Mercurial > public > mercurial-scm > hg
diff contrib/phabricator.py @ 36514:7b74afec6772
templatekw: switch non-showlist template keywords to new API
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 25 Feb 2018 13:40:46 +0900 |
parents | f18ba40d792f |
children | 4397909f82d3 |
line wrap: on
line diff
--- a/contrib/phabricator.py Sun Feb 25 14:28:32 2018 +0900 +++ b/contrib/phabricator.py Sun Feb 25 13:40:46 2018 +0900 @@ -868,11 +868,12 @@ templatekeyword = registrar.templatekeyword() -@templatekeyword('phabreview') -def template_review(repo, ctx, revcache, **args): +@templatekeyword('phabreview', requires={'ctx'}) +def template_review(context, mapping): """:phabreview: Object describing the review for this changeset. Has attributes `url` and `id`. """ + ctx = context.resource(mapping, 'ctx') m = _differentialrevisiondescre.search(ctx.description()) if m: return {