1
# Copyright (C) 2004, 2005, 2006 Canonical Ltd
1
# Copyright (C) 2004, 2005, 2006, 2007 Canonical Ltd
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
152
152
def short_name(self):
153
153
if self._short_name:
154
154
return self._short_name
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):
163
156
def set_short_name(self, short_name):
164
157
self._short_name = short_name
377
370
_global_option('all')
378
371
_global_option('overwrite', help='Ignore differences between branches and '
379
'overwrite unconditionally')
372
'overwrite unconditionally.')
380
373
_global_option('basis', type=str)
381
374
_global_option('bound')
382
375
_global_option('diff-options', type=str)
383
_global_option('help',
384
help='show help message',
386
376
_global_option('file', type=unicode, short_name='F')
387
377
_global_option('force')
388
378
_global_option('format', type=unicode)
389
379
_global_option('forward')
390
380
_global_option('message', type=unicode,
382
help='Message string.')
392
383
_global_option('no-recurse')
393
384
_global_option('profile',
394
help='show performance profiling information')
385
help='Show performance profiling information.')
395
386
_global_option('revision',
396
387
type=_parse_revision_str,
398
help='See \'help revisionspec\' for details')
399
_global_option('show-ids',
400
help='show internal object ids')
389
help='See \'help revisionspec\' for details.')
390
_global_option('show-ids',
391
help='Show internal object ids.')
401
392
_global_option('timezone',
403
394
help='display timezone as local, original, or utc')
404
395
_global_option('unbound')
405
396
_global_option('verbose',
406
help='display more information',
397
help='Display more information.',
408
399
_global_option('version')
409
400
_global_option('email')
410
401
_global_option('update')
411
_global_registry_option('log-format', "Use this log format",
402
_global_registry_option('log-format', "Use specified log format.",
412
403
log.log_formatter_registry, value_switches=True,
413
404
title='Log format')
414
405
_global_option('long', help='Use detailed log format. Same as --log-format long',
417
408
_global_option('line', help='Use log format with one line per revision. Same as --log-format line')
418
409
_global_option('root', type=str)
419
410
_global_option('no-backup')
420
_global_registry_option('merge-type', 'Select a particular merge algorithm',
411
_global_registry_option('merge-type', 'Select a particular merge algorithm.',
421
412
_merge_type_registry, value_switches=True,
422
413
title='Merge algorithm')
423
414
_global_option('pattern', type=str)
424
415
_global_option('quiet', short_name='q')
425
416
_global_option('remember', help='Remember the specified location as a'
427
_global_option('reprocess', help='Reprocess to reduce spurious conflicts')
418
_global_option('reprocess', help='Reprocess to reduce spurious conflicts.')
428
419
_global_option('kind', type=str)
429
420
_global_option('dry-run',
430
help="show what would be done, but don't actually do anything")
421
help="Show what would be done, but don't actually do anything.")
431
422
_global_option('name-from-revision', help='The path name in the old tree.')
434
# prior to 0.14 these were always globally registered; the old dict is
435
# available for plugins that use it but it should not be used.
436
Option.SHORT_OPTIONS = symbol_versioning.DeprecatedDict(
437
symbol_versioning.zero_fourteen,
440
'F': Option.OPTIONS['file'],
441
'h': Option.OPTIONS['help'],
442
'm': Option.OPTIONS['message'],
443
'r': Option.OPTIONS['revision'],
444
'v': Option.OPTIONS['verbose'],
445
'l': Option.OPTIONS['long'],
446
'q': Option.OPTIONS['quiet'],
448
'Set the short option name when constructing the Option.',
424
_help_option = Option('help',
425
help='Show help message.',