[MERGE] bzr help disambiguation and bzr help PLUGINNAME
Martin Pool
mbp at canonical.com
Fri Apr 20 10:06:45 BST 2007
Martin Pool has voted +1 (conditional).
Status is now: Conditionally approved
Comment:
+ """An object to manage help in multiple indices.
+
+ This maintains a list of places to search for help. It is currently
+ separate to the HelpTopicRegistry because of its ordered nature,
but
+ possibly we should instread structure it as a search within the
registry
+ and add ordering and searching facilities to the registry. The
registry
+ would probably need to be restructured to support that cleanly
which is
+ why this has been implemented in parallel even though it does as a
result
+ permit searching for help in indexs which are not discoverable via
+ 'help topics'.
sp 'instead', 'indexes'
Part of this paragraph seems like a todo comment, not an instruction to
a user of this class?
The initial description seems redundant with the class name, maybe use
the first sentence of your second para instead.
I think the key things this needs to say but doesn't is that: each index
has a unique prefix string, such as "commands", and contains help topics
which can be listed or searched. Just for the benefit of people trying
to understand the api.
- if help in help_commands.keys():
+ if cmd_name in help_commands.keys():
So it looks like that was quite broken before, as the variable 'help'
here is not a name but rather a stringio? No objection to the change.
+ result = "Plugin '%s' has no docstring.\n" %
self.module.__name__
Incidentally, it might be good to mention the plugin's __file__ when we
have a problem.
+ self.assertStartsWith(helptext, 'usage:bzr Demo')
I would expect a space after the colon.
I haven't read the tests in detail but the general idea seems good.
For details, see:
http://bundlebuggy.aaronbentley.com/request/%3C1177048145.26184.7.camel%40localhost.localdomain%3E
More information about the bazaar
mailing list