--- a/mercurial/templatekw.py Fri Apr 22 21:45:06 2016 +0900
+++ b/mercurial/templatekw.py Fri Apr 22 21:46:33 2016 +0900
@@ -7,6 +7,7 @@
from __future__ import absolute_import
+from .i18n import _
from .node import hex, nullid
from . import (
encoding,
@@ -422,6 +423,12 @@
else:
return 'o'
+@templatekeyword('index')
+def showindex(**args):
+ """Integer. The current iteration of the loop. (0 indexed)"""
+ # just hosts documentation; should be overridden by template mapping
+ raise error.Abort(_("can't use index in this context"))
+
@templatekeyword('latesttag')
def showlatesttag(**args):
"""List of strings. The global tags on the most recent globally