##// END OF EJS Templates
py3: use pycompat.bytestr to convert str to bytes...
Pulkit Goyal -
r36246:ddeb7653 default
parent child Browse files
Show More
@@ -20,6 +20,7 b' from .thirdparty import ('
20 20 from . import (
21 21 encoding,
22 22 error,
23 pycompat,
23 24 revlog,
24 25 util,
25 26 )
@@ -517,8 +518,8 b' class changelog(revlog.revlog):'
517 518 if not user:
518 519 raise error.RevlogError(_("empty username"))
519 520 if "\n" in user:
520 raise error.RevlogError(_("username %s contains a newline")
521 % repr(user))
521 raise error.RevlogError(_("username %r contains a newline")
522 % pycompat.bytestr(user))
522 523
523 524 desc = stripdesc(desc)
524 525
@@ -808,8 +808,8 b' class ui(object):'
808 808 hint=_("use 'hg config --edit' "
809 809 'to set your username'))
810 810 if "\n" in user:
811 raise error.Abort(_("username %s contains a newline\n")
812 % repr(user))
811 raise error.Abort(_("username %r contains a newline\n")
812 % pycompat.bytestr(user))
813 813 return user
814 814
815 815 def shortuser(self, user):
General Comments 0
You need to be logged in to leave comments. Login now