Patchwork D2927: localrepo: make filterpats private (API)

login
register
mail settings
Submitter phabricator
Date March 28, 2018, 10:06 a.m.
Message ID <bb8cf7c38865d5dfcd6f56ee5211ceb2@localhost.localdomain>
Download mbox | patch
Permalink /patch/29916/
State Not Applicable
Headers show

Comments

phabricator - March 28, 2018, 10:06 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGdb90a5793103: localrepo: make filterpats private (API) (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2927?vs=7219&id=7350

REVISION DETAIL
  https://phab.mercurial-scm.org/D2927

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -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: