Avoid creating non-p4 branches in remotes/p4 off of remotes/origin
Signed-off-by: Simon Hausmann <simon@lst.de>
This commit is contained in:
parent
10f880f8d4
commit
65c5f3e3f2
@ -802,19 +802,23 @@ class P4Sync(Command):
|
|||||||
for line in mypopen("git rev-parse --symbolic --remotes"):
|
for line in mypopen("git rev-parse --symbolic --remotes"):
|
||||||
if (not line.startswith("origin/")) or line.endswith("HEAD\n"):
|
if (not line.startswith("origin/")) or line.endswith("HEAD\n"):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
headName = line[len("origin/"):-1]
|
headName = line[len("origin/"):-1]
|
||||||
remoteHead = self.refPrefix + headName
|
remoteHead = self.refPrefix + headName
|
||||||
originHead = "origin/" + headName
|
originHead = "origin/" + headName
|
||||||
|
|
||||||
|
[originPreviousDepotPath, originP4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(originHead))
|
||||||
|
if len(originPreviousDepotPath) == 0 or len(originP4Change) == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
update = False
|
update = False
|
||||||
if not os.path.exists(gitdir + "/" + remoteHead):
|
if not os.path.exists(gitdir + "/" + remoteHead):
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
print "creating %s" % remoteHead
|
print "creating %s" % remoteHead
|
||||||
update = True
|
update = True
|
||||||
else:
|
else:
|
||||||
[originPreviousDepotPath, originP4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(originHead))
|
|
||||||
[p4PreviousDepotPath, p4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(remoteHead))
|
[p4PreviousDepotPath, p4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(remoteHead))
|
||||||
if len(originPreviousDepotPath) > 0 and len(originP4Change) > 0 and len(p4Change) > 0:
|
if len(p4Change) > 0:
|
||||||
if originPreviousDepotPath == p4PreviousDepotPath:
|
if originPreviousDepotPath == p4PreviousDepotPath:
|
||||||
originP4Change = int(originP4Change)
|
originP4Change = int(originP4Change)
|
||||||
p4Change = int(p4Change)
|
p4Change = int(p4Change)
|
||||||
|
Loading…
Reference in New Issue
Block a user