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

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 3, 2017, 2:36 p.m.
Message ID <2f19734c56c0227e004a.1504449385@mimosa>
Download mbox | patch
Permalink /patch/23646/
State Accepted
Headers show

Comments

Yuya Nishihara - Sept. 3, 2017, 2:36 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.

Patch

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',