D7511: exchange: eliminate some bytes.format() calls

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Sat Nov 23 05:15:55 UTC 2019


mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/exchange.py

CHANGE DETAILS

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -2181,9 +2181,8 @@
     )
     if not user_includes:
         raise error.Abort(
-            _(b"{} configuration for user {} is empty").format(
-                _NARROWACL_SECTION, username
-            )
+            _(b"%s configuration for user %s is empty")
+            % (_NARROWACL_SECTION, username)
         )
 
     user_includes = [
@@ -2202,9 +2201,8 @@
 
     if invalid_includes:
         raise error.Abort(
-            _(b"The following includes are not accessible for {}: {}").format(
-                username, invalid_includes
-            )
+            _(b"The following includes are not accessible for %s: %s")
+            % (username, invalid_includes)
         )
 
     new_args = {}



To: mharbison72, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list