1
# Copyright (C) 2006 Canonical Ltd
1
# Copyright (C) 2006, 2009 Canonical Ltd
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
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():
184
184
if doc == bzrlib.revisionspec.RevisionSpec.help_txt:
191
191
#doc = indent_re.sub('', doc)
192
192
while (doc[-2:] == '\n\n' or doc[-1:] == ' '):
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))
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
304
-Dauth Trace authentication sections used.
305
-Derror Instead of normal error handling, always print a traceback
307
-Devil Capture call sites that do expensive or badly-scaling
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`.
321
305
_standard_options = \
322
306
"""Standard Options
324
308
Standard options are legal for all commands.
326
310
--help, -h Show help message.
327
311
--verbose, -v Display more information.
328
312
--quiet, -q Only display errors and warnings.
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.
386
370
Obviously to commit on a checkout you need to be able to write to the master
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
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.
423
407
By default just running 'bzr init' will create a repository within the new
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')
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
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')
746
737
# Register concept topics.
819
810
returned instead of plain text.
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: