pulkit 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/D2261

AFFECTED FILES
  mercurial/changelog.py
  mercurial/ui.py

CHANGE DETAILS

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -809,7 +809,7 @@
                                     'to set your username'))
         if "\n" in user:
             raise error.Abort(_("username %s contains a newline\n")
-                              % repr(user))
+                              % pycompat.bytestr(repr(user)))
         return user
 
     def shortuser(self, user):
diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -20,6 +20,7 @@
 from . import (
     encoding,
     error,
+    pycompat,
     revlog,
     util,
 )
@@ -518,7 +519,7 @@
             raise error.RevlogError(_("empty username"))
         if "\n" in user:
             raise error.RevlogError(_("username %s contains a newline")
-                                    % repr(user))
+                                    % pycompat.bytestr(repr(user)))
 
         desc = stripdesc(desc)
 



To: pulkit, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to