[cig-commits] commit: enumerate_repos() does not skip directories by accident any more.
Mercurial
hg at geodynamics.org
Mon Nov 24 11:27:04 PST 2008
changeset: 46:8075151c30e9
user: Simon Law <simon at akoha.org>
date: Fri Jun 01 15:50:18 2007 -0400
files: forest.py
description:
enumerate_repos() does not skip directories by accident any more.
diff -r c00f4879211c -r 8075151c30e9 forest.py
--- a/forest.py Fri Mar 30 18:25:54 2007 +0200
+++ b/forest.py Fri Jun 01 15:50:18 2007 -0400
@@ -90,7 +90,8 @@ def enumerate_repos(ui, top, walkhg):
while paths:
path = paths.pop()
for root, dirs, files in os.walk(path, onerror=errhandler):
- for d in dirs:
+ hgdirs = dirs[:] # Shallow-copy to protect d from dirs.remove()
+ for d in hgdirs:
if d == '.hg':
res.append(root)
dirs.remove(d)
More information about the CIG-COMMITS
mailing list