Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Aug 05 00:53:55 2018 -0700 +++ b/mercurial/commands.py Sat Aug 04 12:43:41 2018 +0530 @@ -4546,10 +4546,15 @@ if not (all or pats or show or mark or unmark): raise error.Abort(_('no files or directories specified'), hint=('use --all to re-merge all unresolved files')) + if mark and confirm and not pats: if ui.promptchoice(_(b'mark all unresolved files as resolved (yn)?' b'$$ &Yes $$ &No')): raise error.Abort(_('user quit')) + if unmark and confirm and not pats: + if ui.promptchoice(_(b'mark all resolved files as unresolved (yn)?' + b'$$ &Yes $$ &No')): + raise error.Abort(_('user quit')) if show: ui.pager('resolve')