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

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
990
990
        self.format = format
991
991
 
992
992
 
 
993
class BadConversionTarget(BzrNewError):
 
994
    """Cannot convert to format %(format)s.  %(problem)s"""
 
995
 
 
996
    def __init__(self, problem, format):
 
997
        BzrNewError.__init__(self)
 
998
        self.problem = problem
 
999
        self.format = format
 
1000
 
 
1001
 
993
1002
class NoDiff(BzrNewError):
994
1003
    """Diff is not installed on this machine: %(msg)s"""
995
1004
 
1148
1157
        BzrNewError.__init__(self)
1149
1158
 
1150
1159
 
 
1160
class BadInventoryFormat(BzrNewError):
 
1161
    """Root class for inventory serialization errors"""
 
1162
 
 
1163
 
 
1164
class UnexpectedInventoryFormat(BadInventoryFormat):
 
1165
    """The inventory was not in the expected format:\n %(msg)s"""
 
1166
 
 
1167
    def __init__(self, msg):
 
1168
        BadInventoryFormat.__init__(self, msg=msg)
 
1169
 
 
1170
 
1151
1171
class UnknownSSH(BzrNewError):
1152
1172
    """Unrecognised value for BZR_SSH environment variable: %(vendor)s"""
1153
1173
 
1162
1182
    def __init__(self, revision_id):
1163
1183
        BzrNewError.__init__(self)
1164
1184
        self.revision_id = revision_id
 
1185
 
 
1186
 
 
1187
class IllegalUseOfScopeReplacer(BzrNewError):
 
1188
    """ScopeReplacer object %(name)r was used incorrectly: %(msg)s%(extra)s"""
 
1189
 
 
1190
    is_user_error = False
 
1191
 
 
1192
    def __init__(self, name, msg, extra=None):
 
1193
        BzrNewError.__init__(self)
 
1194
        self.name = name
 
1195
        self.msg = msg
 
1196
        if extra:
 
1197
            self.extra = ': ' + str(extra)
 
1198
        else:
 
1199
            self.extra = ''
 
1200
 
 
1201
 
 
1202
class InvalidImportLine(BzrNewError):
 
1203
    """Not a valid import statement: %(msg)\n%(text)s"""
 
1204
 
 
1205
    is_user_error = False
 
1206
 
 
1207
    def __init__(self, text, msg):
 
1208
        BzrNewError.__init__(self)
 
1209
        self.text = text
 
1210
        self.msg = msg
 
1211
 
 
1212
 
 
1213
class ImportNameCollision(BzrNewError):
 
1214
    """Tried to import an object to the same name as an existing object. %(name)s"""
 
1215
 
 
1216
    is_user_error = False
 
1217
 
 
1218
    def __init__(self, name):
 
1219
        BzrNewError.__init__(self)
 
1220
        self.name = name