##// END OF EJS Templates
bundlerepo: handle changegroup induced phase movement in the associated method...
marmoute -
r51094:21f87689 default
parent child Browse files
Show More
@@ -327,6 +327,14 b' class bundlerepository:'
327 _(b'bundle type %s cannot be read') % type(bundle)
327 _(b'bundle type %s cannot be read') % type(bundle)
328 )
328 )
329
329
330 def _handle_bundle1(self, bundle, bundlepath):
331 if bundle.compressed():
332 f = self._writetempbundle(bundle.read, b'.hg10un', header=b'HG10UN')
333 bundle = exchange.readbundle(self.ui, f, bundlepath, self.vfs)
334
335 self._bundlefile = bundle
336 self._cgunpacker = bundle
337
330 self.firstnewrev = self.changelog.repotiprev + 1
338 self.firstnewrev = self.changelog.repotiprev + 1
331 phases.retractboundary(
339 phases.retractboundary(
332 self,
340 self,
@@ -335,14 +343,6 b' class bundlerepository:'
335 [ctx.node() for ctx in self[self.firstnewrev :]],
343 [ctx.node() for ctx in self[self.firstnewrev :]],
336 )
344 )
337
345
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
346 def _handle_bundle2_cg_part(self, bundle, part):
346 def _handle_bundle2_cg_part(self, bundle, part):
347 assert part.type == b'changegroup'
347 assert part.type == b'changegroup'
348 cgstream = part
348 cgstream = part
@@ -356,6 +356,14 b' class bundlerepository:'
356
356
357 self._cgunpacker = changegroup.getunbundler(version, cgstream, b'UN')
357 self._cgunpacker = changegroup.getunbundler(version, cgstream, b'UN')
358
358
359 self.firstnewrev = self.changelog.repotiprev + 1
360 phases.retractboundary(
361 self,
362 None,
363 phases.draft,
364 [ctx.node() for ctx in self[self.firstnewrev :]],
365 )
366
359 def _writetempbundle(self, readfn, suffix, header=b''):
367 def _writetempbundle(self, readfn, suffix, header=b''):
360 """Write a temporary file to disk"""
368 """Write a temporary file to disk"""
361 fdtemp, temp = self.vfs.mkstemp(prefix=b"hg-bundle-", suffix=suffix)
369 fdtemp, temp = self.vfs.mkstemp(prefix=b"hg-bundle-", suffix=suffix)
General Comments 0
You need to be logged in to leave comments. Login now