localrepo: have _loadfilter return the loaded filter patterns
authorNicolas Dumazet <nicdumz.commits@gmail.com>
Sun, 10 Oct 2010 19:07:58 +0200
changeset 12706 9ca08fbb750a
parent 12705 d734b3470138
child 12707 2216ab103ea8
localrepo: have _loadfilter return the loaded filter patterns
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Mon Oct 11 13:26:29 2010 -0500
+++ b/mercurial/localrepo.py	Sun Oct 10 19:07:58 2010 +0200
@@ -586,11 +586,10 @@
                     fn = lambda s, c, **kwargs: oldfn(s, c)
                 l.append((mf, fn, params))
             self.filterpats[filter] = l
+        return self.filterpats[filter]
 
     def _filter(self, filter, filename, data):
-        self._loadfilter(filter)
-
-        for mf, fn, cmd in self.filterpats[filter]:
+        for mf, fn, cmd in self._loadfilter[filter]:
             if mf(filename):
                 self.ui.debug("filtering %s through %s\n" % (filename, cmd))
                 data = fn(data, cmd, ui=self.ui, repo=self, filename=filename)