491
491
class WeaveError(BzrNewError):
492
492
"""Error in processing weave: %(message)s"""
493
494
def __init__(self, message=None):
494
495
BzrNewError.__init__(self)
495
496
self.message = message
498
499
class WeaveRevisionAlreadyPresent(WeaveError):
499
500
"""Revision {%(revision_id)s} already present in %(weave)s"""
500
501
def __init__(self, revision_id, weave):
501
503
WeaveError.__init__(self)
502
504
self.revision_id = revision_id
503
505
self.weave = weave
506
508
class WeaveRevisionNotPresent(WeaveError):
507
509
"""Revision {%(revision_id)s} not present in %(weave)s"""
508
511
def __init__(self, revision_id, weave):
509
512
WeaveError.__init__(self)
510
513
self.revision_id = revision_id
514
517
class WeaveFormatError(WeaveError):
515
518
"""Weave invariant violated: %(what)s"""
516
520
def __init__(self, what):
517
521
WeaveError.__init__(self)
546
550
self.weave_b = weave_b
553
class VersionedFileError(BzrNewError):
554
"""Versioned file error."""
557
class RevisionNotPresent(VersionedFileError):
558
"""Revision {%(revision_id)s} not present in %(file_id)s."""
560
def __init__(self, revision_id, file_id):
561
VersionedFileError.__init__(self)
562
self.revision_id = revision_id
563
self.file_id = file_id
566
class RevisionAlreadyPresent(VersionedFileError):
567
"""Revision {%(revision_id)s} already present in %(file_id)s."""
569
def __init__(self, revision_id, file_id):
570
VersionedFileError.__init__(self)
571
self.revision_id = revision_id
572
self.file_id = file_id
575
class KnitError(BzrNewError):
579
class KnitHeaderError(KnitError):
580
"""Knit header error: %(badline)r unexpected"""
582
def __init__(self, badline):
583
KnitError.__init__(self)
584
self.badline = badline
587
class KnitCorrupt(KnitError):
588
"""Knit %(filename)s corrupt: %(how)s"""
590
def __init__(self, filename, how):
591
KnitError.__init__(self)
592
self.filename = filename
549
596
class NoSuchExportFormat(BzrNewError):
550
597
"""Export format %(format)r not supported"""
551
598
def __init__(self, format):