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