Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 44555:bd7b2c8d06cc
pull: add `--confirm` flag to confirm before writing changes
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.
Differential Revision: https://phab.mercurial-scm.org/D8200
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 29 Feb 2020 12:58:38 +0530 |
parents | 9d2b2df2c2ba |
children | 47c1226463a1 |
comparison
equal
deleted
inserted
replaced
44554:13da36d77a3f | 44555:bd7b2c8d06cc |
---|---|
5342 b'f', | 5342 b'f', |
5343 b'force', | 5343 b'force', |
5344 None, | 5344 None, |
5345 _(b'run even when remote repository is unrelated'), | 5345 _(b'run even when remote repository is unrelated'), |
5346 ), | 5346 ), |
5347 (b'', b'confirm', None, _(b'confirm pull before applying changes'),), | |
5347 ( | 5348 ( |
5348 b'r', | 5349 b'r', |
5349 b'rev', | 5350 b'rev', |
5350 [], | 5351 [], |
5351 _(b'a remote changeset intended to be added'), | 5352 _(b'a remote changeset intended to be added'), |
5458 other, | 5459 other, |
5459 heads=nodes, | 5460 heads=nodes, |
5460 force=opts.get(b'force'), | 5461 force=opts.get(b'force'), |
5461 bookmarks=opts.get(b'bookmark', ()), | 5462 bookmarks=opts.get(b'bookmark', ()), |
5462 opargs=pullopargs, | 5463 opargs=pullopargs, |
5464 confirm=opts.get(b'confirm'), | |
5463 ).cgresult | 5465 ).cgresult |
5464 | 5466 |
5465 # brev is a name, which might be a bookmark to be activated at | 5467 # brev is a name, which might be a bookmark to be activated at |
5466 # the end of the update. In other words, it is an explicit | 5468 # the end of the update. In other words, it is an explicit |
5467 # destination of the update | 5469 # destination of the update |