Skip to content

Commit

Permalink
Warn about conflicting p4 branch mappings and use the first one found.
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Hausmann <simon@lst.de>
  • Loading branch information
Simon Hausmann committed Jun 17, 2007
1 parent 6555b2c commit 1a2edf4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,12 @@ class P4Sync(Command):
source = source[len(self.depotPaths[0]):-4]
destination = destination[len(self.depotPaths[0]):-4]

if destination in self.knownBranches:
if not self.silent:
print "p4 branch %s defines a mapping from %s to %s" % (info["branch"], source, destination)
print "but there exists another mapping from %s to %s already!" % (self.knownBranches[destination], destination)
continue

self.knownBranches[destination] = source

lostAndFoundBranches.discard(destination)
Expand Down

0 comments on commit 1a2edf4

Please sign in to comment.