128
134
return ''.join(out)
137
def _load_from_file(topic_name):
138
"""Load help from a file.
140
Topics are expected to be txt files in bzrlib.help_topics.
142
resource_name = osutils.pathjoin("en", "%s.txt" % (topic_name,))
143
return osutils.resource_string('bzrlib.help_topics', resource_name)
131
146
def _help_on_revisionspec(name):
132
147
"""Generate the help for revision specs."""
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.
276
293
_standard_options = \
549
566
log10 = log --short -r -10..-1
572
A criss-cross in the branch history can cause the default merge technique
573
to emit more conflicts than would normally be expected.
575
If you encounter criss-crosses, you can use merge --weave instead, which
576
should provide a much better result.
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").
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.
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
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
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')
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')
580
637
# Register concept topics.
581
638
# Note that we might choose to remove these from the online help in the
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)
598
657
class HelpTopicIndex(object):