--- a/mercurial/templatekw.py Sun Jul 29 21:25:37 2018 +0900
+++ b/mercurial/templatekw.py Sun Jul 29 21:28:51 2018 +0900
@@ -582,6 +582,12 @@
repo = context.resource(mapping, 'repo')
return repo.root
+@templatekeyword('size', requires={'fctx'})
+def showsize(context, mapping):
+ """Integer. Size of the current file in bytes. (EXPERIMENTAL)"""
+ fctx = context.resource(mapping, 'fctx')
+ return fctx.size()
+
@templatekeyword("successorssets", requires={'repo', 'ctx'})
def showsuccessorssets(context, mapping):
"""Returns a string of sets of successors for a changectx. Format used