This is an archive of the discontinued Mercurial Phabricator instance.

revert: ask user to confirm before tracking new file when interactive
ClosedPublic

Authored by martinvonz on Mar 28 2022, 1:57 PM.

Details

Summary

If interactively reverting from a commit with hg revert -i -r, we
would unconditionally add files from that commit that are not already
tracked in the working copy. We have prompts for adding back files
removed in the working copy, but that's specific to such files and
does not apply to adding files from another revision.

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.Mar 28 2022, 1:57 PM
Alphare accepted this revision.Apr 6 2022, 6:17 AM
Alphare added a subscriber: Alphare.
Alphare added inline comments.
tests/test-revert-interactive.t
424

I'll amend this to hg up 0 as per our previous discussion about this particular shortcut. (I know this is very subjective so I won't bother you with a round-trip :) )

This revision is now accepted and ready to land.Apr 6 2022, 6:17 AM
martinvonz added inline comments.Apr 6 2022, 12:50 PM
tests/test-revert-interactive.t
424

Sounds good. I'm just so used to using hg co that I didn't think about it (I didn't intentionally ignore your previous request).