D2927: localrepo: make filterpats private (API)
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Thu Mar 22 00:12:31 UTC 2018
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2927
AFFECTED FILES
mercurial/localrepo.py
CHANGE DETAILS
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -491,7 +491,7 @@
self._branchcaches = {}
self._revbranchcache = None
- self.filterpats = {}
+ self._filterpats = {}
self._datafilters = {}
self._transref = self._lockref = self._wlockref = None
@@ -1094,7 +1094,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 == '!':
@@ -1114,8 +1114,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:
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list