/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

Move weave errors into bzrlib.errors and make consistent with new system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
        BzrError.__init__(self, "Stores for branch %s are not listable" % br)
276
276
 
277
277
 
278
 
from bzrlib.weave import WeaveError, WeaveParentMismatch
 
278
class WeaveError(BzrNewError):
 
279
    """Error in processing weave: %(message)s"""
 
280
    def __init__(self, message=None):
 
281
        BzrNewError.__init__(self)
 
282
        self.message = message
 
283
 
 
284
 
 
285
class WeaveRevisionAlreadyPresent(WeaveError):
 
286
    """Revision {%(revision_id)s} already present in %(weave)s"""
 
287
    def __init__(self, revision_id, weave):
 
288
        WeaveError.__init__(self)
 
289
        self.revision_id = revision_id
 
290
        self.weave = weave
 
291
 
 
292
 
 
293
class WeaveRevisionNotPresent(WeaveError):
 
294
    """Revision {%(revision_id)s} not present in %(weave)s"""
 
295
    def __init__(self, revision_id, weave):
 
296
        WeaveError.__init__(self)
 
297
        self.revision_id = revision_id
 
298
        self.weave = weave
 
299
 
 
300
 
 
301
class WeaveFormatError(WeaveError):
 
302
    """Weave invariant violated: %(what)s"""
 
303
    def __init__(self, what):
 
304
        WeaveError.__init__(self)
 
305
        self.what = what
 
306
 
 
307
 
 
308
class WeaveParentMismatch(WeaveError):
 
309
    """Parents are mismatched between two revisions."""
 
310
    
279
311
 
280
312
class TransportError(BzrError):
281
313
    """All errors thrown by Transport implementations should derive