Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 7494:85dc88630beb
util: disable walkrepo() recursive behaviour
Revert b1aea76f700 and 268c582bd42a for performances reasons. Traversing
checkout working directories may be too expensive.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 10 Dec 2008 00:16:12 +0100 |
parents | 2a67430f92f1 |
children | 90487273f59c e60aaae83323 |
comparison
equal
deleted
inserted
replaced
7476:6644c111f9e9 | 7494:85dc88630beb |
---|---|
1899 if (seen_dirs is None) and followsym: | 1899 if (seen_dirs is None) and followsym: |
1900 seen_dirs = [] | 1900 seen_dirs = [] |
1901 _add_dir_if_not_there(seen_dirs, path) | 1901 _add_dir_if_not_there(seen_dirs, path) |
1902 for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler): | 1902 for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler): |
1903 if '.hg' in dirs: | 1903 if '.hg' in dirs: |
1904 dirs.remove('.hg') # don't recurse inside the .hg directory | 1904 dirs[:] = [] # don't descend further |
1905 yield root # found a repository | 1905 yield root # found a repository |
1906 qroot = os.path.join(root, '.hg', 'patches') | 1906 qroot = os.path.join(root, '.hg', 'patches') |
1907 if os.path.isdir(os.path.join(qroot, '.hg')): | 1907 if os.path.isdir(os.path.join(qroot, '.hg')): |
1908 yield qroot # we have a patch queue repo here | 1908 yield qroot # we have a patch queue repo here |
1909 elif followsym: | 1909 elif followsym: |