mercurial/narrowspec.py
changeset 42213 84bd6ae2d1f6
parent 42192 770f5f586ae5
child 42423 0c0a22f5b0b5
--- a/mercurial/narrowspec.py	Wed Apr 17 14:37:06 2019 +0200
+++ b/mercurial/narrowspec.py	Wed Apr 17 10:49:11 2019 -0700
@@ -293,8 +293,8 @@
     removedmatch = matchmod.differencematcher(oldmatch, newmatch)
 
     ds = repo.dirstate
-    lookup, status = ds.status(removedmatch, subrepos=[], ignored=False,
-                               clean=True, unknown=False)
+    lookup, status = ds.status(removedmatch, subrepos=[], ignored=True,
+                               clean=True, unknown=True)
     trackeddirty = status.modified + status.added
     clean = status.clean
     if assumeclean:
@@ -306,6 +306,10 @@
     uipathfn = scmutil.getuipathfn(repo)
     for f in sorted(trackeddirty):
         repo.ui.status(_('not deleting possibly dirty file %s\n') % uipathfn(f))
+    for f in sorted(status.unknown):
+        repo.ui.status(_('not deleting unknown file %s\n') % uipathfn(f))
+    for f in sorted(status.ignored):
+        repo.ui.status(_('not deleting ignored file %s\n') % uipathfn(f))
     for f in clean + trackeddirty:
         ds.drop(f)