This is an archive of the discontinued Mercurial Phabricator instance.

rename: add support for --at-rev, which marks as copy and removes the source
ClosedPublic

Authored by martinvonz on Jul 28 2020, 1:23 PM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Jul 28 2020, 1:23 PM

I didn't include release notes in this patch because D8839 needs to get in first. If that lands quickly and gets merged to default, I'll update this patch. Otherwise I'll just send a follow-up later.

martinvonz updated this revision to Diff 22313.Aug 6 2020, 11:36 AM
martinvonz edited the summary of this revision. (Show Details)Aug 6 2020, 12:04 PM
martinvonz updated this revision to Diff 22314.

This now includes release notes. I also fixed a bug: I realized only now that I had previously made it remove the source file, but that shouldn't happen since it only supports the -A/--after mode.

indygreg accepted this revision.Aug 8 2020, 4:51 PM
This revision is now accepted and ready to land.Aug 8 2020, 4:51 PM

I'm not sure what the README.rst rename was doing in the diff. So I dropped it in-flight.