# HG changeset patch # User Pierre-Yves David # Date 1443142341 25200 # Node ID 4c4b3c37776c007b96bd8c1d1299d57009e59295 # Parent 19d946cf2a1bf921e78de18f52cfabcc3401035f 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. diff -r 19d946cf2a1b -r 4c4b3c37776c mercurial/commands.py --- 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/" diff -r 19d946cf2a1b -r 4c4b3c37776c tests/test-bundle2-format.t --- 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 ..