mercurial/cmdutil.py
branchstable
changeset 29622 9c2cc107547f
parent 29498 1b38cfde9530
child 29633 bc5148d0a446
equal deleted inserted replaced
29621:d3df009ab117 29622:9c2cc107547f
  2479     total = len(files)
  2479     total = len(files)
  2480     count = 0
  2480     count = 0
  2481     for f in files:
  2481     for f in files:
  2482         def insubrepo():
  2482         def insubrepo():
  2483             for subpath in wctx.substate:
  2483             for subpath in wctx.substate:
  2484                 if f.startswith(subpath):
  2484                 if f.startswith(subpath + '/'):
  2485                     return True
  2485                     return True
  2486             return False
  2486             return False
  2487 
  2487 
  2488         count += 1
  2488         count += 1
  2489         ui.progress(_('deleting'), count, total=total, unit=_('files'))
  2489         ui.progress(_('deleting'), count, total=total, unit=_('files'))
  2490         isdir = f in deleteddirs or wctx.hasdir(f)
  2490         isdir = f in deleteddirs or wctx.hasdir(f)
  2491         if f in repo.dirstate or isdir or f == '.' or insubrepo():
  2491         if (f in repo.dirstate or isdir or f == '.'
       
  2492             or insubrepo() or f in subs):
  2492             continue
  2493             continue
  2493 
  2494 
  2494         if repo.wvfs.exists(f):
  2495         if repo.wvfs.exists(f):
  2495             if repo.wvfs.isdir(f):
  2496             if repo.wvfs.isdir(f):
  2496                 warnings.append(_('not removing %s: no tracked files\n')
  2497                 warnings.append(_('not removing %s: no tracked files\n')