# HG changeset patch # User Pierre-Yves David # Date 2014-06-10 06:37:36 # Node ID e9801c7b6ff0cfd7578f34a4a2cb40a91dc60e14 # Parent 311979b773fbe1f1439747f71d09a74154de10f1 merge: refactor labels selection code The code is simplified to prepare the future introduction of a third labels for the merge base. diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py --- a/mercurial/filemerge.py +++ b/mercurial/filemerge.py @@ -388,16 +388,13 @@ def filemerge(repo, mynode, orig, fcd, f ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca)) markerstyle = ui.config('ui', 'mergemarkers', 'basic') - if markerstyle == 'basic': - formattedlabels = _defaultconflictlabels - else: - if not labels: - labels = _defaultconflictlabels - - formattedlabels = _formatlabels(repo, fcd, fco, labels) + if not labels: + labels = _defaultconflictlabels + if markerstyle != 'basic': + labels = _formatlabels(repo, fcd, fco, labels) needcheck, r = func(repo, mynode, orig, fcd, fco, fca, toolconf, - (a, b, c, back), labels=formattedlabels) + (a, b, c, back), labels=labels) if not needcheck: if r: if onfailure: