Page MenuHomePhabricator

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

Authored by martinvonz on Tue, Jul 28, 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.Tue, Jul 28, 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.Thu, Aug 6, 11:36 AM
martinvonz edited the summary of this revision. (Show Details)Thu, Aug 6, 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.Sat, Aug 8, 4:51 PM
This revision is now accepted and ready to land.Sat, Aug 8, 4:51 PM

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