Patchwork D2545: scmutil: fix a repr in an error message on Python 3

login
register
mail settings
Submitter phabricator
Date March 2, 2018, 4:18 p.m.
Message ID <7d7194e16db59b49995924b9c269c7a4@localhost.localdomain>
Download mbox | patch
Permalink /patch/28696/
State Not Applicable
Headers show

Comments

phabricator - March 2, 2018, 4:18 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbb5f5c1c3c1b: scmutil: fix a repr in an error message on Python 3 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2545?vs=6338&id=6358

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -261,7 +261,8 @@ 
         raise error.Abort(_("the name '%s' is reserved") % lbl)
     for c in (':', '\0', '\n', '\r'):
         if c in lbl:
-            raise error.Abort(_("%r cannot be used in a name") % c)
+            raise error.Abort(
+                _("%r cannot be used in a name") % pycompat.bytestr(c))
     try:
         int(lbl)
         raise error.Abort(_("cannot use an integer as a name"))