-=[ Mr. Bumblebee ]=-
_Indonesia_
σ
ΛφOc @@ sΎ d Z d d l m Z d d l m Z m Z d d l m Z m Z m Z d d l
m Z d d l m
Z
d d l m Z m Z d d l m Z d e f d
YZ d e f d YZ d
S( s! Weave-era branch implementations.i ( t absolute_import( t errorst lockable_files( t needs_read_lockt needs_write_lockt only_raises( t LogicalLockResult( t mutter( t BranchFormatt BranchWriteLockResult( t FullHistoryBzrBrancht
BzrBranch4c B@ s e Z d Z d d Z d Z e e j e j d Z
e d Z d Z
d Z d Z d Z d Z d d
Z RS( s Branch format 4.c C@ sz | j s | j d n | j j | | j j y# t | j | j j d | SWn | j j n Xd S( sΏ Lock the branch for write operations.
:param token: A token to permit reacquiring a previously held and
preserved lock.
:return: A BranchWriteLockResult.
t wt tokenN( t is_lockedt
_note_lockt
repositoryt _warn_if_deprecatedt
lock_writeR t unlockt
control_files( t selfR
( ( sC /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt/branch.pyR . s
c C@ su | j s | j d n | j j | | j j y | j j t | j SWn | j j n Xd S( s` Lock the branch for read operations.
:return: A bzrlib.lock.LogicalLockResult.
t rN( R R R R t lock_readR R R ( R ( ( sC /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt/branch.pyR A s
c C@ ss | j j d k r1 | j d k r1 | j j n z | j j Wd | j j | j j sn | j n Xd S( Ni ( R t _lock_countt
conf_storet Nonet save_changesR R R t _clear_cached_state( R ( ( sC /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt/branch.pyR R s !
c C@ sd d d l m } d d l m } | } | rT | j | j | j j j | _ n | | _ | S( sH Return the most suitable metadir for a checkout of this branch.
i ( t RepositoryFormat7( t BzrDirMetaFormat1( t# bzrlib.plugins.weave_fmt.repositoryR t
bzrlib.bzrdirR t set_branch_formatt _formatt bzrdirt repository_format( R t lightweightR R t format( ( sC /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt/branch.pyt _get_checkout_format_ s c C@ s t j | j d S( N( R t UpgradeRequiredt user_url( R ( ( sC /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt/branch.pyt unbindl s c C@ s t j | j d S( N( R R( R) ( R t other( ( sC /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt/branch.pyt bindo s c C@ s t | j d S( N( t NotImplementedErrort set_bound_location( R t location( ( sC /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt/branch.pyR. r s c C@ s d S( N( R ( R ( ( sC /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt/branch.pyt get_bound_locationu s c C@ s d S( N( R ( R ( ( sC /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt/branch.pyt updatex s c C@ s d S( N( R ( R t possible_transports( ( sC /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt/branch.pyt get_master_branch{ s N( t __name__t
__module__t __doc__R R R R R t LockNotHeldt
LockBrokenR t FalseR' R* R, R. R0 R1 R3 ( ( ( sC /usr/lib/python2.7/dist-packages/bzrlib/plugins/weave_fmt/branch.pyR + s
t BzrBranchFormat4c B@ se e Z d Z d d d d Z d Z d Z d Z d e e d d d Z d Z
d Z RS( s± Bzr branch format 4.
This format has:
- a revision-history file.
- a branch-lock lock file [ to be shared with the bzrdir ]
It does not support binding.
c
C@ s | r t j | j n | d k r= t d | f n g | j D] } t | j | ^ qG s} t j | | j n d d
g } t d | | j | j
| d | } t j | d t j
} | j y | j Wn t j k
rύ t } n Xt } z7 x0 | D]( \ }
} | j |
| d | j qWWd | rQ| j n X| j | | d
t d d } | j | | | | S( sτ Create a branch of this format in a_bzrdir.
:param a_bzrdir: The bzrdir to initialize the branch in
:param name: Name of colocated branch to create, if any
:param repository: Repository for this branch (unused)
s' initialize(repository=<not None>) on %rs revision-historyt s branch-names creating branch %r in %st names branch-lockt modeNt _foundt found_repository( s revision-historyR; ( s branch-nameR; ( R R( R) R R- t _compatible_bzrdirst
isinstanceR"