comparison mercurial/commands.py @ 45389:5178dd2233d0

rename: add support for --at-rev, which marks as copy and removes the source I had previously only added support for `--at-rev` to `hg cp`, but not to `hg mv`. This patch adds that support. Just like for `hg cp`, it marks the destination as copied from the source, and doesn't care if the source file still exists (because it only supports the `-A` mode, aka "don't touch files" mode). It works whether or not the source file still exists. This matches the behavior of `hg mv -A` in the working copy. Differential Revision: https://phab.mercurial-scm.org/D8840
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 28 Jul 2020 09:58:28 -0700
parents 7f41e824a02b
children 8c466bcb0879
comparison
equal deleted inserted replaced
45388:d71693f799a0 45389:5178dd2233d0
5779 @command( 5779 @command(
5780 b'rename|move|mv', 5780 b'rename|move|mv',
5781 [ 5781 [
5782 (b'A', b'after', None, _(b'record a rename that has already occurred')), 5782 (b'A', b'after', None, _(b'record a rename that has already occurred')),
5783 ( 5783 (
5784 b'',
5785 b'at-rev',
5786 b'',
5787 _(b'(un)mark renames in the given revision (EXPERIMENTAL)'),
5788 _(b'REV'),
5789 ),
5790 (
5784 b'f', 5791 b'f',
5785 b'force', 5792 b'force',
5786 None, 5793 None,
5787 _(b'forcibly move over an existing managed file'), 5794 _(b'forcibly move over an existing managed file'),
5788 ), 5795 ),