~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help_topics/__init__.py

  • Committer: Ian Clatworthy
  • Date: 2007-12-17 04:49:20 UTC
  • mfrom: (3089.3.17 bzr.ug-tweaks)
  • mto: This revision was merged to the branch mainline in revision 3120.
  • Revision ID: ian.clatworthy@internode.on.net-20071217044920-8fjh9v6m1t93c8dc
Move material out of User Guide into User Reference (Ian Clatworthy)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
rendering on the screen naturally.
34
34
"""
35
35
 
36
 
from bzrlib import registry
 
36
import sys
 
37
 
 
38
import bzrlib
 
39
from bzrlib import (
 
40
    osutils,
 
41
    registry,
 
42
    )
37
43
 
38
44
 
39
45
# Section identifiers (map topics to the right place in the manual)
128
134
    return ''.join(out)
129
135
 
130
136
 
 
137
def _load_from_file(topic_name):
 
138
    """Load help from a file.
 
139
 
 
140
    Topics are expected to be txt files in bzrlib.help_topics.
 
141
    """
 
142
    resource_name = osutils.pathjoin("en", "%s.txt" % (topic_name,))
 
143
    return osutils.resource_string('bzrlib.help_topics', resource_name)
 
144
 
 
145
 
131
146
def _help_on_revisionspec(name):
132
147
    """Generate the help for revision specs."""
133
148
    import re
608
623
topic_registry.register('files', _files,
609
624
                        'Information on configuration and log files')
610
625
 
 
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')
 
635
 
611
636
 
612
637
# Register concept topics.
613
638
# Note that we might choose to remove these from the online help in the