# HG changeset patch # User mwilli2@localhost.localdomain # Date 1121040200 28800 # Node ID 8aa2a282eda4f627a2aa4587dfd6c7212c8dddb3 # Parent d93f0b127b6ad827268737c0eeea477f92d63709 .hgignore speedups patch incorporating Matt's feedback. # HG changeset patch # User mwilli2@localhost.localdomain # Node ID c78a9d4398c63b6bc689e456e1cab3850a846c8a # Parent 8c89408a7154d2da94766e957a088407fd0fef93 .hgignore speedups patch incorporating Matt's feedback. diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -397,13 +397,20 @@ class dirstate: if os.path.isdir(f): for dir, subdirs, fl in os.walk(f): d = dir[len(self.root) + 1:] - if ".hg" in subdirs: subdirs.remove(".hg") + if ".hg" in subdirs: + subdirs.remove(".hg") + for sd in subdirs: + if ignore(os.path.join(d, sd + '/')): + subdirs.remove(sd) for fn in fl: fn = util.pconvert(os.path.join(d, fn)) yield fn else: yield f[len(self.root) + 1:] + for k in dc.keys(): + yield k + for fn in util.unique(walk(files)): try: s = os.stat(os.path.join(self.root, fn)) except: continue