Show More
@@ -4559,8 +4559,13 b' def resolve(ui, repo, *pats, **opts):' | |||||
4559 | all, mark, unmark, show, nostatus, remerge = \ |
|
4559 | all, mark, unmark, show, nostatus, remerge = \ | |
4560 | [opts.get(o) for o in flaglist] |
|
4560 | [opts.get(o) for o in flaglist] | |
4561 |
|
4561 | |||
4562 |
|
|
4562 | actioncount = len(list(filter(None, [show, mark, unmark, remerge]))) | |
4563 | raise error.Abort(_("too many options specified")) |
|
4563 | if actioncount > 1: | |
|
4564 | raise error.Abort(_("too many actions specified")) | |||
|
4565 | elif (actioncount == 0 | |||
|
4566 | and ui.config('commands', 'resolve.explicit-re-merge')): | |||
|
4567 | hint = _('use --mark, --unmark, --list or --re-merge') | |||
|
4568 | raise error.Abort(_('no action specified'), hint=hint) | |||
4564 | if pats and all: |
|
4569 | if pats and all: | |
4565 | raise error.Abort(_("can't specify --all and patterns")) |
|
4570 | raise error.Abort(_("can't specify --all and patterns")) | |
4566 | if not (all or pats or show or mark or unmark): |
|
4571 | if not (all or pats or show or mark or unmark): |
@@ -193,6 +193,9 b" coreconfigitem('commands', 'grep.all-fil" | |||||
193 | coreconfigitem('commands', 'resolve.confirm', |
|
193 | coreconfigitem('commands', 'resolve.confirm', | |
194 | default=False, |
|
194 | default=False, | |
195 | ) |
|
195 | ) | |
|
196 | coreconfigitem('commands', 'resolve.explicit-re-merge', | |||
|
197 | default=False, | |||
|
198 | ) | |||
196 | coreconfigitem('commands', 'resolve.mark-check', |
|
199 | coreconfigitem('commands', 'resolve.mark-check', | |
197 | default='none', |
|
200 | default='none', | |
198 | ) |
|
201 | ) |
@@ -442,6 +442,11 b' effect and style see :hg:`help color`.' | |||||
442 | Confirm before performing action if no filename is passed. |
|
442 | Confirm before performing action if no filename is passed. | |
443 | (default: False) |
|
443 | (default: False) | |
444 |
|
444 | |||
|
445 | ``resolve.explicit-re-merge`` | |||
|
446 | Require uses of ``hg resolve`` to specify which action it should perform, | |||
|
447 | instead of re-merging files by default. | |||
|
448 | (default: False) | |||
|
449 | ||||
445 | ``resolve.mark-check`` |
|
450 | ``resolve.mark-check`` | |
446 | Determines what level of checking :hg:`resolve --mark` will perform before |
|
451 | Determines what level of checking :hg:`resolve --mark` will perform before | |
447 | marking files as resolved. Valid values are ``none`, ``warn``, and |
|
452 | marking files as resolved. Valid values are ``none`, ``warn``, and |
@@ -448,12 +448,22 b' Testing the --re-merge flag' | |||||
448 | U file1 |
|
448 | U file1 | |
449 | R file2 |
|
449 | R file2 | |
450 | $ hg resolve --mark --re-merge |
|
450 | $ hg resolve --mark --re-merge | |
451 |
abort: too many |
|
451 | abort: too many actions specified | |
452 | [255] |
|
452 | [255] | |
453 | $ hg resolve --re-merge --all |
|
453 | $ hg resolve --re-merge --all | |
454 | merging file1 |
|
454 | merging file1 | |
455 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
|
455 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') | |
456 | [1] |
|
456 | [1] | |
|
457 | Explicit re-merge | |||
|
458 | $ hg resolve --unmark file1 | |||
|
459 | $ hg resolve --config commands.resolve.explicit-re-merge=1 --all | |||
|
460 | abort: no action specified | |||
|
461 | (use --mark, --unmark, --list or --re-merge) | |||
|
462 | [255] | |||
|
463 | $ hg resolve --config commands.resolve.explicit-re-merge=1 --re-merge --all | |||
|
464 | merging file1 | |||
|
465 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') | |||
|
466 | [1] | |||
457 |
|
467 | |||
458 | $ cd .. |
|
468 | $ cd .. | |
459 |
|
469 |
General Comments 0
You need to be logged in to leave comments.
Login now