-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyc


Qc@@s0dZddlmZddlZddlmZeedddlmZm	Z	ddl
mZmZm
Z
ddlmZmZd	ejfd
YZdefdYZd
efdYZdejfdYZejjedejfdYZdeejfdYZdefdYZejjejeeej_ defdYZ!ejje!je!dej"fdYZ#dej"fdYZ$dej"fdYZ$ejj%edefdYZ&d e&fd!YZ'd"e&fd#YZ(e)e*e+e+e*e*e*e+d$Z,e,ej-d%d&d'd(d)d*d+d,e)d-e)e,ej-d.d&d/d0d(d)d*d1d,e)d-e)e,ej-d2d&d/d3d(d4d*d1d,e)d-e)e,ej-d5d6d/d7d(d4d*d1d,e)d-e)e,ej-d8d9d/d:d(d4d*d1d;e)d,e)e,ej-d<d=d/d>d(d4d*d1d-e)e,ej-d?d@d/dAd(d4d*d1d,e)d-e)d;e)e,ej-dBdCd/dDd(d4d*d1d,e)d-e)e,ej-dEdFd/dGd(dHd*d1d,e)d-e)e,ej-dIdJd/dKd(dHd*d1d,e)d-e)e,ej-dLdMd/dNd(dHd*d1d,e)d-e)e,ej-dOdPd/dQd(dHd*d1d,e)d-e)e,ej-dRdMd/dSd(dHd*dTd,e)d-e)e,ej-dUdPd/dVd(dHd*dTd,e)d-e)e,ej-dWdXd/dYd(dHd*dZd;e)d,e)d[e*e,ej-d\d]d/d^d(dHd*dZd;e)d,e)d[e*e,ej-d_d`d/dad(dHd*dZd;e)dbe!e,ej-dcd`d/ddd(dHd*dZd;e*e,ej-ded`d(dHd*dZd[e)d,e)d/dfej.j/dgZ0ej-j1e0ej-Z-dS(hsBzrDir logic. The BzrDir is the basic control directory used by bzr.

At format 7 this was split out into Branch, Repository and Checkout control
directories.

Note: This module has a lot of ``open`` functions/methods that return
references to in-memory objects. As a rule, there are no matching ``close``
methods. To free any associated resources, simply stop referencing the
objects returned.
i(tabsolute_importN(tlazy_imports;
import bzrlib
from bzrlib import (
    branch as _mod_branch,
    cleanup,
    errors,
    fetch,
    graph,
    lockable_files,
    lockdir,
    osutils,
    pyutils,
    remote,
    repository,
    revision as _mod_revision,
    transport as _mod_transport,
    ui,
    urlutils,
    vf_search,
    win32utils,
    workingtree_3,
    workingtree_4,
    )
from bzrlib.branchfmt import fullhistory as fullhistorybranch
from bzrlib.repofmt import knitpack_repo
from bzrlib.transport import (
    do_catching_redirections,
    local,
    )
from bzrlib.i18n import gettext
(tmuttertnote(tconfigt
controldirtregistry(t
deprecated_intdeprecated_methodtBzrDirc
B@seZdZdZdZd"eed"eeedZdZ	ed"d"edZ
dZdZd"edd"d"eed"ed		Z
d"edd"d"eed"ed
	ZdZdZd
dZdZdZdZdZdZdZdZdZedZedZdZdZedZd"dZ dZ!dZ"e#d"d"dZ$d Z%d!Z&RS(#s A .bzr control diretory.

    BzrDir instances let you create or open any of the things that can be
    found within .bzr - checkouts, branches and repositories.

    :ivar transport:
        the transport which this bzr dir is rooted at (i.e. file:///.../.bzr/)
    :ivar root_transport:
        a transport connected to the directory this bzr was opened from
        (i.e. the parent directory holding the .bzr directory).

    Everything in the bzrdir should have the same file permissions.

    :cvar hooks: An instance of BzrDirHooks.
    cC@sy|j}Wnltjtjfk
r~y|j}Wqtjk
rzy|j}Wq{tjk
rvdSXqXnX|jdS(sInvoke break_lock on the first object in the bzrdir.

        If there is a tree, the tree is opened and break_lock() called.
        Otherwise, branch is tried, and finally repository.
        N(	topen_workingtreeterrorstNotLocalUrlt
NoWorkingTreetopen_branchtNotBranchErrortopen_repositorytNoRepositoryPresentt
break_lock(tselftthing_to_unlock((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRbs
cC@s>|j}y|jjj|Wntjk
r9nXdS(s@Check that a bzrdir as a whole can be converted to a new format.N(trepository_formatRt_formattcheck_conversion_targetRR(Rt
target_formatttarget_repo_format((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRvs	c	C@s|dk	}	|j|	}
y|j}Wntjk
rGd}nXy|j}Wntjk
rtd}n^X|jj|r|j}n|ry|j	}Wqtj
tjtjfk
rqXn|r	|j
o|}
|j}|
jj}nt}
t}d}|
j|d|d|d|d|d|jjd|d|
d|\}}}	}|rzg|j|jkr|	r|dk	rtj|g|}|j|d	|n|j|d
|Wd|jXn|dk	r	td|n|dk	r3|j|d
|d
|}nyH|jjd|dks^|j
rz|jj|d
|nWntjtjfk
rnX|S(sClone this bzrdir and its contents to transport verbatim.

        :param transport: The transport for the location to produce the clone
            at.  If the target directory does not exist, it will be created.
        :param revision_id: The tip revision-id to use for any branch or
            working tree.  If not None, then the clone operation may tune
            itself to download less data.
        :param force_new_repo: Do not use a shared repository for the target,
                               even if one is available.
        :param preserve_stacking: When cloning a stacked branch, stack the
            new branch on top of the other branch's stacked-on branch.
        :param create_prefix: Create any missing directories leading up to
            to_transport.
        :param use_existing_dir: Use an existing directory if one exists.
        :param no_tree: If set to true prevents creation of a working tree.
        tuse_existing_dirt
create_prefixtforce_new_repot
stacked_ontstack_on_pwdtrepo_format_nametmake_working_treestshared_repot
fetch_spectrevision_idNsresult_repo not None(%r)trepository_policyt.( tNonetcloning_metadirtfind_repositoryRRRRt
repositorythas_same_locationtget_stacked_on_urltUnstackableBranchFormattUnstackableRepositoryFormatt
NotStackedR t	is_sharedRtnetwork_nametFalsetinitialize_on_transport_extroot_transporttbasetuser_urlt	vf_searchtPendingAncestryResulttfetchtunlocktAssertionErrortclonet
local_abspathR
R
R(Rt	transportR#Rtpreserve_stackingRRRtno_treetrequire_stackingtformatt
local_repotlocal_branchR twant_sharedRtresult_repotresultR$R"t
result_branch((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytclone_on_transportsl

 cC@stj|}|jdS(N(t_mod_transportt
get_transporttensure_base(Rturltt((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt
_make_tailsc@sfd}|s|dkrFj|}|dk	r}|Sqy tj||dSWqtjk
r|qXnt||dS(sSReturn an object representing a policy to use.

        This controls whether a new repository is created, and the format of
        that repository, or some existing shared repository used instead.

        If stack_on is supplied, will not seek a containing shared repo.

        :param force_new_repo: If True, require a new repository to be created.
        :param stack_on: If supplied, the location to stack on.  If not
            supplied, a default_stack_on location may be used.
        :param stack_on_pwd: If stack_on is relative, the location it is
            relative to.
        c@sd}d}|j}t}|j}|dk	rH|j}t}ny|j}Wntjk
