404 if not opts.get('text'): |
404 if not opts.get('text'): |
405 raise error.Abort(msg) |
405 raise error.Abort(msg) |
406 return text |
406 return text |
407 |
407 |
408 def _picklabels(defaults, overrides): |
408 def _picklabels(defaults, overrides): |
409 name_a, name_b, name_base = defaults |
|
410 |
|
411 if len(overrides) > 0: |
|
412 name_a = overrides[0] |
|
413 if len(overrides) > 1: |
|
414 name_b = overrides[1] |
|
415 if len(overrides) > 2: |
|
416 name_base = overrides[2] |
|
417 if len(overrides) > 3: |
409 if len(overrides) > 3: |
418 raise error.Abort(_("can only specify three labels.")) |
410 raise error.Abort(_("can only specify three labels.")) |
419 |
411 result = defaults[:] |
420 return [name_a, name_b, name_base] |
412 for i, override in enumerate(overrides): |
|
413 result[i] = override |
|
414 return result |
421 |
415 |
422 def simplemerge(ui, localctx, basectx, otherctx, repo=None, **opts): |
416 def simplemerge(ui, localctx, basectx, otherctx, repo=None, **opts): |
423 """Performs the simplemerge algorithm. |
417 """Performs the simplemerge algorithm. |
424 |
418 |
425 The merged result is written into `localctx`. |
419 The merged result is written into `localctx`. |