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