tests/test-copy.t
changeset 30151 381293e1135e
parent 29958 37a36c05dcc3
child 32267 c2380b448265
--- a/tests/test-copy.t	Sun Oct 09 01:03:20 2016 +0900
+++ b/tests/test-copy.t	Mon Sep 19 17:15:39 2016 -0400
@@ -226,11 +226,23 @@
   C foo
 Trying to copy on top of an existing file fails,
   $ hg copy -A bar foo
-  foo: not overwriting - file exists
+  foo: not overwriting - file already committed
+  (hg copy --after --force to replace the file by recording a copy)
+same error without the --after, so the user doesn't have to go through
+two hints:
+  $ hg copy bar foo
+  foo: not overwriting - file already committed
+  (hg copy --force to replace the file by recording a copy)
 but it's considered modified after a copy --after --force
   $ hg copy -Af bar foo
   $ hg st -AC foo
   M foo
     bar
+The hint for a file that exists but is not in file history doesn't
+mention --force:
+  $ touch xyzzy
+  $ hg cp bar xyzzy
+  xyzzy: not overwriting - file exists
+  (hg copy --after to record the copy)
 
   $ cd ..