# HG changeset patch # User Brodie Rao # Date 1301539856 25200 # Node ID 03dfe0c85c1a4d7df59adf8a23058046178a7a1e # Parent 76593ef397ef4f1090f7957e847618c0160b76d2 url: move drive letter checking into has_drive_letter() for extensions This will let the schemes extension override drive letter detection to allow single letter schemes. diff -r 76593ef397ef -r 03dfe0c85c1a mercurial/url.py --- a/mercurial/url.py Thu Mar 31 10:03:24 2011 -0500 +++ b/mercurial/url.py Wed Mar 30 19:50:56 2011 -0700 @@ -67,7 +67,7 @@ self._localpath = True # special case for Windows drive letters - if path[1:2] == ':' and path[0:1].isalpha(): + if has_drive_letter(path): self.path = path return @@ -211,6 +211,9 @@ def has_scheme(path): return bool(url(path).scheme) +def has_drive_letter(path): + return path[1:2] == ':' and path[0:1].isalpha() + def hidepassword(u): '''hide user credential in a url string''' u = url(u)