Patchwork D11886: simplemerge: avoid a call to `pycompat.strkwargs()`

login
register
mail settings
Submitter phabricator
Date Dec. 8, 2021, 5:56 a.m.
Message ID <differential-rev-PHID-DREV-43ie44llccf67wfa3syw-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50211/
State New
Headers show

Comments

phabricator - Dec. 8, 2021, 5:56 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11886

AFFECTED FILES
  mercurial/simplemerge.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/simplemerge.py b/mercurial/simplemerge.py
--- a/mercurial/simplemerge.py
+++ b/mercurial/simplemerge.py
@@ -516,25 +516,23 @@ 
 
     m3 = Merge3Text(basetext, localtext, othertext)
     extrakwargs = {
-        b"localorother": opts.get("localorother", None),
-        b'minimize': True,
+        "localorother": opts.get("localorother", None),
+        'minimize': True,
     }
     if mode == b'union':
-        extrakwargs[b'start_marker'] = None
-        extrakwargs[b'mid_marker'] = None
-        extrakwargs[b'end_marker'] = None
+        extrakwargs['start_marker'] = None
+        extrakwargs['mid_marker'] = None
+        extrakwargs['end_marker'] = None
     elif name_base is not None:
-        extrakwargs[b'base_marker'] = b'|||||||'
-        extrakwargs[b'name_base'] = name_base
-        extrakwargs[b'minimize'] = False
+        extrakwargs['base_marker'] = b'|||||||'
+        extrakwargs['name_base'] = name_base
+        extrakwargs['minimize'] = False
 
     if mode == b'mergediff':
         lines, conflicts = _mergediff(m3, name_a, name_b, name_base)
     else:
         lines = list(
-            m3.merge_lines(
-                name_a=name_a, name_b=name_b, **pycompat.strkwargs(extrakwargs)
-            )
+            m3.merge_lines(name_a=name_a, name_b=name_b, **extrakwargs)
         )
         conflicts = m3.conflicts and not mode == b'union'