Comments
Patch
@@ -6395,10 +6395,16 @@ def unbundle(ui, repo, fname1, *fnames,
if isinstance(gen, bundle2.unbundle20):
tr = repo.transaction('unbundle')
try:
op = bundle2.processbundle(repo, gen, lambda: tr)
tr.close()
+ except error.BundleUnknownFeatureError as exc:
+ raise util.Abort(_('%s: unknown bundle feature, %s')
+ % (fname, exc),
+ hint=_("see https://mercurial.selenic.com/"
+ "wiki/BundleFeature for more "
+ "information"))
finally:
if tr:
tr.release()
changes = [r.get('result', 0)
for r in op.records['changegroup']]
@@ -957,7 +957,11 @@ unknown compression while unbundling
$ hg bundle2 --param Compression=FooBarUnknown --rev '8+7+5+4' ../rev.hg2.bz
$ 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 ..