##// END OF EJS Templates
util: url keeps backslash in paths...
Simon Heimberg -
r20106:c33d9217 stable
parent child Browse files
Show More
@@ -1633,6 +1633,8 b' class url(object):'
1633 <url path: '\\\\blah\\blah\\blah'>
1633 <url path: '\\\\blah\\blah\\blah'>
1634 >>> url(r'\\blah\blah\blah#baz')
1634 >>> url(r'\\blah\blah\blah#baz')
1635 <url path: '\\\\blah\\blah\\blah', fragment: 'baz'>
1635 <url path: '\\\\blah\\blah\\blah', fragment: 'baz'>
1636 >>> url(r'file:///C:\users\me')
1637 <url scheme: 'file', path: 'C:\\users\\me'>
1636
1638
1637 Authentication credentials:
1639 Authentication credentials:
1638
1640
@@ -1650,7 +1652,7 b' class url(object):'
1650 """
1652 """
1651
1653
1652 _safechars = "!~*'()+"
1654 _safechars = "!~*'()+"
1653 _safepchars = "/!~*'()+:"
1655 _safepchars = "/!~*'()+:\\"
1654 _matchscheme = re.compile(r'^[a-zA-Z0-9+.\-]+:').match
1656 _matchscheme = re.compile(r'^[a-zA-Z0-9+.\-]+:').match
1655
1657
1656 def __init__(self, path, parsequery=True, parsefragment=True):
1658 def __init__(self, path, parsequery=True, parsefragment=True):
@@ -1787,6 +1789,8 b' class url(object):'
1787 'file:///c:/tmp/foo/bar'
1789 'file:///c:/tmp/foo/bar'
1788 >>> print url(r'bundle:foo\bar')
1790 >>> print url(r'bundle:foo\bar')
1789 bundle:foo\bar
1791 bundle:foo\bar
1792 >>> print url(r'file:///D:\data\hg')
1793 file:///D:\data\hg
1790 """
1794 """
1791 if self._localpath:
1795 if self._localpath:
1792 s = self.path
1796 s = self.path
General Comments 0
You need to be logged in to leave comments. Login now