~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help_topics/__init__.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
306
306
"""Global Options
307
307
 
308
308
These options may be used with any command, and may appear in front of any
309
 
command.  (e.g. "bzr --profile help").
 
309
command.  (e.g. ``bzr --profile help``).
310
310
 
311
311
--version      Print the version number. Must be supplied before the command.
312
312
--no-aliases   Do not process command aliases when running this command.
325
325
               will be a pickle.
326
326
--coverage     Generate line coverage report in the specified directory.
327
327
 
328
 
See doc/developers/profiling.txt for more information on profiling.
 
328
See http://doc.bazaar.canonical.com/developers/profiling.html for more
 
329
information on profiling.
 
330
 
329
331
A number of debug flags are also available to assist troubleshooting and
330
 
development.  See `bzr help debug-flags`.
 
332
development.  See :doc:`debug-flags-help`.
331
333
"""
332
334
 
333
335
_standard_options = \
518
520
branch history is stored), but multiple branches may share the same
519
521
repository (a shared repository). Branches can be copied and merged.
520
522
 
 
523
In addition, one branch may be bound to another one.  Binding to another
 
524
branch indicates that commits which happen in this branch must also 
 
525
happen in the other branch.  Bazaar ensures consistency by not allowing 
 
526
commits when the two branches are out of date.  In order for a commit 
 
527
to succeed, it may be necessary to update the current branch using 
 
528
``bzr update``.
 
529
 
521
530
Related commands::
522
531
 
523
532
  init    Change a directory into a versioned branch.
524
533
  branch  Create a new branch that is a copy of an existing branch.
525
534
  merge   Perform a three-way merge.
 
535
  bind    Bind a branch to another one.
526
536
"""
527
537
 
528
538
 
647
657
differences.
648
658
"""
649
659
 
650
 
_branches_out_of_sync = """Branches out of sync
 
660
_branches_out_of_sync = """Branches Out of Sync
651
661
 
652
662
When reconfiguring a checkout, tree or branch into a lightweight checkout,
653
663
a local branch must be destroyed.  (For checkouts, this is the local branch
682
692
project owner to upgrade.
683
693
 
684
694
 
685
 
Note: Some of the older formats have two variants:
686
 
a plain one and a rich-root one. The latter include an additional
687
 
field about the root of the tree. There is no performance cost
688
 
for using a rich-root format but you cannot easily merge changes
689
 
from a rich-root format into a plain format. As a consequence,
690
 
moving a project to a rich-root format takes some co-ordination
691
 
in that all contributors need to upgrade their repositories
692
 
around the same time. 2a and all future formats will be
693
 
implicitly rich-root.
694
 
 
695
 
See ``bzr help current-formats`` for the complete list of
696
 
currently supported formats. See ``bzr help other-formats`` for
 
695
.. note::
 
696
 
 
697
   Some of the older formats have two variants:
 
698
   a plain one and a rich-root one. The latter include an additional
 
699
   field about the root of the tree. There is no performance cost
 
700
   for using a rich-root format but you cannot easily merge changes
 
701
   from a rich-root format into a plain format. As a consequence,
 
702
   moving a project to a rich-root format takes some co-ordination
 
703
   in that all contributors need to upgrade their repositories
 
704
   around the same time. 2a and all future formats will be
 
705
   implicitly rich-root.
 
706
 
 
707
See :doc:`current-formats-help` for the complete list of
 
708
currently supported formats. See :doc:`other-formats-help` for
697
709
descriptions of any available experimental and deprecated formats.
698
710
"""
699
711
 
742
754
                        'Information on configuring authentication')
743
755
topic_registry.register('configuration', _load_from_file,
744
756
                        'Details on the configuration settings available')
745
 
topic_registry.register('conflicts', _load_from_file,
 
757
topic_registry.register('conflict-types', _load_from_file,
746
758
                        'Types of conflicts and what to do about them')
747
759
topic_registry.register('debug-flags', _load_from_file,
748
760
                        'Options to show or record debug information')
749
761
topic_registry.register('log-formats', _load_from_file,
750
762
                        'Details on the logging formats available')
751
 
topic_registry.register('diverged-branches', _load_from_file,
752
 
                        'How to fix diverged branches')
753
763
 
754
764
 
755
765
# Register concept topics.
763
773
topic_registry.register('content-filters', _load_from_file,
764
774
                        'Conversion of content into/from working trees',
765
775
                        SECT_CONCEPT)
 
776
topic_registry.register('diverged-branches', _load_from_file,
 
777
                        'How to fix diverged branches',
 
778
                        SECT_CONCEPT)
766
779
topic_registry.register('eol', _load_from_file,
767
780
                        'Information on end-of-line handling',
768
781
                        SECT_CONCEPT)
856
869
 
857
870
def help_as_plain_text(text):
858
871
    """Minimal converter of reStructuredText to plain text."""
 
872
    import re
859
873
    lines = text.splitlines()
860
874
    result = []
861
875
    for line in lines:
863
877
            line = line[1:]
864
878
        elif line.endswith('::'):
865
879
            line = line[:-1]
 
880
        # Map :doc:`xxx-help` to ``bzr help xxx``
 
881
        line = re.sub(":doc:`(.+)-help`", r'``bzr help \1``', line)
866
882
        result.append(line)
867
883
    return "\n".join(result) + "\n"