From patchwork Thu Oct 15 17:32:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D9214: copy: clarify in help text that `hg co --forget` takes a *destination* file From: phabricator X-Patchwork-Id: 47473 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 15 Oct 2020 17:32:44 +0000 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 `: 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 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.