# HG changeset patch # User Mads Kiilerich # Date 2011-11-07 02:25:10 # Node ID de7e2fba4326cad80bda0cb100d2ae2f58e67ee8 # Parent 23144f06919cf246c435f6bfc5ee26ec91e96a6f util: don't encode ':' in url paths ':' has no special meaning in paths, so there is no need for encoding it. Not encoding ':' makes it easier to test on windows. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1496,7 +1496,7 @@ class url(object): """ _safechars = "!~*'()+" - _safepchars = "/!~*'()+" + _safepchars = "/!~*'()+:" _matchscheme = re.compile(r'^[a-zA-Z0-9+.\-]+:').match def __init__(self, path, parsequery=True, parsefragment=True): @@ -1608,8 +1608,8 @@ class url(object): Examples: - >>> str(url('http://user:pw@host:80/?foo#bar')) - 'http://user:pw@host:80/?foo#bar' + >>> str(url('http://user:pw@host:80/c:/bob?fo:oo#ba:ar')) + 'http://user:pw@host:80/c:/bob?fo:oo#ba:ar' >>> str(url('http://user:pw@host:80/?foo=bar&baz=42')) 'http://user:pw@host:80/?foo=bar&baz=42' >>> str(url('http://user:pw@host:80/?foo=bar%3dbaz')) diff --git a/tests/test-url.py b/tests/test-url.py --- a/tests/test-url.py +++ b/tests/test-url.py @@ -219,7 +219,7 @@ def test_url(): >>> u >>> str(u) - 'file:f%3Aoo/bar/baz' + 'file:f:oo/bar/baz' >>> u.localpath() 'f:oo/bar/baz'