Show More
@@ -83,6 +83,10 b' try:' | |||||
83 | if len(opts[b'label']) > 2: |
|
83 | if len(opts[b'label']) > 2: | |
84 | opts[b'mode'] = b'merge3' |
|
84 | opts[b'mode'] = b'merge3' | |
85 | local, base, other = args |
|
85 | local, base, other = args | |
|
86 | overrides = opts[b'label'] | |||
|
87 | labels = [local, other, base] | |||
|
88 | labels[: len(overrides)] = overrides | |||
|
89 | opts[b'label'] = labels | |||
86 | sys.exit( |
|
90 | sys.exit( | |
87 | simplemerge.simplemerge( |
|
91 | simplemerge.simplemerge( | |
88 | uimod.ui.load(), |
|
92 | uimod.ui.load(), |
@@ -332,10 +332,10 b' def _verifytext(text, path, ui, opts):' | |||||
332 | return text |
|
332 | return text | |
333 |
|
333 | |||
334 |
|
334 | |||
335 |
def _picklabels( |
|
335 | def _picklabels(overrides): | |
336 | if len(overrides) > 3: |
|
336 | if len(overrides) > 3: | |
337 | raise error.Abort(_(b"can only specify three labels.")) |
|
337 | raise error.Abort(_(b"can only specify three labels.")) | |
338 | result = defaults[:] |
|
338 | result = [None, None, None] | |
339 | for i, override in enumerate(overrides): |
|
339 | for i, override in enumerate(overrides): | |
340 | result[i] = override |
|
340 | result[i] = override | |
341 | return result |
|
341 | return result | |
@@ -501,9 +501,7 b' def simplemerge(ui, localctx, basectx, o' | |||||
501 | elif mode == b'other': |
|
501 | elif mode == b'other': | |
502 | lines = _resolve(m3, (2,)) |
|
502 | lines = _resolve(m3, (2,)) | |
503 | else: |
|
503 | else: | |
504 | name_a, name_b, name_base = _picklabels( |
|
504 | name_a, name_b, name_base = _picklabels(opts.get('label', [])) | |
505 | [localctx.path(), otherctx.path(), None], opts.get('label', []) |
|
|||
506 | ) |
|
|||
507 | if mode == b'mergediff': |
|
505 | if mode == b'mergediff': | |
508 | lines, conflicts = render_mergediff(m3, name_a, name_b, name_base) |
|
506 | lines, conflicts = render_mergediff(m3, name_a, name_b, name_base) | |
509 | else: |
|
507 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now