localrepo: make filterpats private (API)
authorGregory Szorc <gregory.szorc@gmail.com>
Tue, 20 Mar 2018 18:02:16 -0700
changeset 37137 db90a5793103
parent 37136 e2d386b8a38f
child 37138 4d63f3bc1e1a
localrepo: make filterpats private (API) I'm not sure why this is available on the public API. AFAICT it isn't used outside of the class. .. api:: localrepo.localrepository.filterpats was renamed to localrepo.localrepository._filterpats. Differential Revision: https://phab.mercurial-scm.org/D2927
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Tue Mar 20 17:34:05 2018 -0700
+++ b/mercurial/localrepo.py	Tue Mar 20 18:02:16 2018 -0700
@@ -495,7 +495,7 @@
 
         self._branchcaches = {}
         self._revbranchcache = None
-        self.filterpats = {}
+        self._filterpats = {}
         self._datafilters = {}
         self._transref = self._lockref = self._wlockref = None
 
@@ -1098,7 +1098,7 @@
         return self.dirstate.pathto(f, cwd)
 
     def _loadfilter(self, filter):
-        if filter not in self.filterpats:
+        if filter not in self._filterpats:
             l = []
             for pat, cmd in self.ui.configitems(filter):
                 if cmd == '!':
@@ -1118,8 +1118,8 @@
                     oldfn = fn
                     fn = lambda s, c, **kwargs: oldfn(s, c)
                 l.append((mf, fn, params))
-            self.filterpats[filter] = l
-        return self.filterpats[filter]
+            self._filterpats[filter] = l
+        return self._filterpats[filter]
 
     def _filter(self, filterpats, filename, data):
         for mf, fn, cmd in filterpats: