mercurial/scmutil.py
changeset 18626 b114e41c4df3
parent 18624 4db216b1c154
child 18668 4034b8d551b1
equal deleted inserted replaced
18625:2cbd27f4f3c4 18626:b114e41c4df3
   750     m.bad = lambda x, y: rejected.append(x)
   750     m.bad = lambda x, y: rejected.append(x)
   751 
   751 
   752     ctx = repo[None]
   752     ctx = repo[None]
   753     walkresults = repo.dirstate.walk(m, sorted(ctx.substate), True, False)
   753     walkresults = repo.dirstate.walk(m, sorted(ctx.substate), True, False)
   754     for abs in sorted(walkresults):
   754     for abs in sorted(walkresults):
   755         good = audit_path.check(abs)
       
   756 
       
   757         st = walkresults[abs]
   755         st = walkresults[abs]
   758         dstate = repo.dirstate[abs]
   756         dstate = repo.dirstate[abs]
   759         if good and dstate == '?':
   757         if dstate == '?' and audit_path.check(abs):
   760             unknown.append(abs)
   758             unknown.append(abs)
   761             if repo.ui.verbose or not m.exact(abs):
   759             if repo.ui.verbose or not m.exact(abs):
   762                 rel = m.rel(abs)
   760                 rel = m.rel(abs)
   763                 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs))
   761                 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs))
   764         elif (dstate != 'r' and
   762         elif (dstate != 'r' and (not st or
   765               (not good or not st or
       
   766                (stat.S_ISDIR(st.st_mode) and not stat.S_ISLNK(st.st_mode)))):
   763                (stat.S_ISDIR(st.st_mode) and not stat.S_ISLNK(st.st_mode)))):
   767             deleted.append(abs)
   764             deleted.append(abs)
   768             if repo.ui.verbose or not m.exact(abs):
   765             if repo.ui.verbose or not m.exact(abs):
   769                 rel = m.rel(abs)
   766                 rel = m.rel(abs)
   770                 repo.ui.status(_('removing %s\n') % ((pats and rel) or abs))
   767                 repo.ui.status(_('removing %s\n') % ((pats and rel) or abs))