/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/counted_lock.py

  • Committer: John Ferlito
  • Date: 2009-09-02 04:31:45 UTC
  • mto: (4665.7.1 serve-init)
  • mto: This revision was merged to the branch mainline in revision 4913.
  • Revision ID: johnf@inodes.org-20090902043145-gxdsfw03ilcwbyn5
Add a debian init script for bzr --serve

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Counted lock class"""
18
18
 
19
 
from . import (
 
19
 
 
20
from bzrlib import (
20
21
    errors,
21
22
    )
22
23
 
27
28
    This can be used with any object that provides a basic Lock interface,
28
29
    including LockDirs and OS file locks.
29
30
 
30
 
    :ivar _token: While a write lock is held, this is the token
 
31
    :ivar _token: While a write lock is held, this is the token 
31
32
        for it.
32
33
    """
33
34
 
38
39
 
39
40
    def __repr__(self):
40
41
        return "%s(%r)" % (self.__class__.__name__,
41
 
                           self._real_lock)
 
42
            self._real_lock)
42
43
 
43
44
    def break_lock(self):
44
45
        self._real_lock.break_lock()
79
80
 
80
81
        If the lock was originally acquired in read mode this will fail.
81
82
 
82
 
        :param token: If given and the lock is already held,
 
83
        :param token: If given and the lock is already held, 
83
84
            then validate that we already hold the real
84
85
            lock with this token.
85
86