Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revset.py @ 14318:1f46be4689ed
help: consolidate topic hooks in help.py
This removes loops like cmdutil->revset->help->extensions->cmdutil and
simplifies the code.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 13 May 2011 12:57:27 -0500 |
parents | 30273f0c776b |
children | c0b6a734b4f3 |
comparison
equal
deleted
inserted
replaced
14317:660b0c1b6196 | 14318:1f46be4689ed |
---|---|
4 # | 4 # |
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 import re | 8 import re |
9 import parser, util, error, discovery, help, hbisect | 9 import parser, util, error, discovery, hbisect |
10 import bookmarks as bookmarksmod | 10 import bookmarks as bookmarksmod |
11 import match as matchmod | 11 import match as matchmod |
12 from i18n import _ | 12 from i18n import _ |
13 | 13 |
14 elements = { | 14 elements = { |
979 weight, tree = optimize(tree, True) | 979 weight, tree = optimize(tree, True) |
980 def mfunc(repo, subset): | 980 def mfunc(repo, subset): |
981 return getset(repo, subset, tree) | 981 return getset(repo, subset, tree) |
982 return mfunc | 982 return mfunc |
983 | 983 |
984 def makedoc(topic, doc): | |
985 return help.makeitemsdoc(topic, doc, '.. predicatesmarker', symbols) | |
986 | |
987 # tell hggettext to extract docstrings from these functions: | 984 # tell hggettext to extract docstrings from these functions: |
988 i18nfunctions = symbols.values() | 985 i18nfunctions = symbols.values() |