From: Simon Hausmann Date: Sun, 17 Jun 2007 13:10:24 +0000 (+0200) Subject: Warn about conflicting p4 branch mappings and use the first one found. X-Git-Tag: v1.5.3-rc0~65^2^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1a2edf4e8dff05fea66daf82c675cfab673c1242;p=git.git Warn about conflicting p4 branch mappings and use the first one found. Signed-off-by: Simon Hausmann --- diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 3b6d8a09d..204059138 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -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)