comparison mercurial/filemerge.py @ 22021:e9801c7b6ff0

merge: refactor labels selection code The code is simplified to prepare the future introduction of a third labels for the merge base.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 09 Jun 2014 23:37:36 -0700
parents 50e20154cb68
children 2ea6d906cf9b
comparison
equal deleted inserted replaced
22020:311979b773fb 22021:e9801c7b6ff0
386 ui.status(_("merging %s\n") % fd) 386 ui.status(_("merging %s\n") % fd)
387 387
388 ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca)) 388 ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca))
389 389
390 markerstyle = ui.config('ui', 'mergemarkers', 'basic') 390 markerstyle = ui.config('ui', 'mergemarkers', 'basic')
391 if markerstyle == 'basic': 391 if not labels:
392 formattedlabels = _defaultconflictlabels 392 labels = _defaultconflictlabels
393 else: 393 if markerstyle != 'basic':
394 if not labels: 394 labels = _formatlabels(repo, fcd, fco, labels)
395 labels = _defaultconflictlabels
396
397 formattedlabels = _formatlabels(repo, fcd, fco, labels)
398 395
399 needcheck, r = func(repo, mynode, orig, fcd, fco, fca, toolconf, 396 needcheck, r = func(repo, mynode, orig, fcd, fco, fca, toolconf,
400 (a, b, c, back), labels=formattedlabels) 397 (a, b, c, back), labels=labels)
401 if not needcheck: 398 if not needcheck:
402 if r: 399 if r:
403 if onfailure: 400 if onfailure:
404 ui.warn(onfailure % fd) 401 ui.warn(onfailure % fd)
405 else: 402 else: