comparison mercurial/dirstate.py @ 19171:252de7b77cfd

dirstate.walk: move dirignore filter out of explicit walk code This is a move towards factoring this code out into a separate function.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 07 May 2013 09:47:10 -0700
parents b184e5041f2f
children c6cea2e2031b
comparison
equal deleted inserted replaced
19170:b184e5041f2f 19171:252de7b77cfd
624 if nf in dmap: 624 if nf in dmap:
625 #file deleted on disk but still in dirstate 625 #file deleted on disk but still in dirstate
626 results[nf] = None 626 results[nf] = None
627 if matchedir: 627 if matchedir:
628 matchedir(nf) 628 matchedir(nf)
629 if not dirignore(nf): 629 wadd(nf)
630 wadd(nf)
631 elif kind == regkind or kind == lnkkind: 630 elif kind == regkind or kind == lnkkind:
632 results[nf] = st 631 results[nf] = st
633 else: 632 else:
634 badfn(ff, badtype(kind)) 633 badfn(ff, badtype(kind))
635 if nf in dmap: 634 if nf in dmap:
646 dirsnotfound.append(nf) 645 dirsnotfound.append(nf)
647 skipstep3 = False 646 skipstep3 = False
648 break 647 break
649 else: 648 else:
650 badfn(ff, inst.strerror) 649 badfn(ff, inst.strerror)
650
651 work = [d for d in work if not dirignore(d)]
652 wadd = work.append
651 653
652 # step 2: visit subdirectories 654 # step 2: visit subdirectories
653 while work: 655 while work:
654 nd = work.pop() 656 nd = work.pop()
655 skip = None 657 skip = None