[PATCH 2 of 3] util.walkrepos() follows symbolic links to directories

Robin Farine robin.farine at terminus.org
Fri Dec 22 16:53:13 CST 2006


# HG changeset patch
# User Robin Farine <robin.farine at terminus.org>
# Date 1166829598 -3600
# Node ID 1dff63c75ba0911e8dfeb6543a6a5309ee1a44a4
# Parent  6fbd69149e27e13bb466b99e812f4ebfbbecfd30
util.walkrepos() follows symbolic links to directories

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1268,6 +1268,11 @@ def walkrepos(path):
             if d == '.hg':
                 yield root
                 dirs.remove(d)
+            else:
+                p = os.path.join(root, d)
+                if os.path.islink(p):
+                    for r in walkrepos(p):
+                        yield r
 
 _rcpath = None
 


More information about the Mercurial-devel mailing list