Rev 2443: Remove duplication by using the new help infrastructure for topic output. in file:///home/robertc/source/baz/help-contexts/
Robert Collins
robertc at robertcollins.net
Fri Apr 20 02:15:15 BST 2007
At file:///home/robertc/source/baz/help-contexts/
------------------------------------------------------------
revno: 2443
revision-id: robertc at robertcollins.net-20070420011512-wralvwk6y8esm83c
parent: robertc at robertcollins.net-20070420010751-mghuh1ac3ce1ovhl
committer: Robert Collins <robertc at robertcollins.net>
branch nick: help-contexts
timestamp: Fri 2007-04-20 11:15:12 +1000
message:
Remove duplication by using the new help infrastructure for topic output.
modified:
bzrlib/help.py help.py-20050505025907-4dd7a6d63912f894
=== modified file 'bzrlib/help.py'
--- a/bzrlib/help.py 2007-04-20 00:50:34 +0000
+++ b/bzrlib/help.py 2007-04-20 01:15:12 +0000
@@ -37,12 +37,10 @@
if outfile is None:
outfile = sys.stdout
- if topic is None:
- topic = 'basic'
-
- if topic in help_topics.topic_registry:
- txt = help_topics.topic_registry.get_detail(topic)
- outfile.write(txt)
+ topic_context = help_topics.HelpTopicContext()
+ topics = topic_context.get_topics(topic)
+ if topics:
+ outfile.write(topics[0].get_help_text())
else:
help_on_command(topic, outfile=outfile)
More information about the bazaar-commits
mailing list