Patchwork D12101: merge: break up a not-so-one-liner for readability

login
register
mail settings
Submitter phabricator
Date Jan. 29, 2022, 2:13 p.m.
Message ID <differential-rev-PHID-DREV-tk47lp52muavpqmq3zfq-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50427/
State New
Headers show

Comments

phabricator - Jan. 29, 2022, 2:13 p.m.
marmoute 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/D12101

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -41,10 +41,9 @@ 
     valid = [b'abort', b'ignore', b'warn']
     if config not in valid:
         validstr = b', '.join([b"'" + v + b"'" for v in valid])
-        raise error.ConfigError(
-            _(b"%s.%s not valid ('%s' is none of %s)")
-            % (section, name, config, validstr)
-        )
+        msg = _(b"%s.%s not valid ('%s' is none of %s)")
+        msg %= (section, name, config, validstr)
+        raise error.ConfigError(msg)
     return config