--- a/mercurial/cmdutil.py Wed Jul 20 14:12:45 2016 -0500
+++ b/mercurial/cmdutil.py Fri Jul 22 11:29:42 2016 +0000
@@ -2481,14 +2481,15 @@
for f in files:
def insubrepo():
for subpath in wctx.substate:
- if f.startswith(subpath):
+ if f.startswith(subpath + '/'):
return True
return False
count += 1
ui.progress(_('deleting'), count, total=total, unit=_('files'))
isdir = f in deleteddirs or wctx.hasdir(f)
- if f in repo.dirstate or isdir or f == '.' or insubrepo():
+ if (f in repo.dirstate or isdir or f == '.'
+ or insubrepo() or f in subs):
continue
if repo.wvfs.exists(f):