Mercurial > hg-stable
changeset 6140:47e6d5d5913a
Simplify utils.walkrepos().
author | Walter Doerwald <walter@livinglogic.de> |
---|---|
date | Tue, 28 Aug 2007 18:00:07 +0200 |
parents | 989467e8e3a9 |
children | 50a277e6ceae |
files | mercurial/util.py |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Sun Feb 17 21:34:28 2008 +0100 +++ b/mercurial/util.py Tue Aug 28 18:00:07 2007 +0200 @@ -1704,11 +1704,9 @@ raise err for root, dirs, files in os.walk(path, onerror=errhandler): - for d in dirs: - if d == '.hg': - yield root - dirs[:] = [] - break + if '.hg' in dirs: + dirs[:] = [] # don't descend further + yield root # found a repository _rcpath = None