Skip to content

Commit 75b7cb6

Browse files
committed
Merge branch 'kf/p4-multiple-remotes' into seen
* kf/p4-multiple-remotes: git-p4: fix issue with multiple perforce remotes
2 parents 674ea47 + 944db25 commit 75b7cb6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

git-p4.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1051,8 +1051,12 @@ def findUpstreamBranchPoint(head="HEAD"):
10511051
log = extractLogMessageFromGitCommit(tip)
10521052
settings = extractSettingsGitLog(log)
10531053
if "depot-paths" in settings:
1054+
git_branch = "remotes/p4/" + branch
10541055
paths = ",".join(settings["depot-paths"])
1055-
branchByDepotPath[paths] = "remotes/p4/" + branch
1056+
branchByDepotPath[paths] = git_branch
1057+
if "change" in settings:
1058+
paths = paths + ";" + settings["change"]
1059+
branchByDepotPath[paths] = git_branch
10561060

10571061
settings = None
10581062
parent = 0
@@ -1062,6 +1066,10 @@ def findUpstreamBranchPoint(head="HEAD"):
10621066
settings = extractSettingsGitLog(log)
10631067
if "depot-paths" in settings:
10641068
paths = ",".join(settings["depot-paths"])
1069+
if "change" in settings:
1070+
expaths = paths + ";" + settings["change"]
1071+
if expaths in branchByDepotPath:
1072+
return [branchByDepotPath[expaths], settings]
10651073
if paths in branchByDepotPath:
10661074
return [branchByDepotPath[paths], settings]
10671075

0 commit comments

Comments
 (0)