# HG changeset patch # User Yuya Nishihara # Date 2017-10-21 08:31:13 # Node ID e2fc6cec0eff1dea9bdcd732565cb6db939564fe # Parent 29e6513856eef37add7b70c702373437f9c02038 templatekw: move loadkeyword() to bottom loadkeyword() isn't a template keyword function. diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -860,12 +860,6 @@ def showtags(**args): """List of strings. Any tags associated with the changeset.""" return shownames('tags', **args) -def loadkeyword(ui, extname, registrarobj): - """Load template keyword from specified registrarobj - """ - for name, func in registrarobj._table.iteritems(): - keywords[name] = func - @templatekeyword('termwidth') def showtermwidth(repo, ctx, templ, **args): """Integer. The width of the current terminal.""" @@ -891,5 +885,11 @@ def showinstabilities(**args): return showlist('instability', args['ctx'].instabilities(), args, plural='instabilities') +def loadkeyword(ui, extname, registrarobj): + """Load template keyword from specified registrarobj + """ + for name, func in registrarobj._table.iteritems(): + keywords[name] = func + # tell hggettext to extract docstrings from these functions: i18nfunctions = keywords.values()