Patchwork D9214: copy: clarify in help text that `hg co --forget` takes a *destination* file

login
register
mail settings
Submitter phabricator
Date Oct. 15, 2020, 5:32 p.m.
Message ID <differential-rev-PHID-DREV-amf5mncmcns6xd7a4zql-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47473/
State Superseded
Headers show

Comments

phabricator - Oct. 15, 2020, 5:32 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9214

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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.