-=[ Mr. Bumblebee ]=-
_Indonesia_

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


]:Oc@@sfdZddlmZddlmZeedddlmZdefdYZ	de	fd	YZ
d
ejfdYZ
e
e
_defd
YZdejfdYZdefdYZdefdYZdefdYZdefdYZdejfdYZdefdYZeZejZdS(sControlDir is the basic control directory class.

The ControlDir class is the base for the control directory used
by all bzr and foreign formats. For the ".bzr" implementation,
see bzrlib.bzrdir.BzrDir.

i(tabsolute_import(tlazy_imports
import textwrap

from bzrlib import (
    errors,
    hooks,
    revision as _mod_revision,
    transport as _mod_transport,
    trace,
    ui,
    urlutils,
    )
from bzrlib.transport import local
from bzrlib.push import (
    PushResult,
    )

from bzrlib.i18n import gettext
(tregistrytControlComponentcB@sJeZdZedZedZedZedZRS(s%Abstract base class for control directory components.

    This provides interfaces that are common across controldirs,
    repositories, branches, and workingtree control directories.

    They all expose two urls and transports: the *user* URL is the
    one that stops above the control directory (eg .bzr) and that
    should normally be used in messages, and the *control* URL is
    under that in eg .bzr/checkout and is used to read the control
    files.

    This can be used as a mixin and is intended to fit with
    foreign formats.
    cC@s
tdS(N(tNotImplementedError(tself((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytcontrol_transportCscC@s
|jjS(N(Rtbase(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytcontrol_urlGscC@s
tdS(N(R(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytuser_transportKscC@s
|jjS(N(R	R(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytuser_urlOs(t__name__t
__module__t__doc__tpropertyRRR	R
(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR3s
t
ControlDirc
B@seZdZdZdZdZdZd/dZe	dZ
dZd/d/d/dZd/d	Z
d/d/d/e	d
ZdZdZd/d
Zd/dZd/dZd/e	e	d/dZe	dZdZe	ed/dZd/dZdZdZe	dZdZd/e	dd/d/e	e	d/ed	Zd/e	e	e	dZd/dZ dZ!dZ"d/e	e	dZ#d/e	e	d/e	ee	d Z$e%d/d/d!Z&e%d"Z'e%e	d/d#Z(e%e	d/d/d/d$Z)e%d/d%Z*e%d&Z+e%d/d/e	d'Z,e%e	d/d(Z-e%d/d)Z.e%d*Z/e%d+Z0e%d/d,Z1e%d-Z2e%d/d/d.Z3RS(0s-A control directory.

    While this represents a generic control directory, there are a few
    features that are present in this interface that are currently only
    supported by one of its implementations, BzrDir.

    These features (bound branches, stacked branches) are currently only
    supported by Bazaar, but could be supported by other version control
    systems as well. Implementations are required to raise the appropriate
    exceptions when an operation is requested that is not supported.

    This also makes life easier for API users who can rely on the
    implementation always allowing a particular feature to be requested but
    raising an exception when it is not supported, rather than requiring the
    API users to check for magic attributes to see what features are supported.
    cC@stS(sOReturn true if this controldir is one whose format we can convert
        from.(tTrue(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytcan_convert_formatfscC@s|jjS(sLReturn a sequence of all branches local to this control directory.

        (tget_branchestvalues(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt
list_brancheskscC@s:yi|jd6SWntjtjfk
r5iSXdS(sGet all branches in this control directory, as a dictionary.
        
        :return: Dictionary mapping branch names to instances.
        tN(topen_branchterrorstNotBranchErrortNoRepositoryPresent(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRqscC@st|jdS(sTrue if filename is the name of a path which is reserved for
        controldirs.

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

        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. it is expected that plugins will need to extend
        this in the future - for instance to make bzr talk with svn working
        trees.
        N(Rtis_control_filename(Rtfilename((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR{s
cC@st|jdS(sMReturn true if this controldir needs convert_format run on it.

        For instance, if the repository format is out of date but the
        branch and working tree are not, this should return True.

        :param format: Optional parameter indicating a specific desired
                       format we plan to arrive at.
        N(Rtneeds_format_conversion(Rtformat((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs	cC@st|jdS(sCreate a new repository in this control directory.

        :param shared: If a shared repository should be created
        :return: The newly created repository
        N(Rtcreate_repository(Rtshared((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRscC@st|jdS(s*Destroy the repository in this ControlDir.N(Rtdestroy_repository(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR scC@st|jdS(sCreate a branch in this ControlDir.

        :param name: Name of the colocated branch to create, None for
            the user selected branch or "" for the active branch.
        :param append_revisions_only: Whether this branch should only allow
            appending new revisions to its history.

        The controldirs format will control what branch format is created.
        For more control see BranchFormatXX.create(a_controldir).
        N(Rt
create_branch(Rtnamet
repositorytappend_revisions_only((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR!scC@st|jdS(sDestroy a branch in this ControlDir.

        :param name: Name of the branch to destroy, None for the 
            user selected branch or "" for the active branch.
        :raise NotBranchError: When the branch does not exist
        N(Rtdestroy_branch(RR"((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR%scC@st|jdS(sCreate a working tree at this ControlDir.

        :param revision_id: create it as of this revision id.
        :param from_branch: override controldir branch 
            (for lightweight checkouts)
        :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.
        N(Rtcreate_workingtree(Rtrevision_idtfrom_branchtaccelerator_treethardlink((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR&scC@st|jdS(sDestroy the working tree at this ControlDir.

        Formats that do not support this may raise UnsupportedOperation.
        N(Rtdestroy_workingtree(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR+scC@st|jdS(sDestroy the control files for the working tree at this ControlDir.

        The contents of working tree files are not affected.
        Formats that do not support this may raise UnsupportedOperation.
        N(Rtdestroy_workingtree_metadata(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR,scC@st|jdS(sFind the branch 'format' for this controldir.

        This might be a synthetic object for e.g. RemoteBranch and SVN.
        N(Rtfind_branch_format(RR"((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR-scC@s"|dk	rtj|ndS(sReturn the referenced URL for the branch in this controldir.

        :param name: Optional colocated branch name
        :raises NotBranchError: If there is no Branch.
        :raises NoColocatedBranchSupport: If a branch name was specified
            but colocated branches are not supported.
        :return: The URL the branch in this controldir references if it is a
            reference branch, or None for regular branches.
        N(tNoneRtNoColocatedBranchSupport(RR"((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytget_branch_references
cC@st|jdS(sPSet the referenced URL for the branch in this controldir.

        :param name: Optional colocated branch name
        :param target_branch: Branch to reference
        :raises NoColocatedBranchSupport: If a branch name was specified
            but colocated branches are not supported.
        :return: The referencing branch
        N(Rtset_branch_reference(Rt
target_branchR"((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR1s	cC@st|jdS(seOpen the branch object at this ControlDir if one is present.

        :param unsupported: if True, then no longer supported branch formats can
            still be opened.
        :param ignore_fallbacks: Whether to open fallback repositories
        :param possible_transports: Transports to use for opening e.g.
            fallback repositories.
        N(RR(RR"tunsupportedtignore_fallbackstpossible_transports((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs
cC@st|jdS(sNOpen the repository object at this ControlDir if one is present.

        This will not follow the Branch object pointer - it's strictly a direct
        open facility. Most client code should use open_branch().repository to
        get at a repository.

        :param _unsupported: a private parameter, not part of the api.
        N(Rtopen_repository(Rt_unsupported((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR6s	cC@st|jdS(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.
        N(Rtfind_repository(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR8scC@st|jdS(sOpen the workingtree object at this ControlDir if one is present.

        :param recommend_upgrade: Optional keyword parameter, when True (the
            default), emit through the ui module a recommendation that the user
            upgrade the working tree when the workingtree being opened is old
            (but still fully supported).
        :param from_branch: override controldir branch (for lightweight
            checkouts)
        N(Rtopen_workingtree(RR3trecommend_upgradeR(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR9scC@s7y|j|dttSWntjk
r2tSXdS(sTell if this controldir contains a branch.

        Note: if you're going to open the branch, you should just go ahead
        and try, and not ask permission first.  (This method just opens the
        branch and discards it, and that's somewhat expensive.)
        R4N(RRRRtFalse(RR"((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt
has_branch"s
cC@s:|jjjd}|dkr-d}ntj|S(s~Return the name of the branch selected by the user.

        :return: Name of the branch selected by the user, or "".
        tbranchRN(troot_transporttget_segment_parameterstgetR.turlutilstunescape(RR=((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt_get_selected_branch/s	cC@s4y|jdttSWntjk
r/tSXdS(sTell if this controldir contains a working tree.

        This will still raise an exception if the controldir has a workingtree
        that is remote & inaccessible.

        Note: if you're going to open the working tree, you should just go ahead
        and try, and not ask permission first.  (This method just opens the
        workingtree and discards it, and that's somewhat expensive.)
        R:N(R9R;RRt
NoWorkingTree(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pythas_workingtree9s

cC@st|jdS(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(Rtcloning_metadir(Rtrequire_stacking((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRFIs
cC@s
|jS(sProduce a metadir suitable for checkouts of this controldir.

        :returns: A ControlDirFormat with all component formats
            either set appropriately or set to None if that component
            should not be created.
        (RF(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytcheckout_metadirXstdowncC@st|jdS(sfCreate 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.

        :param revision_id: 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.
        N(Rtsprout(RturlR'tforce_new_repotrecurseR5R)R*tstackedt
source_branchtcreate_tree_if_local((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRJasc
C@sAd}y|j}Wn tjk
r8|j}n
X|j}t}||_|dkr|dkr{|j}n|j	|jd||j
|d|}|jdks|r|j|j
nd|_d|_d|_tj|_||_d|_t|_n'|jdks.|rA|j|j
ny|j}	Wnotjk
r|j||d||_t|_ntjk
r|j||d||_d|_nNX|	jz,|j|	j|d||_|	jWd|	jXt |_|jj|_|jj|_|jj|_|S(s,Push the source branch into this ControlDir.R't
stop_revisionN(!R.RRRR8R#t
PushResultROt
last_revisiontfetchtclonetget_push_locationtset_push_locationRt
stacked_ontbranch_push_resultt	old_revnot
_mod_revisiont
NULL_REVISIONt	old_revidR2t
master_branchR;tworkingtree_updatedR9tNotLocalUrltpushRDt
lock_writeR=tupdatetunlockR(
RtsourceR't	overwritetremembert
create_prefixtbr_tot
repository_totpush_resultttree_to((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytpush_branch~sZ										

	cC@s|y|j}Wn5tjtjfk
rGd}|jd|}n+X|dk	ri|jd|}n	|j}||fS(s
Return the branch and tree, if any, for this controldir.

        :param name: Name of colocated branch to open.

        Return None for tree if not present or inaccessible.
        Raise NotBranchError if no branch is present.
        :return: (tree, branch)
        R"N(R9RRDR`R.RR=(RR"ttreeR=((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt_get_tree_branchs		cC@st|jdS(s&Get configuration for this ControlDir.N(Rt
get_config(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRpscC@st|jdS(sDCheck that a controldir as a whole can be converted to a new format.N(Rtcheck_conversion_target(Rt
target_format((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRqscC@s(|jtj|d|d|d|S(sClone this controldir and its contents to url verbatim.

        :param url: The url create the clone at.  If url's last component 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.
        R'RLtpreserve_stacking(tclone_on_transportt_mod_transportt
get_transport(RRKR'RLRs((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRUsc		C@st|jdS(sClone this controldir 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.
        N(RRt(	Rt	transportR'RLRsRXRhtuse_existing_dirtno_tree((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRtscc@s!|dkrd}n|dkr0d}n|g}xt|dkr|j}t}y|j|}Wntjtjfk
rnX||\}}|Vy||}	Wn tjtjfk
rq<nX|r<x3t	|	dtD]}
|j
|j|
qWq<q<WdS(sFind control dirs recursively from current location.

        This is intended primarily as a building block for more sophisticated
        functionality, like finding trees under a directory, or finding
        branches that use a given repository.

        :param evaluate: An optional callable that yields recurse, value,
            where recurse controls whether this controldir is recursed into
            and value is the value to yield.  By default, all bzrdirs
            are recursed into, and the return value is the controldir.
        :param list_current: if supplied, use this function to list the current
            directory, instead of Transport.list_dir
        :return: a generator of found bzrdirs, or whatever evaluate returns.
        cS@s
|jdS(NR(tlist_dir(Rw((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytlist_currentscS@s
t|fS(N(R(t
controldir((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytevaluatesitreverseN(R.tlentpopRtopen_from_transportRRtPermissionDeniedt
NoSuchFiletsortedtappendRU(tklassRwR}R{tpendingtcurrent_transportRMR|tvaluetsubdirstsubdir((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytfind_bzrdirss*	cC@swd}g}xa|j|d|D]J\}}|dk	rS|j|jn|dk	r%|j|q%q%W|S(sAFind all branches under a transport.

        This will find all branches below the transport, including branches
        inside other branches.  Where possible, it will use
        Repository.find_branches.

        To list all the branches that use a particular Repository, see
        Repository.find_branches
        cS@sMy|j}Wntjk
r&nXtg|ffSt|jdffS(N(R6RRR;RRR.(R|R#((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR}:sR}N(RR.textendt
find_branches(RRwR}trettbranchestrepo((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR/s		cC@s)|j||}|j||jS(sCreate a new ControlDir, Branch and Repository at the url 'base'.

        This will use the current default ControlDirFormat unless one is
        specified, and use whatever
        repository format that that uses via controldir.create_branch and
        create_repository. If a shared repository is available that is used
        preferentially.

        The created Branch object is returned.

        :param base: The URL to create the branch at.
        :param force_new_repo: If True a new repository is always created.
        :param format: If supplied, the format of branch to create.  If not
            supplied, the default is used.
        (tcreatet_find_or_create_repositoryR!(RRRLRR|((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytcreate_branch_and_repoKs
c
C@s|r?tj||}t|tjs?tj|q?n|j|||}|j|}|j	}	|s|j
r|dkry|jWqtjk
rqXn|	S(sCreate a new ControlDir, Branch and Repository at the url 'base'.

        This is a convenience function - it will use an existing repository
        if possible, can be told explicitly whether to create a working tree or
        not.

        This will use the current default ControlDirFormat unless one is
        specified, and use whatever
        repository format that that uses via ControlDir.create_branch and
        create_repository. If a shared repository is available that is used
        preferentially. Whatever repository is used, its tree creation policy
        is followed.

        The created Branch object is returned.
        If a working tree cannot be made due to base not being a file:// url,
        no error is raised unless force_new_tree is True, in which case no
        data is created on disk and NotLocalUrl is raised.

        :param base: The URL to create the branch at.
        :param force_new_repo: If True a new repository is always created.
        :param force_new_tree: If True or False force creation of a tree or
                               prevent such creation respectively.
        :param format: Override for the controldir format to create.
        :param possible_transports: An optional reusable transports list.
        N(
RuRvt
isinstancetlocaltLocalTransportRR`RRR!tmake_working_treesR.R&(
RRRLtforce_new_treeRR5ttR|Rtresult((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytcreate_branch_convenience`scC@s[tj|}t|tjs3tj|n|j|dtd|j	}|j
S(sCreate a new ControlDir, WorkingTree, Branch and Repository at 'base'.

        'base' must be a local path or a file:// url.

        This will use the current default ControlDirFormat unless one is
        specified, and use whatever
        repository format that that uses for bzrdirformat.create_workingtree,
        create_branch and create_repository.

        :param format: Override for the controldir format to create.
        :return: The WorkingTree object.
        RLR(RuRvRRRRR`RRtbzrdirR&(RRRRR|((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytcreate_standalone_workingtreescC@s|j|dtS(s%Open a branch which is not supported.R7(topenR(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytopen_unsupportedscC@s+tj||}|j|d|d|S(sOpen an existing controldir, rooted at 'base' (url).

        :param _unsupported: a private parameter to the ControlDir class.
        tprobersR7(RuRvR(RRR5RR7R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRsc@sx|jdD]}||qW|jfd}fd}ytj|||\}}Wn#tjk
rtjnX|j||j|dt	S(sOpen a controldir within a particular directory.

        :param transport: Transport containing the controldir.
        :param _unsupported: private.
        tpre_openc@s|tj|dfS(NR(tControlDirFormattfind_format(Rw(R(s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRsc@se|j|j|j}|dkr6tjntjtdj	|j
|j|j
|S(Ns{0} is{1} redirected to {2}(t_redirected_toRettargetR.RRttracetnotetgettextRRtpermanently(Rwtetredirection_noticetredirected_transport(R(s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt
redirectedst_found(
thooksRRutdo_catching_redirectionsRtTooManyRedirectionsRtcheck_support_statusRR(RRwR7RthookRRR((RRs5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs	
cC@stj||}|j|S(sOpen an existing branch which contains url.

        :param url: url to search from.

        See open_containing_from_transport for more detail.
        (RuRvtopen_containing_from_transport(RRKR5Rw((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytopen_containingscC@s|j}xtry/|j|}|tj|j|fSWn)tjk
rY}ntjk
rlnXy|j	d}Wn&tj
k
rtjd|nX|j|jkrtjd|n|}qWdS(sOpen an existing branch which contains a_transport.base.

        This probes for a branch at a_transport, and searches upwards from there.

        Basically we keep looking up until we find the control directory or
        run into the root.  If there isn't one, raises NotBranchError.
        If there is one and it is either an unrecognised format or an unsupported
        format, UnknownFormatError or UnsupportedFormatError are raised.
        If there is one, it is returned, along with the unused portion of url.

        :return: The ControlDir that contains the path, and a Unicode path
                for the rest of the URL.
        s..tpathN(RRRRARBtrelpathRRRRUtInvalidURLJoin(Rta_transportRKRRtnew_t((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs 		 cC@s|j|}|jS(sReturn the branch and working tree at a location.

        If there is no tree at the location, tree will be None.
        If there is no branch at the location, an exception will be
        raised
        :return: (tree, branch)
        (RRo(RtlocationR|((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytopen_tree_or_branchs	cC@s:|j|d|\}}|j\}}|||fS(s`Return the branch and working tree contained by a location.

        Returns (tree, branch, relpath).
        If there is no tree at containing the location, tree will be None.
        If there is no branch containing the location, an exception will be
        raised
        relpath is the portion of the path that is contained by the branch.
        R5(RRo(RRR5R|RRnR=((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytopen_containing_tree_or_branchscC@s|j|\}}y|j\}}WnZtjk
ry |j}dd||fSWqtjk
rtj|qXnX|||j|fS(s"Return the working tree, branch and repo contained by a location.

        Returns (tree, branch, repository, relpath).
        If there is no tree containing the location, tree will be None.
        If there is no branch containing the location, branch will be None.
        If there is no repository containing the location, repository will be
        None.
        relpath is the portion of the path that is contained by the innermost
        ControlDir.

        If no tree, branch or repository is found, a NotBranchError is raised.
        N(RRoRRR8R.RR#(RRR|RRnR=R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt)open_containing_tree_branch_or_repositoryscC@sc|tk	rtd|ntj||}|j|dkrVtj}n|j|S(s.Create a new ControlDir 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.
        sAControlDir.create always creates thedefault format, not one of %rN(	RtAssertionErrorRuRvtensure_baseR.Rtget_default_formattinitialize_on_transport(RRRR5R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR8s	

N(4RRR
RRRRR.RR;RR R!R%R&R+R,R-R0R1RR6R8RR9R<RCRERFRHRJRmRoRpRqRURttclassmethodRRRRRRRRRRRRRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRTs			
		
	
				
	
				A			)*	 
#tControlDirHookscB@seZdZdZRS(s Hooks for ControlDir operations.cC@s@tjj|dd|jddd|jdddd
S(
sCreate the default hooks.sbzrlib.controldirsControlDir.hooksRsYInvoked before attempting to open a ControlDir with the transport that the open will use.iitpost_repo_initsvInvoked after a repository has been initialized. post_repo_init is called with a bzrlib.controldir.RepoInitHookParams.iN(ii(ii(RtHookst__init__tadd_hook(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRNs		(RRR
R(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRKstControlComponentFormatcB@sDeZdZeZdZdZeddZ	e
dZRS(s8A component that can live inside of a control directory.cC@st|jdS(s-Return the short description for this format.N(Rtget_format_description(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRcscC@stS(sIs this format supported?

        Supported formats must be initializable and openable.
        Unsupported formats may not support initialization or committing or
        some other features depending on the reason for not being supported.
        (R(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytis_supportedgscC@sX|r)|jr)tjd|n|rT|jrTtjj|j|ndS(soGive an error or warning on old formats.

        :param allow_unsupported: If true, allow opening
            formats that are strongly deprecated, and which may
            have limited functionality.

        :param recommend_upgrade: If true (default), warn
            the user through the ui object that they may wish
            to upgrade the object.
        RN(RRtUnsupportedFormatErrortupgrade_recommendedtuit
ui_factoryR:R(Rtallow_unsupportedR:tbasedir((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRps
	cC@st|jdS(N(Rtget_format_string(tcls((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRsN(RRR
R;RRRRR.RRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR^s			tControlComponentFormatRegistrycB@sbeZdZd
dZdZdZdZdZdZ	dZ
dZd	ZRS(sDA registry for control components (branch, workingtree, repository).cC@s#tt|j|g|_dS(N(tsuperRRt_extra_formats(Rtother_registry((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRscC@s#tt|j|j|dS(sRegister a new format.N(RRtregisterR(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRscC@s tt|j|jdS(sRemove a registered format.N(RRtremoveR(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRscC@s|jjtj|dS(sRegister a format that can not be used in a metadir.

        This is mainly useful to allow custom repository formats, such as older
        Bazaar formats and foreign formats, to be tested.
        N(RRRt
_ObjectGetter(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytregister_extrascC@s|jjtj|dS(s Remove an extra format.
        N(RRRR(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytremove_extrascC@s |jjtj||dS(s"Register a format lazily.
        N(RRRt_LazyObjectGetter(Rtmodule_nametmember_name((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytregister_extra_lazys	cC@sOg}xB|jD]7}|j}t|r:|}n|j|qW|S(s;Return all "extra" formats, not usable in meta directories.(Rtget_objtcallableR(RRtgettertf((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt
_get_extrascC@s_g}xH|jD]:}|j|}t|r@|}n|j|qW||jS(s?Return all formats, even those not usable in metadirs.
        (tkeysR@RRR(RRR"tfmt((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt_get_allscC@sat}x*|jD]}|j|j|qWx$|jD]}|j|jq@W|S(s.Return a set of the modules providing objects.(tsetRtaddt_get_moduleRt
get_module(RtmodulesR"R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt_get_all_moduless	N(
RRR
R.RRRRRRRRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs						
	t	ConvertercB@s eZdZdZdZRS(s9Converts a disk format object from one format to another.cC@sdS(sPerform the conversion of to_convert, giving feedback via pb.

        :param to_convert: The disk object to convert.
        :param pb: a progress bar to use for progress information.
        N((Rt
to_converttpb((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytconvertscC@s/|jd7_|jj||j|jdS(sUpdate the pb by a step.iN(tcountRRcttotal(Rtmessage((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytsteps(RRR
RR(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs	Rc
B@saeZdZdZgZgZeZe	Z
eZeZdZ
ddZdZdZe	ddZdZedZedZed	Zed
ZdZedZed
ZeddZddZdZeeeddddeed	ZdZedZ edZ!edZ"dZ#RS(sAn encapsulation of the initialization and open routines for a format.

    Formats provide three things:
     * An initialization routine,
     * a format string,
     * an open routine.

    Formats are placed in a dict by their format string for reference
    during controldir opening. These should be subclasses of ControlDirFormat
    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.

    :cvar colocated_branches: Whether this formats supports colocated branches.
    :cvar supports_workingtrees: This control directory can co-exist with a
        working tree.
    cC@st|jdS(s-Return the short description for this format.N(RR(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRscC@st|jdS(sReturn the converter to use to convert controldirs needing converts.

        This returns a bzrlib.controldir.Converter object.

        This should return the best upgrader to step this format towards the
        current default format. In the case of plugins we can/should provide
        some means for them to extend the range of returnable converters.

        :param format: Optional format to override the default format of the
                       library.
        N(Rt
get_converter(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRscC@stS(sIs this format supported?

        Supported formats must be openable.
        Unsupported formats may not support initialization or committing or
        some other features depending on the reason for not being supported.
        (R(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR scC@s
|jS(sKWhether new control directories of this format can be initialized.
        (R(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytis_initializable)scC@sX|r)|jr)tjd|n|rT|jrTtjj|j|ndS(soGive an error or warning on old formats.

        :param allow_unsupported: If true, allow opening
            formats that are strongly deprecated, and which may
            have limited functionality.

        :param recommend_upgrade: If true (default), warn
            the user through the ui object that they may wish
            to upgrade the object.
        RN(RRRRRRR:R(RRR:R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR.s
	cC@s|jj|jkS(N(trepository_formattrich_root_data(RRr((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt
same_modelAs	cC@stjddS(sIRegister a format that does not use '.bzr' for its control dir.

        s_ControlDirFormat.register_format() has been removed in Bazaar 2.4. Please upgrade your plugins.N(RtBzrError(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytregister_formatEscC@s|jj|dS(s<Register a prober that can look for a control dir.

        N(t_probersR(Rtprober((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytregister_proberMscC@s|jj|dS(sUnregister a prober.

        N(RR(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytunregister_proberTscC@s|jj|dS(s-Register a control format prober for client-server environments.

        These probers will be used before ones registered with
        register_prober.  This gives implementations that decide to the
        chance to grab it before anything looks at the contents of the format
        file.
        N(t_server_probersR(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytregister_server_prober[s	cC@s|jjS(N(Rtrstrip(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt__str__fscC@s|j|jS(N(RR(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytall_probersjscC@s7t}x'|jD]}|j|jqW|S(s&Return all the known formats.
        (RRRct
known_formats(RRt
prober_kls((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRns	cC@sv|dkr|j}nx?|D]7}|}y|j|SWq"tjk
rXq"Xq"Wtjd|jdS(s'Return the format present at transport.RN(R.Rtprobe_transportRRR(RRwRR	R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRws
	cC@s|jtj||S(sCreate a control dir at this url and return an opened copy.

        While not deprecated, this method is very specific and its use will
        lead to many round trips to setup a working environment. See
        initialize_on_transport_ex for a [nearly] all-in-one method.

        Subclasses should typically override initialize_on_transport
        instead of this method.
        (RRuRv(RRKR5((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt
initializes
cC@st|jdS(sAInitialize a new controldir in the base directory of a Transport.N(RR(RRw((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRscC@st|jdS(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, controldir is always valid.
            require_stacking is the result of examining the stacked_on
            parameter and any stacking policy found for the target.
        N(Rtinitialize_on_transport_ex(RRwRxRhRLRXtstack_on_pwdtrepo_format_nameRtshared_repotvfs_only((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs cC@st|jdS(s\A simple byte string uniquely identifying this format for RPC calls.

        Bzr control formats use this disk format string to identify the format
        over the wire. Its possible that other control formats have more
        complex detection requirements, so we permit them to use any unique and
        immutable string they desire.
        N(Rtnetwork_name(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRscC@st|jdS(sKReturn an instance of this format for the dir transport points at.
        N(RR(RRwR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRscC@s
||_dS(s:Set default format (for testing behavior of defaults only)N(t_default_format(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt_set_default_formatscC@s|jS(s"Return the current default format.(R(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRscC@st|jdS(sHCheck if this format can be opened over a particular transport.
        N(Rtsupports_transport(RRw((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRsN($RRR
R.RRRR;tcolocated_branchesRtsupports_workingtreestfixed_componentsRRRRRRRRRRRRRRRRRRRRRRRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRsF							

				
tProbercB@s&eZdZdZedZRS(s1Abstract class that can be used to detect a particular kind of
    control directory.

    At the moment this just contains a single method to probe a particular
    transport, but it may be extended in the future to e.g. avoid
    multiple levels of probing for Subversion repositories.

    See BzrProber and RemoteBzrProber in bzrlib.bzrdir for the
    probers that detect .bzr/ directories and Bazaar smart servers,
    respectively.

    Probers should be registered using the register_server_prober or
    register_prober methods on ControlDirFormat.
    cC@st|jdS(sReturn the controldir style format present in a directory.

        :raise UnknownFormatError: If a control dir was found but is
            in an unknown format.
        :raise NotBranchError: If no control directory was found.
        :return: A ControlDirFormat instance.
        N(RR
(RRw((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR
scC@st|jdS(sReturn the control dir formats known by this prober.

        Multiple probers can return the same formats, so this should
        return a set.

        :return: A set of known formats.
        N(RR(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs	(RRR
R
RR(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs	
tControlDirFormatInfocB@seZdZRS(cC@s(||_||_||_||_dS(N(t
deprecatedtnativethiddentexperimental(RRRRR((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs			(RRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRstControlDirFormatRegistrycB@steZdZdZdZeeeeedZeeeeedZdZ	dZ
dZdZRS(	sRegistry of user-selectable ControlDir subformats.

    Differs from ControlDirFormat._formats in that it provides sub-formats,
    e.g. BzrDirMeta1 with weave repository.  Also, it's more user-oriented.
    cC@s/t|_t|_tt|jdS(s"Create a ControlDirFormatRegistry.N(Rt_aliasestlistt_registration_orderRRR(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR
scC@s
t|jS(s3Return a set of the format names which are aliases.(t	frozensetR(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytaliasessc		
C@sXtjj||||t|||||rD|jj|n|jj|dS(s'Register a ControlDirFormat factory.

        The factory must be a callable that takes one parameter: the key.
        It must produce an instance of the ControlDirFormat when called.

        This function mainly exists to prevent the info object from being
        supplied directly.
        N(RtRegistryRRRRR!R(	RtkeytfactorythelpRRRRtalias((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs

c

C@s[tjj|||||t|||||	rG|jj|n|jj|dS(N(RR$t
register_lazyRRRR!R(
RR%RRR'RRRRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR)'s
cC@sNtjj|d|j||j|d|j||jjddS(sySet the 'default' key to be a clone of the supplied key.

        This method must be called once and only once.
        tdefaulttinfoN(RR$RR@tget_helptget_infoRR(RR%((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytset_default/scC@s?d|kr|jdn|j||jd}dS(sSet the FormatRegistry default and Repository default.

        This is a transitional method while Repository.set_default_format
        is deprecated.
        R*N(RR.R@(RR%R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytset_default_repository8s
cC@s|j|S(N(R@(RR%((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytmake_bzrdirCsc
C@sJd}d}|jd}g}xZ|jD]O}|dkrCq+n|j|}||krg|}q+|j||fq+Wd}|dk	r|||d||jd7}ng}	g}
x|D]~\}}|j|}|jrqq|jr|	j||fq|jr4|
j||fq|||||7}qW|d7}d}t|
dkr|d7}xF|
D]1\}}|j|}|||||7}qWn
|d7}t|	dkr|d	7}xF|	D]1\}}|j|}|||||7}qWn
|d
7}|d7}|dkrB|S|SdS(NRR*c
S@s?|jrd|}nd|tj|dddddtfS(Ns	(native) s	:%s:
%s

tinitial_indents    tsubsequent_indenttbreak_long_words(RttextwraptfillR;(R%R'R+((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pytwrappedTs	
s(default) %ss8
See :doc:`formats-help` for more about storage formats.is'Experimental formats are shown below.

s(No experimental formats are available.

s&
Deprecated formats are shown below.

s'
No deprecated formats are available.

s
other-formats(	R.R,R!RR-RRRR(
Rttopictoutputtdefault_realkeytdefault_helpt
help_pairsR%R'R6tdeprecated_pairstexperimental_pairsR+tother_output((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt
help_topicFs^					


(
RRR
RR#RR;RR)R.R/R0R?(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs						tRepoInitHookParamscB@s)eZdZdZdZdZRS(s!Object holding parameters passed to `*_repo_init` hooks.

    There are 4 fields that hooks may wish to access:

    :ivar repository: Repository created
    :ivar format: Repository format
    :ivar bzrdir: The controldir for the repository
    :ivar shared: The repository is shared
    cC@s(||_||_||_||_dS(sCreate a group of RepoInitHook parameters.

        :param repository: Repository created
        :param format: Repository format
        :param controldir: The controldir for the repository
        :param shared: The repository is shared
        N(R#RRR(RR#RR|R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyRs			cC@s|j|jkS(N(t__dict__(Rtother((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt__eq__scC@s;|jr d|jj|jfSd|jj|jfSdS(Ns<%s for %s>(R#t	__class__RR(R((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt__repr__s
	(RRR
RRCRE(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyR@s		
	N(R
t
__future__Rtbzrlib.lazy_importRtglobalstbzrlibRtobjectRRRRRRtFormatRegistryRRRRRR$RR@tformat_registrytnetwork_format_registry(((s5/usr/lib/python2.7/dist-packages/bzrlib/controldir.pyt<module>s,	!*C&	'	

Copyright © 2017 || Recoded By Mr.Bumblebee