diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -828,9 +828,9 @@ def handlereplycaps(op, inpart): """Used to transmit abort error over the wire""" raise util.Abort(inpart.params['message'], hint=inpart.params.get('hint')) -@parthandler('b2x:error:unknownpart') +@parthandler('b2x:error:unsupportedcontent') def handlereplycaps(op, inpart): - """Used to transmit unknown part error over the wire""" + """Used to transmit unknown content error over the wire""" raise error.BundleValueError(inpart.params['parttype']) @parthandler('b2x:error:pushraced') diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -805,7 +805,8 @@ def unbundle(repo, proto, heads): os.unlink(tempname) except error.BundleValueError, exc: bundler = bundle2.bundle20(repo.ui) - bundler.newpart('B2X:ERROR:UNKNOWNPART', [('parttype', str(exc))]) + errpart = bundler.newpart('B2X:ERROR:UNSUPPORTEDCONTENT') + errpart.addparam('parttype', str(exc)) return streamres(bundler.getchunks()) except util.Abort, inst: # The old code we moved used sys.stderr directly.