1361
1361
self.error = error
1364
class WeaveError(BzrError):
1366
_fmt = "Error in processing weave: %(msg)s"
1368
def __init__(self, msg=None):
1369
BzrError.__init__(self)
1373
class WeaveRevisionAlreadyPresent(WeaveError):
1375
_fmt = "Revision {%(revision_id)s} already present in %(weave)s"
1377
def __init__(self, revision_id, weave):
1379
WeaveError.__init__(self)
1380
self.revision_id = revision_id
1384
class WeaveRevisionNotPresent(WeaveError):
1386
_fmt = "Revision {%(revision_id)s} not present in %(weave)s"
1388
def __init__(self, revision_id, weave):
1389
WeaveError.__init__(self)
1390
self.revision_id = revision_id
1394
class WeaveFormatError(WeaveError):
1396
_fmt = "Weave invariant violated: %(what)s"
1398
def __init__(self, what):
1399
WeaveError.__init__(self)
1403
class WeaveParentMismatch(WeaveError):
1405
_fmt = "Parents are mismatched between two revisions. %(msg)s"
1408
class WeaveInvalidChecksum(WeaveError):
1410
_fmt = "Text did not match its checksum: %(msg)s"
1413
class WeaveTextDiffers(WeaveError):
1415
_fmt = ("Weaves differ on text content. Revision:"
1416
" {%(revision_id)s}, %(weave_a)s, %(weave_b)s")
1418
def __init__(self, revision_id, weave_a, weave_b):
1419
WeaveError.__init__(self)
1420
self.revision_id = revision_id
1421
self.weave_a = weave_a
1422
self.weave_b = weave_b
1425
class WeaveTextDiffers(WeaveError):
1427
_fmt = ("Weaves differ on text content. Revision:"
1428
" {%(revision_id)s}, %(weave_a)s, %(weave_b)s")
1430
def __init__(self, revision_id, weave_a, weave_b):
1431
WeaveError.__init__(self)
1432
self.revision_id = revision_id
1433
self.weave_a = weave_a
1434
self.weave_b = weave_b
1364
1437
class VersionedFileError(BzrError):
1366
1439
_fmt = "Versioned file error"
1369
class ParentMismatch(VersionedFileError):
1371
_fmt = "Parents are mismatched between two revisions. %(name)s has %(p1)s vs %(p2)s"
1373
def __init__(self, name, p1, p2):
1379
1442
class RevisionNotPresent(VersionedFileError):
1381
1444
_fmt = 'Revision {%(revision_id)s} not present in "%(file_id)s".'