[Updated] D12101: merge: break up a not-so-one-liner for readability

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Feb 4 10:28:34 UTC 2022


Closed by commit rHG937998e43e93: merge: break up a not-so-one-liner for readability (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12101?vs=31997&id=32059

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12101/new/

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

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS

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
 
 



To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220204/072de4bf/attachment-0002.html>


More information about the Mercurial-patches mailing list