# HG changeset patch # User Martin von Zweigbergk # Date 2022-01-20 17:04:39 # Node ID 62682662346ce39844eac19a91671cfa501053b3 # Parent 1a84758b4fcacfa4df614802bfe0b515a43a26c5 filemerge: make `labels` a required arg for `_premerge()` We always pass labels, and it's always a non-empty list, so we can simplify a bit. Differential Revision: https://phab.mercurial-scm.org/D12012 diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py --- a/mercurial/filemerge.py +++ b/mercurial/filemerge.py @@ -399,7 +399,7 @@ def _underlyingfctxifabsent(filectx): return filectx -def _premerge(repo, fcd, fco, fca, toolconf, backup, labels=None): +def _premerge(repo, fcd, fco, fca, toolconf, backup, labels): tool, toolpath, binary, symlink, scriptfn = toolconf if symlink or fcd.isabsent() or fco.isabsent(): return 1 @@ -421,8 +421,6 @@ def _premerge(repo, fcd, fco, fca, toolc ) if premerge: - if not labels: - labels = _defaultconflictlabels if len(labels) < 3: labels.append(b'base') mode = b'merge'