~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
        self.message = message
176
176
 
177
177
 
 
178
class DisabledMethod(BzrError):
 
179
 
 
180
    _fmt = "The smart server method '%(class_name)s' is disabled."
 
181
 
 
182
    internal_error = True
 
183
 
 
184
    def __init__(self, class_name):
 
185
        BzrError.__init__(self)
 
186
        self.class_name = class_name
 
187
 
 
188
 
178
189
class InvalidEntryName(BzrError):
179
190
    
180
191
    _fmt = "Invalid entry name: %(name)s"
798
809
        self.lock = lock
799
810
 
800
811
 
 
812
class TokenLockingNotSupported(LockError):
 
813
 
 
814
    _fmt = "The object %(obj)s does not support token specifying a token when locking."
 
815
 
 
816
    internal_error = True
 
817
 
 
818
    def __init__(self, obj):
 
819
        self.obj = obj
 
820
 
 
821
 
 
822
class TokenMismatch(LockBroken):
 
823
 
 
824
    _fmt = "The lock token %(given_token)r does not match lock token %(lock_token)r."
 
825
 
 
826
    internal_error = True
 
827
 
 
828
    def __init__(self, given_token, lock_token):
 
829
        self.given_token = given_token
 
830
        self.lock_token = lock_token
 
831
 
 
832
 
801
833
class PointlessCommit(BzrError):
802
834
 
803
835
    _fmt = "No changes to commit"
2023
2055
class TagsNotSupported(BzrError):
2024
2056
 
2025
2057
    _fmt = ("Tags not supported by %(branch)s;"
2026
 
            " you may be able to use bzr upgrade.")
 
2058
            " you may be able to use bzr upgrade --dirstate-tags.")
2027
2059
 
2028
2060
    def __init__(self, branch):
2029
2061
        self.branch = branch