diff -r 518afef5e350 -r 90487273f59c mercurial/util.py --- a/mercurial/util.py Tue Dec 09 09:58:13 2008 +0000 +++ b/mercurial/util.py Wed Dec 10 00:29:10 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')):