Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 37106:be3f33f5e232
templater: switch 'revcache' based on new mapping items
It was pretty easy to leave a stale 'revcache' when switching 'ctx'.
Let's make it be automatically replaced.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 15 Mar 2018 21:52:47 +0900 |
parents | 08890706366e |
children | 335e19c6b7fa |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Thu Mar 15 21:49:33 2018 +0900 +++ b/mercurial/cmdutil.py Thu Mar 15 21:52:47 2018 +0900 @@ -909,7 +909,7 @@ tres = formatter.templateresources(repo.ui, repo) t = formatter.maketemplater(repo.ui, tmpl, defaults=templatekw.keywords, resources=tres) - mapping = {'ctx': ctx, 'revcache': {}} + mapping = {'ctx': ctx} if props: mapping.update(props) return t.renderdefault(mapping)