diff -r 02328b5d775d -r 3f4e1c033f40 mercurial/util.py --- a/mercurial/util.py Wed Sep 28 20:07:32 2016 +0900 +++ b/mercurial/util.py Fri Sep 30 21:38:47 2016 +0900 @@ -2377,6 +2377,22 @@ >>> url('http://host/a?b#c', parsequery=False, parsefragment=False) + + Empty path: + + >>> url('') + + >>> url('#a') + + >>> url('http://host/') + + >>> url('http://host/#a') + + + Only scheme: + + >>> url('http:') + """ _safechars = "!~*'()+" @@ -2393,8 +2409,6 @@ if parsefragment and '#' in path: path, self.fragment = path.split('#', 1) - if not path: - path = None # special case for Windows drive letters and UNC paths if hasdriveletter(path) or path.startswith(r'\\'):