Skip to content

Commit 1a2edf4

Browse files
committed
Warn about conflicting p4 branch mappings and use the first one found.
Signed-off-by: Simon Hausmann <[email protected]>
1 parent 6555b2c commit 1a2edf4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

contrib/fast-import/git-p4

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,12 @@ class P4Sync(Command):
957957
source = source[len(self.depotPaths[0]):-4]
958958
destination = destination[len(self.depotPaths[0]):-4]
959959

960+
if destination in self.knownBranches:
961+
if not self.silent:
962+
print "p4 branch %s defines a mapping from %s to %s" % (info["branch"], source, destination)
963+
print "but there exists another mapping from %s to %s already!" % (self.knownBranches[destination], destination)
964+
continue
965+
960966
self.knownBranches[destination] = source
961967

962968
lostAndFoundBranches.discard(destination)

0 commit comments

Comments
 (0)