Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 38913:f35f6791595f
resolve: support confirm config option with --unmark flag
Now, commands.resolve.confirm also respect --unmark option; and
confirm to unresolve all resolved files.
It will confirm only when no files pats are passed (same as --mark),
because when no pats are passed the default is to mark resolved files
as unresolved.
And if user has passed file pats then I think there is no need to confirm
for that.
Differential Revision: https://phab.mercurial-scm.org/D4102
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sat, 04 Aug 2018 12:43:41 +0530 |
parents | 7e75777e4a51 |
children | 49b51f41fb46 |
comparison
equal
deleted
inserted
replaced
38912:7e75777e4a51 | 38913:f35f6791595f |
---|---|
4544 if pats and all: | 4544 if pats and all: |
4545 raise error.Abort(_("can't specify --all and patterns")) | 4545 raise error.Abort(_("can't specify --all and patterns")) |
4546 if not (all or pats or show or mark or unmark): | 4546 if not (all or pats or show or mark or unmark): |
4547 raise error.Abort(_('no files or directories specified'), | 4547 raise error.Abort(_('no files or directories specified'), |
4548 hint=('use --all to re-merge all unresolved files')) | 4548 hint=('use --all to re-merge all unresolved files')) |
4549 | |
4549 if mark and confirm and not pats: | 4550 if mark and confirm and not pats: |
4550 if ui.promptchoice(_(b'mark all unresolved files as resolved (yn)?' | 4551 if ui.promptchoice(_(b'mark all unresolved files as resolved (yn)?' |
4552 b'$$ &Yes $$ &No')): | |
4553 raise error.Abort(_('user quit')) | |
4554 if unmark and confirm and not pats: | |
4555 if ui.promptchoice(_(b'mark all resolved files as unresolved (yn)?' | |
4551 b'$$ &Yes $$ &No')): | 4556 b'$$ &Yes $$ &No')): |
4552 raise error.Abort(_('user quit')) | 4557 raise error.Abort(_('user quit')) |
4553 | 4558 |
4554 if show: | 4559 if show: |
4555 ui.pager('resolve') | 4560 ui.pager('resolve') |