Skip to content

Commit

Permalink
Merge branch 'kf/p4-multiple-remotes' into seen
Browse files Browse the repository at this point in the history
* kf/p4-multiple-remotes:
  git-p4: fix issue with multiple perforce remotes
  • Loading branch information
gitster committed Mar 21, 2022
2 parents 5e8a29a + 944db25 commit d9bc890
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion git-p4.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,12 @@ def findUpstreamBranchPoint(head="HEAD"):
log = extractLogMessageFromGitCommit(tip)
settings = extractSettingsGitLog(log)
if "depot-paths" in settings:
git_branch = "remotes/p4/" + branch
paths = ",".join(settings["depot-paths"])
branchByDepotPath[paths] = "remotes/p4/" + branch
branchByDepotPath[paths] = git_branch
if "change" in settings:
paths = paths + ";" + settings["change"]
branchByDepotPath[paths] = git_branch

settings = None
parent = 0
Expand All @@ -1062,6 +1066,10 @@ def findUpstreamBranchPoint(head="HEAD"):
settings = extractSettingsGitLog(log)
if "depot-paths" in settings:
paths = ",".join(settings["depot-paths"])
if "change" in settings:
expaths = paths + ";" + settings["change"]
if expaths in branchByDepotPath:
return [branchByDepotPath[expaths], settings]
if paths in branchByDepotPath:
return [branchByDepotPath[paths], settings]

Expand Down

0 comments on commit d9bc890

Please sign in to comment.