# HG changeset patch # User Matt Mackall # Date 1216749797 18000 # Node ID 177b3186f78a3a69ef653bc197460760fe0689cd # Parent c3fb7dc51a4bac70964519f7e7bf54d51f56ca9a dirstate.walk: unify match.dir logic diff -r c3fb7dc51a4b -r 177b3186f78a mercurial/dirstate.py --- a/mercurial/dirstate.py Tue Jul 22 13:03:16 2008 -0500 +++ b/mercurial/dirstate.py Tue Jul 22 13:03:17 2008 -0500 @@ -506,11 +506,11 @@ if dirignore(nf): continue - if hasattr(match, 'dir'): - match.dir(nf) wadd(nf) while work: nd = work.pop() + if hasattr(match, 'dir'): + match.dir(nd) entries = listdir(_join(nd), stat=True) # nd is the top of the repository dir tree if nd == '.': @@ -532,8 +532,6 @@ if kind == stat.S_IFDIR: if not ignore(nf): wadd(nf) - if hasattr(match, 'dir'): - match.dir(nf) if nf in dmap and match(nf): add((nf, None)) elif imatch(nf):