# HG changeset patch # User Pierre-Yves David # Date 1401211927 25200 # Node ID 292331e906d7b91aaf9c8b5a9207790fe05cdcc1 # Parent 7568f5c1c80175dcb2ffd50f79c28cde5f1951bc bundle2: rename b2x:error:unknownpart to b2x:error:unsupportedcontent This is a backward compatibility breakage per se. But bundle2 was explicitly flagged as experimental, and this is one an error path anyway. So the worse possible outcome from this change is to still have a crash but with a different message. diff -r 7568f5c1c801 -r 292331e906d7 mercurial/bundle2.py --- a/mercurial/bundle2.py Wed May 28 15:31:05 2014 -0700 +++ b/mercurial/bundle2.py Tue May 27 10:32:07 2014 -0700 @@ -828,9 +828,9 @@ """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 -r 7568f5c1c801 -r 292331e906d7 mercurial/wireproto.py --- a/mercurial/wireproto.py Wed May 28 15:31:05 2014 -0700 +++ b/mercurial/wireproto.py Tue May 27 10:32:07 2014 -0700 @@ -805,7 +805,8 @@ 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.