mercurial/util.py
changeset 7494 85dc88630beb
parent 7461 2a67430f92f1
child 7495 90487273f59c
child 7523 e60aaae83323
--- 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')):