~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lock.py

  • Committer: Jonathan Riddell
  • Date: 2011-09-16 11:13:47 UTC
  • mto: This revision was merged to the branch mainline in revision 6144.
  • Revision ID: jriddell@canonical.com-20110916111347-fyjk426bkl0jrbfu
gettext() show_warning usage

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    trace,
47
47
    )
48
48
from bzrlib.hooks import Hooks
49
 
 
 
49
from bzrlib.i18n import gettext
50
50
 
51
51
class LockHooks(Hooks):
52
52
 
535
535
    locked the same way), and -Drelock is set, then this will trace.note a
536
536
    message about it.
537
537
    """
538
 
    
 
538
 
539
539
    _prev_lock = None
540
540
 
541
541
    def _note_lock(self, lock_type):
544
544
                type_name = 'read'
545
545
            else:
546
546
                type_name = 'write'
547
 
            trace.note('%r was %s locked again', self, type_name)
 
547
            trace.note(gettext('%r was %s locked again'), self, type_name)
548
548
        self._prev_lock = lock_type
549
549