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.
$ hg init t
$ cd t
$ echo 1 > foo
$ hg ci -Am m
adding foo
$ cd ..
$ hg clone t tt
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd tt
$ echo 1.1 > foo
$ hg ci -Am m
$ cd ../t
$ echo 1.2 > foo
$ hg ci -Am m
Should not update:
$ hg pull -u ../tt
pulling from ../tt
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
not updating: not a linear update
(merge or update --check to force update)
$ cd ../tt
Should not update:
$ hg pull -u ../t
pulling from ../t
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
not updating: not a linear update
(merge or update --check to force update)
$ HGMERGE=true hg merge
merging foo
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg ci -mm
$ cd ../t
Should work:
$ hg pull -u ../tt
pulling from ../tt
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (-1 heads)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd ..