/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/option.py

  • Committer: Jelmer Vernooij
  • Date: 2020-08-10 15:00:17 UTC
  • mfrom: (7490.40.99 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200810150017-vs7xnrd1vat4iktg
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# TODO: For things like --diff-prefix, we want a way to customize the display
18
18
# of the option argument.
19
19
 
20
 
from __future__ import absolute_import
21
 
 
22
20
import optparse
23
21
import re
24
22
 
27
25
    registry as _mod_registry,
28
26
    revisionspec,
29
27
    )
30
 
from .sixish import (
31
 
    text_type,
32
 
    )
33
28
 
34
29
 
35
30
class BadOptionValue(errors.BzrError):
111
106
    >>> _parse_change_str('123..124')
112
107
    Traceback (most recent call last):
113
108
      ...
114
 
    RangeInChangeOption: Option --change does not accept revision ranges
 
109
    breezy.errors.RangeInChangeOption: Option --change does not accept revision ranges
115
110
    """
116
111
    revs = _parse_revision_str(revstr)
117
112
    if len(revs) > 1:
564
559
               short_name='c',
565
560
               param_name='revision',
566
561
               help='Select changes introduced by the specified revision. See also "help revisionspec".')
567
 
_global_option('directory', short_name='d', type=text_type,
 
562
_global_option('directory', short_name='d', type=str,
568
563
               help='Branch to operate on, instead of working directory.')
569
 
_global_option('file', type=text_type, short_name='F')
 
564
_global_option('file', type=str, short_name='F')
570
565
_global_registry_option('log-format', "Use specified log format.",
571
566
                        lazy_registry=('breezy.log', 'log_formatter_registry'),
572
567
                        value_switches=True, title='Log format',
574
569
_global_registry_option('merge-type', 'Select a particular merge algorithm.',
575
570
                        lazy_registry=('breezy.merge', 'merge_type_registry'),
576
571
                        value_switches=True, title='Merge algorithm')
577
 
_global_option('message', type=text_type,
 
572
_global_option('message', type=str,
578
573
               short_name='m',
579
574
               help='Message string.')
580
575
_global_option('null', short_name='0',