~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockablefiles.py

Rename Controlfiles to LockableFiles.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import bzrlib
 
2
import bzrlib.errors as errors
 
3
from bzrlib.errors import LockError
2
4
from bzrlib.trace import mutter
3
5
import bzrlib.transactions as transactions
4
 
import errors
5
 
from errors import LockError
6
 
 
7
 
class ControlFiles(object):
8
 
    """
9
 
    Object representing a set of control files
 
6
 
 
7
class LockableFiles(object):
 
8
    """Object representing a set of lockable files
 
9
 
10
10
    _lock_mode
11
11
        None, or 'r' or 'w'
12
12
 
17
17
    _lock
18
18
        Lock object from bzrlib.lock.
19
19
    """
 
20
 
20
21
    _lock_mode = None
21
22
    _lock_count = None
22
23
    _lock = None
 
24
 
23
25
    def __init__(self, transport, lock_name):
24
26
        object.__init__(self)
25
27
        self._transport = transport
30
32
        if self._lock_mode or self._lock:
31
33
            # XXX: This should show something every time, and be suitable for
32
34
            # headless operation and embedding
33
 
            warn("branch %r was not explicitly unlocked" % self)
 
35
            warn("file group %r was not explicitly unlocked" % self)
34
36
            self._lock.unlock()
35
37
 
36
38
    def _rel_controlfilename(self, file_or_path):