Code review comment for lp:~richard-wilbur/bzr/1540293-manpage

Revision history for this message
Richard Wilbur (richard-wilbur) wrote :

I agree that we need tests, but how do you do that in documentation? Do we have infrastructure for that already? Otherwise it seems like a lot of text parsing and haggling with rules.

Honestly, I haven't built the documentation, yet. So I don't know for sure that it is fixed but from reading the code:
1. The first line assigns an initial value to doc without any side effects (nothing else is changed).
2. The second line overwrites the value assigned to doc in the first line by calling bzrlib.help_topics.help_as_plain_text() which man-escapes the text returned by cmd.help() (which from my reading of class Command is just cmd.__doc__ as in the first line).
3. The output of this function is subsequently passed through man_escape() before being written to the output file.

In the associated bug (lp:1540293) I noted that I ran across a document describing conventions for GNU/Linux man-pages (man/info man-pages). I have only started reading it but already found that the title (header?) line '.TH ' is supposed to have the title in all capitals (we bzr in lowercase). Also, it always expects a date of the most recent "nontrivial" change in the form YYYY-MM-DD. That sounds very much like our datestamp.

I'll keep reading and see what I can learn (and report here and/or in the bug).

I am certainly interested in targetting lp:bzr/2.7. How would I accomplish that?

« Back to merge proposal