Cross Forests
/
projects
/
python
/
fast-export.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfc3ed8
)
don't write out too many merges
author
Simon Hausmann
<simon@luria.(none)>
Mon, 12 Feb 2007 20:44:02 +0000
(21:44 +0100)
committer
Simon Hausmann
<simon@luria.(none)>
Mon, 12 Feb 2007 20:44:02 +0000
(21:44 +0100)
p4-fast-export.py
patch
|
blob
|
history
diff --git
a/p4-fast-export.py
b/p4-fast-export.py
index
f9653f1
..
5838ca3
100755
(executable)
--- a/
p4-fast-export.py
+++ b/
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: