/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.

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 re
 
21
 
 
22
from bzrlib.lazy_import import lazy_import
 
23
lazy_import(globals(), """
20
24
import optparse
21
 
import re
22
25
 
 
26
from bzrlib import (
 
27
    errors,
 
28
    revisionspec,
 
29
    )
 
30
""")
23
31
from bzrlib.trace import warning
24
 
from bzrlib.revisionspec import RevisionSpec
25
 
from bzrlib.errors import BzrCommandError
26
32
 
27
33
 
28
34
def _parse_revision_str(revstr):
83
89
    # split on the first .. that is not followed by a / ?
84
90
    sep = re.compile("\\.\\.(?!/)")
85
91
    for x in sep.split(revstr):
86
 
        revs.append(RevisionSpec.from_string(x or None))
 
92
        revs.append(revisionspec.RevisionSpec.from_string(x or None))
87
93
    return revs
88
94
 
89
95
 
101
107
        type_list = '\n'.join(lines)
102
108
        msg = "No known merge type %s. Supported types are:\n%s" %\
103
109
            (typestring, type_list)
104
 
        raise BzrCommandError(msg)
 
110
        raise errors.BzrCommandError(msg)
105
111
 
106
112
class Option(object):
107
113
    """Description of a command line option"""
192
198
    DEFAULT_VALUE = object()
193
199
 
194
200
    def error(self, message):
195
 
        raise BzrCommandError(message)
 
201
        raise errors.BzrCommandError(message)
196
202
 
197
203
 
198
204
def get_optparser(options):