diff 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
line wrap: on
line diff
--- a/mercurial/util.py	Sat Dec 06 20:10:31 2008 +0100
+++ b/mercurial/util.py	Wed Dec 10 00:16:12 2008 +0100
@@ -1901,7 +1901,7 @@
         _add_dir_if_not_there(seen_dirs, path)
     for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler):
         if '.hg' in dirs:
-            dirs.remove('.hg') # don't recurse inside the .hg directory
+            dirs[:] = [] # don't descend further
             yield root # found a repository
             qroot = os.path.join(root, '.hg', 'patches')
             if os.path.isdir(os.path.join(qroot, '.hg')):