diff mercurial/scmutil.py @ 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 0e4753807c93
children f4189866c76c
line wrap: on
line diff
--- 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)