~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/option.py

  • Committer: Martin Pool
  • Date: 2007-07-11 04:15:48 UTC
  • mto: This revision was merged to the branch mainline in revision 2605.
  • Revision ID: mbp@sourcefrog.net-20070711041548-n1om2ptyj2j01r6l
Clean up old/unused global options

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
    def short_name(self):
153
153
        if self._short_name:
154
154
            return self._short_name
155
 
        else:
156
 
            # remove this when SHORT_OPTIONS is removed
157
 
            # XXX: This is accessing a DeprecatedDict, so we call the super 
158
 
            # method to avoid warnings
159
 
            for (k, v) in dict.iteritems(Option.SHORT_OPTIONS):
160
 
                if v == self:
161
 
                    return k
162
155
 
163
156
    def set_short_name(self, short_name):
164
157
        self._short_name = short_name
374
367
_merge_type_registry.register_lazy('weave', 'bzrlib.merge', 'WeaveMerger',
375
368
                                   "Weave-based merge")
376
369
 
377
 
_global_option('all')
378
370
_global_option('overwrite', help='Ignore differences between branches and '
379
371
               'overwrite unconditionally.')
380
 
_global_option('basis', type=str)
381
 
_global_option('bound')
382
372
_global_option('diff-options', type=str)
383
 
_global_option('help',
384
 
               help='Show help message.',
385
 
               short_name='h')
386
 
_global_option('file', type=unicode, short_name='F')
387
373
_global_option('force')
388
374
_global_option('format', type=unicode)
389
 
_global_option('forward')
390
375
_global_option('message', type=unicode,
391
376
               short_name='m')
392
377
_global_option('no-recurse')
393
 
_global_option('profile',
394
 
               help='Show performance profiling information.')
395
378
_global_option('revision',
396
379
               type=_parse_revision_str,
397
380
               short_name='r',
401
384
_global_option('timezone',
402
385
               type=str,
403
386
               help='Display timezone as local, original, or utc.')
404
 
_global_option('unbound')
405
387
_global_option('verbose',
406
388
               help='Display more information.',
407
389
               short_name='v')
408
 
_global_option('version')
409
 
_global_option('email')
410
 
_global_option('update')
411
390
_global_registry_option('log-format', "Use specified log format.",
412
391
                        log.log_formatter_registry, value_switches=True,
413
392
                        title='Log format')
414
 
_global_option('long',
415
 
        help='Use detailed log format.  Same as --log-format long.',
416
 
        short_name='l')
417
 
_global_option('short',
418
 
        help='Use moderately short log format. Same as --log-format short.')
419
 
_global_option('line', help='Use log format with one line per revision. Same as --log-format line.')
420
393
_global_option('root', type=str)
421
394
_global_registry_option('merge-type', 'Select a particular merge algorithm.',
422
395
                        _merge_type_registry, value_switches=True,
423
396
                        title='Merge algorithm')
424
 
_global_option('pattern', type=str)
425
 
_global_option('quiet', short_name='q')
426
397
_global_option('remember', help='Remember the specified location as a'
427
398
               ' default.')
428
399
_global_option('reprocess', help='Reprocess to reduce spurious conflicts.')
431
402
               help="Show what would be done, but don't actually do anything.")
432
403
_global_option('name-from-revision', help='The path name in the old tree.')
433
404
 
434
 
 
435
 
# prior to 0.14 these were always globally registered; the old dict is
436
 
# available for plugins that use it but it should not be used.
437
 
Option.SHORT_OPTIONS = symbol_versioning.DeprecatedDict(
438
 
    symbol_versioning.zero_fourteen,
439
 
    'SHORT_OPTIONS',
440
 
    {
441
 
        'F': Option.OPTIONS['file'],
442
 
        'h': Option.OPTIONS['help'],
443
 
        'm': Option.OPTIONS['message'],
444
 
        'r': Option.OPTIONS['revision'],
445
 
        'v': Option.OPTIONS['verbose'],
446
 
        'l': Option.OPTIONS['long'],
447
 
        'q': Option.OPTIONS['quiet'],
448
 
    },
449
 
    'Set the short option name when constructing the Option.',
450
 
    )
 
405
_help_option = Option('help',
 
406
                      help='Show help message.',
 
407
                      short_name='h')