Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/help.py @ 24587:76c0b4cfa039
help: populate template functions via docstrings
We do this for revsets, template keywrods, and template filters. Now we
do it for template functions as well.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 01 Apr 2015 20:23:58 -0700 |
parents | be83fd9d46d5 |
children | 117b9a101f71 |
comparison
equal
deleted
inserted
replaced
24586:90e3f5d22dad | 24587:76c0b4cfa039 |
---|---|
7 | 7 |
8 from i18n import gettext, _ | 8 from i18n import gettext, _ |
9 import itertools, os, textwrap | 9 import itertools, os, textwrap |
10 import error | 10 import error |
11 import extensions, revset, fileset, templatekw, templatefilters, filemerge | 11 import extensions, revset, fileset, templatekw, templatefilters, filemerge |
12 import templater | |
12 import encoding, util, minirst | 13 import encoding, util, minirst |
13 import cmdutil | 14 import cmdutil |
14 import hgweb.webcommands as webcommands | 15 import hgweb.webcommands as webcommands |
15 | 16 |
16 def listexts(header, exts, indent=1, showdeprecated=False): | 17 def listexts(header, exts, indent=1, showdeprecated=False): |
207 addtopicsymbols('merge-tools', '.. internaltoolsmarker', | 208 addtopicsymbols('merge-tools', '.. internaltoolsmarker', |
208 filemerge.internalsdoc) | 209 filemerge.internalsdoc) |
209 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols) | 210 addtopicsymbols('revsets', '.. predicatesmarker', revset.symbols) |
210 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords) | 211 addtopicsymbols('templates', '.. keywordsmarker', templatekw.dockeywords) |
211 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) | 212 addtopicsymbols('templates', '.. filtersmarker', templatefilters.filters) |
213 addtopicsymbols('templates', '.. functionsmarker', templater.funcs) | |
212 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands, | 214 addtopicsymbols('hgweb', '.. webcommandsmarker', webcommands.commands, |
213 dedent=True) | 215 dedent=True) |
214 | 216 |
215 def help_(ui, name, unknowncmd=False, full=True, **opts): | 217 def help_(ui, name, unknowncmd=False, full=True, **opts): |
216 ''' | 218 ''' |