# HG changeset patch # User Augie Fackler # Date 2018-03-02 05:19:30 # Node ID bb5f5c1c3c1bef154aaed5b2be1533bde7955373 # Parent a5eefc9cccc5ce52f3fb2924b785dede2dcbeaf0 scmutil: fix a repr in an error message on Python 3 Differential Revision: https://phab.mercurial-scm.org/D2545 diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -261,7 +261,8 @@ def checknewlabel(repo, lbl, kind): 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"))