Show More
@@ -318,14 +318,7 b' class bundlerepository:' | |||||
318 | cgpart.seek(0, os.SEEK_SET) |
|
318 | cgpart.seek(0, os.SEEK_SET) | |
319 |
|
319 | |||
320 | elif isinstance(bundle, changegroup.cg1unpacker): |
|
320 | elif isinstance(bundle, changegroup.cg1unpacker): | |
321 | if bundle.compressed(): |
|
321 | self._handle_bundle1(bundle, bundlepath) | |
322 | f = self._writetempbundle( |
|
|||
323 | bundle.read, b'.hg10un', header=b'HG10UN' |
|
|||
324 | ) |
|
|||
325 | bundle = exchange.readbundle(self.ui, f, bundlepath, self.vfs) |
|
|||
326 |
|
||||
327 | self._bundlefile = bundle |
|
|||
328 | self._cgunpacker = bundle |
|
|||
329 | else: |
|
322 | else: | |
330 | raise error.Abort( |
|
323 | raise error.Abort( | |
331 | _(b'bundle type %s cannot be read') % type(bundle) |
|
324 | _(b'bundle type %s cannot be read') % type(bundle) | |
@@ -342,6 +335,14 b' class bundlerepository:' | |||||
342 | [ctx.node() for ctx in self[self.firstnewrev :]], |
|
335 | [ctx.node() for ctx in self[self.firstnewrev :]], | |
343 | ) |
|
336 | ) | |
344 |
|
337 | |||
|
338 | def _handle_bundle1(self, bundle, bundlepath): | |||
|
339 | if bundle.compressed(): | |||
|
340 | f = self._writetempbundle(bundle.read, b'.hg10un', header=b'HG10UN') | |||
|
341 | bundle = exchange.readbundle(self.ui, f, bundlepath, self.vfs) | |||
|
342 | ||||
|
343 | self._bundlefile = bundle | |||
|
344 | self._cgunpacker = bundle | |||
|
345 | ||||
345 | def _handle_bundle2_cg_part(self, bundle, part): |
|
346 | def _handle_bundle2_cg_part(self, bundle, part): | |
346 | assert part.type == b'changegroup' |
|
347 | assert part.type == b'changegroup' | |
347 | cgstream = part |
|
348 | cgstream = part |
General Comments 0
You need to be logged in to leave comments.
Login now