changeset 14227:94985b5a8278

scmutil: rename local function _add_dir_if_not_there
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 06 May 2011 15:02:53 +0200
parents 73cca883370d
children 116de1da2154
files mercurial/scmutil.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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