1314
1314
self.error = error
1317
class WeaveError(BzrError):
1319
_fmt = "Error in processing weave: %(msg)s"
1321
def __init__(self, msg=None):
1322
BzrError.__init__(self)
1326
class WeaveRevisionAlreadyPresent(WeaveError):
1328
_fmt = "Revision {%(revision_id)s} already present in %(weave)s"
1330
def __init__(self, revision_id, weave):
1332
WeaveError.__init__(self)
1333
self.revision_id = revision_id
1337
class WeaveRevisionNotPresent(WeaveError):
1339
_fmt = "Revision {%(revision_id)s} not present in %(weave)s"
1341
def __init__(self, revision_id, weave):
1342
WeaveError.__init__(self)
1343
self.revision_id = revision_id
1347
class WeaveFormatError(WeaveError):
1349
_fmt = "Weave invariant violated: %(what)s"
1351
def __init__(self, what):
1352
WeaveError.__init__(self)
1356
class WeaveParentMismatch(WeaveError):
1358
_fmt = "Parents are mismatched between two revisions. %(msg)s"
1361
class WeaveInvalidChecksum(WeaveError):
1363
_fmt = "Text did not match its checksum: %(msg)s"
1366
class WeaveTextDiffers(WeaveError):
1368
_fmt = ("Weaves differ on text content. Revision:"
1369
" {%(revision_id)s}, %(weave_a)s, %(weave_b)s")
1371
def __init__(self, revision_id, weave_a, weave_b):
1372
WeaveError.__init__(self)
1373
self.revision_id = revision_id
1374
self.weave_a = weave_a
1375
self.weave_b = weave_b
1378
class WeaveTextDiffers(WeaveError):
1380
_fmt = ("Weaves differ on text content. Revision:"
1381
" {%(revision_id)s}, %(weave_a)s, %(weave_b)s")
1383
def __init__(self, revision_id, weave_a, weave_b):
1384
WeaveError.__init__(self)
1385
self.revision_id = revision_id
1386
self.weave_a = weave_a
1387
self.weave_b = weave_b
1390
1317
class VersionedFileError(BzrError):
1392
1319
_fmt = "Versioned file error"