This is an archive of the discontinued Mercurial Phabricator instance.

pull: add `--confirm` flag to confirm before writing changes
ClosedPublic

Authored by pulkit on Feb 29 2020, 2:31 AM.

Details

Summary

This introduces a new flag to pull command --confirm and also a config option
named pull.confirm which if used will prompt user describing changes which are
pulled and asking whether to accept them or not.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

pulkit created this revision.Feb 29 2020, 2:31 AM
durin42 added a subscriber: durin42.Mar 3 2020, 1:26 PM
durin42 added inline comments.
mercurial/exchange.py
1807

I think this should probably respect HGPLAIN. Thoughts?

(Note that doing so will require some reworking, because you probably want HGPLAIN=1 hg pull --confirm to confirm, and it wouldn't if you just respect HGPLAIN on this line.)

marmoute added inline comments.
mercurial/exchange.py
1807

From IRC discussion, HGPLAIN should result in the config option to be ignored, but the command line flag to be enforced.

durin42 requested changes to this revision.Mar 4 2020, 5:07 PM

(marking as needs-changes since we've got consensus)

This revision now requires changes to proceed.Mar 4 2020, 5:07 PM
pulkit updated this revision to Diff 20501.Mar 5 2020, 4:11 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.