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
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
"""A collection of extra help information for using bzr.
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
-Dgraph Trace graph traversal.
311
-Dhashcache Log every time a working file is read to determine its hash.
312
-Dhooks Trace hook execution.
313
-Dhpss Trace smart protocol requests and responses.
314
-Dhttp Trace http connections, requests and responses
315
-Dindex Trace major index operations.
316
-Dknit Trace knit operations.
317
-Dlock Trace when lockdir locks are taken or released.
318
-Dmerge Emit information for debugging merges.
319
-Dpack Emit information about pack operations.
320
-Dsftp Trace SFTP internals.
302
development. See `bzr help debug-flags`.
323
305
_standard_options = \
324
306
"""Standard Options
326
308
Standard options are legal for all commands.
328
310
--help, -h Show help message.
329
311
--verbose, -v Display more information.
330
312
--quiet, -q Only display errors and warnings.
383
365
Another possible use for a checkout is to use it with a treeless repository
384
366
containing your branches, where you maintain only one working tree by
385
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
386
368
work on a different branch.
388
370
Obviously to commit on a checkout you need to be able to write to the master
404
386
update Pull any changes in the master branch in to your checkout
405
387
commit Make a commit that is sent to the master branch. If you have
406
a heavy checkout then the --local option will commit to the
388
a heavy checkout then the --local option will commit to the
407
389
checkout without sending the commit to the master
408
390
bind Change the master branch that the commits in the checkout will
420
402
Repositories are a form of database. Bzr will usually maintain this for
421
403
good performance automatically, but in some situations (e.g. when doing
422
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
423
405
optimise the database indices. This can be done by the 'bzr pack' command.
425
407
By default just running 'bzr init' will create a repository within the new
671
653
* If you are using bzr-svn to interoperate with a Subversion
672
repository, use 1.9-rich-root.
654
repository, use 1.14-rich-root.
674
656
* If you are working on a project with big trees (5000+ paths)
675
or deep history (5000+ revisions), use 1.9.
657
or deep history (5000+ revisions), use 1.14.
677
659
* Otherwise, use the default format - it is good enough for
680
662
If some of your developers are unable to use the most recent
681
663
version of Bazaar (due to distro package availability say), be
682
664
sure to adjust the guidelines above accordingly. For example,
683
you may need to select 1.6 instead of 1.9 if your project has
684
standardized on Bazaar 1.7.
665
you may need to select 1.9 instead of 1.14 if your project has
666
standardized on Bazaar 1.13.1 say.
686
668
Note: Many of the currently supported formats have two variants:
687
669
a plain one and a rich-root one. The latter include an additional
727
709
"Help on status flags")
728
710
def get_bugs_topic(topic):
729
711
from bzrlib import bugtracker
730
return ("Bug Tracker Settings\n\n" +
712
return ("Bug Tracker Settings\n\n" +
731
713
bugtracker.tracker_registry.help_topic(topic))
732
714
topic_registry.register('bugs', get_bugs_topic, 'Bug tracker settings')
733
715
topic_registry.register('env-variables', _env_variables,
734
716
'Environment variable names and values')
735
717
topic_registry.register('files', _files,
736
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')
738
# 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
739
725
topic_registry.register('authentication', _load_from_file,
740
726
'Information on configuring authentication')
741
727
topic_registry.register('configuration', _load_from_file,
742
728
'Details on the configuration settings available')
743
729
topic_registry.register('conflicts', _load_from_file,
744
730
'Types of conflicts and what to do about them')
745
topic_registry.register('hooks', _load_from_file,
746
'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')
747
733
topic_registry.register('log-formats', _load_from_file,
748
734
'Details on the logging formats available')
756
742
'Information on what a branch is', SECT_CONCEPT)
757
743
topic_registry.register('checkouts', _checkouts,
758
744
'Information on what a checkout is', SECT_CONCEPT)
745
topic_registry.register('content-filters', _load_from_file,
746
'Conversion of content into/from working trees',
748
topic_registry.register('eol', _load_from_file,
749
'Information on end-of-line handling',
759
751
topic_registry.register('formats', _storage_formats,
760
752
'Information on choosing a storage format',
824
816
returned instead of plain text.
826
818
result = topic_registry.get_detail(self.topic)
827
# there is code duplicated here and in bzrlib/plugin.py's
819
# there is code duplicated here and in bzrlib/plugin.py's
828
820
# matching Topic code. This should probably be factored in
829
821
# to a helper function and a common base class.
830
822
if additional_see_also is not None: