Patchwork D3468: util: make util.url __repr__ consistent on Python 2 and 3

login
register
mail settings
Submitter phabricator
Date May 8, 2018, 4:26 a.m.
Message ID <differential-rev-PHID-DREV-bk5nbdl5raom5ggat7if-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/31323/
State Superseded
Headers show

Comments

phabricator - May 8, 2018, 4:26 a.m.
durin42 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/D3468

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -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):