mercurial/merge.py
changeset 44289 9f8eddd2723f
parent 44287 e76d98546bd2
child 44383 218feb1a7e00
--- a/mercurial/merge.py	Thu Jan 30 19:50:43 2020 -0500
+++ b/mercurial/merge.py	Sat Feb 08 10:22:47 2020 -0500
@@ -2698,6 +2698,7 @@
 def purge(
     repo,
     matcher,
+    unknown=True,
     ignored=False,
     removeemptydirs=True,
     removefiles=True,
@@ -2709,7 +2710,9 @@
     ``matcher`` is a matcher configured to scan the working directory -
     potentially a subset.
 
-    ``ignored`` controls whether ignored files should also be purged.
+    ``unknown`` controls whether unknown files should be purged.
+
+    ``ignored`` controls whether ignored files should be purged.
 
     ``removeemptydirs`` controls whether empty directories should be removed.
 
@@ -2746,7 +2749,7 @@
             directories = []
             matcher.traversedir = directories.append
 
-        status = repo.status(match=matcher, ignored=ignored, unknown=True)
+        status = repo.status(match=matcher, ignored=ignored, unknown=unknown)
 
         if removefiles:
             for f in sorted(status.unknown + status.ignored):