rtd}n5X|jjkr|j	rd}t}nt}|sdtfS|rt
|||dtfSt||dtfSdS(NR@(R&t
get_configR1tget_default_stack_onR5tTrueRRRR/tUseExistingRepositorytCreateRepository(tfound_bzrdirtstack_onRRtstopR)(R@R(s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR$s0		

	
	R@N(R&t_find_containingRRRRRRS(RRRURR@R$tpolicy((R@Rs1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytdetermine_repository_policys	cC@s|j|}|jdS(s<Create a new repository if needed, returning the repository.i(RYtacquire_repository(RRRX((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_find_or_create_repository,scC@s|dk	r,||jj||jfSy|j}|j}WnZtjk
rd}y|j}Wntjk
rd}qX||jjnX||jj||fS(sKFind the source branch and repo for a sprout operation.
        
        This is helper intended for use by _sprout.

        :returns: (source_branch, source_repository).  Either or both may be
            None.  If not None, they will be read-locked (and their unlock(s)
            scheduled via the add_cleanup param).
        N(	R&t	lock_readR9R)RRRRR(Rtadd_cleanupt
source_branchtsource_repository((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_find_source_repo1s	


tdowncC@sUtj|j}|j|d|d|d|d|d|d|d|d|	d	|
	S(
sCreate a copy of this controldir prepared for use as a new line of
        development.

        If url's last component does not exist, it will be created.

        Attributes related to the identity of the source branch like
        branch nickname will be cleaned, a working tree is created
        whether one existed before or not; and a local branch is always
        created.

        if revision_id is not None, then the clone operation may tune
            itself to download less data.

        :param accelerator_tree: A tree which can be used for retrieving file
            contents more quickly than the revision tree, i.e. a workingtree.
            The revision tree will be used for cases where accelerator_tree's
            content is different.
        :param hardlink: If true, hard-link files from accelerator_tree,
            where possible.
        :param stacked: If true, create a stacked branch referring to the
            location of this control directory.
        :param create_tree_if_local: If true, a working-tree will be created
            when working locally.
        :return: The created control directory
        R#Rtrecursetpossible_transportstaccelerator_treethardlinktstackedR^tcreate_tree_if_local(tcleanuptOperationWithCleanupst_sprouttrun(RRLR#RRbRcRdReRfR^Rgt	operation((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytsproutLsc 
C@s|j}tj}
|dk	r=|
j|g||
_n|dkrRg}nt||jg}tj	||}|j
|j|	}ytj
j|}Wn#tjk
r|j|}nX|j||
\}
}|
|
_|	r|
dk	r|jj}nd}|j||d|	}|jd|\}}||jj||
_||
_|	st|jdkrtjj}n!|rtjj}ntjj }||
_!|dk	r|
j"}|j|d|n|
dkr	|j#}n!|
j$|d|d|d|}t%d|f|r|j&rt'|t(j)r|dksx|j*r|j+d	|d
|d|}|jzM|j,ddkry|j-|j.j/Wqtj0k
rqXnWd|jXnd}|d
krd}|dk	r1|j1}n6|dk	rL|j1}n|
dk	rg|
j1}n|dk	r||j2j|j3}ng}xu|D]j\}}t4j5|t4j6|}|
j7||}|j8j$||j9||d|d|d|	qWn|S(NR@RciR"R#R$R)screated new branch %rRdRetfrom_branchtRaRRbRf(:R]R8tFetchSpecFactoryR&tadd_revision_idstsource_branch_stop_revision_idtlistR3RIRJRKR'Rt
ControlDirtopen_from_transportRRtinitialize_on_transportR`R^R4RYRZt
lock_writeR9tsource_repottarget_repotlent_fallback_repositoriestTargetRepoKindstSTACKEDtEMPTYtPREEXISTINGttarget_repo_kindtmake_fetch_spect
create_branchRmRthas_workingtreet
isinstancetlocaltLocalTransportR tcreate_workingtreetpath2idtset_root_idR
tget_root_idR
t
basis_treeR\titer_referencesturlutilstjointescapetreference_parenttbzrdirtget_reference_revision( RtopRLR#RRbRcRdReRfR^RgR]tfetch_spec_factoryttarget_transporttcloning_formatRFR_tstacked_branch_urlR$REtis_new_repoRR"RGtwttbasistsubtreestpathtfile_idttargettsublocation((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRjqs			
		
						
cC@stj||jjS(sFind a non-existing backup file name based on base.

        See bzrlib.osutils.available_backup_name about race conditions.
        (tosutilstavailable_backup_nameR3thas(RR4((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_available_backup_namescC@stjj}z|jjd}|jd}|jj|}tjjtdjt	j
|dt	j
|d|jjd|||fSWd|jXdS(shBackup this bzr control directory.

        :return: Tuple with old path name and new path name
        s.bzrs
backup.bzrsmaking backup of {0}
  to {1}sutf-8N(
tuit
ui_factorytnested_progress_barR3tabspathRRtgettextRARtunescape_for_displayt	copy_treetfinished(Rtpbtold_patht
backup_dirtnew_path((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt
backup_bzrdirsi'cC@sd}xtryMd|}|jjd|ttdj|jjd|dSWq	tjt	tj
fk
r|d7}||krqq	Xq	WdS(s$Permanently disable the bzrdir.

        This is done by renaming it to give the user some ability to recover
        if there was a problem.

        This will have horrible consequences if anyone has anything locked or
        in use.
        :param limit: number of times to retry
        is.bzr.retired.%ds.bzrsrenamed {0} to {1}Ni(RQR3trenameRRRARRtTransportErrortIOErrort	PathError(Rtlimittitto_path((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt
retire_bzrdirs
	

cC@s|}x}tr||\}}|r+|S|jjd}|j|jkrSdSy|j|d}Wq	tjk
rdSXq	WdS(sFind something in a containing control directory.

        This method will scan containing control dirs, until it finds what
        it is looking for, decides that it will never find it, or runs out
        of containing control directories to check.

        It is used to implement find_repository and
        determine_repository_policy.

        :param evaluate: A function returning (value, stop).  If stop is True,
            the value will be returned.
        s..iN(	RQR3R;R5R4R&topen_containing_from_transportRR(RtevaluateRTRFRVtnext_transport((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRWs
	c@s@fd}j|}|dkr<tjn|S(sFind the repository that should be used.

        This does not require a branch as we use it to find the repo for
        new branches as well as to hook existing branches up to their
        repository.
        c@sny|j}Wntjk
r-dtfSX|jjkrJ|tfS|jr`|tfSdtfSdS(N(RRRR&R1R5RQR/(RTR)(R(s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytusable_repository,s

N(RWR&RR(RRt
found_repo((Rs1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR(%s

cC@s|jr
dSt|_y|jjd}Wn&tjk
rTd|_d|_nMX|j	d@dkr}d|_d|_n$|j	d@dB|_|jd@|_dS(sDetermine the appropriate modes for files and directories.

        They're always set to be consistent with the base directory,
        assuming that this transport allows setting modes.
        NR%iiiiIi(
t_mode_check_doneRQR=tstatRtTransportNotPossibleR&t	_dir_modet
_file_modetst_mode(Rtst((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_find_creation_modes>s			
	cC@s|js|jn|jS(s;Return Unix mode for newly created files, or None.
        (RRR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_get_file_mode\s	
cC@s|js|jn|jS(sAReturn Unix mode for newly created directories, or None.
        (RRR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt
_get_dir_modecs	
cC@s
tj|S(s"Get configuration for this BzrDir.(RtBzrDirConfig(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyROjscC@sdS(s*By default, no configuration is available.N(R&(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_get_confignscC@s1||_|jd|_||_t|_dS(s.Initialize a Bzr control dir object.

        Only really common logic should reside here, concrete classes should be
        made with varying behaviours.

        :param _format: the format that is creating this BzrDir instance.
        :param _transport: the transport this dir is based at.
        s.bzrN(RR;R=R3R1R(Rt
_transportR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt__init__rs			cC@s|jS(N(R3(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytuser_transportscC@s|jS(N(R=(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytcontrol_transportscC@s|dkp|jdS(scTrue if filename is the name of a path which is reserved for bzrdir's.

        :param filename: A filename within the root transport of this bzrdir.

        This is true IF and ONLY IF the filename is part of the namespace reserved
        for bzr control dirs. Currently this is the '.bzr' directory in the root
        of the root_transport. 
        s.bzrs.bzr/(t
startswith(Rtfilename((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytis_control_filenamescC@s|jj}yXy+|jdt}|j}|j|_Wn&tjk
red}|j	}nXWntj
k
rd}n>X|j}t|tj
r|j|jj}n||_y|jdt}Wn&tjtjfk
rd|_nX|jj|_||fS(swProduce a metadir suitable for cloning with.

        :returns: (destination_bzrdir_format, source_repository)
        tignore_fallbackstrecommend_upgradeN(Rt	__class__RRQR)t_branch_formatRRR&RRRtremotetRemoteRepositoryFormatt_ensure_realt_real_repositoryRR
R1R
Rtworkingtree_format(Rt
result_formattbranchR_R^trepo_formatttree((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_cloning_metadirs,	
	
	
cC@si|j\}}|jdkrR|dkr1|S|jjj}|j|_n|re|jn|S(sProduce a metadir suitable for cloning or sprouting with.

        These operations may produce workingtrees (yes, even though they're
        "cloning" something that doesn't have a tree), so a viable workingtree
        format must be selected.

        :require_stacking: If True, non-stackable formats will be upgraded
            to similar stackable formats.
        :returns: a ControlDirFormat with all component formats either set
            appropriately or set to None if that component should not be
            created.
        N(Rt_workingtree_formatR&Rt_matchingbzrdirRRR@(RR@RAR)ttree_format((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR's

cC@st|jdS(sGet the transport for use by branch format in this BzrDir.

        Note that bzr dirs that do not support format strings will raise
        IncompatibleFormat if the branch format they are given has
        a format string, and vice versa.

        If branch_format is None, the transport is returned with no
        checking. If it is not None, then the returned transport is
        guaranteed to point to an existing directory ready for use.
        N(tNotImplementedErrortget_branch_transport(Rt
branch_formattname((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@st|jdS(sGet the transport for use by repository format in this BzrDir.

        Note that bzr dirs that do not support format strings will raise
        IncompatibleFormat if the repository format they are given has
        a format string, and vice versa.

        If repository_format is None, the transport is returned with no
        checking. If it is not None, then the returned transport is
        guaranteed to point to an existing directory ready for use.
        N(Rtget_repository_transport(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@st|jdS(sGet the transport for use by workingtree format in this BzrDir.

        Note that bzr dirs that do not support format strings will raise
        IncompatibleFormat if the workingtree format they are given has a
        format string, and vice versa.

        If workingtree_format is None, the transport is returned with no
        checking. If it is not None, then the returned transport is
        guaranteed to point to an existing directory ready for use.
        N(Rtget_workingtree_transport(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@s;|tk	rtd|ntjj|d|d|S(s*Create a new BzrDir at the url 'base'.

        :param format: If supplied, the format of branch to create.  If not
            supplied, the default is used.
        :param possible_transports: If supplied, a list of transports that
            can be reused to share a remote connection.
        s>BzrDir.create always creates the default format, not one of %rRARc(R	R:RRttcreate(tclsR4RARc((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs
	
cC@sd|jj|jfS(Ns
<%s at %r>(Rt__name__R5(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt__repr__scC@sR|jjz0|jj||jjd|jjWd|jjXdS(sUpdate the features required by this bzrdir.

        :param updated_flags: Dictionary mapping feature names to necessities
            A necessity can be None to indicate the feature should be removed
        s
branch-formatN(t
control_filesRwRt_update_feature_flagsR=t	put_bytest	as_stringR9(Rt
updated_flags((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytupdate_feature_flagss

 N('Rt
__module__t__doc__RRR&R1RQRHRNRYR[R`RmRjRRRRWR(RRRRORRtpropertyRRRRR'RRRtclassmethodRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR	QsT			g	<			"	a												$
	
	
	tBzrDirMeta1cB@s4eZdZdZdZdZdZdZddddZ	ddZ
edZd	Z
ddded
ZdZdZdd
ZdZddZddZddZdZdZdZdZdZdeeddZedZeedZdZRS(sA .bzr meta version 1 control object.

    This is the first control object where the
    individual aspects are really split out: there are separate repository,
    workingtree and branch subdirectories and any subset of the three can be
    present within a BzrDir.
    cC@s)|dkrdStjd|jdS(sEObtain the branch path to use.

        This uses the API specified branch name first, and then falls back to
        the branch name specified in the URL. If neither of those is specified,
        it uses the default branch.

        :param name: Optional branch name to use
        :return: Relative path to branch
        RoRtbranchessutf-8(RRtencode(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_get_branch_path*s
cC@sqy|jjd}Wntjk
r-gSXg}z+x$|D]}|j|jdq>WWd|jX|S(sTRead the branch list.

        :return: List of utf-8 encoded branch names.
        sbranch-lists
N(RtgetRt
NoSuchFiletappendtrstriptclose(RtftretR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_read_branch_list8s
cC@s7|jjddjg|D]}|d^qdS(saWrite out the branch list.

        :param branches: List of utf-8 branch names to write
        sbranch-listRos
N(R=RR(RRR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_write_branch_listJscC@sDtt|j||tj|j|jj|jj|_	dS(N(
tsuperRRtlockable_filest
LockableFilesRRt_lock_file_namet_lock_classR(RRR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRRscC@stS(s See BzrDir.can_convert_format().(RQ(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytcan_convert_formatXscC@sC|dkr|j}n|jjj|d|d|d|S(sSee ControlDir.create_branch.RR)tappend_revisions_onlyN(R&t_get_selected_branchRtget_branch_formatt
initialize(RRR)R	((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR\s
cC@s
|dkr|j}n|j|}|dkr|jjzZ|j}y|j|jdWn tk
rt	j
|nX|j|Wd|jjXny|j
j|Wn>t	jk
rt	j
dtj|j
j|d|nXdS(sSee ControlDir.destroy_branch.Rosutf-8NRR(R&R
RRRwRtremoveRt
ValueErrorRRRR9R=tdelete_treeRRRR4(RRRR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytdestroy_branches$

cC@s|jjj||S(sSee BzrDir.create_repository.(RRR(Rtshared((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytcreate_repository{scC@s>y|jjdWn#tjk
r9tj|nXdS(sSee BzrDir.destroy_repository.R)N(R=RRRR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytdestroy_repositorysc	C@s(|jjj||d|d|d|S(sSee BzrDir.create_workingtree.RnRdRe(RRR(RR#RnRdRe((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@sP|jdt}|jj}|jtj}|jd|}|jdS(sSee BzrDir.destroy_workingtree.Rtold_treeN(	R
R1RR)t
revision_treet
_mod_revisiont
NULL_REVISIONtreverttdestroy_workingtree_metadata(RRR)temptyt	conflicts((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytdestroy_workingtrees
cC@s|jjddS(Ntcheckout(R=R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@s#ddlm}|j|d|S(s{Find the branch 'format' for this bzrdir.

        This might be a synthetic object for e.g. RemoteBranch and SVN.
        i(tBranchFormatMetadirR(t
bzrlib.branchRtfind_format(RRR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytfind_branch_formatscC@s"tj|jdtj}|jS(s9Figure out the mode to use when creating a bzrdir subdir.Ro(RRR=t
TransportLockR(Rttemp_control((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_get_mkdir_modescC@s8ddlm}|j|d|}|j|d|S(s"See BzrDir.get_branch_reference().i(RR(RRR t
get_reference(RRRRA((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytget_branch_referencescC@s%tj}|j|d|d|S(Nt
target_branchR(t_mod_branchtBranchReferenceFormatR(RR'RRA((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytset_branch_referencescC@s|dkr|j}n|j|}|dkrF|jj|Sy|jWn&tk
r|tj||j	nX|dkr{|j
}|jd}||kr{|jj
z|j
}tj|}|dkr||krtj|ng|D]}|j|d^q}t|rItj|n|j||j|Wd|jjXq{n|jj|}	|j}
|	jd|
y|jj|d|
Wntjk
rnX|jj|S(s"See BzrDir.get_branch_transport().Rosutf-8t/Ntmode(R&R
RR=R;tget_format_stringRRtIncompatibleFormatRRRRRwRtdirnametParentBranchExistsRtanytAlreadyBranchErrorRRR9R$Rtmkdirt
FileExists(RRRRRt	utf8_nameR/tbtchild_branchestbranch_transportR,((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRsB

&
cC@s|dkr|jjdSy|jWn&tk
rRtj||jnXy |jjdd|j	Wntj
k
rnX|jjdS(s&See BzrDir.get_repository_transport().R)R,N(R&R=R;R-RRR.RR3R$R4(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs
 cC@s|dkr|jjdSy|jWn&tk
rRtj||jnXy |jjdd|j	Wntj
k
rnX|jjdS(s'See BzrDir.get_workingtree_transport().RR,N(R&R=R;R-RRR.RR3R$R4(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs
 cC@szi}y|jdd|d<Wntjtjfk
r?nXx3|jD]%}|jd|jd||<qMW|S(sSee ControlDir.get_branches.RRosutf-8(RRRRRtdecode(RRR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytget_branchess#cC@s=ddlm}y|j|Wntjk
r8tSXtS(sTell if this bzrdir contains a working tree.

        Note: if you're going to open the working tree, you should just go
        ahead and try, and not ask permission first.
        i(tWorkingTreeFormatMetaDir(tbzrlib.workingtreeR;tfind_format_stringRR
R1RQ(RR;((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@st|j|js1|jj|jkr5tSy&t|jj|jjsZtSWntjk
rqnXx3|j	D]%}t|j|j
jstSqWy2|jdt}t|j|j
jstSWntjtjfk
rnXtS(s%See BzrDir.needs_format_conversion().R(RRRR-RQRRRRt
list_branchesRR
R1RR
R(RRARtmy_wt((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytneeds_format_conversions*		c
C@s_|dkr|j}n|jd|}|j||j|d|dtd|d|S(sSee ControlDir.open_branch.Rt_foundRRcN(R&R
R!tcheck_support_statustopenRQ(RRtunsupportedRRcRA((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR.s
cC@s?ddlm}|j|}|j||j|dtS(sSee BzrDir.open_repository.i(tRepositoryFormatMetaDirRA(tbzrlib.repositoryRER RBRCRQ(RRDRERA((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR9s
cC@sNddlm}|j|}|j||d|jj|j|dtS(sSee BzrDir.open_workingtree.i(R;tbasedirRA(R<R;R RBR3R4RCRQ(RRDRR;RA((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR
@s

cC@stj|jdS(Nscontrol.conf(RtTransportConfigR=(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRIsN( RRRRRRRRR&RRR1RRRRRR!R$R&R*RRRR:RR@RRRQR
R(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR!s>									(			
	
	
t	BzrFormatcB@seZdZeZdZedZedZe	ddZedZedZ
dZedZd	Zd
ZdZRS(
s^Base class for all formats of things living in metadirs.

    This class manages the format string that is stored in the 'format'
    or 'branch-format' file.

    All classes for (branch-, repository-, workingtree-) formats that
    live in meta directories and have their own 'format' file
    (i.e. different from .bzr/branch-format) derive from this class,
    as well as the relevant base class for their kind
    (BranchFormat, WorkingTreeFormat, RepositoryFormat).

    Each format is identified by a "format" or "branch-format" file with a
    single line containing the base format name and then an optional list of
    feature flags.

    Feature flags are supported as of bzr 2.5. Setting feature flags on formats
    will render them inaccessible to older versions of bzr.

    :ivar features: Dictionary mapping feature names to their necessity
    cC@s
i|_dS(N(tfeatures(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRescC@sPd|krtdn||jkr<tj|n|jj|dS(sWRegister a feature as being present.

        :param name: Name of the feature
        t s'spaces are not allowed in feature namesN(Rt_present_featuresRtFeatureAlreadyRegisteredtadd(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytregister_featurehs
cC@s|jj|dS(sUnregister a feature.N(RLR
(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytunregister_featuretscC@sx|jjD]z\}}||jkr1qn|dkrPtd|qq|dkrntj|qtd|tj|qWdS(Ntoptionals$ignoring optional missing feature %strequireds,treating unknown necessity as require for %s(RJt	iteritemsRLRRtMissingFeature(Rtallow_unsupportedRRGRt	necessity((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRBys
cC@st|jdS(s;Return the ASCII format string that identifies this format.N(RR-(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR-sc	
C@s|j}|j|s4td||fn|t|j}|}xt|D]q\}}y|jdd\}}Wn9tk
rtj	d|d|dd|d|nX||j
|<q`W|S(	NsInvalid format header %r for %rRKiRAtlinenoitlinettext(R-RR:Rzt
splitlinest	enumeratetsplitRRtParseFormatErrorRJ(	RRYt
format_stringtlinesRRWRXRVtfeature((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytfrom_strings	
cC@sW|jg}|jg|jjD]}d|d|df^q%dj|S(s9Return the string representation of this format.
        s%s %s
iiRo(R-textendRJRSR(RR_titem((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs	2cC@sy||jdd }Wntk
r4|}nXy|j|}Wn)tk
rstjd|d|nX|j|S(Ns
iRAtkind(tindexRRtKeyErrorRtUnknownFormatErrorRa(tklassRRdR^t
first_lineR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_find_formats


cC@s
|jS(sA simple byte string uniquely identifying this format for RPC calls.

        Metadir branch formats use their format string.
        (R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR0scC@s"|j|jko!|j|jkS(N(RRJ(Rtother((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt__eq__scC@s_xX|jD]J\}}|dkrJy|j|=WqWtk
rFqWXq
||j|<q
WdS(sfUpdate the feature flags in this format.

        :param updated_flags: Updated feature flags
        N(RSR&RJRf(RRRRV((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs
N(RRRtsetRLRRRORPRQR&RBR-RaRRjR0RlR(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRIMs					t	BzrProbercB@s>eZdZejejZedZ	edZ
RS(s6Prober for formats that use a .bzr/ control directory.cC@sy|jd}Wn)tjk
r>tjd|jnXy||jdd }Wntk
rs|}nXy|jj|}Wn)t	k
rtj
d|ddnX|j|S(s7Return the .bzrdir style format present in a directory.s.bzr/branch-formatRs
iRARdR(t	get_bytesRRRR4ReRtformatsRRfRgRa(RhR=R^RiR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytprobe_transports


cC@sRt}xB|jjD]1\}}t|r=|}n|j|qW|S(N(RmRpRStcallableRN(RRFRRA((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt
known_formatss	(RRRRtFormatRegistryRtnetwork_format_registryRpRRqRs(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRnstRemoteBzrProbercB@s,eZdZedZedZRS(s=Prober for remote servers that provide a Bazaar smart server.c	C@sy|j}Wn>tttjtjtjfk
rPtjd|jnX|j	ry|j
}Wn)tjk
rtjd|jnX|dkrtjd|jqnddlm}|SdS(s8Return a RemoteBzrDirFormat object if it looks possible.Rt2i(tRemoteBzrDirFormatN(
tget_smart_mediumRtAttributeErrorRRt
NoSmartMediumtSmartProtocolErrorRR4tshould_probetprotocol_versiont
bzrlib.remoteRx(RhR=tmediumtserver_versionRx((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRqscC@s ddlm}t|gS(Ni(Rx(RRxRm(RRx((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRss(RRRRRqRs(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRvstBzrDirFormatc
B@seZdZdZdZeeed
d
d
d
eed	ZdZedZ	dZ
dZdZe
d
d	ZRS(sControlDirFormat base class for .bzr/ directories.

    Formats are placed in a dict by their format string for reference
    during bzrdir opening. These should be subclasses of BzrDirFormat
    for consistency.

    Once a format is deprecated, just deprecate the initialize and open
    methods on the format class. Do not deprecate the object, as the
    object will be created every system load.
    sbranch-lockcC@sy|j}Wntjk
r0|j|SXt|tkrP|j|Sddlm}|}|j||j	|SdS(s=Initialize a new bzrdir in the base directory of a Transport.i(RxN(
RyRR{t_initialize_on_transport_vfsttypetBzrDirMetaFormat1RRxt_supply_sub_formats_toRv(RR=t
client_mediumRxt
remote_format((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRv"s
	
cC@s|
sy|j}Wntjk
r,qXddlm}|}
|j|
_|j|
|
j|d|d|d|d|d|d|d	|d
|	Snd}d}yt	|||}WnItj
k
r|sqn*tjk
r|sn|jnX|dk	}|j|}|rytjj||j_Wntk
rfnX|j|||d
|}|j||	\}}|r|jrt}|jjn|jnd}d}||||fS(sCreate this format on transport.

        The directory to initialize will be created.

        :param force_new_repo: Do not use a shared repository for the target,
                               even if one is available.
        :param create_prefix: Create any missing directories leading up to
            to_transport.
        :param use_existing_dir: Use an existing directory if one exists.
        :param stacked_on: A url to stack any created branch on, None to follow
            any target stacking policy.
        :param stack_on_pwd: If stack_on is relative, the location it is
            relative to.
        :param repo_format_name: If non-None, a repository will be
            made-or-found. Should none be found, or if force_new_repo is True
            the repo_format_name is used to select the format of repository to
            create.
        :param make_working_trees: Control the setting of make_working_trees
            for a new shared repository when one is made. None to use whatever
            default the format has.
        :param shared_repo: Control whether made repositories are shared or
            not.
        :param vfs_only: If True do not attempt to use a smart server
        :return: repo, controldir, require_stacking, repository_policy. repo is
            None if none was created or found, bzrdir is always valid.
            require_stacking is the result of examining the stacked_on
            parameter and any stacking policy found for the target.
        i(RxRRRRRRR R!cS@s|jd|S(NR%(R3(R=((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytmake_directoryis
cS@s t||j|j|jS(N(Rt_redirected_totsourceR(R=tetredirection_notice((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt
redirectedls
R@N(RyRR{RRxR0t
_network_nameRR2tdo_catching_redirectionsR4RRR&RvR)RuRRRRzRYRZt_require_stackingRQR@Rw(RR=RRRRRRR R!tvfs_onlyRRxtremote_dir_formatRRR@RFR$RER((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR25sZ 	
			
	
	
c	C@sLtj|dtj}y|jjdd|jWn&tjk
r]tj|j	nXt
jdkrt|t
jrtj|jdn|j}~|jd}d
d|jfg}tj||j|j}|j|jz1x*|D]"\}}|j||d|qWWd|jX|j|d	tS(sInitialize a new bzrdir using VFS calls.

        :param transport: The transport to create the .bzr directory in.
        :return: A
        Ros.bzrR,twin32tREADMEsThis is a Bazaar control directory.
Do not change any files in this directory.
See http://bazaar.canonical.com/ for more information about Bazaar.
s
branch-formatNRA(RsThis is a Bazaar control directory.
Do not change any files in this directory.
See http://bazaar.canonical.com/ for more information about Bazaar.
(RRR"RR3RRR4tAlreadyControlDirErrorR4tsystplatformRRRt
win32utilstset_file_attr_hiddent_abspathRR;RRRtcreate_lockRwRR9RCRQ(	RR=R#t	file_modetbzrdir_transportt
utf8_filesRRtcontent((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs2	!		

cC@sm|s`tjj|}t||jsFtd|||fn|j||j|S|j|S(sReturn an instance of this format for the dir transport points at.

        _found is a private parameter, do not use it.
        s7%s was asked to open %s, but it seems to need format %s(RtControlDirFormatR RRR:Rt_open(RR=RAtfound_format((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRCs

cC@st|jdS(sTemplate method helper for opening BzrDirectories.

        This performs the actual open and any additional logic or parameter
        passing.
        N(RR(RR=((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@st|j|_dS(sGive other_format the same values for sub formats as this has.

        This method is expected to be used when parameterising a
        RemoteBzrDirFormat instance with the parameters from a
        BzrDirMetaFormat1 instance.

        :param other_format: other_format is a format which should be
            compatible with whatever sub formats are supported by self.
        :return: None.
        N(tdictRJ(Rtother_format((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@stS(N(RQ(RR=((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytsupports_transportscC@sEtjj|d|d|d|tj|d|d|d|dS(NRURRG(RRRBRI(RRURRG((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRBs
N(RRRRRvR1R&R2RRCRRRRQRB(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs
			_	)		
	RcB@seZdZejZeZeZ	dZ
dZdZdZ
dZddedZddZedZd	Zd
ZdZdZeeeZd
ZdZdZdZeeeZRS(sBzr meta control format 1

    This is the first format with split out working tree, branch and repository
    disk storage.

    It has:

    - Format 3 working trees [optional]
    - Format 5 branches [optional]
    - Format 7 repositories [optional]
    cC@s,tj|d|_d|_d|_dS(N(RRR&RRt_repository_format(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs
		cC@s\|j|jk	rtS|j|jkr,tS|j|jkrBtS|j|jkrXtStS(N(RR1RRRJRQ(RRk((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRlscC@s||kS(N((RRk((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt__ne__scC@s8|jdkr1ddlm}|j|_n|jS(Ni(tformat_registry(RR&RRtget_default(Rtbranch_format_registry((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@s
||_dS(N(R(RRA((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytset_branch_formatsc@sd}d}dtdgfd}|r|jjr|\}}}	|dkr|	r|jjrtj}qtj}qn|jj	}|jsd}n|dk	r||_t
td|jqn|j
js|\}}}	|dkr<|	rZddlm}
|
}qZn|j	}|jsZd}n|dk	r|j|t
td|jqndS(sWe have a request to stack, try to ensure the formats support it.

        :param stack_on: If supplied, it is the URL to a branch that we want to
            stack on. Check to see if that format supports stacking before
            forcing an upgrade.
        c@sdrSdkr.dttg(Sytjd}WnItjk
rndttg(Stjk
rdttg(SXy|j}Wn%tjk
rdttg(SX|ttg(S(NiRc(	R&RQR	RCRRR1t	JailBreakR(t
target_dirR'(RcRUR(s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytget_target_branch3s*

sFSource repository format does not support stacking, using format:
  %si(tBzrBranchFormat7sBSource branch format does not support stacking, using format:
  %sN(R&R1Rtsupports_external_lookupstrich_root_datat
knitpack_repot!RepositoryFormatKnitPack5RichRoottRepositoryFormatKnitPack5R)RRRtget_format_descriptionRtsupports_stackingRRR(RRURct
_skip_repotnew_repo_formattnew_branch_formatRR't_t
do_upgradeR((RcRURs1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR@"s@
					
cC@s|dkrtj}nt|tkrIt|tkrIt|St|tkrwt|tkrwt|St||jst	|j
nt|S(s!See BzrDirFormat.get_converter().N(R&Rtget_default_formatRRtBzrDirMetaFormat1ColotConvertMetaToColoRRRt
get_convertertConvertMetaToMeta(RRA((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs

cC@sdS(s%See BzrDirFormat.get_format_string().s#Bazaar-NG meta directory, format 1
((R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR-scC@sdS(s*See BzrDirFormat.get_format_description().sMeta directory format 1((R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@s#t}|j|t||S(sSee BzrDirFormat._open.(RRR(RR=RA((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs	
cC@s*|jr|jSddlm}|jS(sCircular import protection.i(R(RRFRR(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt__return_repository_formats	cC@s
||_dS(s9Allow changing the repository format for metadir formats.N(R(Rtvalue((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_set_repository_formatscC@s}tt|j|t|dddk	r=|j|_n|jdk	r[|j|_n|jdk	ry|j|_ndS(sGive other_format the same values for sub formats as this has.

        This method is expected to be used when parameterising a
        RemoteBzrDirFormat instance with the parameters from a
        BzrDirMetaFormat1 instance.

        :param other_format: other_format is a format which should be
            compatible with whatever sub formats are supported by self.
        :return: None.
        RN(	RRRtgetattrR&RRRR(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@s8|jdkr1ddlm}|j|_n|jS(Ni(R(RR&R<RR(Rtwt_format_registry((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt__get_workingtree_formatscC@s
||_dS(N(R(Rt	wt_format((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt__set_workingtree_formatscC@sd|jjfS(Ns<%r>(RR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRsN(RRRtlockdirtLockDirRR1tfixed_componentsRQtcolocated_branchesRRlRRRR&R@RRR-RRt,_BzrDirMetaFormat1__return_repository_formatRRRRt*_BzrDirMetaFormat1__get_workingtree_formatt*_BzrDirMetaFormat1__set_workingtree_formatRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs2						\										RcB@s5eZdZeZedZdZdZRS(s7BzrDirMeta1 format with support for colocated branches.cC@sdS(s%See BzrDirFormat.get_format_string().s:Bazaar meta directory, format 1 (with colocated branches)
((R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR-scC@sdS(s*See BzrDirFormat.get_format_description().s;Meta directory format 1 with support for colocated branches((R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@s#t}|j|t||S(sSee BzrDirFormat._open.(RRR(RR=RA((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs	
(	RRRRQRRR-RR(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs
	RcB@s eZdZdZdZRS(s$Converts the components of metadirs.cC@s
||_dS(sxCreate a metadir to metadir converter.

        :param target_format: The final metadir format that is desired.
        N(R(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRscC@s7||_tjj|_d|_d|_|jdy|jj}Wnt	j
k
rcngXt|j|j
jjsddlm}tjjtd||j
j}|j||nx'|jjD]}|jj}|j
jj}x||kr|tjkrI|tjtjtjfkrItj}	n{|tjkr|tjtjfkrtj}	nE|tjkr|tjkrtj}	nt	j d||j|	j||jj!}|jj}qWqWy|jj"dt#}
Wnt	j$t	j%fk
r,nXt|
t&j'rt|
t(j)rt|j
j*t(j+rt(j,j|
nt|
t(j)rt|
t(j-rt|j
j*t(j.rt(j/j|
nt|
t(j)r&t|
t(j0r&t|j
j*t(j1r&t(j2j|
n|jj3|S(sSee Converter.convert().iischecking repository format(t
CopyConvertersstarting repository conversionsNo converterR(4RRRRRtcountttotaltstepRRRRRRRRRFRRRtconvertR>RtfullhistorybranchtBzrBranchFormat5R(tBzrBranchFormat6RtBzrBranchFormat8t
Converter5to6t
Converter6to7t
Converter7to8tBadConversionTargetRR
R1R
Rt
workingtree_3tWorkingTree3t
workingtree_4tDirStateWorkingTreeRtDirStateWorkingTreeFormatt
Converter3to4tWorkingTree5tWorkingTreeFormat5t
Converter4to5tWorkingTree6tWorkingTreeFormat6tConverter4or5to6R(Rt
to_convertRtrepoRt	converterRtoldtnewtbranch_converterR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRsp			
		

(RRRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs	RcB@s eZdZdZdZRS(sAdd colocated branch support.cC@s
||_dS(sCreate a converter.that upgrades a metadir to the colo format.

        :param target_format: The final metadir format that is desired.
        N(R(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRFscC@s,|jjd|jjtj|jS(sSee Converter.convert().s
branch-format(R=RRRR	RuR3(RRR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRMs(RRRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRCs	cB@s eZdZdZdZRS(s5Convert a 'development-colo' bzrdir to a '2a' bzrdir.cC@s
||_dS(sCreate a converter that converts a 'development-colo' metadir
        to a '2a' metadir.

        :param target_format: The final metadir format that is desired.
        N(R(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRWscC@s,|jjd|jjtj|jS(sSee Converter.convert().s
branch-format(R=RRRR	RuR3(RRR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyR_s(RRRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRTs	tRepositoryAcquisitionPolicycB@sPeZdZdZdZdZdZddZde	ddZ
RS(sAbstract base class for repository acquisition policies.

    A repository acquisition policy decides how a BzrDir acquires a repository
    for a branch that is being created.  The most basic policy decision is
    whether to create a new repository or use an existing one.
    cC@s||_||_||_dS(sConstructor.

        :param stack_on: A location to stack on
        :param stack_on_pwd: If stack_on is relative, the location it is
            relative to.
        :param require_stacking: If True, it is a failure to not stack.
        N(t	_stack_ont
_stack_on_pwdR(RRURR@((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRps		cC@s|jdkrdS|jdkr.|j}nEy"tj|j|j|j}Wn tjk
rr|j}nXy|j	|Wn,tj
tjfk
r|jrqnXdS(sApply any configuration data from this policy to the branch.

        Default implementation sets repository stacking.
        N(
RR&RRt
rebase_urlR5RtInvalidRebaseURLst_get_full_stack_ontset_stacked_on_urlR,R-R(RRRU((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytconfigure_branch|s 	cC@s|jdk	o|jS(s-Return True if this policy requires stacking.N(RR&R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytrequires_stackingscC@sC|jdkrdS|jdkr)|jStj|j|jSdS(s4Get a fully-qualified URL for the stack_on location.N(RR&RRR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs
cC@s|j}|dkrdSytj|d|}Wntjk
rLdSXy|jj}Wn tjk
r|j	}nXy|j
|Wn#tjk
r|jrqn
Xt
|_dS(s>Add a fallback to the supplied repository, if stacking is set.NRc(RR&R	RCRRRR)RRtadd_fallback_repositoryR-RRQ(RR)RcRUtstacked_dirtstacked_repo((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt
_add_fallbacks$
	
cC@sttjdS(sAcquire a repository for this bzrdir.

        Implementations may create a new repository or use a pre-exising
        repository.

        :param make_working_trees: If creating a repository, set
            make_working_trees to this value (if non-None)
        :param shared: If creating a repository, make it shared if True
        :return: A repository, is_new_flag (True if the repository was
            created).
        N(RRRZ(RR RRc((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRZs
N(RRRRRRRR&RR1RZ(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRis					RScB@s2eZdZddedZdeddZRS(s%A policy of creating a new repositorycC@s#tj||||||_dS(sConstructor.

        :param bzrdir: The bzrdir to create the repository on.
        :param stack_on: A location to stack on
        :param stack_on_pwd: If stack_on is relative, the location it is
            relative to.
        N(RRt_bzrdir(RRRURR@((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs	cC@s|dkrg}nt|}|j|jj|j}|r|jj}|jd|d||jst	t
dj|j|j
qn|jjd|}|j|d||dk	r|j|n|tfS(sImplementation of RepositoryAcquisitionPolicy.acquire_repository

        Creates the desired repository in the bzrdir we already have.
        RURcs(Using default stacking branch {0} at {1}RN(R&RsRRR3RRR@RRRRARRRRtset_make_working_treesRQ(RR RRcRURAR)((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRZs$		N(RRRR&R1RRZ(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRSs
RRcB@s2eZdZddedZdeddZRS(s*A policy of reusing an existing repositorycC@s#tj||||||_dS(sConstructor.

        :param repository: The repository to use.
        :param stack_on: A location to stack on
        :param stack_on_pwd: If stack_on is relative, the location it is
            relative to.
        N(RRt_repository(RR)RURR@((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRs	cC@sZ|dkrg}nt|}|j|jjj|j|jd||jtfS(syImplementation of RepositoryAcquisitionPolicy.acquire_repository

        Returns an existing repository to use.
        RcN(R&RsRRRR=RR1(RR RRc((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRZs	N(RRRR&R1RRZ(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyRRs
c
	@s_dkrtndfd}|j|||||||	|
dS(sRegister a metadir subformat.

    These all use a meta bzrdir, but can be parameterized by the
    Repository/Branch/WorkingTreeformats.

    :param repository_format: The fully-qualified repository format class
        name as a string.
    :param branch_format: Fully-qualified branch format class name as
        a string.
    :param tree_format: Fully-qualified tree format class name as
        a string.
    cS@s|jdd\}}ytj||}WnVtk
rY}td||fn.tk
rtd|tj|fnX|S(NR%isfailed to load %s: %ssno factory %s in module %r(trsplittpyutilstget_named_objecttImportErrorRzRtmodules(t	full_nametmod_nametfactory_nametfactoryR((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt_load+s
c@sk}dk	r+|jndk	rI|_ndk	rg|_n|S(N(R&RRR(tbd(R	Rt
bzrdir_formatRR(s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pythelper6s	N(R&Rtregister(
RtkeyRthelptnativet
deprecatedRRthiddentexperimentaltaliasRR((R	RRRRs1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pytregister_metadirs			tknits-bzrlib.repofmt.knitrepo.RepositoryFormatKnit1sEFormat using knits.  Recommended for interoperation with bzr <= 0.14.Rs-bzrlib.branchfmt.fullhistory.BzrBranchFormat5Rs'bzrlib.workingtree_3.WorkingTreeFormat3RRtdirstateRsFormat using dirstate for working trees. Compatible with bzr 0.8 and above when accessed over the network. Introduced in bzr 0.15.s'bzrlib.workingtree_4.WorkingTreeFormat4s
dirstate-tagssBVariant of dirstate with support for tags. Introduced in bzr 0.15.sbzrlib.branch.BzrBranchFormat6s	rich-roots-bzrlib.repofmt.knitrepo.RepositoryFormatKnit4sMVariant of dirstate with better handling of tree roots. Introduced in bzr 1.0sdirstate-with-subtrees-bzrlib.repofmt.knitrepo.RepositoryFormatKnit3sFVariant of dirstate with support for nested trees. Introduced in 0.15.Rs	pack-0.92s6bzrlib.repofmt.knitpack_repo.RepositoryFormatKnitPack1sPack-based format used in 1.x series. Introduced in 0.92. Interoperates with bzr repositories before 0.92 but cannot be read by bzr < 0.92. spack-0.92-subtrees6bzrlib.repofmt.knitpack_repo.RepositoryFormatKnitPack3sPack-based format used in 1.x series, with subtree support. Introduced in 0.92. Interoperates with bzr repositories before 0.92 but cannot be read by bzr < 0.92. srich-root-packs6bzrlib.repofmt.knitpack_repo.RepositoryFormatKnitPack4shA variant of pack-0.92 that supports rich-root data (needed for bzr-svn and bzr-git). Introduced in 1.0.s1.6s6bzrlib.repofmt.knitpack_repo.RepositoryFormatKnitPack5sA format that allows a branch to indicate that there is another (stacked) repository that should be used to access data that is not present locally.sbzrlib.branch.BzrBranchFormat7s1.6.1-rich-roots>bzrlib.repofmt.knitpack_repo.RepositoryFormatKnitPack5RichRootsOA variant of 1.6 that supports rich-root data (needed for bzr-svn and bzr-git).s1.9s6bzrlib.repofmt.knitpack_repo.RepositoryFormatKnitPack6sA repository format using B+tree indexes. These indexes are smaller in size, have smarter caching and provide faster performance for most operations.s
1.9-rich-roots>bzrlib.repofmt.knitpack_repo.RepositoryFormatKnitPack6RichRootsOA variant of 1.9 that supports rich-root data (needed for bzr-svn and bzr-git).s1.14s6A working-tree format that supports content filtering.s'bzrlib.workingtree_4.WorkingTreeFormat5s1.14-rich-rootsPA variant of 1.14 that supports rich-root data (needed for bzr-svn and bzr-git).sdevelopment-subtrees;bzrlib.repofmt.groupcompress_repo.RepositoryFormat2aSubtreesGCurrent development format, subtree variant. Can convert data to and from pack-0.92-subtree (and anything compatible with pack-0.92-subtree) format repositories. Repositories and branches in this format can only be read by bzr.dev. Please read http://doc.bazaar.canonical.com/latest/developers/development-repo.html before use.s'bzrlib.workingtree_4.WorkingTreeFormat6Rsdevelopment5-subtreesDbzrlib.repofmt.knitpack_repo.RepositoryFormatPackDevelopment2Subtrees?Development format, subtree variant. Can convert data to and from pack-0.92-subtree (and anything compatible with pack-0.92-subtree) format repositories. Repositories and branches in this format can only be read by bzr.dev. Please read http://doc.bazaar.canonical.com/latest/developers/development-repo.html before use.sdevelopment-colos4bzrlib.repofmt.groupcompress_repo.RepositoryFormat2as@The 2a format with experimental support for colocated branches.
Rt2aspFormat for the bzr 2.0 series.
Uses group-compress storage.
Provides rich roots which are a one-way transition.
sdefault-rich-rootsSame as 2a.tdefault_format(2Rt
__future__RRtbzrlib.lazy_importRtglobalstbzrlib.traceRRtbzrlibRRRtbzrlib.symbol_versioningRRRtR	RtobjectRItProberRnRtregister_proberRvRRRpR
R-t_default_formatRt	ConverterRRtregister_server_proberRRSRRRQR1R&RRtGlobalStackRtformat_nametset_default(((s1/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.pyt<module>s^	-~!"N_,!(

Copyright © 2017 || Recoded By Mr.Bumblebee