2017-01-25 16:39:17 +03:00
|
|
|
#require test-repo
|
|
|
|
|
|
|
|
$ . "$TESTDIR/helpers-testrepo.sh"
|
|
|
|
|
2018-01-11 03:20:37 +03:00
|
|
|
$ cat >> $HGRCPATH <<EOF
|
|
|
|
> [extensions]
|
|
|
|
> hgsubversion=
|
|
|
|
> EOF
|
|
|
|
|
2017-01-25 16:39:17 +03:00
|
|
|
$ cat <<'EOF' > scanhelptopics.py
|
|
|
|
> from __future__ import absolute_import, print_function
|
|
|
|
> import re
|
|
|
|
> import sys
|
2017-03-19 21:42:45 +03:00
|
|
|
> if sys.platform == "win32":
|
|
|
|
> import os, msvcrt
|
|
|
|
> msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
|
2017-01-25 16:39:17 +03:00
|
|
|
> topics = set()
|
|
|
|
> topicre = re.compile(r':hg:`help ([a-z0-9\-.]+)`')
|
|
|
|
> for fname in sys.argv:
|
|
|
|
> with open(fname) as f:
|
|
|
|
> topics.update(m.group(1) for m in topicre.finditer(f.read()))
|
|
|
|
> for s in sorted(topics):
|
|
|
|
> print(s)
|
|
|
|
> EOF
|
|
|
|
|
|
|
|
$ cd "$TESTDIR"/..
|
|
|
|
|
|
|
|
Check if ":hg:`help TOPIC`" is valid:
|
|
|
|
(use "xargs -n1 -t" to see which help commands are executed)
|
|
|
|
|
2017-07-02 07:14:20 +03:00
|
|
|
$ testrepohg files 'glob:{hgdemandimport,hgext,mercurial}/**/*.py' \
|
2017-06-28 03:24:31 +03:00
|
|
|
> | sed 's|\\|/|g' \
|
2017-06-20 16:45:02 +03:00
|
|
|
> | xargs $PYTHON "$TESTTMP/scanhelptopics.py" \
|
2018-02-02 23:17:25 +03:00
|
|
|
> | xargs -n1 hg --cwd / help > /dev/null
|