mercurial/commands.py
changeset 4374 de612b5f8d59
parent 4325 aa26759c6fb3
child 4378 e89f9afc462b
child 4379 f4af7960d578
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -503,7 +503,7 @@ def docopy(ui, repo, pats, opts, wlock):
                      util.localpath(prevsrc)))
             return
         if (not opts['after'] and os.path.exists(reltarget) or
-            opts['after'] and repo.dirstate.state(abstarget) not in '?r'):
+            opts['after'] and repo.dirstate.state(abstarget) not in '?ar'):
             if not opts['force']:
                 ui.warn(_('%s: not overwriting - file exists\n') %
                         reltarget)