]> thyrsus.com Git - comparator.git/commitdiff
Drastically cut the report volume on similar versions
authorEric S. Raymond <esr@thyrsus.com>
Tue, 16 Sep 2003 00:52:19 +0000 (00:52 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 16 Sep 2003 00:52:19 +0000 (00:52 +0000)
filterator

index af6251186bec3852ac6d64d1e5fccc6571017101..c15dd09b28faadc8f4c639df6d5e7da333852d06 100755 (executable)
@@ -91,6 +91,9 @@ def report_common(stats=1,list=1):
                               int(m.group(3)), int(m.group(4))))
         if line == '%%\n':
             for (file, start, end, length) in locations:
+                if start == 1 and end == length:
+                    print "%% %s:%d-%d: entire (%d matches)" % (file, start, end, len(locations))
+                    continue
                 if end - start + 1 < minsize:
                     continue
                 try:
@@ -131,7 +134,7 @@ def report_common(stats=1,list=1):
                         count += 1
                         lines += end - start + 1
                         if list:
-                            print "%% %s:%s-%s: (%d matches)" % (file, start, end, len(locations))
+                            print "%% %s:%d-%d: (%d matches)" % (file, start, end, len(locations))
                             sys.stdout.write(text)
                     locations = []
                     break