comparison mercurial/localrepo.py @ 11154:17031fea4e95 stable

expand paths to local repository or bundle in appropriate classes This avoids problem with unexpanded paths when it's not possible to expand it at higher level (for example, if file:~/path/ is supplied as path in schemes).
author Alexander Solovyov <piranha@piranha.org.ua>
date Mon, 07 Dec 2009 12:31:45 +0200
parents a101a743c570
children b203a95fe68b 054549ccb680
comparison
equal deleted inserted replaced
11143:e0a0af140f2e 11154:17031fea4e95
22 capabilities = set(('lookup', 'changegroupsubset', 'branchmap')) 22 capabilities = set(('lookup', 'changegroupsubset', 'branchmap'))
23 supported = set('revlogv1 store fncache shared'.split()) 23 supported = set('revlogv1 store fncache shared'.split())
24 24
25 def __init__(self, baseui, path=None, create=0): 25 def __init__(self, baseui, path=None, create=0):
26 repo.repository.__init__(self) 26 repo.repository.__init__(self)
27 self.root = os.path.realpath(path) 27 self.root = os.path.realpath(util.expandpath(path))
28 self.path = os.path.join(self.root, ".hg") 28 self.path = os.path.join(self.root, ".hg")
29 self.origroot = path 29 self.origroot = path
30 self.opener = util.opener(self.path) 30 self.opener = util.opener(self.path)
31 self.wopener = util.opener(self.root) 31 self.wopener = util.opener(self.root)
32 self.baseui = baseui 32 self.baseui = baseui