[RFC] help logic for commands should be a Command method?

Robert Collins robertc at robertcollins.net
Thu Apr 19 23:53:10 BST 2007


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
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070420/c4620b6f/attachment.pgp 


More information about the bazaar mailing list