diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-05-21 01:26:55 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-05-21 01:26:55 +0300 |
commit | 586f23705c639d08fc3c1f1489cdec57e18a1fe9 (patch) | |
tree | 9ce78053165b26ea67955bad4872abc3c94c4611 /git-p4.py | |
parent | af3a3205d14561e1683ca86b894888f9f1fc0176 (diff) | |
parent | 944db25c603ec56aeea95c193a4b74eb5da5d90d (diff) |
Merge branch 'kf/p4-multiple-remotes'
"git p4" update.
* kf/p4-multiple-remotes:
git-p4: fix issue with multiple perforce remotes
Diffstat (limited to 'git-p4.py')
-rwxr-xr-x | git-p4.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1080,8 +1080,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 @@ -1091,6 +1095,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] |