##// END OF EJS Templates
simplemerge: refactor _picklabels to be more compact...
Phil Cohen -
r33934:39d253d0 default
parent child Browse files
Show More
@@ -406,18 +406,12 b' def _verifytext(text, path, ui, opts):'
406 406 return text
407 407
408 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 409 if len(overrides) > 3:
418 410 raise error.Abort(_("can only specify three labels."))
419
420 return [name_a, name_b, name_base]
411 result = defaults[:]
412 for i, override in enumerate(overrides):
413 result[i] = override
414 return result
421 415
422 416 def simplemerge(ui, localctx, basectx, otherctx, repo=None, **opts):
423 417 """Performs the simplemerge algorithm.
General Comments 0
You need to be logged in to leave comments. Login now