copy: clarify in help text that `hg co --forget` takes a *destination* file
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 15 Oct 2020 10:28:27 -0700
changeset 45731 03690079d7dd
parent 45730 fbde66b05da4
child 45732 4ffe502673c3
copy: clarify in help text that `hg co --forget` takes a *destination* file We had a user who tried to pass a source file. The command then fails with `<file>: not unmarking as copy - file is not marked as copied`, so at least it's not just silent, but let's be a little clearer in the documentation. Differential Revision: https://phab.mercurial-scm.org/D9214
mercurial/commands.py
--- a/mercurial/commands.py	Thu Oct 15 15:57:31 2020 +0200
+++ b/mercurial/commands.py	Thu Oct 15 10:28:27 2020 -0700
@@ -2328,7 +2328,7 @@
 @command(
     b'copy|cp',
     [
-        (b'', b'forget', None, _(b'unmark a file as copied')),
+        (b'', b'forget', None, _(b'unmark a destination file as copied')),
         (b'A', b'after', None, _(b'record a copy that has already occurred')),
         (
             b'',
@@ -2360,9 +2360,9 @@
     exist in the working directory. If invoked with -A/--after, the
     operation is recorded, but no copying is performed.
 
-    To undo marking a file as copied, use --forget. With that option,
-    all given (positional) arguments are unmarked as copies. The destination
-    file(s) will be left in place (still tracked).
+    To undo marking a destination file as copied, use --forget. With that
+    option, all given (positional) arguments are unmarked as copies. The
+    destination file(s) will be left in place (still tracked).
 
     This command takes effect with the next commit by default.