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.