##// END OF EJS Templates
scmutil: rename local function _add_dir_if_not_there
Adrian Buehlmann -
r14227:94985b5a default
parent child Browse files
Show More
@@ -319,7 +319,7 b' def walkrepos(path, followsym=False, see'
319 if err.filename == path:
319 if err.filename == path:
320 raise err
320 raise err
321 if followsym and hasattr(os.path, 'samestat'):
321 if followsym and hasattr(os.path, 'samestat'):
322 def _add_dir_if_not_there(dirlst, dirname):
322 def adddir(dirlst, dirname):
323 match = False
323 match = False
324 samestat = os.path.samestat
324 samestat = os.path.samestat
325 dirstat = os.stat(dirname)
325 dirstat = os.stat(dirname)
@@ -335,7 +335,7 b' def walkrepos(path, followsym=False, see'
335
335
336 if (seen_dirs is None) and followsym:
336 if (seen_dirs is None) and followsym:
337 seen_dirs = []
337 seen_dirs = []
338 _add_dir_if_not_there(seen_dirs, path)
338 adddir(seen_dirs, path)
339 for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler):
339 for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler):
340 dirs.sort()
340 dirs.sort()
341 if '.hg' in dirs:
341 if '.hg' in dirs:
@@ -352,7 +352,7 b' def walkrepos(path, followsym=False, see'
352 newdirs = []
352 newdirs = []
353 for d in dirs:
353 for d in dirs:
354 fname = os.path.join(root, d)
354 fname = os.path.join(root, d)
355 if _add_dir_if_not_there(seen_dirs, fname):
355 if adddir(seen_dirs, fname):
356 if os.path.islink(fname):
356 if os.path.islink(fname):
357 for hgname in walkrepos(fname, True, seen_dirs):
357 for hgname in walkrepos(fname, True, seen_dirs):
358 yield hgname
358 yield hgname
General Comments 0
You need to be logged in to leave comments. Login now