Mercurial > hg-stable
changeset 14220:21b8ce4d3331
rename path_auditor to pathauditor
The Mercurial 1.9 release is moving a lot of stuff around anyway and we are
already moving path_auditor from util.py to scmutil.py for that release.
So this seems like a good opportunity to do such a rename. It also strengthens
the current project policy to avoid underbars in names.
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Fri, 06 May 2011 09:54:06 +0200 |
parents | c33427080671 |
children | 680c3c6fcb48 |
files | mercurial/cmdutil.py mercurial/commands.py mercurial/localrepo.py mercurial/merge.py mercurial/scmutil.py mercurial/subrepo.py |
diffstat | 6 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Fri May 06 12:09:20 2011 +0200 +++ b/mercurial/cmdutil.py Fri May 06 09:54:06 2011 +0200 @@ -286,7 +286,7 @@ similarity = float(opts.get('similarity') or 0) # we'd use status here, except handling of symlinks and ignore is tricky added, unknown, deleted, removed = [], [], [], [] - audit_path = scmutil.path_auditor(repo.root) + audit_path = scmutil.pathauditor(repo.root) m = match(repo, pats, opts) for abs in repo.walk(m): target = repo.wjoin(abs)
--- a/mercurial/commands.py Fri May 06 12:09:20 2011 +0200 +++ b/mercurial/commands.py Fri May 06 09:54:06 2011 +0200 @@ -3618,7 +3618,7 @@ fc = ctx[f] repo.wwrite(f, fc.data(), fc.flags()) - audit_path = scmutil.path_auditor(repo.root) + audit_path = scmutil.pathauditor(repo.root) for f in remove[0]: if repo.dirstate[f] == 'a': repo.dirstate.forget(f)
--- a/mercurial/localrepo.py Fri May 06 12:09:20 2011 +0200 +++ b/mercurial/localrepo.py Fri May 06 09:54:06 2011 +0200 @@ -30,7 +30,7 @@ self.root = os.path.realpath(util.expandpath(path)) self.path = os.path.join(self.root, ".hg") self.origroot = path - self.auditor = scmutil.path_auditor(self.root, self._checknested) + self.auditor = scmutil.pathauditor(self.root, self._checknested) self.opener = scmutil.opener(self.path) self.wopener = scmutil.opener(self.root) self.baseui = baseui
--- a/mercurial/merge.py Fri May 06 12:09:20 2011 +0200 +++ b/mercurial/merge.py Fri May 06 09:54:06 2011 +0200 @@ -302,7 +302,7 @@ repo.ui.debug("removing %s\n" % f) os.unlink(repo.wjoin(f)) - audit_path = scmutil.path_auditor(repo.root) + audit_path = scmutil.pathauditor(repo.root) numupdates = len(action) for i, a in enumerate(action):
--- a/mercurial/scmutil.py Fri May 06 12:09:20 2011 +0200 +++ b/mercurial/scmutil.py Fri May 06 09:54:06 2011 +0200 @@ -57,7 +57,7 @@ self._ui.warn(_("warning: %s\n") % msg) map[fl] = f -class path_auditor(object): +class pathauditor(object): '''ensure that a filesystem path contains no banned components. the following properties of a path are checked: @@ -169,7 +169,7 @@ def __init__(self, base, audit=True): self.base = base if audit: - self.auditor = path_auditor(base) + self.auditor = pathauditor(base) else: self.auditor = util.always self.createmode = None @@ -276,7 +276,7 @@ name = os.path.join(root, cwd, name) name = os.path.normpath(name) if auditor is None: - auditor = path_auditor(root) + auditor = pathauditor(root) if name != rootsep and name.startswith(rootsep): name = name[len(rootsep):] auditor(name)
--- a/mercurial/subrepo.py Fri May 06 12:09:20 2011 +0200 +++ b/mercurial/subrepo.py Fri May 06 09:54:06 2011 +0200 @@ -235,7 +235,7 @@ import hg as h hg = h - scmutil.path_auditor(ctx._repo.root)(path) + scmutil.pathauditor(ctx._repo.root)(path) state = ctx.substate.get(path, nullstate) if state[2] not in types: raise util.Abort(_('unknown subrepo type %s') % state[2])