From: Simon Hausmann Date: Mon, 12 Feb 2007 20:44:02 +0000 (+0100) Subject: After marking a p4 branch as merged don't ever merge it in git again. X-Git-Tag: v1.5.3-rc0~65^2^2~207 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=53b03239aa899677bcadf69f757354b72797e457;p=git.git After marking a p4 branch as merged don't ever merge it in git again. Signed-off-by: Simon Hausmann --- diff --git a/contrib/fast-import/p4-fast-export.py b/contrib/fast-import/p4-fast-export.py index f9653f134..5838ca3c6 100755 --- a/contrib/fast-import/p4-fast-export.py +++ b/contrib/fast-import/p4-fast-export.py @@ -171,6 +171,8 @@ def commit(details, files, branch, branchPrefix): gitStream.write("from %s\n" % initialParent) initialParent = "" + mergedBranches = set() + for file in files: path = file["path"] if not path.startswith(branchPrefix): @@ -202,8 +204,9 @@ def commit(details, files, branch, branchPrefix): relPath = source[len(globalPrefix):] for branch in knownBranches: - if relPath.startswith(branch): + if relPath.startswith(branch) and branch not in mergedBranches: gitStream.write("merge refs/heads/%s\n" % branch) + mergedBranches.add(branch) break for file in files: