# HG changeset patch # User Yuya Nishihara # Date 2018-10-26 12:28:20 # Node ID 2891ee3fcb8689415db0a5f8fd03bc4a3dcd82bf # Parent 844a40687d833d7a1d9b6e1b008ec74c6aa3ea0b templatekw: extract internal "{rev}:{node|formatnode}" template to constant This will be used later. diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -153,10 +153,13 @@ def getlogcolumns(): 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}'