diff options
author | 2007-03-10 21:23:49 +0100 | |
---|---|---|
committer | 2007-03-10 21:23:49 +0100 | |
commit | dd87020bd3969dbac5ae26c527bcf50fe0ebb845 (patch) | |
tree | 373f4cf3f092785e5d22f6c57de29b630d1a4aea /contrib/fast-import | |
parent | More work on branch detection by implementing changeIsBranchMerge(). (diff) | |
download | tgif-dd87020bd3969dbac5ae26c527bcf50fe0ebb845.tar.xz |
Reduce the number of false "merges" by skipping "branch from" entries in the integrated output as well as by ignoring integrations of future (newer) changes.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-x | contrib/fast-import/p4-fast-export.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/fast-import/p4-fast-export.py b/contrib/fast-import/p4-fast-export.py index d0832e8c3d..a45068d362 100755 --- a/contrib/fast-import/p4-fast-export.py +++ b/contrib/fast-import/p4-fast-export.py @@ -415,6 +415,7 @@ def changeIsBranchMerge(sourceBranch, destinationBranch, change): for fileName in sourceFiles.keys(): integrations = [] deleted = False + integrationCount = 0 for integration in p4CmdList("integrated \"%s\"" % fileName): toFile = integration["fromFile"] # yes, it's true, it's fromFile if not toFile in destinationFiles: @@ -424,10 +425,15 @@ def changeIsBranchMerge(sourceBranch, destinationBranch, change): # print "file %s has been deleted in %s" % (fileName, toFile) deleted = True break + integrationCount += 1 + if integration["how"] == "branch from": + continue if int(integration["change"]) == change: integrations.append(integration) continue + if int(integration["change"]) > change: + continue destRev = int(destFile["rev"]) @@ -453,7 +459,7 @@ def changeIsBranchMerge(sourceBranch, destinationBranch, change): if deleted: continue - if len(integrations) == 0: + if len(integrations) == 0 and integrationCount > 1: print "file %s was not integrated from %s into %s" % (fileName, sourceBranch, destinationBranch) return False |