134
128
return ''.join(out)
137
def _load_from_file(topic_name):
138
"""Load help from a file.
140
Topics are expected to be txt files in bzrlib.help_topics.
142
resource_name = osutils.pathjoin("en", "%s.txt" % (topic_name,))
143
return osutils.resource_string('bzrlib.help_topics', resource_name)
146
131
def _help_on_revisionspec(name):
147
132
"""Generate the help for revision specs."""
615
600
"Help on status flags")
616
601
def get_bugs_topic(topic):
617
602
from bzrlib import bugtracker
618
return "Bug Tracker Settings\n\n" + \
619
bugtracker.tracker_registry.help_topic(topic)
620
topic_registry.register('bugs', get_bugs_topic, 'Bug tracker settings')
603
return "Bug Trackers\n\n" + bugtracker.tracker_registry.help_topic(topic)
604
topic_registry.register('bugs', get_bugs_topic, 'Bug tracker support')
621
605
topic_registry.register('env-variables', _env_variables,
622
606
'Environment variable names and values')
623
607
topic_registry.register('files', _files,
624
608
'Information on configuration and log files')
626
# Load some of the help topics from files
627
topic_registry.register('authentication', _load_from_file,
628
'Information on configuring authentication')
629
topic_registry.register('configuration', _load_from_file,
630
'Details on the configuration settings available')
631
topic_registry.register('conflicts', _load_from_file,
632
'Types of conflicts and what to do about them')
633
topic_registry.register('hooks', _load_from_file,
634
'Points at which custom processing can be added')
637
611
# Register concept topics.
638
612
# Note that we might choose to remove these from the online help in the