Mercurial > public > mercurial-scm > hg-stable
diff relnotes/next @ 44401:9dab3fa64325
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 20 Dec 2019 13:24:46 -0800 |
parents | 7c4b98a4e536 |
children | 815c63526d1d |
line wrap: on
line diff
--- a/relnotes/next Thu Dec 26 14:02:50 2019 -0800 +++ b/relnotes/next Fri Dec 20 13:24:46 2019 -0800 @@ -14,8 +14,12 @@ * `hg copy --forget` can be used to unmark a file as copied. +== New Experimental Features == -== New Experimental Features == + * `hg copy` now supports a `--at-rev` argument to mark files as + copied in the specified commit. It only works with `--after` for + now (i.e., it's only useful for marking files copied using non-hg + `cp` as copied). * Use `hg copy --forget --at-rev REV` to unmark already committed copies.