mercurial/exchange.py
changeset 21159 024f38f6d5f6
parent 21158 8f6530b62177
child 21180 b056777221bf
equal deleted inserted replaced
21158:8f6530b62177 21159:024f38f6d5f6
   576     else:
   576     else:
   577         kwargs['common'] = pullop.common
   577         kwargs['common'] = pullop.common
   578         kwargs['heads'] = pullop.heads or pullop.rheads
   578         kwargs['heads'] = pullop.heads or pullop.rheads
   579         if pullop.heads is None and list(pullop.common) == [nullid]:
   579         if pullop.heads is None and list(pullop.common) == [nullid]:
   580             pullop.repo.ui.status(_("requesting all changes\n"))
   580             pullop.repo.ui.status(_("requesting all changes\n"))
       
   581     _pullbundle2extraprepare(pullop, kwargs)
   581     if kwargs.keys() == ['format']:
   582     if kwargs.keys() == ['format']:
   582         return # nothing to pull
   583         return # nothing to pull
   583     bundle = pullop.remote.getbundle('pull', **kwargs)
   584     bundle = pullop.remote.getbundle('pull', **kwargs)
   584     try:
   585     try:
   585         op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
   586         op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
   586     except KeyError, exc:
   587     except KeyError, exc:
   587         raise util.Abort('missing support for %s' % exc)
   588         raise util.Abort('missing support for %s' % exc)
   588     assert len(op.records['changegroup']) == 1
   589     assert len(op.records['changegroup']) == 1
   589     pullop.cgresult = op.records['changegroup'][0]['return']
   590     pullop.cgresult = op.records['changegroup'][0]['return']
       
   591 
       
   592 def _pullbundle2extraprepare(pullop, kwargs):
       
   593     """hook function so that extensions can extend the getbundle call"""
       
   594     pass
   590 
   595 
   591 def _pullchangeset(pullop):
   596 def _pullchangeset(pullop):
   592     """pull changeset from unbundle into the local repo"""
   597     """pull changeset from unbundle into the local repo"""
   593     # We delay the open of the transaction as late as possible so we
   598     # We delay the open of the transaction as late as possible so we
   594     # don't open transaction for nothing or you break future useful
   599     # don't open transaction for nothing or you break future useful