doc: show short description of each commands in generated documents
Before this patch, short description of each commands is not shown in
generated documents (HTML file and UNIX man page). This omitting may
prevent users from understanding about commands.
This patch show it as the 1st paragraph in the help section of each
commands. This style is chosen because:
- showing it as the section title in "command - short desc" style
disallows referencing by "#command" in HTML file: in "en" locale,
hyphen concatenated title is used as the section ID in HTML file
for this style
- showing it as the 1st paragraph in "command - short desc" style
seems to be redundant: "command" appears also just before as the
section title
- showing it just after synopsis like "hg help command" seems not to
be reasonable in UNIX man page
This patch just writes short description ("d['desc'][0]") before "::",
because it should be already "strip()"-ed in "get_desc()", or empty
string for the command without description.
#if unix-permissions no-root no-windows
Prepare
$ hg init a
$ echo a > a/a
$ hg -R a ci -A -m a
adding a
$ hg clone a b
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
One process waiting for another
$ cat > hooks.py << EOF
> import time
> def sleepone(**x): time.sleep(1)
> def sleephalf(**x): time.sleep(0.5)
> EOF
$ echo b > b/b
$ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout &
$ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf"
waiting for lock on working directory of b held by '*:*' (glob)
got lock after ? seconds (glob)
warning: ignoring unknown working parent d2ae7f538514!
$ wait
$ cat stdout
adding b
Pushing to a local read-only repo that can't be locked
$ chmod 100 a/.hg/store
$ hg -R b push a
pushing to a
abort: could not lock repository a: Permission denied
[255]
$ chmod 700 a/.hg/store
#endif