# HG changeset patch # User Matt Mackall # Date 1311372695 18000 # Node ID 28edd65000d984b381a85fd847cfda8efeabd8a8 # Parent 41c3a71c318de27961ba01f94501f463b7e58ff3 url: handle urls of the form file:///c:/foo/bar/ correctly diff -r 41c3a71c318d -r 28edd65000d9 mercurial/util.py --- a/mercurial/util.py Thu Jul 21 16:02:34 2011 -0400 +++ b/mercurial/util.py Fri Jul 22 17:11:35 2011 -0500 @@ -1353,6 +1353,8 @@ >>> url('file:///home/joe/repo') + >>> url('file:///c:/temp/foo/') + >>> url('bundle:foo') >>> url('bundle://../foo') @@ -1442,7 +1444,7 @@ path = None if not self.host: self.host = None - if path: + if path and not hasdriveletter(path): path = '/' + path if self.host and '@' in self.host: