aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Hausmann <shausman@trolltech.com>2007-06-17 15:10:24 +0200
committerSimon Hausmann <shausman@trolltech.com>2007-06-17 15:10:24 +0200
commit1a2edf4e8dff05fea66daf82c675cfab673c1242 (patch)
treedd2676820acdb749f5cd7b2648c1707868efced6
parent6555b2ccfe63913b3e5c8b02e117f0f476307ca2 (diff)
downloadgit-1a2edf4e8dff05fea66daf82c675cfab673c1242.tar.gz
git-1a2edf4e8dff05fea66daf82c675cfab673c1242.tar.xz
Warn about conflicting p4 branch mappings and use the first one found.
Signed-off-by: Simon Hausmann <simon@lst.de>
-rwxr-xr-xcontrib/fast-import/git-p46
1 files changed, 6 insertions, 0 deletions
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)