Show More
@@ -4,6 +4,7 b' sys.path.insert(0, "..")' | |||||
4 | # fall back to pure modules if required C extensions are not available |
|
4 | # fall back to pure modules if required C extensions are not available | |
5 | sys.path.append(os.path.join('..', 'mercurial', 'pure')) |
|
5 | sys.path.append(os.path.join('..', 'mercurial', 'pure')) | |
6 | from mercurial import demandimport; demandimport.enable() |
|
6 | from mercurial import demandimport; demandimport.enable() | |
|
7 | from mercurial import encoding | |||
7 | from mercurial.commands import table, globalopts |
|
8 | from mercurial.commands import table, globalopts | |
8 | from mercurial.i18n import _ |
|
9 | from mercurial.i18n import _ | |
9 | from mercurial.help import helptable |
|
10 | from mercurial.help import helptable | |
@@ -55,9 +56,9 b' def get_cmd(cmd):' | |||||
55 |
|
56 | |||
56 | def show_doc(ui): |
|
57 | def show_doc(ui): | |
57 | def section(s): |
|
58 | def section(s): | |
58 |
ui.write("%s\n%s\n\n" % (s, "-" * |
|
59 | ui.write("%s\n%s\n\n" % (s, "-" * encoding.colwidth(s))) | |
59 | def subsection(s): |
|
60 | def subsection(s): | |
60 |
ui.write("%s\n%s\n\n" % (s, '"' * |
|
61 | ui.write("%s\n%s\n\n" % (s, '"' * encoding.colwidth(s))) | |
61 |
|
62 | |||
62 | # print options |
|
63 | # print options | |
63 | section(_("OPTIONS")) |
|
64 | section(_("OPTIONS")) |
@@ -3,10 +3,19 b'' | |||||
3 | "$TESTDIR/hghave" rst2html || exit 80 |
|
3 | "$TESTDIR/hghave" rst2html || exit 80 | |
4 | RST2HTML=$(which rst2html 2> /dev/null || which rst2html.py) |
|
4 | RST2HTML=$(which rst2html 2> /dev/null || which rst2html.py) | |
5 |
|
5 | |||
6 | echo "checking for syntax errors in gendoc.py" |
|
6 | HGENCODING=UTF-8 | |
7 | python $TESTDIR/../doc/gendoc.py > gendoc.txt || exit |
|
7 | export HGENCODING | |
8 |
|
8 | |||
9 | # We run rst2html over the file without adding "--halt warning" to |
|
9 | for PO in C $TESTDIR/../i18n/*.po; do | |
10 | # make it report all errors instead of stopping on the first one. |
|
10 | LOCALE=$(basename $PO .po) | |
11 | echo "checking for parse errors with rst2html" |
|
11 | echo | |
12 | $RST2HTML gendoc.txt /dev/null |
|
12 | echo "% extracting documentation from $LOCALE" | |
|
13 | echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt | |||
|
14 | echo "" >> gendoc-$LOCALE.txt | |||
|
15 | LC_ALL=$LOCALE python $TESTDIR/../doc/gendoc.py >> gendoc-$LOCALE.txt || exit | |||
|
16 | ||||
|
17 | # We run rst2html over the file without adding "--halt warning" to | |||
|
18 | # make it report all errors instead of stopping on the first one. | |||
|
19 | echo "checking for parse errors with rst2html" | |||
|
20 | $RST2HTML gendoc-$LOCALE.txt /dev/null | |||
|
21 | done |
@@ -1,2 +1,30 b'' | |||||
1 | checking for syntax errors in gendoc.py |
|
1 | ||
|
2 | % extracting documentation from C | |||
|
3 | checking for parse errors with rst2html | |||
|
4 | ||||
|
5 | % extracting documentation from da | |||
|
6 | checking for parse errors with rst2html | |||
|
7 | ||||
|
8 | % extracting documentation from de | |||
|
9 | checking for parse errors with rst2html | |||
|
10 | ||||
|
11 | % extracting documentation from el | |||
|
12 | checking for parse errors with rst2html | |||
|
13 | ||||
|
14 | % extracting documentation from fr | |||
2 | checking for parse errors with rst2html |
|
15 | checking for parse errors with rst2html | |
|
16 | ||||
|
17 | % extracting documentation from it | |||
|
18 | checking for parse errors with rst2html | |||
|
19 | ||||
|
20 | % extracting documentation from ja | |||
|
21 | checking for parse errors with rst2html | |||
|
22 | ||||
|
23 | % extracting documentation from pt_BR | |||
|
24 | checking for parse errors with rst2html | |||
|
25 | ||||
|
26 | % extracting documentation from zh_CN | |||
|
27 | checking for parse errors with rst2html | |||
|
28 | ||||
|
29 | % extracting documentation from zh_TW | |||
|
30 | checking for parse errors with rst2html |
General Comments 0
You need to be logged in to leave comments.
Login now