scmutil: rename local function _add_dir_if_not_there
authorAdrian Buehlmann <adrian@cadifra.com>
Fri, 06 May 2011 15:02:53 +0200
changeset 14227 94985b5a8278
parent 14226 73cca883370d
child 14228 116de1da2154
scmutil: rename local function _add_dir_if_not_there
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Fri May 06 14:58:04 2011 +0200
+++ b/mercurial/scmutil.py	Fri May 06 15:02:53 2011 +0200
@@ -319,7 +319,7 @@
         if err.filename == path:
             raise err
     if followsym and hasattr(os.path, 'samestat'):
-        def _add_dir_if_not_there(dirlst, dirname):
+        def adddir(dirlst, dirname):
             match = False
             samestat = os.path.samestat
             dirstat = os.stat(dirname)
@@ -335,7 +335,7 @@
 
     if (seen_dirs is None) and followsym:
         seen_dirs = []
-        _add_dir_if_not_there(seen_dirs, path)
+        adddir(seen_dirs, path)
     for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler):
         dirs.sort()
         if '.hg' in dirs:
@@ -352,7 +352,7 @@
             newdirs = []
             for d in dirs:
                 fname = os.path.join(root, d)
-                if _add_dir_if_not_there(seen_dirs, fname):
+                if adddir(seen_dirs, fname):
                     if os.path.islink(fname):
                         for hgname in walkrepos(fname, True, seen_dirs):
                             yield hgname