Patchwork [05,of,11,py3] util: use pycompat url_unquote function

login
register
mail settings
Submitter Augie Fackler
Date Oct. 9, 2016, 2:16 p.m.
Message ID <db2eae3cd5db193cd892.1476022607@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/17000/
State Accepted
Headers show

Comments

Augie Fackler - Oct. 9, 2016, 2:16 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1476018190 14400
#      Sun Oct 09 09:03:10 2016 -0400
# Node ID db2eae3cd5db193cd8922e93df2c6120ca9d7340
# Parent  d333d64709648be4b31a7fcf25ff2505c0c4c78c
util: use pycompat url_unquote function
Yuya Nishihara - Nov. 9, 2016, 12:33 p.m.
On Sun, 09 Oct 2016 10:16:47 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1476018190 14400
> #      Sun Oct 09 09:03:10 2016 -0400
> # Node ID db2eae3cd5db193cd8922e93df2c6120ca9d7340
> # Parent  d333d64709648be4b31a7fcf25ff2505c0c4c78c
> util: use pycompat url_unquote function
> 
> diff --git a/mercurial/util.py b/mercurial/util.py
> --- a/mercurial/util.py
> +++ b/mercurial/util.py
> @@ -2470,7 +2470,7 @@ class url(object):
>                    'path', 'fragment'):
>              v = getattr(self, a)
>              if v is not None:
> -                setattr(self, a, pycompat.urlparse.unquote(v))
> +                setattr(self, a, pycompat.url_unquote(v))

Queued 4 and 5, thanks. I made s/url_unquote/urlunquote/g per our coding
style.

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -2470,7 +2470,7 @@  class url(object):
                   'path', 'fragment'):
             v = getattr(self, a)
             if v is not None:
-                setattr(self, a, pycompat.urlparse.unquote(v))
+                setattr(self, a, pycompat.url_unquote(v))
 
     def __repr__(self):
         attrs = []