Mercurial > hg
diff hgext/churn.py @ 28628:ed1d90f6e921
templater: do not abuse SyntaxError to report errors in template map file
SyntaxError is the class representing syntax errors in Python code. We should
use a dedicated exception class for our needs. With this change, unnecessary
re-wrapping of SyntaxError can be eliminated.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 Mar 2016 18:01:04 +0900 |
parents | 70d3dc05e118 |
children | d5883fd055c6 |
line wrap: on
line diff
--- a/hgext/churn.py Wed Mar 23 13:34:47 2016 -0700 +++ b/hgext/churn.py Sat Mar 26 18:01:04 2016 +0900 @@ -19,7 +19,6 @@ cmdutil, commands, encoding, - error, patch, scmutil, util, @@ -34,12 +33,7 @@ testedwith = 'internal' def maketemplater(ui, repo, tmpl): - try: - t = cmdutil.changeset_templater(ui, repo, False, None, tmpl, - None, False) - except SyntaxError as inst: - raise error.Abort(inst.args[0]) - return t + return cmdutil.changeset_templater(ui, repo, False, None, tmpl, None, False) def changedlines(ui, repo, ctx1, ctx2, fns): added, removed = 0, 0