hgext/purge.py
changeset 22265 fe22d86a8992
parent 21994 c6e1f2c6d5f1
child 22920 e049338d1a7b
--- a/hgext/purge.py	Thu Aug 21 16:05:29 2014 -0700
+++ b/hgext/purge.py	Wed Aug 20 15:07:25 2014 -0700
@@ -95,9 +95,10 @@
         else:
             ui.write('%s%s' % (name, eol))
 
-    directories = []
     match = scmutil.match(repo[None], dirs, opts)
-    match.explicitdir = match.traversedir = directories.append
+    if removedirs:
+        directories = []
+        match.explicitdir = match.traversedir = directories.append
     status = repo.status(match=match, ignored=opts['all'], unknown=True)
 
     if removefiles: