# HG changeset patch # User Matt Mackall # Date 2011-07-22 22:11:35 # Node ID 28edd65000d984b381a85fd847cfda8efeabd8a8 # Parent 41c3a71c318de27961ba01f94501f463b7e58ff3 url: handle urls of the form file:///c:/foo/bar/ correctly diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1353,6 +1353,8 @@ class url(object): >>> url('file:///home/joe/repo') + >>> url('file:///c:/temp/foo/') + >>> url('bundle:foo') >>> url('bundle://../foo') @@ -1442,7 +1444,7 @@ class url(object): 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: