From 5b98e70dc7033ea725d20bc509c4227d5bec8b57 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 28 Aug 2003 03:28:08 +0000 Subject: [PATCH] Sort output. --- shredcompare.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.43.0