changeset 48602:62682662346c

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
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 20 Jan 2022 09:04:39 -0800
parents 1a84758b4fca
children 77e24ee8994b
files mercurial/filemerge.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filemerge.py	Thu Jan 20 14:46:16 2022 -0800
+++ b/mercurial/filemerge.py	Thu Jan 20 09:04:39 2022 -0800
@@ -399,7 +399,7 @@
         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 @@
             )
 
     if premerge:
-        if not labels:
-            labels = _defaultconflictlabels
         if len(labels) < 3:
             labels.append(b'base')
         mode = b'merge'