comparison mercurial/bundlerepo.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 08a0f04b56bd
children bcc7139521b7
comparison
equal deleted inserted replaced
11143:e0a0af140f2e 11154:17031fea4e95
164 self._tempparent = tempfile.mkdtemp() 164 self._tempparent = tempfile.mkdtemp()
165 localrepo.instance(ui, self._tempparent, 1) 165 localrepo.instance(ui, self._tempparent, 1)
166 localrepo.localrepository.__init__(self, ui, self._tempparent) 166 localrepo.localrepository.__init__(self, ui, self._tempparent)
167 167
168 if path: 168 if path:
169 self._url = 'bundle:' + path + '+' + bundlename 169 self._url = 'bundle:' + util.expandpath(path) + '+' + bundlename
170 else: 170 else:
171 self._url = 'bundle:' + bundlename 171 self._url = 'bundle:' + bundlename
172 172
173 self.tempfile = None 173 self.tempfile = None
174 self.bundlefile = open(bundlename, "rb") 174 self.bundlefile = open(bundlename, "rb")