/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 bzrlib/option.py

Merge bzr.dev r3466

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
import optparse
20
21
import re
21
22
 
22
23
from bzrlib.lazy_import import lazy_import
23
24
lazy_import(globals(), """
24
 
import optparse
25
 
 
26
25
from bzrlib import (
27
26
    errors,
 
27
    revisionspec,
 
28
    )
 
29
""")
 
30
 
 
31
from bzrlib import (
28
32
    log,
29
33
    registry,
30
 
    revisionspec,
31
 
    symbol_versioning,
32
34
    )
33
 
""")
34
 
from bzrlib.trace import warning
35
 
 
36
35
 
37
36
def _parse_revision_str(revstr):
38
37
    """This handles a revision string -> revno.
180
179
        self.type = type
181
180
        self._short_name = short_name
182
181
        if type is None:
183
 
            assert argname is None
 
182
            if argname:
 
183
                raise ValueError('argname not valid for booleans')
184
184
        elif argname is None:
185
185
            argname = 'ARG'
186
186
        self.argname = argname