# HG changeset patch # User Simon Heimberg # Date 1384981395 -3600 # Node ID c33d9217e99df21528432b4324010fdc394ae7ea # Parent c5a0f899e47b117f20abe2cf57edda0f83f3fdbf util: url keeps backslash in paths Backslashes (\) in paths were encoded to %C5 when converting from url to string. This does not look nice for windows paths. And it introduces many problems when running tests on windows. diff -r c5a0f899e47b -r c33d9217e99d mercurial/util.py --- a/mercurial/util.py Sat Nov 16 19:55:38 2013 -0500 +++ b/mercurial/util.py Wed Nov 20 22:03:15 2013 +0100 @@ -1633,6 +1633,8 @@ >>> url(r'\\blah\blah\blah#baz') + >>> url(r'file:///C:\users\me') + Authentication credentials: @@ -1650,7 +1652,7 @@ """ _safechars = "!~*'()+" - _safepchars = "/!~*'()+:" + _safepchars = "/!~*'()+:\\" _matchscheme = re.compile(r'^[a-zA-Z0-9+.\-]+:').match def __init__(self, path, parsequery=True, parsefragment=True): @@ -1787,6 +1789,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