# HG changeset patch # User Matt Mackall # Date 2011-03-30 18:34:39 # Node ID 974490c1768f06a90dd3594ad73d892a89de4e81 # Parent 8ba08a16e4e0b36ddb1c2c72de5a5122047e9871 url: deal with drive letters diff --git a/mercurial/url.py b/mercurial/url.py --- a/mercurial/url.py +++ b/mercurial/url.py @@ -39,6 +39,8 @@ class url(object): >>> url('bundle:foo') + >>> url('c:\\\\foo\\\\bar') + Authentication credentials: @@ -64,6 +66,11 @@ class url(object): self.port = self.path = self.query = self.fragment = None self._localpath = True + # special case for Windows drive letters + if path[1:2] == ':' and path[0:1].isalpha(): + self.path = path + return + if not path.startswith('/') and ':' in path: parts = path.split(':', 1) if parts[0]: