util: make util.url __repr__ consistent on Python 2 and 3
authorAugie Fackler <augie@google.com>
Fri, 27 Apr 2018 00:06:08 -0400
changeset 37917 bb1b15acfd06
parent 37916 51a2f8d199c7
child 37918 0dcd03637d36
util: make util.url __repr__ consistent on Python 2 and 3 Differential Revision: https://phab.mercurial-scm.org/D3468
mercurial/util.py
--- a/mercurial/util.py	Fri Apr 27 00:05:46 2018 -0400
+++ b/mercurial/util.py	Fri Apr 27 00:06:08 2018 -0400
@@ -2717,7 +2717,7 @@
                   'query', 'fragment'):
             v = getattr(self, a)
             if v is not None:
-                attrs.append('%s: %r' % (a, v))
+                attrs.append('%s: %r' % (a, pycompat.bytestr(v)))
         return '<url %s>' % ', '.join(attrs)
 
     def __bytes__(self):