~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

Merge up bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
906
906
        self.obj = obj
907
907
 
908
908
 
909
 
class ReadOnlyLockError(LockError):
910
 
 
911
 
    _fmt = "Cannot acquire write lock on %(fname)s. %(msg)s"
912
 
 
913
 
    @symbol_versioning.deprecated_method(symbol_versioning.zero_ninetytwo)
914
 
    def __init__(self, fname, msg):
915
 
        LockError.__init__(self, '')
916
 
        self.fname = fname
917
 
        self.msg = msg
918
 
 
919
 
 
920
909
class LockFailed(LockError):
921
910
 
922
911
    internal_error = False
1078
1067
        BzrError.__init__(self, branch=branch, revision=revision)
1079
1068
 
1080
1069
 
1081
 
# zero_ninetyone: this exception is no longer raised and should be removed
1082
 
class NotLeftParentDescendant(InternalBzrError):
1083
 
 
1084
 
    _fmt = ("Revision %(old_revision)s is not the left parent of"
1085
 
            " %(new_revision)s, but branch %(branch_location)s expects this")
1086
 
 
1087
 
    def __init__(self, branch, old_revision, new_revision):
1088
 
        BzrError.__init__(self, branch_location=branch.base,
1089
 
                          old_revision=old_revision,
1090
 
                          new_revision=new_revision)
1091
 
 
1092
 
 
1093
1070
class RangeInChangeOption(BzrError):
1094
1071
 
1095
1072
    _fmt = "Option --change does not accept revision ranges"
2702
2679
        self.path = path
2703
2680
        self.kind = kind
2704
2681
        self.user_encoding = osutils.get_user_encoding()
 
2682
 
 
2683
 
 
2684
class CannotBindAddress(BzrError):
 
2685
 
 
2686
    _fmt = 'Cannot bind address "%(host)s:%(port)i": %(orig_error)s.'
 
2687
 
 
2688
    def __init__(self, host, port, orig_error):
 
2689
        BzrError.__init__(self, host=host, port=port,
 
2690
            orig_error=orig_error[1])