Mercurial > hg
comparison mercurial/commands.py @ 26410:4c4b3c37776c
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 24 Sep 2015 17:52:21 -0700 |
parents | 0224d22ef5d8 |
children | 4b0fc75f9403 |
comparison
equal
deleted
inserted
replaced
26409:19d946cf2a1b | 26410:4c4b3c37776c |
---|---|
6386 if isinstance(gen, bundle2.unbundle20): | 6386 if isinstance(gen, bundle2.unbundle20): |
6387 tr = repo.transaction('unbundle') | 6387 tr = repo.transaction('unbundle') |
6388 try: | 6388 try: |
6389 op = bundle2.processbundle(repo, gen, lambda: tr) | 6389 op = bundle2.processbundle(repo, gen, lambda: tr) |
6390 tr.close() | 6390 tr.close() |
6391 except error.UnsupportedPartError as exc: | 6391 except error.BundleUnknownFeatureError as exc: |
6392 raise util.Abort(_('%s: unknown bundle feature, %s') | 6392 raise util.Abort(_('%s: unknown bundle feature, %s') |
6393 % (fname, exc), | 6393 % (fname, exc), |
6394 hint=_("see https://mercurial.selenic.com/" | 6394 hint=_("see https://mercurial.selenic.com/" |
6395 "wiki/BundleFeature for more " | 6395 "wiki/BundleFeature for more " |
6396 "information")) | 6396 "information")) |