303
class OutSideTransaction(BzrNewError):
304
"""A transaction related operation was attempted after the transaction finished."""
303
307
class ObjectNotLocked(LockError):
304
308
"""%(obj)r is not locked"""
305
309
# this can indicate that any particular object is not locked; see also
491
495
class WeaveError(BzrNewError):
492
496
"""Error in processing weave: %(message)s"""
493
498
def __init__(self, message=None):
494
499
BzrNewError.__init__(self)
495
500
self.message = message
498
503
class WeaveRevisionAlreadyPresent(WeaveError):
499
504
"""Revision {%(revision_id)s} already present in %(weave)s"""
500
505
def __init__(self, revision_id, weave):
501
507
WeaveError.__init__(self)
502
508
self.revision_id = revision_id
503
509
self.weave = weave
506
512
class WeaveRevisionNotPresent(WeaveError):
507
513
"""Revision {%(revision_id)s} not present in %(weave)s"""
508
515
def __init__(self, revision_id, weave):
509
516
WeaveError.__init__(self)
510
517
self.revision_id = revision_id
514
521
class WeaveFormatError(WeaveError):
515
522
"""Weave invariant violated: %(what)s"""
516
524
def __init__(self, what):
517
525
WeaveError.__init__(self)
546
554
self.weave_b = weave_b
557
class VersionedFileError(BzrNewError):
558
"""Versioned file error."""
561
class RevisionNotPresent(VersionedFileError):
562
"""Revision {%(revision_id)s} not present in %(file_id)s."""
564
def __init__(self, revision_id, file_id):
565
VersionedFileError.__init__(self)
566
self.revision_id = revision_id
567
self.file_id = file_id
570
class RevisionAlreadyPresent(VersionedFileError):
571
"""Revision {%(revision_id)s} already present in %(file_id)s."""
573
def __init__(self, revision_id, file_id):
574
VersionedFileError.__init__(self)
575
self.revision_id = revision_id
576
self.file_id = file_id
579
class KnitError(BzrNewError):
583
class KnitHeaderError(KnitError):
584
"""Knit header error: %(badline)r unexpected"""
586
def __init__(self, badline):
587
KnitError.__init__(self)
588
self.badline = badline
591
class KnitCorrupt(KnitError):
592
"""Knit %(filename)s corrupt: %(how)s"""
594
def __init__(self, filename, how):
595
KnitError.__init__(self)
596
self.filename = filename
549
600
class NoSuchExportFormat(BzrNewError):
550
601
"""Export format %(format)r not supported"""
551
602
def __init__(self, format):
799
class MergeModifiedFormatError(BzrNewError):
800
"""Error in merge modified format"""
748
803
class CorruptRepository(BzrNewError):
749
804
"""An error has been detected in the repository %(repo_path)s.
750
805
Please run bzr reconcile on this repository."""
765
820
class LocalRequiresBoundBranch(BzrNewError):
766
821
"""Cannot perform local-only commits on unbound branches."""
824
class MissingProgressBarFinish(BzrNewError):
825
"""A nested progress bar was not 'finished' correctly."""