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