Mercurial > public > mercurial-scm > hg-stable
diff mercurial/logcmdutil.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 | f0b6fbea00cf |
children | 8c48a3c088a7 |
line wrap: on
line diff
--- a/mercurial/logcmdutil.py Thu Mar 15 21:49:33 2018 +0900 +++ b/mercurial/logcmdutil.py Thu Mar 15 21:52:47 2018 +0900 @@ -288,7 +288,7 @@ t = formatter.maketemplater(self.repo.ui, '{join(obsfate, "\n")}', defaults=templatekw.keywords, resources=tres) - obsfate = t.renderdefault({'ctx': ctx, 'revcache': {}}).splitlines() + obsfate = t.renderdefault({'ctx': ctx}).splitlines() if obsfate: for obsfateline in obsfate: @@ -856,7 +856,7 @@ templ = formatter.maketemplater(ui, spec, defaults=templatekw.keywords, resources=tres) def formatnode(repo, ctx): - props = {'ctx': ctx, 'repo': repo, 'revcache': {}} + props = {'ctx': ctx, 'repo': repo} return templ.renderdefault(props) return formatnode