From: Eric S. Raymond Date: Sat, 7 Aug 2004 16:43:57 +0000 (+0000) Subject: Ready to ship 2.5. X-Git-Tag: 2.5 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=aac9ca138716c50fdbd25879cfb42874ccfbf024;p=comparator.git Ready to ship 2.5. --- diff --git a/comparator.py b/comparator.py index 9e9a219..87b9c75 100644 --- a/comparator.py +++ b/comparator.py @@ -118,17 +118,20 @@ class CommonReport: def cliquefilter(self, predicate): self.read_matches() filtered = [] + # Any patch band that matches the predicate keeps the entire clique. for clique in self.cliques: for (file, start, end) in clique: if predicate(file, start, end): filtered.append(clique) break - else: - for (treename, properties) in self.trees: - if treename == file.split("/")[0]: - break - properties['matches'] -= 1 - properties['matchlines'] -= end - start + 1 + # Correct the statistics for each clique not kept. + for clique in self.cliques: + if clique not in filtered: + for (file, start, end) in clique: + for (treename, properties) in self.trees: + if treename == file.split("/")[0]: + properties['matches'] -= 1 + properties['matchlines'] -= end - start + 1 self.cliques = filtered self.matches = len(filtered) diff --git a/comparator.spec b/comparator.spec index 1841c6f..488cd2d 100644 --- a/comparator.spec +++ b/comparator.spec @@ -44,8 +44,11 @@ cp comparator.py "$RPM_BUILD_ROOT"${pylib} %{_libdir}/python*/site-packages/comparator.py %changelog -* Thu Jul 8 2004 Eric S. Raymond - 2.5-1 -- Alan Burlinson's tweaks to ease porting to SunOS. +* Sat Aug 7 2004 Eric S. Raymond - 2.5-1 +- Alan Burlinson's tweaks to ease porting to SunOS. Emil Sit's + dramatic speedup for SCF-file reads. Fix incorrect statistics + generation with filterator -mfF options -- counts were too high. + Documentation fixes. * Thu Mar 11 2004 Eric S. Raymond 2.4-1 - Fixed strtok() bug apparently introduced by C library change.