mercurial/cmdutil.py
changeset 11223 0d09f2244805
parent 11177 6a64813276ed
child 11231 1107888a1ad1
--- a/mercurial/cmdutil.py	Tue May 25 18:45:44 2010 +0200
+++ b/mercurial/cmdutil.py	Wed May 26 16:16:47 2010 +0200
@@ -351,12 +351,13 @@
 
     def walkpat(pat):
         srcs = []
+        badstates = after and '?' or '?r'
         m = match(repo, [pat], opts, globbed=True)
         for abs in repo.walk(m):
             state = repo.dirstate[abs]
             rel = m.rel(abs)
             exact = m.exact(abs)
-            if state in '?r':
+            if state in badstates:
                 if exact and state == '?':
                     ui.warn(_('%s: not copying - file is not managed\n') % rel)
                 if exact and state == 'r':