Code

Sort output of "p4 change" in incremental import before further
authorHan-Wen Nienhuys <hanwen@google.com>
Mon, 23 Jul 2007 22:51:49 +0000 (15:51 -0700)
committerSimon Hausmann <simon@lst.de>
Thu, 2 Aug 2007 07:40:25 +0000 (09:40 +0200)
processing

P4 change outputs the changes sorted for each directory separately. We
want the global ordering on the changes, hence we sort.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4

index 1f5a56ee7ffcedb854d84023fdf61570dcffe67e..f00c691a7bf71b00ece3177130533988ddb063c2 100755 (executable)
@@ -1296,7 +1296,7 @@ class P4Sync(Command):
                     changeNum = line.split(" ")[1]
                     changes.append(changeNum)
 
-                changes.reverse()
+                changes.sort()
 
                 if len(self.maxChanges) > 0:
                     changes = changes[0:min(int(self.maxChanges), len(changes))]