/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/help_topics/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
from __future__ import absolute_import
37
37
 
38
 
import brzlib
39
 
from brzlib import (
 
38
import breezy
 
39
from breezy import (
40
40
    config,
41
41
    osutils,
42
42
    registry,
139
139
def _load_from_file(topic_name):
140
140
    """Load help from a file.
141
141
 
142
 
    Topics are expected to be txt files in brzlib.help_topics.
 
142
    Topics are expected to be txt files in breezy.help_topics.
143
143
    """
144
144
    resource_name = osutils.pathjoin("en", "%s.txt" % (topic_name,))
145
 
    return osutils.resource_string('brzlib.help_topics', resource_name)
 
145
    return osutils.resource_string('breezy.help_topics', resource_name)
146
146
 
147
147
 
148
148
def _help_on_revisionspec(name):
149
149
    """Generate the help for revision specs."""
150
150
    import re
151
 
    import brzlib.revisionspec
 
151
    import breezy.revisionspec
152
152
 
153
153
    out = []
154
154
    out.append(
187
187
 
188
188
    # The help text is indented 4 spaces - this re cleans that up below
189
189
    indent_re = re.compile(r'^    ', re.MULTILINE)
190
 
    for prefix, i in brzlib.revisionspec.revspec_registry.iteritems():
 
190
    for prefix, i in breezy.revisionspec.revspec_registry.iteritems():
191
191
        doc = i.help_txt
192
 
        if doc == brzlib.revisionspec.RevisionSpec.help_txt:
 
192
        if doc == breezy.revisionspec.RevisionSpec.help_txt:
193
193
            summary = "N/A"
194
194
            doc = summary + "\n"
195
195
        else:
209
209
 
210
210
 
211
211
def _help_on_transport(name):
212
 
    from brzlib.transport import (
 
212
    from breezy.transport import (
213
213
        transport_list_registry,
214
214
    )
215
215
    import textwrap
304
304
  brz help init      more help on e.g. init command
305
305
  brz help commands  list all commands
306
306
  brz help topics    list all help topics
307
 
""" % brzlib.__version__
 
307
""" % breezy.__version__
308
308
 
309
309
 
310
310
_global_options = \
744
744
topic_registry.register('basic', _basic_help, "Basic commands", SECT_HIDDEN)
745
745
topic_registry.register('topics', _help_on_topics, "Topics list", SECT_HIDDEN)
746
746
def get_current_formats_topic(topic):
747
 
    from brzlib import controldir
 
747
    from breezy import controldir
748
748
    return "Current Storage Formats\n\n" + \
749
749
        controldir.format_registry.help_topic(topic)
750
750
def get_other_formats_topic(topic):
751
 
    from brzlib import controldir
 
751
    from breezy import controldir
752
752
    return "Other Storage Formats\n\n" + \
753
753
        controldir.format_registry.help_topic(topic)
754
754
topic_registry.register('current-formats', get_current_formats_topic,
764
764
topic_registry.register('status-flags', _status_flags,
765
765
                        "Help on status flags")
766
766
def get_bugs_topic(topic):
767
 
    from brzlib import bugtracker
 
767
    from breezy import bugtracker
768
768
    return ("Bug Tracker Settings\n\n" +
769
769
        bugtracker.tracker_registry.help_topic(topic))
770
770
topic_registry.register('bugs', get_bugs_topic, 'Bug tracker settings')
772
772
                        'Environment variable names and values')
773
773
topic_registry.register('files', _files,
774
774
                        'Information on configuration and log files')
775
 
topic_registry.register_lazy('hooks', 'brzlib.hooks', 'hooks_help_text',
 
775
topic_registry.register_lazy('hooks', 'breezy.hooks', 'hooks_help_text',
776
776
                        'Points at which custom processing can be added')
777
 
topic_registry.register_lazy('location-alias', 'brzlib.directory_service',
 
777
topic_registry.register_lazy('location-alias', 'breezy.directory_service',
778
778
                        'AliasDirectory.help_text',
779
779
                        'Aliases for remembered locations')
780
780