##// END OF EJS Templates
bundlerepo: use early return...
Gregory Szorc -
r35074:3eeb0a3e default
parent child Browse files
Show More
@@ -319,19 +319,19 b' class bundlerepository(localrepo.localre'
319 319 [ctx.node() for ctx in self[self.firstnewrev:]])
320 320
321 321 def _handlebundle2part(self, bundle, part):
322 if part.type == 'changegroup':
323 cgstream = part
324 version = part.params.get('version', '01')
325 legalcgvers = changegroup.supportedincomingversions(self)
326 if version not in legalcgvers:
327 msg = _('Unsupported changegroup version: %s')
328 raise error.Abort(msg % version)
329 if bundle.compressed():
330 cgstream = self._writetempbundle(part.read,
331 ".cg%sun" % version)
322 if part.type != 'changegroup':
323 return
332 324
333 self._cgunpacker = changegroup.getunbundler(version, cgstream,
334 'UN')
325 cgstream = part
326 version = part.params.get('version', '01')
327 legalcgvers = changegroup.supportedincomingversions(self)
328 if version not in legalcgvers:
329 msg = _('Unsupported changegroup version: %s')
330 raise error.Abort(msg % version)
331 if bundle.compressed():
332 cgstream = self._writetempbundle(part.read, '.cg%sun' % version)
333
334 self._cgunpacker = changegroup.getunbundler(version, cgstream, 'UN')
335 335
336 336 def _writetempbundle(self, readfn, suffix, header=''):
337 337 """Write a temporary file to disk
General Comments 0
You need to be logged in to leave comments. Login now