Show More
@@ -256,24 +256,24 b' def _getfilestarts(bundle):' | |||||
256 | return bundlefilespos |
|
256 | return bundlefilespos | |
257 |
|
257 | |||
258 | class bundlerepository(localrepo.localrepository): |
|
258 | class bundlerepository(localrepo.localrepository): | |
259 |
def __init__(self, ui, path, bundle |
|
259 | def __init__(self, ui, repopath, bundlepath): | |
260 | self._tempparent = None |
|
260 | self._tempparent = None | |
261 | try: |
|
261 | try: | |
262 | localrepo.localrepository.__init__(self, ui, path) |
|
262 | localrepo.localrepository.__init__(self, ui, repopath) | |
263 | except error.RepoError: |
|
263 | except error.RepoError: | |
264 | self._tempparent = tempfile.mkdtemp() |
|
264 | self._tempparent = tempfile.mkdtemp() | |
265 | localrepo.instance(ui, self._tempparent, 1) |
|
265 | localrepo.instance(ui, self._tempparent, 1) | |
266 | localrepo.localrepository.__init__(self, ui, self._tempparent) |
|
266 | localrepo.localrepository.__init__(self, ui, self._tempparent) | |
267 | self.ui.setconfig('phases', 'publish', False, 'bundlerepo') |
|
267 | self.ui.setconfig('phases', 'publish', False, 'bundlerepo') | |
268 |
|
268 | |||
269 | if path: |
|
269 | if repopath: | |
270 |
self._url = 'bundle:' + util.expandpath(path) + '+' + bundle |
|
270 | self._url = 'bundle:' + util.expandpath(repopath) + '+' + bundlepath | |
271 | else: |
|
271 | else: | |
272 |
self._url = 'bundle:' + bundle |
|
272 | self._url = 'bundle:' + bundlepath | |
273 |
|
273 | |||
274 | self.tempfile = None |
|
274 | self.tempfile = None | |
275 |
f = util.posixfile(bundle |
|
275 | f = util.posixfile(bundlepath, "rb") | |
276 |
self.bundlefile = self.bundle = exchange.readbundle(ui, f, bundle |
|
276 | self.bundlefile = self.bundle = exchange.readbundle(ui, f, bundlepath) | |
277 |
|
277 | |||
278 | if isinstance(self.bundle, bundle2.unbundle20): |
|
278 | if isinstance(self.bundle, bundle2.unbundle20): | |
279 | hadchangegroup = False |
|
279 | hadchangegroup = False | |
@@ -293,7 +293,7 b' class bundlerepository(localrepo.localre' | |||||
293 | f = self._writetempbundle(self.bundle.read, '.hg10un', |
|
293 | f = self._writetempbundle(self.bundle.read, '.hg10un', | |
294 | header='HG10UN') |
|
294 | header='HG10UN') | |
295 | self.bundlefile = self.bundle = exchange.readbundle(ui, f, |
|
295 | self.bundlefile = self.bundle = exchange.readbundle(ui, f, | |
296 |
bundle |
|
296 | bundlepath, | |
297 | self.vfs) |
|
297 | self.vfs) | |
298 |
|
298 | |||
299 | # dict with the mapping 'filename' -> position in the bundle |
|
299 | # dict with the mapping 'filename' -> position in the bundle |
General Comments 0
You need to be logged in to leave comments.
Login now