Patchwork [2,of,3] templatekw: move loadkeyword() to bottom

login
register
mail settings
Submitter Yuya Nishihara
Date Nov. 2, 2017, 1:33 p.m.
Message ID <369af8fed661bef2b0b0.1509629605@mimosa>
Download mbox | patch
Permalink /patch/25346/
State Accepted
Headers show

Comments

Yuya Nishihara - Nov. 2, 2017, 1:33 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1508574673 -32400
#      Sat Oct 21 17:31:13 2017 +0900
# Node ID 369af8fed661bef2b0b061f2eac4c932d4f753ae
# Parent  a19232e55e7c0838299dbd1dfd93207b24a02f39
templatekw: move loadkeyword() to bottom

loadkeyword() isn't a template keyword function.

Patch

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()