Warn about conflicting p4 branch mappings and use the first one found.
Signed-off-by: Simon Hausmann <simon@lst.de>
Simon Hausmann committed
Jun 17, 2007 at 15:10 UTC
1a2edf4e8dff05fea66daf82c675cfab673c1242
1 file changed
+6
contrib/fast-import/git-p4
+6
@@ -957,6 +957,12 @@ class P4Sync(Command):
957
source = source[len(self.depotPaths[0]):-4]
958
destination = destination[len(self.depotPaths[0]):-4]
959
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
+
966
self.knownBranches[destination] = source
967
968
lostAndFoundBranches.discard(destination)