[PING][MERGE] help topics

Aaron Bentley aaron.bentley at utoronto.ca
Tue Nov 7 20:23:35 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Goffredo Baroncelli wrote:
> +def add_topic(topic, detail, summary):
> +    """Add documentation for a new topic.
> +
> +    :param topic:  Name of documentation entry.
> +    :param detail:  Function or string object providing detailed
> +    documentation for topic.  Function interface is detail(topic, outfile).
> +    :param summary:  String providing single-line documentation for topic.
> +
> +    """
> +    _HELP_TOPICS[topic]=(detail, summary)

Wouldn't it make sense to use a Registry for this?

> +
>  class cmd_revert(Command):
>      """Revert files to a previous revision.
>  
> @@ -2485,23 +2486,25 @@
>  class cmd_help(Command):
>      """Show help on a command or other topic.
>  
> -    For a list of all available commands, say 'bzr help commands'."""
> +    For a list of all available commands, say 'bzr help commands'.
> +    """

There seem to be a lot of unrelated changes here.  These sorts of
changes are hostile to branches, and I have a lot of outstanding branches.

>  class RevisionSpec_revno(RevisionSpec):
> +    """Selects a revision using a number.
> +
> +    Use an integer to specify a revision in the history of the branch.
> +    Optionally a branch can be specified. The 'revno:' prefix is optional.
> +    A negative number will count from the end of the branch (-1 is the
> +    last revision, -2 the previous one). If the negative number is larger
> +    than the branch's history, the first revision is returned.
> +    examples:

Aren't we getting away from putting user-facing text in docstrings?
IIRC, Martin said doing that for BzrNewError was a mistake.

So I like the idea, but I think this implementation could stand improvement.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFFUOtH0F+nu1YWqI0RAsE2AJwI7Z8iIcLLCboy3lqJXRdIhdSj1QCdEXlq
oVrClNdyHewquGNFS5Hg+Po=
=yyyH
-----END PGP SIGNATURE-----




More information about the bazaar mailing list