Mercurial > public > mercurial-scm > hg
comparison mercurial/wireproto.py @ 21619:292331e906d7
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 27 May 2014 10:32:07 -0700 |
parents | 7568f5c1c801 |
children | 6eaa71b2a3cc |
comparison
equal
deleted
inserted
replaced
21618:7568f5c1c801 | 21619:292331e906d7 |
---|---|
803 finally: | 803 finally: |
804 fp.close() | 804 fp.close() |
805 os.unlink(tempname) | 805 os.unlink(tempname) |
806 except error.BundleValueError, exc: | 806 except error.BundleValueError, exc: |
807 bundler = bundle2.bundle20(repo.ui) | 807 bundler = bundle2.bundle20(repo.ui) |
808 bundler.newpart('B2X:ERROR:UNKNOWNPART', [('parttype', str(exc))]) | 808 errpart = bundler.newpart('B2X:ERROR:UNSUPPORTEDCONTENT') |
809 errpart.addparam('parttype', str(exc)) | |
809 return streamres(bundler.getchunks()) | 810 return streamres(bundler.getchunks()) |
810 except util.Abort, inst: | 811 except util.Abort, inst: |
811 # The old code we moved used sys.stderr directly. | 812 # The old code we moved used sys.stderr directly. |
812 # We did not change it to minimise code change. | 813 # We did not change it to minimise code change. |
813 # This need to be moved to something proper. | 814 # This need to be moved to something proper. |