Re: [PATCH follow-up] perftemplating: abort on incompatible version

2018-06-12 Thread Yuya Nishihara
On Tue, 12 Jun 2018 09:42:42 +0200, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld 
> # Date 1528736741 -7200
> #  Mon Jun 11 19:05:41 2018 +0200
> # Node ID 1d1ccc0388cd266b6186be64dafbc46015440fa0
> # Parent  a577a199983c5033192660c55db909df83fe65fc
> # EXP-Topic perftemplating
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #  hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
> 1d1ccc0388cd
> perftemplating: abort on incompatible version

Queued, thanks.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH follow-up] perftemplating: abort on incompatible version

2018-06-12 Thread Boris Feld
# HG changeset patch
# User Boris Feld 
# Date 1528736741 -7200
#  Mon Jun 11 19:05:41 2018 +0200
# Node ID 1d1ccc0388cd266b6186be64dafbc46015440fa0
# Parent  a577a199983c5033192660c55db909df83fe65fc
# EXP-Topic perftemplating
# Available At https://bitbucket.org/octobus/mercurial-devel/
#  hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
1d1ccc0388cd
perftemplating: abort on incompatible version

This is what the other debug commands do. Thanks to Yuya Nishihara for
pointing this out.

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -911,8 +911,8 @@ def perfmoonwalk(ui, repo, **opts):
  ] + formatteropts)
 def perftemplating(ui, repo, **opts):
 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')
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel