HomePhabricator

copy: add experimental support for marking committed copies

Authored by martinvonz.

Description

copy: add experimental support for marking committed copies

The simplest way I'm aware of to mark a file as copied/moved after
committing is this:

hg uncommit --keep <src> <dest>  # <src> needed for move, but not copy
hg mv --after <src> <dest>
hg amend

This patch teaches hg copy a --at-rev argument to simplify that
into:

hg copy --after --at-rev . <src> <dest>

In addition to being simpler, it doesn't touch the working copy, so it
can easily be used even if the destination file has been modified in
the working copy.

Differential Revision: https://phab.mercurial-scm.org/D8035

Details