unbundle: cleanly abort on unknown bundle2 feature stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 25 Sep 2015 13:30:49 -0700
branchstable
changeset 26367 f31ddc9bfa5f
parent 26151 0dda3692ec9b
child 26368 0224d22ef5d8
child 26405 c15d8f84343e
unbundle: cleanly abort on unknown bundle2 feature The exception wasn't caught and resulted in a traceback.
mercurial/commands.py
--- a/mercurial/commands.py	Thu Sep 03 22:25:16 2015 +0800
+++ b/mercurial/commands.py	Fri Sep 25 13:30:49 2015 -0700
@@ -6372,6 +6372,12 @@
                 try:
                     op = bundle2.processbundle(repo, gen, lambda: tr)
                     tr.close()
+                except error.UnsupportedPartError 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()