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

  • Committer: Breezy landing bot
  • Author(s): Colin Watson
  • Date: 2020-11-16 21:47:08 UTC
  • mfrom: (7521.1.1 remove-lp-workaround)
  • Revision ID: breezy.the.bot@gmail.com-20201116214708-jos209mgxi41oy15
Remove breezy.git workaround for bazaar.launchpad.net.

Merged from https://code.launchpad.net/~cjwatson/brz/remove-lp-workaround/+merge/393710

Show diffs side-by-side

added added

removed removed

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