mercurial/util.py
changeset 7201 b1aea76f7001
parent 7164 cae820101762
child 7223 5d14b06b1cc1
--- a/mercurial/util.py	Wed Oct 22 13:14:52 2008 +0200
+++ b/mercurial/util.py	Wed Oct 22 18:23:32 2008 +0200
@@ -1852,7 +1852,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[:] = [] # don't descend further
+            dirs.remove('.hg') # don't recurse inside the .hg directory
             yield root # found a repository
             qroot = os.path.join(root, '.hg', 'patches')
             if os.path.isdir(os.path.join(qroot, '.hg')):