mercurial/exchange.py
changeset 37635 cc8c06835097
parent 37498 aacfca6f9767
child 37646 72e26319f3b8
equal deleted inserted replaced
37634:0ed11f9368fd 37635:cc8c06835097
  1691     if pullop.remote.capable('getbundle'):
  1691     if pullop.remote.capable('getbundle'):
  1692         # TODO: get bundlecaps from remote
  1692         # TODO: get bundlecaps from remote
  1693         cg = pullop.remote.getbundle('pull', common=pullop.common,
  1693         cg = pullop.remote.getbundle('pull', common=pullop.common,
  1694                                      heads=pullop.heads or pullop.rheads)
  1694                                      heads=pullop.heads or pullop.rheads)
  1695     elif pullop.heads is None:
  1695     elif pullop.heads is None:
  1696         cg = pullop.remote.changegroup(pullop.fetch, 'pull')
  1696         with pullop.remote.commandexecutor() as e:
       
  1697             cg = e.callcommand('changegroup', {
       
  1698                 'nodes': pullop.fetch,
       
  1699                 'source': 'pull',
       
  1700             }).result()
       
  1701 
  1697     elif not pullop.remote.capable('changegroupsubset'):
  1702     elif not pullop.remote.capable('changegroupsubset'):
  1698         raise error.Abort(_("partial pull cannot be done because "
  1703         raise error.Abort(_("partial pull cannot be done because "
  1699                            "other repository doesn't support "
  1704                            "other repository doesn't support "
  1700                            "changegroupsubset."))
  1705                            "changegroupsubset."))
  1701     else:
  1706     else:
  1702         cg = pullop.remote.changegroupsubset(pullop.fetch, pullop.heads, 'pull')
  1707         with pullop.remote.commandexecutor() as e:
       
  1708             cg = e.callcommand('changegroupsubset', {
       
  1709                 'bases': pullop.fetch,
       
  1710                 'heads': pullop.heads,
       
  1711                 'source': 'pull',
       
  1712             }).result()
       
  1713 
  1703     bundleop = bundle2.applybundle(pullop.repo, cg, tr, 'pull',
  1714     bundleop = bundle2.applybundle(pullop.repo, cg, tr, 'pull',
  1704                                    pullop.remote.url())
  1715                                    pullop.remote.url())
  1705     pullop.cgresult = bundle2.combinechangegroupresults(bundleop)
  1716     pullop.cgresult = bundle2.combinechangegroupresults(bundleop)
  1706 
  1717 
  1707 def _pullphase(pullop):
  1718 def _pullphase(pullop):