comparison mercurial/util.py @ 15496:396e83d635a6 stable

url: handle file://localhost/c:/foo "correctly" The path was parsed correctly, but localpath prepended an extra '/' (as in '/c:/foo') because it assumed it was an absolute unix path.
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 16 Nov 2011 00:10:56 +0100
parents 6eff984d8e76
children ae04af1ce78d
comparison
equal deleted inserted replaced
15495:e99facd2cd2a 15496:396e83d635a6
1706 path = self.path or '/' 1706 path = self.path or '/'
1707 # For Windows, we need to promote hosts containing drive 1707 # For Windows, we need to promote hosts containing drive
1708 # letters to paths with drive letters. 1708 # letters to paths with drive letters.
1709 if hasdriveletter(self._hostport): 1709 if hasdriveletter(self._hostport):
1710 path = self._hostport + '/' + self.path 1710 path = self._hostport + '/' + self.path
1711 elif self.host is not None and self.path: 1711 elif (self.host is not None and self.path
1712 and not hasdriveletter(path)):
1712 path = '/' + path 1713 path = '/' + path
1713 return path 1714 return path
1714 return self._origpath 1715 return self._origpath
1715 1716
1716 def hasscheme(path): 1717 def hasscheme(path):