~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lock.py

  • Committer: Jonathan Riddell
  • Date: 2011-09-14 16:31:57 UTC
  • mto: This revision was merged to the branch mainline in revision 6139.
  • Revision ID: jriddell@canonical.com-20110914163157-ee87lu1pqmq5b4r3
default _translations back to None so we can tell if it gets installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
 
17
18
"""Locking using OS file locks or file existence.
18
19
 
19
20
Note: This method of locking is generally deprecated in favour of LockDir, but
33
34
unlock() method.
34
35
"""
35
36
 
36
 
from __future__ import absolute_import
37
 
 
38
37
import errno
39
38
import os
40
39
import sys
47
46
    trace,
48
47
    )
49
48
from bzrlib.hooks import Hooks
50
 
from bzrlib.i18n import gettext
 
49
 
51
50
 
52
51
class LockHooks(Hooks):
53
52
 
545
544
                type_name = 'read'
546
545
            else:
547
546
                type_name = 'write'
548
 
            trace.note(gettext('{0!r} was {1} locked again'), self, type_name)
 
547
            trace.note('%r was %s locked again', self, type_name)
549
548
        self._prev_lock = lock_type
550
549