templatekw: extract internal "{rev}:{node|formatnode}" template to constant
This will be used later.
--- a/mercurial/templatekw.py Thu Nov 01 14:35:18 2018 +0100
+++ b/mercurial/templatekw.py Fri Oct 26 21:28:20 2018 +0900
@@ -153,10 +153,13 @@
return dict(zip([s.split(':', 1)[0] for s in columns.splitlines()],
i18n._(columns).splitlines(True)))
+# basic internal templates
+_changeidtmpl = '{rev}:{node|formatnode}'
+
# default templates internally used for rendering of lists
defaulttempl = {
- 'parent': '{rev}:{node|formatnode} ',
- 'manifest': '{rev}:{node|formatnode}',
+ 'parent': _changeidtmpl + ' ',
+ 'manifest': _changeidtmpl,
'file_copy': '{name} ({source})',
'envvar': '{key}={value}',
'extra': '{key}={value|stringescape}'