mercurial/util.py
changeset 7537 9e186bda013d
parent 7535 9a962209dc28
parent 7525 6a49fa7674c1
child 7547 4949729ee9ee
--- a/mercurial/util.py	Fri Dec 19 08:42:41 2008 +0100
+++ b/mercurial/util.py	Fri Dec 19 18:49:02 2008 +0100
@@ -1902,13 +1902,12 @@
     for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler):
         if '.hg' in dirs:
             yield root # found a repository
+            qroot = os.path.join(root, '.hg', 'patches')
+            if os.path.isdir(os.path.join(qroot, '.hg')):
+                yield qroot # we have a patch queue repo here
             if recurse:
                 # avoid recursing inside the .hg directory
-                # the mq repository is added in any case
                 dirs.remove('.hg')
-                qroot = os.path.join(root, '.hg', 'patches')
-                if os.path.isdir(os.path.join(qroot, '.hg')):
-                    yield qroot # we have a patch queue repo here
             else:
                 dirs[:] = [] # don't descend further
         elif followsym: