Show More
@@ -831,8 +831,13 b' def handlereplycaps(op, inpart):' | |||||
831 | @parthandler('b2x:error:unsupportedcontent') |
|
831 | @parthandler('b2x:error:unsupportedcontent') | |
832 | def handlereplycaps(op, inpart): |
|
832 | def handlereplycaps(op, inpart): | |
833 | """Used to transmit unknown content error over the wire""" |
|
833 | """Used to transmit unknown content error over the wire""" | |
834 | parttype = inpart.params['parttype'] |
|
834 | kwargs = {} | |
835 | raise error.BundleValueError(parttype=parttype) |
|
835 | kwargs['parttype'] = inpart.params['parttype'] | |
|
836 | params = inpart.params.get('params') | |||
|
837 | if params is not None: | |||
|
838 | kwargs['params'] = params.split('\0') | |||
|
839 | ||||
|
840 | raise error.BundleValueError(**kwargs) | |||
836 |
|
841 | |||
837 | @parthandler('b2x:error:pushraced') |
|
842 | @parthandler('b2x:error:pushraced') | |
838 | def handlereplycaps(op, inpart): |
|
843 | def handlereplycaps(op, inpart): |
@@ -807,6 +807,8 b' def unbundle(repo, proto, heads):' | |||||
807 | bundler = bundle2.bundle20(repo.ui) |
|
807 | bundler = bundle2.bundle20(repo.ui) | |
808 | errpart = bundler.newpart('B2X:ERROR:UNSUPPORTEDCONTENT') |
|
808 | errpart = bundler.newpart('B2X:ERROR:UNSUPPORTEDCONTENT') | |
809 | errpart.addparam('parttype', exc.parttype) |
|
809 | errpart.addparam('parttype', exc.parttype) | |
|
810 | if exc.params: | |||
|
811 | errpart.addparam('params', '\0'.join(exc.params)) | |||
810 | return streamres(bundler.getchunks()) |
|
812 | return streamres(bundler.getchunks()) | |
811 | except util.Abort, inst: |
|
813 | except util.Abort, inst: | |
812 | # The old code we moved used sys.stderr directly. |
|
814 | # The old code we moved used sys.stderr directly. |
General Comments 0
You need to be logged in to leave comments.
Login now