-=[ 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 Inter-object utility class.i ( t absolute_import( t NoCompatibleIntert InterObjectc B@ sh e Z d Z d „ Z d „ Z e d „ ƒ Z d „ Z d „ Z e d „ ƒ Z d „ Z
e d „ ƒ Z RS( sµ This class represents operations taking place between two objects.
Its instances have methods like join or copy_content or fetch, and contain
references to the source and target objects these operations can be
carried out between.
Often we will provide convenience methods on the objects which carry out
operations with another of similar type - they will always forward to
a subclass of InterObject - i.e.
InterVersionedFile.get(other).method_name(parameters).
If the source and target objects implement the locking protocol -
lock_read, lock_write, unlock, then the InterObject's lock_read,
lock_write and unlock methods may be used (optionally in conjunction with
the needs_read_lock and needs_write_lock decorators.)
When looking for an inter, the most recently registered types are tested
first. So typically the most generic and slowest InterObjects should be
registered first.
c C@ s | | _ | | _ d S( s¥ Construct a default InterObject instance. Please use 'get'.
Only subclasses of InterObject should call
InterObject.__init__ - clients should call InterFOO.get where FOO
is the base type of the objects they are interacting between. I.e.
InterVersionedFile or InterRepository.
get() is a convenience class method which will create an optimised
InterFOO if possible.
N( t sourcet target( t selfR R ( ( s0 /usr/lib/python2.7/dist-packages/bzrlib/inter.pyt __init__1 s
c C@ s: | ƒ y | ƒ Wn! t k
r5 | j j ƒ ‚ n Xd S( s@ Take out two locks, rolling back the first if the second throws.N( t ExceptionR t unlock( R t lock_sourcet lock_target( ( s0 /usr/lib/python2.7/dist-packages/bzrlib/inter.pyt _double_lock>