templatekw: add {path} keyword to host documentation
It's hidden since I'm not sure if filectx templates can be a thing. The plan
is to add {status}, {size}, etc., which are usable within {files % ...}
context.
--- a/mercurial/templatekw.py Sun Aug 05 16:51:25 2018 +0900
+++ b/mercurial/templatekw.py Sun Aug 05 16:33:30 2018 +0900
@@ -543,6 +543,12 @@
return 'obsolete'
return ''
+@templatekeyword('path', requires={'fctx'})
+def showpath(context, mapping):
+ """String. Repository-absolute path of the current file. (EXPERIMENTAL)"""
+ fctx = context.resource(mapping, 'fctx')
+ return fctx.path()
+
@templatekeyword('peerurls', requires={'repo'})
def showpeerurls(context, mapping):
"""A dictionary of repository locations defined in the [paths] section