mercurial/templatekw.py
changeset 39371 3cd977d5a16b
parent 39368 5b1d406b39f1
child 39587 918944f53aac
--- 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