diff -r 08c84fd99aac -r 4345274adc4b mercurial/bundle2.py --- a/mercurial/bundle2.py Tue Apr 22 11:41:34 2014 -0700 +++ b/mercurial/bundle2.py Mon Apr 21 16:02:03 2014 -0700 @@ -753,3 +753,9 @@ manargs = dict(inpart.mandatoryparams) advargs = dict(inpart.advisoryparams) raise util.Abort(manargs['message'], hint=advargs.get('hint')) + +@parthandler('b2x:error:unknownpart') +def handlereplycaps(op, inpart): + """Used to transmit unknown part error over the wire""" + manargs = dict(inpart.mandatoryparams) + raise UnknownPartError(manargs['parttype'])