diff mercurial/util.py @ 15452:de7e2fba4326

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.
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 07 Nov 2011 03:25:10 +0100
parents d7bfbc92a1c0
children 25ea33fe7e5c
line wrap: on
line diff
--- a/mercurial/util.py	Mon Nov 07 03:25:10 2011 +0100
+++ b/mercurial/util.py	Mon Nov 07 03:25:10 2011 +0100
@@ -1496,7 +1496,7 @@
     """
 
     _safechars = "!~*'()+"
-    _safepchars = "/!~*'()+"
+    _safepchars = "/!~*'()+:"
     _matchscheme = re.compile(r'^[a-zA-Z0-9+.\-]+:').match
 
     def __init__(self, path, parsequery=True, parsefragment=True):
@@ -1608,8 +1608,8 @@
 
         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'))