-=[ Mr. Bumblebee ]=-
_Indonesia_
ó
î:ïNc @@ s@ d Z d d l m Z d d l m Z d e f d „ ƒ YZ d S( s Counted lock classi ( t absolute_import( t errorst CountedLockc B@ sY e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d d „ Z
d „ Z RS(
sý Decorator around a lock that makes it reentrant.
This can be used with any object that provides a basic Lock interface,
including LockDirs and OS file locks.
:ivar _token: While a write lock is held, this is the token
for it.
c C@ s | | _ d | _ d | _ d S( Ni ( t
_real_lockt Nonet
_lock_modet _lock_count( t selft real_lock( ( s7 /usr/lib/python2.7/dist-packages/bzrlib/counted_lock.pyt __init__$ s c C@ s d | j j | j f S( Ns %s(%r)( t __class__t __name__R ( R ( ( s7 /usr/lib/python2.7/dist-packages/bzrlib/counted_lock.pyt __repr__) s c C@ s# | j j ƒ d | _ d | _ d S( Ni ( R t
break_lockR R R ( R ( ( s7 /usr/lib/python2.7/dist-packages/bzrlib/counted_lock.pyR
- s
c C@ s0 y | j j ƒ d k SWn t k
r+ t SXd S( sá Return physical lock status.
Returns true if a lock is held on the transport. If no lock is held, or
the underlying locking mechanism does not support querying lock
status, false is returned.
N( R t peekR t NotImplementedErrort False( R ( ( s7 /usr/lib/python2.7/dist-packages/bzrlib/counted_lock.pyt get_physical_lock_status2 s
c C@ s
| j d k S( N( R R ( R ( ( s7 /usr/lib/python2.7/dist-packages/bzrlib/counted_lock.pyt is_locked>