[RFC] help logic for commands should be a Command method?
John Arbash Meinel
john at arbash-meinel.com
Fri Apr 20 00:20:32 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> On Thu, 2007-04-19 at 11:24 -0500, John Arbash Meinel wrote:
>> Martin Pool wrote:
>>> On 4/19/07, Robert Collins <robertc at robertcollins.net> wrote:
>>>> Well that about says it all - I think the logic in bzrlib/help.py that
>>>> relates to commands would be better suited as 'Command.help_text' or
>>>> some such method.
>>> +1
>>>
>> Isn't it?
>>
>> I see:
> ...
>> Are you saying that the "help_on_command" logic should be rolled into
>> that?
>
> the 'docstring is the help text' part is. But the options -> help isn't,
> nor is the manipulation of takes_args, the detection of whether its a
> plugin or not, and so on.
>
>> I'm ambivalent on it. Because it is helpful, but if we have html help
>> it
>> would be nice to have a formatter which can do the "extra" stuff in a
>> fancy html fashion...
>
> Well we do have html help, and its currently a completely separate piece
> of logic. I would like to fix that up as well, and having the command
> call into a builder of some sort would allow that.
>
> So strictly speaking, I'm not suggesting that we force the help
> implementation to be plain text, but I am suggesting the logic about
> what makes up help for a given command be delegated more thoroughly.
>
> -Rob
Good enough, I guess. As long as things are factored out so that
commands that need to override the default behavior have some helpers
available to them.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGJ/lAJdeBCYSNAAMRAs3RAJ9GuadzC7vzmX6UCgFSSI8KQcuUiACfY7hR
AyPM+KRzFNPhgg4vQ4jBNo8=
=z9vM
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list