Mercurial > hg
changeset 21628:7c5a85619dca
bundle2: raise BundleValueError error for stream level unsupported params
This ensures both consistency and smooth propagation over the wire.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 28 May 2014 15:37:47 -0700 |
parents | 3e8bcc90f07c |
children | 664c49420d48 |
files | mercurial/bundle2.py tests/test-bundle2.t |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bundle2.py Wed May 28 16:46:58 2014 -0700 +++ b/mercurial/bundle2.py Wed May 28 15:37:47 2014 -0700 @@ -523,7 +523,7 @@ if name[0].islower(): self.ui.debug("ignoring unknown parameter %r\n" % name) else: - raise KeyError(name) + raise error.BundleValueError(params=(name,)) def iterparts(self):
--- a/tests/test-bundle2.t Wed May 28 16:46:58 2014 -0700 +++ b/tests/test-bundle2.t Wed May 28 15:37:47 2014 -0700 @@ -166,7 +166,7 @@ > unbundler = bundle2.unbundle20(ui, sys.stdin) > try: > params = unbundler.params - > except KeyError, exc: + > except error.BundleValueError, exc: > raise util.Abort('unknown parameters: %s' % exc) > ui.write('options count: %i\n' % len(params)) > for key in sorted(params): @@ -304,7 +304,7 @@ --------------------------------------------------- $ hg bundle2 --param 'Gravity' | hg statbundle2 - abort: unknown parameters: 'Gravity' + abort: unknown parameters: Stream Parameter - Gravity [255] Test debug output