Mercurial > hg-stable
diff mercurial/hg.py @ 669:8aa2a282eda4
.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.
author | mwilli2@localhost.localdomain |
---|---|
date | Sun, 10 Jul 2005 16:03:20 -0800 |
parents | 31a9aa890016 |
children | 4efb9b109292 |
line wrap: on
line diff
--- a/mercurial/hg.py Sun Jul 10 16:02:39 2005 -0800 +++ b/mercurial/hg.py Sun Jul 10 16:03:20 2005 -0800 @@ -397,13 +397,20 @@ 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