equal
deleted
inserted
replaced
1 #!/usr/bin/env python |
1 #!/usr/bin/env python |
2 # |
2 # |
3 # checkseclevel - checking section title levels in each online help document |
3 # checkseclevel - checking section title levels in each online help document |
4 |
4 |
5 import sys, os |
5 from __future__ import absolute_import |
|
6 |
6 import optparse |
7 import optparse |
|
8 import os |
|
9 import sys |
7 |
10 |
8 # import from the live mercurial repo |
11 # import from the live mercurial repo |
9 os.environ['HGMODULEPOLICY'] = 'py' |
12 os.environ['HGMODULEPOLICY'] = 'py' |
10 sys.path.insert(0, "..") |
13 sys.path.insert(0, "..") |
11 from mercurial import demandimport; demandimport.enable() |
14 from mercurial import demandimport; demandimport.enable() |
12 from mercurial.commands import table |
15 from mercurial import ( |
13 from mercurial.help import helptable |
16 commands, |
14 from mercurial import extensions |
17 extensions, |
15 from mercurial import minirst |
18 help, |
16 from mercurial import ui as uimod |
19 minirst, |
|
20 ui as uimod, |
|
21 ) |
|
22 |
|
23 table = commands.table |
|
24 helptable = help.helptable |
17 |
25 |
18 level2mark = ['"', '=', '-', '.', '#'] |
26 level2mark = ['"', '=', '-', '.', '#'] |
19 reservedmarks = ['"'] |
27 reservedmarks = ['"'] |
20 |
28 |
21 mark2level = {} |
29 mark2level = {} |