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)
%{_libdir}/python*/site-packages/comparator.py
%changelog
-* Thu Jul 8 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 2.5-1
-- Alan Burlinson's tweaks to ease porting to SunOS.
+* Sat Aug 7 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 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 <esr@snark.thyrsus.com> 2.4-1
- Fixed strtok() bug apparently introduced by C library change.