]> thyrsus.com Git - comparator.git/commitdiff
Sort output.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 28 Aug 2003 03:28:08 +0000 (03:28 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 28 Aug 2003 03:28:08 +0000 (03:28 +0000)
shredcompare.py

index e0a2185a80b4eba684dac39d21997f3a788d00b8..d41668a0606689f169c2a0328e4ee4f7c8796643 100755 (executable)
@@ -184,7 +184,9 @@ def shredcompare(tree1, tree2, shredsize, verbose):
                 matches[j][1].merge(matches[i][1])
                 matches[i] = None
                 retry = True
-    return filter(lambda x: x, matches)
+    matches = filter(lambda x: x, matches)
+    matches.sort(lambda x, y: cmp(x[0], y[0])) # by source chunk
+    return matches
 
 if __name__ == '__main__':
     mark_time = None