[PATCH 7 of 8] py3: fix repr(util.url) to return system string

Yuya Nishihara yuya at tcha.org
Sun Sep 3 10:36:25 EDT 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1504428683 -32400
#      Sun Sep 03 17:51:23 2017 +0900
# Node ID 2f19734c56c0227e004a849e8037378f9d930e7d
# Parent  6f837717bec80a273aa7263d1d2af0f68ff04237
py3: fix repr(util.url) to return system string

This is required on Python 3.

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -2804,6 +2804,7 @@ class url(object):
             if v is not None:
                 setattr(self, a, urlreq.unquote(v))
 
+    @encoding.strmethod
     def __repr__(self):
         attrs = []
         for a in ('scheme', 'user', 'passwd', 'host', 'port', 'path',


More information about the Mercurial-devel mailing list