diff -r f1c54d003327 -r a33be093ec62 mercurial/formatter.py --- a/mercurial/formatter.py Thu Dec 21 22:05:30 2017 +0900 +++ b/mercurial/formatter.py Thu Dec 21 22:17:39 2017 +0900 @@ -94,14 +94,14 @@ >>> def subrepos(ui, fm): ... fm.startitem() -... fm.write(b'repo', b'[%s]\\n', b'baz') +... fm.write(b'reponame', b'[%s]\\n', b'baz') ... files(ui, fm.nested(b'files')) ... fm.end() >>> show(subrepos) [baz] foo bar ->>> show(subrepos, template=b'{repo}: {join(files % "{path}", ", ")}\\n') +>>> show(subrepos, template=b'{reponame}: {join(files % "{path}", ", ")}\\n') baz: foo, bar """ @@ -491,7 +491,9 @@ and function""" return { 'cache': {}, # for templatekw/funcs to store reusable data + 'ctx': None, 'repo': repo, + 'revcache': None, # per-ctx cache; set later 'ui': ui, }