Page MenuHomePhabricator

copy: recommend `--at-rev .` if target was added in parent commit
ClosedPublic

Authored by martinvonz on Oct 14 2021, 4:12 PM.

Details

Summary

If the target file was added in the working copy parent, it's much
more likely that the user meant to use --at-rev . (to record the
copy/rename in the that commit) than --force (to replace the
just-added file by another file).

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.Oct 14 2021, 4:12 PM

This looks good aside from the small comment I have.

mercurial/cmdutil.py
1681–1696

Could you add an intermediate variable to make this easier to read?

martinvonz marked an inline comment as done.Oct 18 2021, 12:10 PM
martinvonz updated this revision to Diff 30879.
martinvonz added inline comments.Oct 18 2021, 12:10 PM
mercurial/cmdutil.py
1681–1696

Makes sense, that expression was pretty long.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.