changeset 38273:9df777d7f061

perftemplating: abort on incompatible version This is what the other debug commands do. Thanks to Yuya Nishihara for pointing this out.
author Boris Feld <boris.feld@octobus.net>
date Mon, 11 Jun 2018 19:05:41 +0200
parents 354fad8697fd
children 99188a7c8717
files contrib/perf.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Tue Jun 05 21:40:33 2018 +0900
+++ b/contrib/perf.py	Mon Jun 11 19:05:41 2018 +0200
@@ -912,8 +912,8 @@
 def perftemplating(ui, repo, testedtemplate=None, **opts):
     """test the rendering time of a given template"""
     if makelogtemplater is None:
-        ui.write_err('incompatible Mercurial version')
-        return 1
+        raise error.Abort(("perftemplating not available with this Mercurial"),
+                          hint="use 4.3 or later")
 
     nullui = ui.copy()
     nullui.fout = open(os.devnull, 'wb')