Show More
@@ -531,6 +531,9 b" coreconfigitem('merge', 'checkignored'," | |||||
531 | coreconfigitem('merge', 'followcopies', |
|
531 | coreconfigitem('merge', 'followcopies', | |
532 | default=True, |
|
532 | default=True, | |
533 | ) |
|
533 | ) | |
|
534 | coreconfigitem('merge', 'on-failure', | |||
|
535 | default='continue', | |||
|
536 | ) | |||
534 | coreconfigitem('merge', 'preferancestor', |
|
537 | coreconfigitem('merge', 'preferancestor', | |
535 | default=lambda: ['*'], |
|
538 | default=lambda: ['*'], | |
536 | ) |
|
539 | ) |
@@ -745,6 +745,20 b' def _filemerge(premerge, repo, wctx, myn' | |||||
745 | if not r and back is not None: |
|
745 | if not r and back is not None: | |
746 | back.remove() |
|
746 | back.remove() | |
747 |
|
747 | |||
|
748 | def _haltmerge(): | |||
|
749 | msg = _('merge halted after failed merge (see hg resolve)') | |||
|
750 | raise error.InterventionRequired(msg) | |||
|
751 | ||||
|
752 | def _onfilemergefailure(ui): | |||
|
753 | action = ui.config('merge', 'on-failure') | |||
|
754 | if action == 'prompt': | |||
|
755 | msg = _('continue merge operation (yn)?' '$$ &Yes $$ &No') | |||
|
756 | if ui.promptchoice(msg, 0) == 1: | |||
|
757 | _haltmerge() | |||
|
758 | if action == 'halt': | |||
|
759 | _haltmerge() | |||
|
760 | # default action is 'continue', in which case we neither prompt nor halt | |||
|
761 | ||||
748 | def _check(repo, r, ui, tool, fcd, files): |
|
762 | def _check(repo, r, ui, tool, fcd, files): | |
749 | fd = fcd.path() |
|
763 | fd = fcd.path() | |
750 | unused, unused, unused, back = files |
|
764 | unused, unused, unused, back = files |
@@ -1288,6 +1288,17 b' This section specifies behavior during m' | |||||
1288 | different contents. Similar to ``merge.checkignored``, except for files that |
|
1288 | different contents. Similar to ``merge.checkignored``, except for files that | |
1289 | are not ignored. (default: ``abort``) |
|
1289 | are not ignored. (default: ``abort``) | |
1290 |
|
1290 | |||
|
1291 | ``on-failure`` | |||
|
1292 | When set to ``continue`` (the default), the merge process attempts to | |||
|
1293 | merge all unresolved files using the merge chosen tool, regardless of | |||
|
1294 | whether previous file merge attempts during the process succeeded or not. | |||
|
1295 | Setting this to ``prompt`` will prompt after any merge failure continue | |||
|
1296 | or halt the merge process. Setting this to ``halt`` will automatically | |||
|
1297 | halt the merge process on any merge tool failure. The merge process | |||
|
1298 | can be restarted by using the ``resolve`` command. When a merge is | |||
|
1299 | halted, the repository is left in a normal ``unresolved`` merge state. | |||
|
1300 | (default: ``continue``) | |||
|
1301 | ||||
1291 | ``merge-patterns`` |
|
1302 | ``merge-patterns`` | |
1292 | ------------------ |
|
1303 | ------------------ | |
1293 |
|
1304 |
General Comments 0
You need to be logged in to leave comments.
Login now