528 if not labels: |
528 if not labels: |
529 labels = _defaultconflictlabels |
529 labels = _defaultconflictlabels |
530 if len(labels) < 3: |
530 if len(labels) < 3: |
531 labels.append(b'base') |
531 labels.append(b'base') |
532 return _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels) |
532 return _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels) |
|
533 |
|
534 |
|
535 @internaltool( |
|
536 b'mergediff', |
|
537 fullmerge, |
|
538 _( |
|
539 b"warning: conflicts while merging %s! " |
|
540 b"(edit, then use 'hg resolve --mark')\n" |
|
541 ), |
|
542 precheck=_mergecheck, |
|
543 ) |
|
544 def _imerge_diff( |
|
545 repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None |
|
546 ): |
|
547 """ |
|
548 Uses the internal non-interactive simple merge algorithm for merging |
|
549 files. It will fail if there are any conflicts and leave markers in |
|
550 the partially merged file. The marker will have two sections, one with the |
|
551 content from one side of the merge, and one with a diff from the base |
|
552 content to the content on the other side. (experimental)""" |
|
553 if not labels: |
|
554 labels = _defaultconflictlabels |
|
555 if len(labels) < 3: |
|
556 labels.append(b'base') |
|
557 return _merge( |
|
558 repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, b'mergediff' |
|
559 ) |
533 |
560 |
534 |
561 |
535 def _imergeauto( |
562 def _imergeauto( |
536 repo, |
563 repo, |
537 mynode, |
564 mynode, |