From: Eric S. Raymond Date: Thu, 28 Aug 2003 03:28:08 +0000 (+0000) Subject: Sort output. X-Git-Tag: 1.0~128 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=5b98e70dc7033ea725d20bc509c4227d5bec8b57;p=comparator.git Sort output. --- diff --git a/shredcompare.py b/shredcompare.py index e0a2185..d41668a 100755 --- a/shredcompare.py +++ b/shredcompare.py @@ -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