unbundle: test and fix for clean abort on unknown bundle2 feature
This introduce a test for the feature and fix the exception name that is
different on default.
--- a/mercurial/commands.py Tue Sep 29 14:33:31 2015 -0500
+++ b/mercurial/commands.py Thu Sep 24 17:52:21 2015 -0700
@@ -6388,7 +6388,7 @@
try:
op = bundle2.processbundle(repo, gen, lambda: tr)
tr.close()
- except error.UnsupportedPartError as exc:
+ except error.BundleUnknownFeatureError as exc:
raise util.Abort(_('%s: unknown bundle feature, %s')
% (fname, exc),
hint=_("see https://mercurial.selenic.com/"
--- a/tests/test-bundle2-format.t Tue Sep 29 14:33:31 2015 -0500
+++ b/tests/test-bundle2-format.t Thu Sep 24 17:52:21 2015 -0700
@@ -1219,5 +1219,9 @@
$ cat ../rev.hg2.bz | hg statbundle2
abort: unknown parameters: Stream Parameter - Compression='FooBarUnknown'
[255]
+ $ hg unbundle ../rev.hg2.bz
+ abort: ../rev.hg2.bz: unknown bundle feature, Stream Parameter - Compression='FooBarUnknown'
+ (see https://mercurial.selenic.com/wiki/BundleFeature for more information)
+ [255]
$ cd ..