##// 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 from .thirdparty import (
20 from . import (
20 from . import (
21 encoding,
21 encoding,
22 error,
22 error,
23 pycompat,
23 revlog,
24 revlog,
24 util,
25 util,
25 )
26 )
@@ -517,8 +518,8 class changelog(revlog.revlog):
517 if not user:
518 if not user:
518 raise error.RevlogError(_("empty username"))
519 raise error.RevlogError(_("empty username"))
519 if "\n" in user:
520 if "\n" in user:
520 raise error.RevlogError(_("username %s contains a newline")
521 raise error.RevlogError(_("username %r contains a newline")
521 % repr(user))
522 % pycompat.bytestr(user))
522
523
523 desc = stripdesc(desc)
524 desc = stripdesc(desc)
524
525
@@ -808,8 +808,8 class ui(object):
808 hint=_("use 'hg config --edit' "
808 hint=_("use 'hg config --edit' "
809 'to set your username'))
809 'to set your username'))
810 if "\n" in user:
810 if "\n" in user:
811 raise error.Abort(_("username %s contains a newline\n")
811 raise error.Abort(_("username %r contains a newline\n")
812 % repr(user))
812 % pycompat.bytestr(user))
813 return user
813 return user
814
814
815 def shortuser(self, user):
815 def shortuser(self, user):
General Comments 0
You need to be logged in to leave comments. Login now