mercurial/util.py
changeset 20108 af12f58e2aa0
parent 20034 1e5b38a919dd
parent 20106 c33d9217e99d
child 20202 a6014018ec28
--- a/mercurial/util.py	Mon Nov 18 09:09:05 2013 -0800
+++ b/mercurial/util.py	Mon Nov 25 16:15:44 2013 -0600
@@ -1634,6 +1634,8 @@
     <url path: '\\\\blah\\blah\\blah'>
     >>> url(r'\\blah\blah\blah#baz')
     <url path: '\\\\blah\\blah\\blah', fragment: 'baz'>
+    >>> url(r'file:///C:\users\me')
+    <url scheme: 'file', path: 'C:\\users\\me'>
 
     Authentication credentials:
 
@@ -1651,7 +1653,7 @@
     """
 
     _safechars = "!~*'()+"
-    _safepchars = "/!~*'()+:"
+    _safepchars = "/!~*'()+:\\"
     _matchscheme = re.compile(r'^[a-zA-Z0-9+.\-]+:').match
 
     def __init__(self, path, parsequery=True, parsefragment=True):
@@ -1788,6 +1790,8 @@
         'file:///c:/tmp/foo/bar'
         >>> print url(r'bundle:foo\bar')
         bundle:foo\bar
+        >>> print url(r'file:///D:\data\hg')
+        file:///D:\data\hg
         """
         if self._localpath:
             s = self.path