/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 bzrlib/help_topics/__init__.py

  • Committer: Martin Pool
  • Date: 2009-03-13 07:54:48 UTC
  • mfrom: (4144 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4189.
  • Revision ID: mbp@sourcefrog.net-20090313075448-jlz1t7baz7gzipqn
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006, 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
126
126
 
127
127
    topics = topic_registry.keys()
128
128
    lmax = max(len(topic) for topic in topics)
129
 
        
 
129
 
130
130
    out = []
131
131
    for topic in topics:
132
132
        summary = topic_registry.get_summary(topic)
179
179
 
180
180
    # The help text is indented 4 spaces - this re cleans that up below
181
181
    indent_re = re.compile(r'^    ', re.MULTILINE)
182
 
    for i in bzrlib.revisionspec.SPEC_TYPES:
 
182
    for prefix, i in bzrlib.revisionspec.revspec_registry.iteritems():
183
183
        doc = i.help_txt
184
184
        if doc == bzrlib.revisionspec.RevisionSpec.help_txt:
185
185
            summary = "N/A"
191
191
            #doc = indent_re.sub('', doc)
192
192
            while (doc[-2:] == '\n\n' or doc[-1:] == ' '):
193
193
                doc = doc[:-1]
194
 
        
 
194
 
195
195
        # Note: The leading : here are HACKs to get reStructuredText
196
196
        # 'field' formatting - we know that the prefix ends in a ':'.
197
197
        out.append(":%s\n\t%s" % (i.prefix, summary))
299
299
 
300
300
See doc/developers/profiling.txt for more information on profiling.
301
301
A number of debug flags are also available to assist troubleshooting and
302
 
development.
303
 
 
304
 
-Dauth            Trace authentication sections used.
305
 
-Derror           Instead of normal error handling, always print a traceback
306
 
                  on error.
307
 
-Devil            Capture call sites that do expensive or badly-scaling
308
 
                  operations.
309
 
-Dfetch           Trace history copying between repositories.
310
 
-Dhashcache       Log every time a working file is read to determine its hash.
311
 
-Dhooks           Trace hook execution.
312
 
-Dhpss            Trace smart protocol requests and responses.
313
 
-Dhttp            Trace http connections, requests and responses
314
 
-Dindex           Trace major index operations.
315
 
-Dknit            Trace knit operations.
316
 
-Dlock            Trace when lockdir locks are taken or released.
317
 
-Dmerge           Emit information for debugging merges.
318
 
-Dpack            Emit information about pack operations.
 
302
development.  See `bzr help debug-flags`.
319
303
"""
320
304
 
321
305
_standard_options = \
322
306
"""Standard Options
323
307
 
324
308
Standard options are legal for all commands.
325
 
      
 
309
 
326
310
--help, -h     Show help message.
327
311
--verbose, -v  Display more information.
328
312
--quiet, -q    Only display errors and warnings.
380
364
 
381
365
Another possible use for a checkout is to use it with a treeless repository
382
366
containing your branches, where you maintain only one working tree by
383
 
switching the master branch that the checkout points to when you want to 
 
367
switching the master branch that the checkout points to when you want to
384
368
work on a different branch.
385
369
 
386
370
Obviously to commit on a checkout you need to be able to write to the master
401
385
              checkout
402
386
  update      Pull any changes in the master branch in to your checkout
403
387
  commit      Make a commit that is sent to the master branch. If you have
404
 
              a heavy checkout then the --local option will commit to the 
 
388
              a heavy checkout then the --local option will commit to the
405
389
              checkout without sending the commit to the master
406
390
  bind        Change the master branch that the commits in the checkout will
407
391
              be sent to
417
401
 
418
402
Repositories are a form of database. Bzr will usually maintain this for
419
403
good performance automatically, but in some situations (e.g. when doing
420
 
very many commits in a short time period) you may want to ask bzr to 
 
404
very many commits in a short time period) you may want to ask bzr to
421
405
optimise the database indices. This can be done by the 'bzr pack' command.
422
406
 
423
407
By default just running 'bzr init' will create a repository within the new
540
524
  - File unversioned
541
525
  R File renamed
542
526
  ? File unknown
 
527
  X File nonexistent (and unknown to bzr)
543
528
  C File has conflicts
544
529
  P Entry for a pending merge (not a file)
545
530
 
724
709
                        "Help on status flags")
725
710
def get_bugs_topic(topic):
726
711
    from bzrlib import bugtracker
727
 
    return ("Bug Tracker Settings\n\n" + 
 
712
    return ("Bug Tracker Settings\n\n" +
728
713
        bugtracker.tracker_registry.help_topic(topic))
729
714
topic_registry.register('bugs', get_bugs_topic, 'Bug tracker settings')
730
715
topic_registry.register('env-variables', _env_variables,
731
716
                        'Environment variable names and values')
732
717
topic_registry.register('files', _files,
733
718
                        'Information on configuration and log files')
 
719
topic_registry.register_lazy('hooks', 'bzrlib.hooks', 'hooks_help_text',
 
720
                        'Points at which custom processing can be added')
734
721
 
735
 
# Load some of the help topics from files
 
722
# Load some of the help topics from files. Note that topics which reproduce API
 
723
# details will tend to skew (quickly usually!) so please seek other solutions
 
724
# for such things.
736
725
topic_registry.register('authentication', _load_from_file,
737
726
                        'Information on configuring authentication')
738
727
topic_registry.register('configuration', _load_from_file,
739
728
                        'Details on the configuration settings available')
740
729
topic_registry.register('conflicts', _load_from_file,
741
730
                        'Types of conflicts and what to do about them')
742
 
topic_registry.register('hooks', _load_from_file,
743
 
                        'Points at which custom processing can be added')
 
731
topic_registry.register('debug-flags', _load_from_file,
 
732
                        'Options to show or record debug information')
 
733
topic_registry.register('log-formats', _load_from_file,
 
734
                        'Details on the logging formats available')
744
735
 
745
736
 
746
737
# Register concept topics.
819
810
            returned instead of plain text.
820
811
        """
821
812
        result = topic_registry.get_detail(self.topic)
822
 
        # there is code duplicated here and in bzrlib/plugin.py's 
 
813
        # there is code duplicated here and in bzrlib/plugin.py's
823
814
        # matching Topic code. This should probably be factored in
824
815
        # to a helper function and a common base class.
825
816
        if additional_see_also is not None: