496
521
_merge_type_registry = MergeTypeRegistry()
522
_merge_type_registry.register_lazy('diff3', 'bzrlib.merge', 'Diff3Merger',
523
"Merge using external diff3")
524
_merge_type_registry.register_lazy('lca', 'bzrlib.merge', 'LCAMerger',
497
526
_merge_type_registry.register_lazy('merge3', 'bzrlib.merge', 'Merge3Merger',
498
527
"Native diff3-style merge")
499
_merge_type_registry.register_lazy('diff3', 'bzrlib.merge', 'Diff3Merger',
500
"Merge using external diff3")
501
528
_merge_type_registry.register_lazy('weave', 'bzrlib.merge', 'WeaveMerger',
502
529
"Weave-based merge")
503
_merge_type_registry.register_lazy('lca', 'bzrlib.merge', 'LCAMerger',
506
531
# Declare the standard options
507
532
_standard_option('help', short_name='h',
518
543
# Declare commonly used options
519
544
_global_option('all')
520
_global_option('overwrite', help='Ignore differences between branches and '
521
'overwrite unconditionally.')
522
545
_global_option('basis', type=str)
523
546
_global_option('bound')
547
_global_option('change',
548
type=_parse_change_str,
550
param_name='revision',
551
help='Select changes introduced by the specified revision. See also "help revisionspec".')
524
552
_global_option('diff-options', type=str)
553
_global_option('directory', short_name='d', type=unicode,
554
help='Branch to operate on, instead of working directory')
555
_global_option('dry-run',
556
help="Show what would be done, but don't actually do anything.")
557
_global_option('email')
525
558
_global_option('file', type=unicode, short_name='F')
526
559
_global_option('force')
527
560
_global_option('format', type=unicode)
528
561
_global_option('forward')
562
_global_option('kind', type=str)
563
_global_option('line', help='Use log format with one line per revision.'
564
' Same as --log-format line')
565
_global_registry_option('log-format', "Use specified log format.",
566
lazy_registry=('bzrlib.log', 'log_formatter_registry'),
567
value_switches=True, title='Log format',
568
short_value_switches={'short': 'S'})
569
_global_option('long', help='Use detailed log format.'
570
' Same as --log-format long',
572
_global_registry_option('merge-type', 'Select a particular merge algorithm.',
573
_merge_type_registry, value_switches=True,
574
title='Merge algorithm')
529
575
_global_option('message', type=unicode,
531
577
help='Message string.')
578
_global_option('name-from-revision', help='The path name in the old tree.')
579
_global_option('no-backup')
532
580
_global_option('no-recurse')
533
581
_global_option('null', short_name='0',
534
582
help='Use an ASCII NUL (\\0) separator rather than '
584
_global_option('overwrite', help='Ignore differences between branches and '
585
'overwrite unconditionally.')
586
_global_option('pattern', type=str)
536
587
_global_option('profile',
537
588
help='Show performance profiling information.')
589
_global_option('reprocess', help='Reprocess to reduce spurious conflicts.')
590
_global_option('remember', help='Remember the specified location as a'
538
592
_global_option('revision',
539
593
type=_parse_revision_str,
541
595
help='See "help revisionspec" for details.')
542
_global_option('change',
543
type=_parse_change_str,
545
param_name='revision',
546
help='Select changes introduced by the specified revision. See also "help revisionspec".')
596
_global_option('short', help='Use moderately short log format.'
597
' Same as --log-format short')
547
598
_global_option('show-ids',
548
599
help='Show internal object ids.')
549
600
_global_option('timezone',
551
602
help='Display timezone as local, original, or utc.')
603
_global_option('root', type=str)
552
604
_global_option('unbound')
605
_global_option('update')
553
606
_global_option('version')
554
_global_option('email')
555
_global_option('update')
556
_global_registry_option('log-format', "Use specified log format.",
557
lazy_registry=('bzrlib.log', 'log_formatter_registry'),
558
value_switches=True, title='Log format')
559
_global_option('long', help='Use detailed log format. Same as --log-format long',
561
_global_option('short', help='Use moderately short log format. Same as --log-format short')
562
_global_option('line', help='Use log format with one line per revision. Same as --log-format line')
563
_global_option('root', type=str)
564
_global_option('no-backup')
565
_global_registry_option('merge-type', 'Select a particular merge algorithm.',
566
_merge_type_registry, value_switches=True,
567
title='Merge algorithm')
568
_global_option('pattern', type=str)
569
_global_option('remember', help='Remember the specified location as a'
571
_global_option('reprocess', help='Reprocess to reduce spurious conflicts.')
572
_global_option('kind', type=str)
573
_global_option('dry-run',
574
help="Show what would be done, but don't actually do anything.")
575
_global_option('name-from-revision', help='The path name in the old tree.')
576
_global_option('directory', short_name='d', type=unicode,
577
help='Branch to operate on, instead of working directory')
579
608
diff_writer_registry = _mod_registry.Registry()
580
609
diff_writer_registry.register('plain', lambda x: x, 'Plaintext diff output.')