[MERGE] updated help topics
Goffredo Baroncelli
kreijack at tiscalinet.it
Wed Nov 8 19:22:21 GMT 2006
On Wednesday 08 November 2006 17:38, you (John Arbash Meinel) wrote:
[....]
> 2) Change from using RevisionSpec.__doc__ to using
> RevisionSpec.help_txt. As you say, it wasn't that hard to do. I went
> with 'help_txt' because 'help' is a builtin python command. (Although
> only really useful from the command line)
Even tough I prefer using the __doc__ attribute fo the help, what about
calling a function instead a static attribute in order to get the help text ?
We can add to the RevisionSpec class a function as:
class RevisionSpec
[...]
def get_help_summary(self):
return self.__doc__.split('\n')[0]
def get_help(self):
return '\n'.join(self.__doc__.split('\n')[2:])
which can be overraidable if we want separate the help text from the __doc__,
but only if it is necessary.
The same path can be used for the help of the Command class...
> Attached is the new diff. I realize there are still some changes in
> builtins which might conflict, but I don't think they are serious.
If this time the your (our) patch will not accepted, I suggest to divide the
patch itself in two: the first one will be related to the help text only (
which I think raises less concern ); the second one will be related to the
code.
Goffredo
( Of course a +1 to your patch )
--
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack at inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87 87C0 BB86 505C 6B2A CFF9
More information about the bazaar
mailing list