mercurial/bundle2.py
changeset 39700 b10d145837bc
parent 38783 e7aa113b14f7
child 39721 1b5880352314
equal deleted inserted replaced
39699:6f26417b71bb 39700:b10d145837bc
  1777     """apply a changegroup part on the repo
  1777     """apply a changegroup part on the repo
  1778 
  1778 
  1779     This is a very early implementation that will massive rework before being
  1779     This is a very early implementation that will massive rework before being
  1780     inflicted to any end-user.
  1780     inflicted to any end-user.
  1781     """
  1781     """
       
  1782     from . import localrepo
       
  1783 
  1782     tr = op.gettransaction()
  1784     tr = op.gettransaction()
  1783     unpackerversion = inpart.params.get('version', '01')
  1785     unpackerversion = inpart.params.get('version', '01')
  1784     # We should raise an appropriate exception here
  1786     # We should raise an appropriate exception here
  1785     cg = changegroup.getunbundler(unpackerversion, inpart, None)
  1787     cg = changegroup.getunbundler(unpackerversion, inpart, None)
  1786     # the source and url passed here are overwritten by the one contained in
  1788     # the source and url passed here are overwritten by the one contained in
  1793         if len(op.repo.changelog) != 0:
  1795         if len(op.repo.changelog) != 0:
  1794             raise error.Abort(_(
  1796             raise error.Abort(_(
  1795                 "bundle contains tree manifests, but local repo is "
  1797                 "bundle contains tree manifests, but local repo is "
  1796                 "non-empty and does not use tree manifests"))
  1798                 "non-empty and does not use tree manifests"))
  1797         op.repo.requirements.add('treemanifest')
  1799         op.repo.requirements.add('treemanifest')
  1798         op.repo._applyopenerreqs()
  1800         op.repo.svfs.options = localrepo.resolvestorevfsoptions(
       
  1801             op.repo.ui, op.repo.requirements)
  1799         op.repo._writerequirements()
  1802         op.repo._writerequirements()
  1800     extrakwargs = {}
  1803     extrakwargs = {}
  1801     targetphase = inpart.params.get('targetphase')
  1804     targetphase = inpart.params.get('targetphase')
  1802     if targetphase is not None:
  1805     if targetphase is not None:
  1803         extrakwargs[r'targetphase'] = int(targetphase)
  1806         extrakwargs[r'targetphase'] = int(targetphase)