summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da4a660)
raw | patch | inline | side by side (parent: da4a660)
author | Simon Hausmann <shausman@trolltech.com> | |
Sun, 17 Jun 2007 09:25:34 +0000 (11:25 +0200) | ||
committer | Simon Hausmann <shausman@trolltech.com> | |
Sun, 17 Jun 2007 09:25:59 +0000 (11:25 +0200) |
Collect "unknown" source branches separately and register them at the end.
Also added a minor speed up to splitFilesIntoBranches by breaking out of the loop through all branches when it's safe.
Signed-off-by: Simon Hausmann <simon@lst.de>
Also added a minor speed up to splitFilesIntoBranches by breaking out of the loop through all branches when it's safe.
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4 | patch | blob | history |
index d1f8d3b78d12c95e580750c3c0b02d54865f5da5..3b6d8a09d1fabcf877b5f9967eaadf50c0b8df2e 100755 (executable)
if branch not in branches:
branches[branch] = []
branches[branch].append(file)
+ break
return branches
return p
def getBranchMapping(self):
+ lostAndFoundBranches = set()
+
for info in p4CmdList("branches"):
details = p4Cmd("branch -o %s" % info["branch"])
viewIdx = 0
if source.startswith(self.depotPaths[0]) and destination.startswith(self.depotPaths[0]):
source = source[len(self.depotPaths[0]):-4]
destination = destination[len(self.depotPaths[0]):-4]
- if destination not in self.knownBranches:
- self.knownBranches[destination] = source
+
+ self.knownBranches[destination] = source
+
+ lostAndFoundBranches.discard(destination)
+
if source not in self.knownBranches:
- self.knownBranches[source] = source
+ lostAndFoundBranches.add(source)
+
+
+ for branch in lostAndFoundBranches:
+ self.knownBranches[branch] = branch
def listExistingP4GitBranches(self):
self.p4BranchesInGit = []