Pulkit Goyal <7895pulkit@gmail.com> [Sat, 31 Mar 2018 14:31:29 +0530] rev 37232
infinitepush: replace `remotenames.hoist` with `remotenames.hoistedpeer`
The remotenames.hoist config option was renamed to remotenames.hoistedpeer while
moving to core as an extension. Let's start using the config option provided by
the in-core extension.
Differential Revision: https://phab.mercurial-scm.org/D2990
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 16:57:07 +0900] rev 37231
templater: drop global exception catcher from runfilter() (API)
Now all built-in template filters declare input data types or handle type
errors by themselves.
.. api::
Template filters should declare input data type and/or catch
AttributeError, ValueError, TypeError, etc. as needed. See the doc of
``registrar.templatefilters`` for details.
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 16:53:08 +0900] rev 37230
templatefilters: raise ProgrammingError if unencodable type passed to json()
This shouldn't happen for any template data types (though I know it does
because of some templater bugs.) Let's clarify it is a bug.
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 16:47:44 +0900] rev 37229
templatefilters: handle TypeError by count()
Prepares for removing the weird exception catcher from runfilter().
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 17:02:39 +0900] rev 37228
keyword: declare input type of date filters as date
Dropped redundant dateutil.parsedate(), which is now handled by the
templater.
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 16:12:44 +0900] rev 37227
templatefilters: declare input type as date where appropriate
I'm not sure if the templateutil.date type can be a thing. Currently it's
just a constant.
Yuya Nishihara <yuya@tcha.org> [Tue, 20 Mar 2018 22:57:36 +0900] rev 37226
templater: attach hint to input-type error of runfilter()
Tests will be added by the next patch.
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 15:58:22 +0900] rev 37225
templatefuncs: use evaldate() where seems appropriate
This means date("today") is allowed.
Also fixes evaldate() to forcibly use the custom error message if specified.
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 15:55:31 +0900] rev 37224
templater: factor out function that parses argument as date tuple
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Mar 2018 15:42:28 +0900] rev 37223
templatefilters: declare input type as bytes where appropriate
Some test outputs changed since input is now coerced to a byte string. I
think that's okay. Maybe {date} should have some readable representation?