# HG changeset patch # User Matt Mackall # Date 2011-06-20 21:45:33 # Node ID 388af80c058b491089e1c680ed67df0ef30d6e4b # Parent df902fe3d79ebe1be4fff98673e1a5aa8b501941 url: catch UNC paths as yet another Windows special case (issue2808) diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1359,6 +1359,8 @@ class url(object): >>> url(r'c:\foo\bar') + >>> url(r'\\blah\blah\blah') + Authentication credentials: @@ -1387,8 +1389,8 @@ class url(object): self._hostport = '' self._origpath = path - # special case for Windows drive letters - if hasdriveletter(path): + # special case for Windows drive letters and UNC paths + if hasdriveletter(path) or path.startswith(r'\\'): self.path = path return