/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: Lukáš Lalinský
  • Date: 2007-12-17 17:28:25 UTC
  • mfrom: (3120 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3123.
  • Revision ID: lalinsky@gmail.com-20071217172825-tr3pqm1mhvs3gwnn
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
rendering on the screen naturally.
34
34
"""
35
35
 
36
 
from bzrlib import registry
 
36
import sys
 
37
 
 
38
import bzrlib
 
39
from bzrlib import (
 
40
    osutils,
 
41
    registry,
 
42
    )
37
43
 
38
44
 
39
45
# Section identifiers (map topics to the right place in the manual)
128
134
    return ''.join(out)
129
135
 
130
136
 
 
137
def _load_from_file(topic_name):
 
138
    """Load help from a file.
 
139
 
 
140
    Topics are expected to be txt files in bzrlib.help_topics.
 
141
    """
 
142
    resource_name = osutils.pathjoin("en", "%s.txt" % (topic_name,))
 
143
    return osutils.resource_string('bzrlib.help_topics', resource_name)
 
144
 
 
145
 
131
146
def _help_on_revisionspec(name):
132
147
    """Generate the help for revision specs."""
133
148
    import re
268
283
               operations.
269
284
-Dhashcache    Log every time a working file is read to determine its hash.
270
285
-Dhooks        Trace hook execution.
 
286
-Dhttp         Trace http connections, requests and responses
271
287
-Dhpss         Trace smart protocol requests and responses.
272
288
-Dindex        Trace major index operations.
273
289
-Dlock         Trace when lockdir locks are taken or released.
 
290
-Dmerge        Emit information for debugging merges.
274
291
"""
275
292
 
276
293
_standard_options = \
549
566
  log10 = log --short -r -10..-1
550
567
"""
551
568
 
 
569
_criss_cross = \
 
570
"""Criss-Cross
 
571
 
 
572
A criss-cross in the branch history can cause the default merge technique
 
573
to emit more conflicts than would normally be expected.
 
574
 
 
575
If you encounter criss-crosses, you can use merge --weave instead, which
 
576
should provide a much better result.
 
577
 
 
578
Criss-crosses occur in a branch's history if two branches merge the same thing
 
579
and then merge one another, or if two branches merge one another at the same
 
580
time.  They can be avoided by having each branch only merge from or into a
 
581
designated central branch (a "star topology").
 
582
 
 
583
Criss-crosses cause problems because of the way merge works.  Bazaar's default
 
584
merge is a three-way merger; in order to merge OTHER into THIS, it must
 
585
find a basis for comparison, BASE.  Using BASE, it can determine whether
 
586
differences between THIS and OTHER are due to one side adding lines, or
 
587
from another side removing lines.
 
588
 
 
589
Criss-crosses mean there is no good choice for a base.  Selecting the recent
 
590
merge points could cause one side's changes to be silently discarded.
 
591
Selecting older merge points (which Bazaar does) mean that extra conflicts
 
592
are emitted.
 
593
 
 
594
The ``weave`` merge type is not affected by this problem because it uses
 
595
line-origin detection instead of a basis revision to determine the cause of
 
596
differences."""
 
597
 
552
598
 
553
599
# Register help topics
554
600
topic_registry.register("revisionspec", _help_on_revisionspec,
569
615
                        "Help on status flags")
570
616
def get_bugs_topic(topic):
571
617
    from bzrlib import bugtracker
572
 
    return "Bug Trackers\n\n" + bugtracker.tracker_registry.help_topic(topic)
573
 
topic_registry.register('bugs', get_bugs_topic, 'Bug tracker support')
 
618
    return "Bug Tracker Settings\n\n" + \
 
619
        bugtracker.tracker_registry.help_topic(topic)
 
620
topic_registry.register('bugs', get_bugs_topic, 'Bug tracker settings')
574
621
topic_registry.register('env-variables', _env_variables,
575
622
                        'Environment variable names and values')
576
623
topic_registry.register('files', _files,
577
624
                        'Information on configuration and log files')
578
625
 
 
626
# Load some of the help topics from files
 
627
topic_registry.register('authentication', _load_from_file,
 
628
                        'Information on configuring authentication')
 
629
topic_registry.register('configuration', _load_from_file,
 
630
                        'Details on the configuration settings available')
 
631
topic_registry.register('conflicts', _load_from_file,
 
632
                        'Types of conflicts and what to do about them')
 
633
topic_registry.register('hooks', _load_from_file,
 
634
                        'Points at which custom processing can be added')
 
635
 
579
636
 
580
637
# Register concept topics.
581
638
# Note that we might choose to remove these from the online help in the
593
650
                        SECT_CONCEPT)
594
651
topic_registry.register('working-trees', _working_trees,
595
652
                        'Information on working trees', SECT_CONCEPT)
 
653
topic_registry.register('criss-cross', _criss_cross,
 
654
                        'Information on criss-cross merging', SECT_CONCEPT)
596
655
 
597
656
 
598
657
class HelpTopicIndex(object):