/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Andrew Bennetts
  • Date: 2007-02-12 04:49:32 UTC
  • mto: (2018.5.74 hpss)
  • mto: This revision was merged to the branch mainline in revision 2414.
  • Revision ID: andrew.bennetts@canonical.com-20070212044932-k9keo85c0s9gg5wv
``LockableFiles.lock_write()`` now accepts a ``token`` keyword argument, so that
a seperate LockableFiles instance can share a lock if it has the right token.
(Andrew Bennetts, Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
744
744
        self.lock = lock
745
745
 
746
746
 
 
747
class TokenLockingNotSupported(LockError):
 
748
 
 
749
    _fmt = "The object %(obj)s does not support token specifying a token when locking."
 
750
 
 
751
    internal_error = True
 
752
 
 
753
    def __init__(self, obj):
 
754
        self.obj = obj
 
755
 
 
756
 
 
757
class TokenMismatch(LockError):
 
758
 
 
759
    _fmt = "The lock token %(given_token)r does not match lock token %(lock_token)r."
 
760
 
 
761
    internal_error = True
 
762
 
 
763
    def __init__(self, given_token, lock_token):
 
764
        self.given_token = given_token
 
765
        self.lock_token = lock_token
 
766
 
 
767
 
747
768
class PointlessCommit(BzrError):
748
769
 
749
770
    _fmt = "No changes to commit"