mercurial/templatekw.py
changeset 39371 3cd977d5a16b
parent 39368 5b1d406b39f1
child 39587 918944f53aac
equal deleted inserted replaced
39370:46f3ff64bea7 39371:3cd977d5a16b
   541     ctx = context.resource(mapping, 'ctx')
   541     ctx = context.resource(mapping, 'ctx')
   542     if ctx.obsolete():
   542     if ctx.obsolete():
   543         return 'obsolete'
   543         return 'obsolete'
   544     return ''
   544     return ''
   545 
   545 
       
   546 @templatekeyword('path', requires={'fctx'})
       
   547 def showpath(context, mapping):
       
   548     """String. Repository-absolute path of the current file. (EXPERIMENTAL)"""
       
   549     fctx = context.resource(mapping, 'fctx')
       
   550     return fctx.path()
       
   551 
   546 @templatekeyword('peerurls', requires={'repo'})
   552 @templatekeyword('peerurls', requires={'repo'})
   547 def showpeerurls(context, mapping):
   553 def showpeerurls(context, mapping):
   548     """A dictionary of repository locations defined in the [paths] section
   554     """A dictionary of repository locations defined in the [paths] section
   549     of your configuration file."""
   555     of your configuration file."""
   550     repo = context.resource(mapping, 'repo')
   556     repo = context.resource(mapping, 'repo')