Show More
@@ -503,13 +503,6 b' def simplemerge(ui, localctx, basectx, o' | |||
|
503 | 503 | # repository usually sees) might be more useful. |
|
504 | 504 | return _verifytext(ctx.decodeddata(), ctx.path(), ui, opts) |
|
505 | 505 | |
|
506 | mode = opts.get('mode', b'merge') | |
|
507 | name_a, name_b, name_base = None, None, None | |
|
508 | if mode != b'union': | |
|
509 | name_a, name_b, name_base = _picklabels( | |
|
510 | [localctx.path(), otherctx.path(), None], opts.get('label', []) | |
|
511 | ) | |
|
512 | ||
|
513 | 506 | try: |
|
514 | 507 | localtext = readctx(localctx) |
|
515 | 508 | basetext = readctx(basectx) |
@@ -519,26 +512,31 b' def simplemerge(ui, localctx, basectx, o' | |||
|
519 | 512 | |
|
520 | 513 | m3 = Merge3Text(basetext, localtext, othertext) |
|
521 | 514 | conflicts = False |
|
515 | mode = opts.get('mode', b'merge') | |
|
522 | 516 | if mode == b'union': |
|
523 | 517 | lines = _resolve(m3, (1, 2)) |
|
524 | 518 | elif mode == b'local': |
|
525 | 519 | lines = _resolve(m3, (1,)) |
|
526 | 520 | elif mode == b'other': |
|
527 | 521 | lines = _resolve(m3, (2,)) |
|
528 | elif mode == b'mergediff': | |
|
529 | lines, conflicts = _mergediff(m3, name_a, name_b, name_base) | |
|
530 | 522 | else: |
|
531 | extrakwargs = { | |
|
532 | 'minimize': True, | |
|
533 | } | |
|
534 | if name_base is not None: | |
|
535 | extrakwargs['base_marker'] = b'|||||||' | |
|
536 | extrakwargs['name_base'] = name_base | |
|
537 | extrakwargs['minimize'] = False | |
|
538 | lines = list( | |
|
539 | m3.merge_lines(name_a=name_a, name_b=name_b, **extrakwargs) | |
|
523 | name_a, name_b, name_base = _picklabels( | |
|
524 | [localctx.path(), otherctx.path(), None], opts.get('label', []) | |
|
540 | 525 | ) |
|
541 | conflicts = m3.conflicts | |
|
526 | if mode == b'mergediff': | |
|
527 | lines, conflicts = _mergediff(m3, name_a, name_b, name_base) | |
|
528 | else: | |
|
529 | extrakwargs = { | |
|
530 | 'minimize': True, | |
|
531 | } | |
|
532 | if name_base is not None: | |
|
533 | extrakwargs['base_marker'] = b'|||||||' | |
|
534 | extrakwargs['name_base'] = name_base | |
|
535 | extrakwargs['minimize'] = False | |
|
536 | lines = list( | |
|
537 | m3.merge_lines(name_a=name_a, name_b=name_b, **extrakwargs) | |
|
538 | ) | |
|
539 | conflicts = m3.conflicts | |
|
542 | 540 | |
|
543 | 541 | mergedtext = b''.join(lines) |
|
544 | 542 | if opts.get('print'): |
General Comments 0
You need to be logged in to leave comments.
Login now