Show More
@@ -376,17 +376,17 b' def _processpart(op, part):' | |||
|
376 | 376 | handler = parthandlermapping.get(part.type) |
|
377 | 377 | if handler is None: |
|
378 | 378 | status = 'unsupported-type' |
|
379 |
raise error. |
|
|
379 | raise error.BundleUnknownFeatureError(parttype=part.type) | |
|
380 | 380 | indebug(op.ui, 'found a handler for part %r' % part.type) |
|
381 | 381 | unknownparams = part.mandatorykeys - handler.params |
|
382 | 382 | if unknownparams: |
|
383 | 383 | unknownparams = list(unknownparams) |
|
384 | 384 | unknownparams.sort() |
|
385 | 385 | status = 'unsupported-params (%s)' % unknownparams |
|
386 |
raise error. |
|
|
387 | params=unknownparams) | |
|
386 | raise error.BundleUnknownFeatureError(parttype=part.type, | |
|
387 | params=unknownparams) | |
|
388 | 388 | status = 'supported' |
|
389 |
except error. |
|
|
389 | except error.BundleUnknownFeatureError as exc: | |
|
390 | 390 | if part.mandatory: # mandatory parts |
|
391 | 391 | raise |
|
392 | 392 | indebug(op.ui, 'ignoring unsupported advisory part %s' % exc) |
@@ -666,7 +666,7 b' class unbundle20(unpackermixin):' | |||
|
666 | 666 | if name[0].islower(): |
|
667 | 667 | indebug(self.ui, "ignoring unknown parameter %r" % name) |
|
668 | 668 | else: |
|
669 |
raise error. |
|
|
669 | raise error.BundleUnknownFeatureError(params=(name,)) | |
|
670 | 670 | |
|
671 | 671 | |
|
672 | 672 | def iterparts(self): |
@@ -1329,7 +1329,7 b' def handleerrorunsupportedcontent(op, in' | |||
|
1329 | 1329 | if params is not None: |
|
1330 | 1330 | kwargs['params'] = params.split('\0') |
|
1331 | 1331 | |
|
1332 |
raise error. |
|
|
1332 | raise error.BundleUnknownFeatureError(**kwargs) | |
|
1333 | 1333 | |
|
1334 | 1334 | @parthandler('error:pushraced', ('message',)) |
|
1335 | 1335 | def handleerrorpushraced(op, inpart): |
@@ -141,7 +141,7 b' class PushRaced(RuntimeError):' | |||
|
141 | 141 | class BundleValueError(ValueError): |
|
142 | 142 | """error raised when bundle2 cannot be processed""" |
|
143 | 143 | |
|
144 |
class |
|
|
144 | class BundleUnknownFeatureError(BundleValueError): | |
|
145 | 145 | def __init__(self, parttype=None, params=()): |
|
146 | 146 | self.parttype = parttype |
|
147 | 147 | self.params = params |
General Comments 0
You need to be logged in to leave comments.
Login now