comparison mercurial/exchange.py @ 21181:a92619a2dbd7 stable

bundle2: catch UnknownPartError during pull We narrow the exception catching while pulling.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 21 Apr 2014 19:43:01 -0700
parents b056777221bf
children 08c84fd99aac
comparison
equal deleted inserted replaced
21180:b056777221bf 21181:a92619a2dbd7
582 if kwargs.keys() == ['format']: 582 if kwargs.keys() == ['format']:
583 return # nothing to pull 583 return # nothing to pull
584 bundle = pullop.remote.getbundle('pull', **kwargs) 584 bundle = pullop.remote.getbundle('pull', **kwargs)
585 try: 585 try:
586 op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction) 586 op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
587 except KeyError, exc: 587 except UnknownPartError, exc:
588 raise util.Abort('missing support for %s' % exc) 588 raise util.Abort('missing support for %s' % exc)
589 assert len(op.records['changegroup']) == 1 589 assert len(op.records['changegroup']) == 1
590 pullop.cgresult = op.records['changegroup'][0]['return'] 590 pullop.cgresult = op.records['changegroup'][0]['return']
591 591
592 def _pullbundle2extraprepare(pullop, kwargs): 592 def _pullbundle2extraprepare(pullop, kwargs):