Show More
@@ -1,25 +1,28 b'' | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 | 4 | |
|
5 | 5 | $ cat <<'EOF' > scanhelptopics.py |
|
6 | 6 | > from __future__ import absolute_import, print_function |
|
7 | 7 | > import re |
|
8 | 8 | > import sys |
|
9 | > if sys.platform == "win32": | |
|
10 | > import os, msvcrt | |
|
11 | > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) | |
|
9 | 12 | > topics = set() |
|
10 | 13 | > topicre = re.compile(r':hg:`help ([a-z0-9\-.]+)`') |
|
11 | 14 | > for fname in sys.argv: |
|
12 | 15 | > with open(fname) as f: |
|
13 | 16 | > topics.update(m.group(1) for m in topicre.finditer(f.read())) |
|
14 | 17 | > for s in sorted(topics): |
|
15 | 18 | > print(s) |
|
16 | 19 | > EOF |
|
17 | 20 | |
|
18 | 21 | $ cd "$TESTDIR"/.. |
|
19 | 22 | |
|
20 | 23 | Check if ":hg:`help TOPIC`" is valid: |
|
21 | 24 | (use "xargs -n1 -t" to see which help commands are executed) |
|
22 | 25 | |
|
23 | $ hg files 'glob:{hgext,mercurial}/**/*.py' \ | |
|
26 | $ hg files 'glob:{hgext,mercurial}/**/*.py' | sed 's|\\|/|g' \ | |
|
24 | 27 | > | xargs python "$TESTTMP/scanhelptopics.py" \ |
|
25 | 28 | > | xargs -n1 hg help > /dev/null |
General Comments 0
You need to be logged in to leave comments.
Login now