-=[ Mr. Bumblebee ]=-
_Indonesia_

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


Qc@@sddlmZddlZddlmZddlmZeedddlZddlm	Z	m
Z
ddlmZm
Z
mZddlmZdd	lmZdd
lmZmZddlmZddlmZmZdd
lmZmZmZmZde
jfdYZ de
j!fdYZ"dej#fdYZ$defdYZ%e%e _&de'fdYZ(de'fdYZ)de'fdYZ*de	j+e"fdYZ,de,fdYZ-d e,fd!YZ.d"e,fd#YZ/d$e,fd%YZ0d&e
j1fd'YZ2ej3Z4e2e4Z5e-Z6e/Z7e.Z8e5j9d(d)d*e5j:e0e5j:e6e5j:e7e5j:e8e5j;e7d+efd,YZ<d-e efd.YZ=d/e=fd0YZ>d1e>fd2YZ?d3e?fd4YZ@d5e'fd6YZAd7eAfd8YZBd9eAfd:YZCd;e'fd<YZDd=e'fd>YZEd?e'fd@YZFdAe'fdBYZGdCefdDYZHdEZIdFeHfdGYZJeHjKeJdS(Hi(tabsolute_importN(tStringIO(tlazy_imports
import itertools
from bzrlib import (
    bzrdir,
    controldir,
    cache_utf8,
    cleanup,
    config as _mod_config,
    debug,
    errors,
    fetch,
    graph as _mod_graph,
    lockdir,
    lockable_files,
    remote,
    repository,
    revision as _mod_revision,
    rio,
    shelf,
    tag as _mod_tag,
    transport,
    ui,
    urlutils,
    vf_search,
    )
from bzrlib.i18n import gettext, ngettext
(tbzrdirt
controldir(tneeds_read_locktneeds_write_locktonly_raises(tHooks(tInterObject(t_RelockDebugMixintLogicalLockResult(tregistry(t
deprecated_intdeprecated_method(tmuttertmutter_callsitetnotetis_quiettBranchcB@s9eZdZdrZedZedZdrdZdZ	dZ
dZdZdrdrdZ
d	Zeedrd
ZedredrdZedrdZd
ZdZdZdZdZdZdZedZedrdZdZeeeZdZ drdrdZ!drdZ"dZ#dZ$dZ%dZ&eedZ'dZ(ed Z)d!Z*ed"Z+d#Z,edrdrd$d%d&Z-d'Z.d(Z/d)Z0d*Z1d+Z2d,Z3d-Z4d.Z5d/Z6e7drdrd0Z8d1Z9d2Z:drdrdrdrdrdred3Z;drd4Z<e=e>dsd8Z?d9Z@d:ZAe7d;ZBe7drdrd<ZCe7d=ZDe7d>ZEd?ZFd@ZGdAZHdBZIdCZJdDZKdEZLdFZMdGZNdHZOdIZPedJZQdKZRedLZSdMZTedrdNZUedrdrdOZVedredPZWdQZXdRZYdSZZdredTZ[drdUZ\dVZ]dWZ^dXZ_dYZ`dZZad[Zbd\Zcd]Zdd^Zee7d_Zfd`ZgdaZhedrdrdbZiedrdrdrdcZjddZkdrdeZldfZmedgZnedhZodrdreedrdiZpdredredjZqe7erdkZsdrdlZtdmZudnZvdoZwdpZxdqZyRS(ts>Branch holding a history of revisions.

    :ivar base:
        Base directory/url of the branch; using control_url and
        control_transport is more standardized.
    :ivar hooks: An instance of BranchHooks.
    :ivar _master_branch_cache: cached result of get_master_branch, see
        _clear_cached_state.
    cC@s|jS(N(t
_transport(tself((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytcontrol_transportZscC@s
|jjS(N(Rtuser_transport(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR^scC@s|jj||_d|_d|_i|_g|_d|_d|_	d|_
d|_|j|t
jd}x|D]}||q~WdS(Ntopen(t_formatt	make_tagsttagstNonet_revision_history_cachet_revision_id_to_revno_cachet#_partial_revision_id_to_revno_cachet_partial_revision_history_cachet_tags_bytest_last_revision_info_cachet_master_branch_cachet_merge_sorted_revisions_cachet
_open_hookRthooks(Rtpossible_transportsR&thook((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt__init__bs								


cC@sdS(s<Called by init to allow simpler extension of the base class.N((RR'((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR%qscC@sx7|jjD])}|j|kr
td||dSq
W|j||}|j|jrvtj|j|n|jj|dS(sAActivate the branch/repository from url as a fallback repository.s)duplicate activation of fallback %r on %rN(	t
repositoryt_fallback_repositoriestuser_urlRt_get_fallback_repositorythas_same_locationterrorstUnstackableLocationErrortadd_fallback_repository(RturlR'texisting_fallback_repotrepo((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_activate_fallback_locationtscC@sC|jj|jj|j}|dk	r?|jndS(sBreak a lock if one is present from another instance.

        Uses the ui factory to ask for confirmation if the lock may be from
        an active process.

        This will probe the repository for its lock as well.
        N(t
control_filest
break_lockR*tget_master_branchR(Rtmaster((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR7s


cC@s4|jjjs0tj|jj|jjndS(N(R*Rtsupports_external_lookupsR/tUnstackableRepositoryFormattbase(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_check_stackable_reposcC@svt|jdkr*|jg|_ntj|j|jd|d||jdtjkrr|jjndS(s*Extend the partial history to include a given index

        If a stop_index is supplied, stop when that index has been reached.
        If a stop_revision is supplied, stop when that revision is
        encountered.  Otherwise, stop when the beginning of history is
        reached.

        :param stop_index: The index which should be present.  When it is
            present, history extension will stop.
        :param stop_revision: The revision id which should be present.  When
            it is encountered, history extension will stop.
        it
stop_indext
stop_revisioniN(tlenR t
last_revisionR*t_iter_for_revnot
_mod_revisiont
NULL_REVISIONtpop(RR>R?((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_extend_partial_historys

cC@s"|j}d|fd|fgS(sJGet the references needed for check().

        See bzrlib.check.
        srevision-existenceslefthand-distance(RA(Rtrevid((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_get_check_refsscC@s4tjj|d|d|}|jd|d|S(sOpen the branch rooted at base.

        For instance, if the branch is at URL/.bzr/branch,
        Branch.open(URL) -> a Branch instance.
        R't_unsupportedtunsupported(Rt
ControlDirRtopen_branch(R<RIR'tcontrol((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@s1tjj||}|jd|d|d|S(s#Open the branch rooted at transporttnameRJR'(RRKtopen_from_transportRL(t	transportRNRIR'RM((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyROscC@s7tjj||\}}|jd|}||fS(sOpen an existing branch which contains url.

        This probes for a branch at url, 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.
        R'(RRKtopen_containingRL(R2R'RMtrelpathtbranch((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRQscC@s|jo|jjS(sShould _basic_push merge this branch's tags into the target?

        The default implementation returns False if this branch has no tags,
        and True the rest of the time.  Subclasses may override this.
        (t
supports_tagsRtget_tag_dict(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_push_should_merge_tagsscC@s
tj|S(sGet a bzrlib.config.BranchConfig for this Branch.

        This can then be used to get and set configuration options for the
        branch.

        :return: A bzrlib.config.BranchConfig.
        (t_mod_configtBranchConfig(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt
get_configscC@s
tj|S(sGet a bzrlib.config.BranchStack for this Branch.

        This can then be used to get and set configuration options for the
        branch.

        :return: A bzrlib.config.BranchStack.
        (RWtBranchStack(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytget_config_stackscC@st|jdS(sGet the concrete config for just the config in this branch.

        This is not intended for client use; see Branch.get_config for the
        public API.

        Added in 1.14.

        :return: An object supporting get_option and set_option.
        N(tNotImplementedErrort_get_config(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR]s
cC@st|jdS(sStore uncommitted changes from a ShelfCreator.

        :param creator: The ShelfCreator containing uncommitted changes, or
            None to delete any stored changes.
        :raises: ChangesAlreadyStored if the branch already has changes.
        N(R\tstore_uncommitted(Rtcreator((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR^scC@st|jdS(sReturn a shelf.Unshelver for this branch and tree.

        :param tree: The tree to use to construct the Unshelver.
        :return: an Unshelver or None if no changes are stored.
        N(R\t
get_unshelver(Rttree((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR`scC@s1tj|j|}tj|d|}|jS(s)Get the repository we fallback to at url.R'(turlutilstjoinR<RRR*(RR2R'ta_branch((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR-scC@s.|jdkr'|jjd|_n|jS(sGet the bytes of a serialised tags dict.

        Note that not all branches support tags, nor do all use the same tags
        logic: this method is specific to BasicTags. Other tag implementations
        may use the same method name and behave differently, safely, because
        of the double-dispatch via
        format.make_tags->tags_instance->get_tags_dict.

        :return: The bytes of the tags file.
        :seealso: Branch._set_tags_bytes.
        RN(R!RRt	get_bytes(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_get_tags_bytess
cC@s|j}|r|jryS|j|}|r_|j|jkr_tj|jn|dk	rr|jSWqtjk
r}|qtjk
r}t	dt
|qXn|jS(Ns@Could not connect to bound branch, falling back to local nick.
 (RYthas_explicit_nicknameR8R,R/t
RecursiveBindRtnicktBzrErrorRtstrtget_nickname(RtlocalR'tconfigR9te((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt	_get_nick's	cC@s |jjd|dtdS(Ntnicknametwarn_masked(RYtset_user_optiontTrue(RRi((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt	_set_nick;scC@st|jdS(N(R\t	is_locked(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRv@sc	C@sdtjkrtddn|jj}|dk	rd|j||sdtj||qdn|j	|g}||krtj
||n|}g}tj}x]||krt
||dkr|||j|||d}|j	|g}qW|j|S(Ntevilis&_lefthand_history scales with history.i(tdebugtdebug_flagsRR*t	get_graphRtis_ancestorR/tDivergedBranchestget_parent_maptNoSuchRevisionRCtcheck_not_reserved_idR@tappendtreverse(	Rtrevision_idtlast_revtother_branchtgraphtparents_maptcurrent_rev_idtnew_historyR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_lefthand_historyCs(	


cC@st|jdS(sLock the branch for write operations.

        :param token: A token to permit reacquiring a previously held and
            preserved lock.
        :return: A BranchWriteLockResult.
        N(R\t
lock_write(Rttoken((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR^scC@st|jdS(s`Lock the branch for read operations.

        :return: A bzrlib.lock.LogicalLockResult.
        N(R\t	lock_read(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRgscC@st|jdS(N(R\tunlock(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRnscC@st|jdS(s1Return lock mode for the Branch: 'r', 'w' or NoneN(R\tpeek_lock_mode(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRqscC@st|jdS(N(R\tget_physical_lock_status(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRuscC@s)|j|}|r%||j|<n|S(sReturn the revision_id for a dotted revno.

        :param revno: a tuple like (1,) or (1,1,2)
        :param _cache_reverse: a private parameter enabling storage
           of the reverse mapping in a top level cache. (This should
           only be done in selective circumstances as we want to
           avoid having the mapping cached multiple times.)
        :return: the revision_id
        :raises errors.NoSuchRevision: if the revno doesn't exist
        (t_do_dotted_revno_to_revision_idR(Rtrevnot_cache_reversetrev_id((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytdotted_revno_to_revision_idxscC@st|dkr#|j|dS|j}g|jD]\}}||kr<|^q<}t|dkrz|dSdjtt|}tj||dS(sWorker function for dotted_revno_to_revision_id.

        Subclasses should override this if they wish to
        provide a more efficient implementation.
        iit.N(	R@t
get_rev_idtget_revision_id_to_revno_mapt	iteritemsRctmapRkR/R~(RRtrevision_id_to_revnoRt
this_revnotrevision_idst	revno_str((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@s
|j|S(shGiven a revision id, return its dotted revno.

        :return: a tuple like (1,) or (400,1,3).
        (t_do_revision_id_to_dotted_revno(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytrevision_id_to_dotted_revnoscC@s|jj|}|dk	r"|S|jra|jj|}|dkratj||qany|j|}|fSWnJtjk
r|jj|}|dkrtj||qnX|S(s)Worker function for revision_id_to_revno.N(RtgetRRR/R~RR(RRtresultR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs	cC@s8|jdk	r|j}n|j}|j||S(sReturn the revision_id => dotted revno map.

        This will be regenerated on demand, but will be cached.

        :return: A dictionary mapping revision_id => dotted revno.
            This dictionary should not be modified by the caller.
        N(RRt_gen_revno_mapt_cache_revision_id_to_revno(Rtmapping((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs
	
cC@s td|jD}|S(sVCreate a new mapping from revision ids to dotted revnos.

        Dotted revnos are generated based on the current tip in the revision
        history.
        This is the worker function for get_revision_id_to_revno_map, which
        just caches the return value.

        :return: A dictionary mapping revision_id => dotted revno.
        cs@s'|]\}}}}||fVqdS(N((t.0RtdepthRtend_of_merge((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pys	<genexpr>s(tdicttiter_merge_sorted_revisions(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs
	texcludeRcC@s|jdkrE|j}|jj|g}|j||_n|j|j|||}|j|}|dkr|S|dkrtt	|St
d|dS(sWalk the revisions for a branch in merge sorted order.

        Merge sorted order is the output from a merge-aware,
        topological sort, i.e. all parents come before their
        children going forward; the opposite for reverse.

        :param start_revision_id: the revision_id to begin walking from.
            If None, the branch tip is used.
        :param stop_revision_id: the revision_id to terminate the walk
            after. If None, the rest of history is included.
        :param stop_rule: if stop_revision_id is not None, the precise rule
            to use for termination:

            * 'exclude' - leave the stop revision out of the result (default)
            * 'include' - the stop revision is the last item in the result
            * 'with-merges' - include the stop revision and all of its
              merged revisions in the result
            * 'with-merges-without-common-ancestry' - filter out revisions 
              that are in both ancestries
        :param direction: either 'reverse' or 'forward':

            * reverse means return the start_revision_id first, i.e.
              start at the most recent revision and go backwards in history
            * forward returns tuples in the opposite order to reverse.
              Note in particular that forward does *not* do any intelligent
              ordering w.r.t. depth as some clients of this API may like.
              (If required, that ought to be done at higher layers.)

        :return: an iterator over (revision_id, depth, revno, end_of_merge)
            tuples where:

            * revision_id: the unique id of the revision
            * depth: How many levels of merging deep this node has been
              found.
            * revno_sequence: This field provides a sequence of
              revision numbers for all revisions. The format is:
              (REVNO, BRANCHNUM, BRANCHREVNO). BRANCHNUM is the number of the
              branch that the revno is on. From left to right the REVNO numbers
              are the sequence numbers within that branch of the revision.
            * end_of_merge: When True the next node (earlier in history) is
              part of a different merge.
        Rtforwardsinvalid direction %rN(R$RRAR*tget_known_graph_ancestryt
merge_sortt_filter_merge_sorted_revisionst_filter_start_non_ancestorstreversedtlistt
ValueError(Rtstart_revision_idtstop_revision_idt	stop_rulet	directionRAtknown_graphtfiltered((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs0		cc@st|}|dk	rcxH|D]=}|j}||kr@qqtjt|g|}PqWn|dkrxU|D])}|j}||j|j|jfVqvWn!|dkrx|D]9}|j}||krdS||j|j|jfVqWn|dkrLx|D]9}|j}||j|j|jfV||krdSqWn{|dkr|jj	}|j
||g}	xH|D];}|j}||	krqn||j|j|jfVqWn|dkr|jj|}
|
jr|
jd}n	t
j}t}g}
x|D]}|j}||kr7dS|sJ||
kr||j|j|jfV|sv||kr|jj|}|jrt}|
j|jqqqqWntd|dS(s4Iterate over an inclusive range of sorted revisions.RNtincludes#with-merges-without-common-ancestryswith-mergesisinvalid stop_rule %r(titerRtkeyt	itertoolstchaintmerge_depthRRR*Rztfind_unique_ancestorstget_revisiont
parent_idsRCRDtFalseRttextendR(Rtmerge_sorted_revisionsRRRtrev_itertnodeRRt	ancestorststop_revtleft_parenttreached_stop_revision_idtrevision_id_whitelisttrev((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRst
	
	
	
		
			
		 cc@s5|j}|\}}}}|V|sBx|D]}|Vq0Wnt}t}	|jj|g}
|
j|g}|r|	j|ndSx|D]\}}}}|s||	kr|jj|g}
|
j|g}|	j||	j||dkrt}qqqn||||fVqWdS(Ni(	tnextRtsetR*R}RtupdatetremoveRt(RRtfirstRRRRRtcleant	whitelisttpmaptparents((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRis0
	

cC@s|jjdS(sTell this branch object not to release the physical lock when this
        object is unlocked.

        If lock_write doesn't return a token, then this method is not supported.
        N(R6tleave_in_place(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytleave_lock_in_placescC@s|jjdS(sTell this branch object to release the physical lock when this
        object is unlocked, even if it didn't originally acquire it.

        If lock_write doesn't return a token, then this method is not supported.
        N(R6tdont_leave_in_place(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytdont_leave_lock_in_placescC@stj|jdS(syBind the local branch the other branch.

        :param other: The branch to bind to
        :type other: Branch
        N(R/tUpgradeRequiredR,(Rtother((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytbindscC@s&|jjstS|jjdS(sHWhether it is only possible to append revisions to the history.
        tappend_revisions_only(Rt"supports_set_append_revisions_onlyRR[R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytget_append_revisions_onlyscC@s>|jjs$tj|jn|jjd|dS(NR(RRR/RR,R[R(Rtenabled((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytset_append_revisions_onlyscC@stj|j|dS(s4Set the branch location to use for a tree reference.N(R/tUnsupportedOperationtset_reference_info(Rtfile_idt	tree_pathtbranch_location((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@stj|j|dS(s;Get the tree_path and branch_location for a tree reference.N(R/Rtget_reference_info(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@stj||j|d|S(s;Copy revisions from from_branch into this branch.

        :param from_branch: Where to copy from.
        :param last_revision: What revision to stop at (None for at the end
                              of the branch.
        :param limit: Optional rough limit of revisions to fetch
        :return: None
        tlimit(tInterBranchRtfetch(Rtfrom_branchRAR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs
cC@sdS(sReturn the URL of the branch we are bound to.

        Older format branches cannot bind, please be sure to use a metadir
        branch.
        N(R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytget_bound_locationscC@stj|jdS(s<Return the URL of the branch we used to be bound to
        N(R/RR,(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytget_old_bound_locationsc		
C@sC|dkr|j}n|jj|||||||||	S(sbObtain a CommitBuilder for this branch.

        :param parents: Revision ids of the parents of the new revision.
        :param config: Optional configuration to use.
        :param timestamp: Optional timestamp recorded for commit.
        :param timezone: Optional timezone for timestamp.
        :param committer: Optional committer to set for commit.
        :param revprops: Optional dictionary of revision properties.
        :param revision_id: Optional revision id.
        :param lossy: Whether to discard data that can not be natively
            represented, when pushing to a foreign VCS 
        N(RR[R*tget_commit_builder(	RRtconfig_stackt	timestampttimezonet	committertrevpropsRtlossy((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs
cC@sdS(sVReturn the branch we are bound to.

        :return: Either a Branch, or None
        N(R(RR'((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR8siiicC@sIy|j|}Wn#tjk
r8tj|nX|jj|S(sReturn the delta for one revision.

        The delta is relative to its mainline predecessor, or the
        empty tree for revision 1.
        (RR/R~tInvalidRevisionNumberR*tget_revision_delta(RRRG((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs
cC@st|jdS(sGet the URL this branch is stacked against.

        :raises NotStacked: If the branch is not stacked.
        :raises UnstackableBranchFormat: If the branch does not support
            stacking.
        N(R\tget_stacked_on_url(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@st|jdS(sPrint `file` to stdout.N(R\t
print_file(RtfileR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@st|jdS(sSet the last revision of this branch.

        The caller is responsible for checking that the revno is correct
        for this revision id.

        It may be possible to set the branch last revision to an id not
        present in the repository.  However, branches can also be
        configured to check constraints on history, in which case this may not
        be permitted.
        N(R\tset_last_revision_info(RRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRsc	C@s|jj}|j\}}||ftjdfg}|dk	rr|j||srtj||qrn|j	||}|j
||dS(s$See Branch.generate_revision_historyiN(R*Rztlast_revision_infoRCRDRR{R/R|tfind_distance_to_nullR(	RRRRRt
last_revnot
last_revidtknown_revision_idsR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytgenerate_revision_history!s	cC@s|dk	rot|trWy|jd}WqWtk
rStj|dqWXntj|j	|}n|j
|dS(sSee Branch.set_parent.tasciis4Urls must be 7-bit ascii, use bzrlib.urlutils.escapeN(Rt
isinstancetunicodetencodetUnicodeEncodeErrorR/t
InvalidURLRbtrelative_urlR<t_set_parent_location(RR2((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt
set_parent2s
	cC@s|jjs*tj|j|jn|j|s~y|j}Wn$tjtjtjfk
rpdSX|j	n|j
|d|jjg|j
d|dS(sSet the URL this branch is stacked against.

        :raises UnstackableBranchFormat: If the branch does not support
            stacking.
        :raises UnstackableRepositoryFormat: If the repository does not support
            stacking.
        NR'tstacked_on_location(Rtsupports_stackingR/tUnstackableBranchFormatR,R=Rt
NotStackedR;t_unstackR5Rtroot_transportt_set_config_location(RR2told_url((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytset_stacked_on_urlDs	


c
	C@stjj}z^|jtd|j}t|jdkr_td||jfnt	j
j|jj
j}|j}|jrtd|jfn|jj}||_t|tjr|jdk	r||j_qn|jjd||dk	r|jn|j|dk	rE|jjnd}x:try|jWntjk
ryPnX|d7}qNW|dkrtdnx%t|dD]}|jjqW|jzyt|j j!}Wntj"k
rt}nXt#j$|j|d|j%gd	|d
tj&}	|jj'|d|	Wd|jXWd|j(XdS(
sChange a branch to be unstacked, copying data as needed.

        Don't call this directly, use set_stacked_on_url(None).
        t
Unstackingis;can't cope with fallback repositories of %r (fallbacks: %r)s.didn't expect %r to have fallback_repositoriesRis5old_repository should have been locked at least once.trequired_idstif_present_idstfind_ghostst
fetch_specN()tuit
ui_factorytnested_progress_barRtgettextR*R@R+tAssertionErrorRRKRRRR<tfind_repositoryRtrepository_tokenRtremotetRemoteBrancht_real_branchRRRRRtR/tLockNotHeldtrangeRRRtget_reverse_tag_dicttTagsNotSupportedt	vf_searchtNotInOtherForRevsRAtexecuteRtfinished(
Rtpbtold_repositoryt
new_bzrdirtnew_repositoryt
lock_tokentold_lock_counttit
tags_to_fetchR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRasb					

	

cC@s5tj|j}|j|jj|j|S(sVMirror method for _get_tags_bytes.

        :seealso: Branch._get_tags_bytes.
        (tcleanuptOperationWithCleanupst_set_tags_bytes_lockedtadd_cleanupRRt
run_simple(Rtbytestop((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_set_tags_bytesscC@s||_|jjd|S(NR(R!Rt	put_bytes(RR7((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR4s	cC@s
||_dS(sSet the cached revision history to rev_history.

        The revision_history method will use this cache to avoid regenerating
        the revision history.

        This API is semi-public; it only for use by subclasses, all other code
        should consider it to be private.
        N(R(Rtrev_history((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_cache_revision_historys	cC@s
||_dS(sSet the cached revision_id => revno map to revision_id_to_revno.

        This API is semi-public; it only for use by subclasses, all other code
        should consider it to be private.
        N(R(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@sLd|_d|_d|_d|_d|_g|_i|_d|_dS(s0Clear any cached data on this branch, e.g. cached revision history.

        This means the next call to revision_history will need to call
        _gen_revision_history.

        This API is semi-public; it is only for use by subclasses, all other
        code should consider it to be private.
        N(	RRRR"R#R$R RR!(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_clear_cached_states								cC@st|jdS(sReturn sequence of revision hashes on to this branch.

        Unlike revision_history, this method always regenerates or rereads the
        revision history, i.e. it does not cache the result, so repeated calls
        may be expensive.

        Concrete subclasses should override this instead of revision_history so
        that subclasses do not need to deal with caching logic.

        This API is semi-public; it only for use by subclasses, all other code
        should consider it to be private.
        N(R\t_gen_revision_history(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR>s
cC@s]dtjkrtddn|jdk	r:|j}n|j}|j|t|S(NRwis%revision_history scales with history.(RxRyRRRR>R<R(Rthistory((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_revision_historys
cC@s|jdS(sReturn current revision number for this branch.

        That is equivalent to the number of revisions committed to
        this branch.
        i(R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@stj|jdS(s,Older format branches cannot bind or unbind.N(R/RR,(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytunbind
scC@s|jdS(s*Return last revision id, or NULL_REVISION.i(R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRAscC@s(|jdkr!|j|_n|jS(sdReturn information about the last revision.

        :return: A tuple (revno, revision_id).
        N(R"Rt_read_last_revision_info(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@st|jdS(N(R\RB(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRBscC@sB|jj|js(|j||n|j||||fS(sSet the last revision info, importing from another repo if necessary.

        This is used by the bound branch code to upload a revision to
        the master branch first before updating the tip of the local branch.
        Revisions referenced by source's tags are also transferred.

        :param source: Source branch to optionally fetch from
        :param revno: Revision number of the new tip
        :param revid: Revision id of the new tip
        :param lossy: Whether to discard metadata that can not be
            natively represented
        :return: Tuple with the new revision number and revision id
            (should only be different from the arguments when lossy=True)
        (R*R.RR(RtsourceRRGR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt"import_last_revision_info_and_tagsscC@s^tj|rdS|j}y|j|dSWn#tk
rYtj||nXdS(s%Given a revision id, return its revnoiiN(RCtis_nullR@tindexRR/R~(RRR?((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR4s
cC@s|dkrtjS|j\}}||kr5|S|dksM||krbtj||n||}t|j|kr|j|n|j|S(s,Find the revision id of the specified revno.i(RCRDRR/R~R@R RF(RRR?RRtdistance_from_last((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR>s
c	O@s.tj||jd|d|d|||S(sMirror source into this branch.

        This branch is considered to be 'local', having low latency.

        :returns: PullResult instance
        t	overwriteR?R'(RRtpull(RRCRHR?R'targstkwargs((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRIMscO@s%tj||j|||||S(snMirror this branch into target.

        This branch is considered to be 'local', having low latency.
        (RRtpush(RttargetRHR?RRJRK((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRLYscC@s|jj|jS(s'Return `Tree` object for last revision.(R*t
revision_treeRA(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt
basis_treebscC@s|j}|dkr|S|jdrFtj|jd}nytj|jd |SWn+tj	k
r}tj
||jnXdS(sReturn the parent location of the branch.

        This is the default location for pull/missing.  The usual
        pattern is that the user can override it by specifying a
        location.
        t/tutf8iN(t_get_parent_locationRt
startswithRbtlocal_path_to_urltdecodeRcR<R/tInvalidURLJointInaccessibleParentR,(RtparentRo((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt
get_parentfscC@st|jdS(N(R\RR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRRyscC@sb|dkr|j}n|dkr0d}n|rNtj|j|}n|j||dS(Nt(RR[RbRR<R(RRNR2Rnt
make_relative((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR|s	cC@sC|dkr|j}n|j|}|dkr?d}n|S(NRZ(RR[R(RRNRntlocation((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_get_config_locations	cC@s|jjdS(s:Return the preferred format of submissions to this branch.tchild_submit_format(R[R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytget_child_submit_formatscC@s|jjdS(sReturn the submit location of the branch.

        This is the default location for bundle.  The usual
        pattern is that the user can override it by specifying a
        location.
        t
submit_branch(R[R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytget_submit_branchscC@s|jjd|dS(sReturn the submit location of the branch.

        This is the default location for bundle.  The usual
        pattern is that the user can override it by specifying a
        location.
        R`N(R[R(RR\((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytset_submit_branchscC@s
|jdS(s]Return the public location of the branch.

        This is used by merge directives.
        t
public_branch(R](R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytget_public_branchscC@s|jd|dS(sReturn the submit location of the branch.

        This is the default location for bundle.  The usual
        pattern is that the user can override it by specifying a
        location.
        RcN(R(RR\((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytset_public_branchscC@s|jjdS(s3Return None or the location to push this branch to.t
push_location(R[R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytget_push_locationscC@st|jdS(s(Set a new push location for this branch.N(R\tset_push_location(RR\((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRhscC@s`tjd}|sdS|j\}}t|||||}x|D]}||qHWdS(s%Run the post_change_branch_tip hooks.tpost_change_branch_tipN(RR&RtChangeBranchTipParams(Rt	old_revnot	old_revidR&t	new_revnot	new_revidtparamsR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt!_run_post_change_branch_tip_hookss

cC@s`tjd}|sdS|j\}}t|||||}x|D]}||qHWdS(s$Run the pre_change_branch_tip hooks.tpre_change_branch_tipN(RR&RRj(RRmRnR&RkRlRoR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt _run_pre_change_branch_tip_hookss

cC@sdS(sSynchronise this branch with the master branch if any.

        :return: None or the last_revision pivoted out during the update.
        N(R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@s |dkr|j|ndS(sy        Check whether a revno corresponds to any revision.
        Zero (the NULL revision) is considered valid.
        iN(tcheck_real_revno(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytcheck_revnoscC@s4|dks||jkr0tj|ndS(s}        Check whether a revno corresponds to a real revision.
        Zero (the NULL revision) is considered invalid
        iN(RR/R(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRsscC@s[|j}|jz3|dk	r5|j|n|j|d|Wd|jX|S(sLClone this branch into to_bzrdir preserving all semantic values.

        Most API users will want 'create_clone_on_transport', which creates a
        new bzrdir and branch on the fly.

        revision_id: if not None, the revision history in the new branch will
                     be truncated to end with revision_id.
        RN(t
create_branchRRtconfigure_branchtcopy_content_intoR(Rt	to_bzrdirRtrepository_policyR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytclones

cC@s|dk	r.|jr.|jjdtn|jd|}|jzq|dk	ri|j|n|j|d||j	}|dkr|j
|jjj
n
|j
|Wd|jX|S(sCreate a new line of development from the branch, into to_bzrdir.

        to_bzrdir controls the branch format.

        revision_id: if not None, the revision history in the new branch will
                     be truncated to end with revision_id.
        t
_skip_repoR*RN(Rtrequires_stackingRtrequire_stackingRtRuRRvRwRR	RRR<R(RRxRRyR*Rt
master_url((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytsprouts

cC@s|j\}}|dkr.||}}nK|jj}y|j|||fg}Wntjk
rxd}nX|j||dS(sSynchronize last revision and revision history between branches.

        This version is most efficient when the destination is also a
        BzrBranch6, but works for BzrBranch5, as long as the destination's
        repository contains all the lefthand ancestors of the intended
        last_revision.  If not, set_last_revision_info will fail.

        :param destination: The branch to copy the history into
        :param revision_id: The revision-id to truncate history at.  May
          be None to copy complete history.
        iN(RRR*RzRR/tGhostRevisionsHaveNoRevnoR(RtdestinationRtsource_revnotsource_revision_idRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_synchronize_historys	
cC@stj||jd|S(sCopy the content of self into destination.

        revision_id: if not None, the revision history in the new branch will
                     be truncated to end with revision_id.
        R(RRRw(RRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRw3sc	C@st|jdtsdS|j}t|dkr;dS|j}|j}|j}xK|jD]=\}\}}tj|||}|j	|||fqfW|j
|dS(Ntsupports_reference_locationsi(tgetattrRRt_get_all_reference_infoR@R<titemsRbt
rebase_urlt
setdefaultt_set_all_reference_info(	RRMtreference_dicttold_basetnew_basettarget_reference_dictRRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytupdate_references<s			cC@sdt|}|j\}}|d|f}||kr`|jjtjd||fn|S(sCheck consistency of the branch.

        In particular this checks that revisions given in the revision-history
        do actually match up in the revision graph, and that they're all
        present in the repository.

        Callers will typically also want to check the repository.

        :param refs: Calculated refs for this branch as specified by
            branch._get_check_refs()
        :return: A BranchCheckResult.
        slefthand-distances+revno does not match len(mainline) %s != %s(tBranchCheckResultRR/Rt
BzrCheckError(RtrefsRRtlast_revision_idtactual_revno((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytcheckMscC@s&|jjj}|j|j|S(sReturn the most suitable metadir for a checkout of this branch.
        Weaves are used if this branch's repository uses weaves.
        (R*Rtcheckout_metadirtset_branch_formatR(Rtlightweighttformat((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_get_checkout_formatiscC@sU|dkr|j}n|jj|d|d|d|d|d|}|jS(sCreate a clone of this branch and its bzrdir.

        :param to_transport: The transport to clone onto.
        :param revision_id: The revision id to use as tip in the new branch.
            If None the tip is obtained from this branch.
        :param stacked_on: An optional URL to stack the clone on.
        :param create_prefix: Create any missing directories leading up to
            to_transport.
        :param use_existing_dir: Use an existing directory if one exists.
        Rt
stacked_ont
create_prefixtuse_existing_dirtno_treeN(RRARtclone_on_transportRL(Rtto_transportRRRRRtdir_to((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytcreate_clone_on_transportqs	cC@stj|}|j|jd|}y|j|}Wntjk
rtjj	|}y|j
Wntjk
rnXtj|j|j
j|jj
jkrt}qnX|r|jd|}	nN|j}
|
jd}|j}|j||j|d|d}	|j|d|	d|d|}
|
j}|jz[xT|jD]F\}}|j||}|j|
j||j|||qrWWd|jX|
S(	sCreate a checkout of a branch.

        :param to_location: The url to produce the checkout at
        :param revision_id: The revision to check out
        :param lightweight: If True, produce a lightweight checkout, otherwise,
            produce a bound branch (heavyweight checkout)
        :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.
        :return: The tree of the created checkout
        Rt
target_branchiR?Rtaccelerator_treethardlinkN( RPt
get_transporttensure_baseRtinitialize_on_transportR/tAlreadyControlDirErrorRRKRORLtNotBranchErrorR<RRRttset_branch_referencetdetermine_repository_policytacquire_repositoryRuRRIRtcreate_workingtreeRORtiter_referencestreference_parenttcreate_checkouttabspathtget_reference_revisionR(Rtto_locationRRRRttRtcheckoutRtpolicyR4tcheckout_branchRaROtpathRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRsH


	
cC@s0ddlm}||d|}|j|S(s7Make sure the data stored in this branch is consistent.i(tBranchReconcilertthorough(tbzrlib.reconcileRt	reconcile(RRRt
reconciler((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs
cC@s%tj|jjj|jd|S(sReturn the parent branch for a tree-reference file_id

        :param file_id: The file_id of the tree reference
        :param path: The path of the file_id in the tree
        :return: A branch associated with the file_id
        R'(RRRRRzR<(RRRR'((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@s
|jjS(N(RRT(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRTscC@s;x4tjdD]%}|||}|dk	r|SqWdS(sTry to automatically find the tag name for a revision.

        :param revision_id: Revision id of the revision.
        :return: A tag name or None if no tag name could be determined.
        tautomatic_tag_nameN(RR&R(RRR(tret((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs
cC@sm|j|||}|dkr%tS|dkrFtj||n#|dkrVtStd|fdS(s
Ensure that revision_b is a descendant of revision_a.

        This is a helper function for update_revisions.

        :raises: DivergedBranches if revision_b has diverged from revision_a.
        :returns: True if revision_b is a descendant of revision_a.
        tb_descends_from_atdivergedta_descends_from_bsinvalid relation: %rN(t_revision_relationsRtR/R|RR(Rt
revision_at
revision_bRRtrelation((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt _check_if_descendant_or_divergeds	cC@sz|j||g}|t|gkr.dS|t||gkrJdS|t|gkrcdStd|fdS(sDetermine the relationship between two revisions.

        :returns: One of: 'a_descends_from_b', 'b_descends_from_a', 'diverged'
        RRRsinvalid heads: %rN(theadsRR(RRRRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@st|jg}t}|jjdrfyt|jj}Wqftjk
rbqfXn|jt	j
|jt	j
||fS(s}Return the heads that must and that should be fetched to copy this
        branch into another repo.

        :returns: a 2-tuple of (must_fetch, if_present_fetch).  must_fetch is a
            set of heads that must be fetched.  if_present_fetch is a set of
            heads that must be fetched if present, but no error is necessary if
            they are not present.
        sbranch.fetch_tags(RRAR[RRR$R/R%tdiscardRCRD(Rt
must_fetchtif_present_fetch((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytheads_to_fetchs	N(iii(zt__name__t
__module__t__doc__RR<tpropertyRRR)R%R5R7R=RFRHtstaticmethodRRRORQRVRYR[R]R^R`R-RRfRpRuRiRvRRRRRRRRRRRRRRRRRRRRRRRRRRRR8RR
RRRRRR	RRR9R4R<RR=R>R@RRARARRBRDRRRIRLRORYRRRR]R_RaRbRdReRgRhRpRrRRtRsRzRRRwRRRRRRtRRRTRRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRLs								
	
															A	K	-										
				V								
			
		
																							>				tBranchFormatcB@seZdZdZdZddZedZdZ	dZ
ddddZdZd	Z
d
ZdeedddZdZd
ZdZdZdZdZdZRS(sAn encapsulation of the initialization and open routines for a format.

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

    Formats are placed in an dict by their format string for reference
    during branch opening. It's not required that these be instances, they
    can be classes themselves with class methods - it simply depends on
    whether state is needed for a given format or not.

    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 time regardless.
    cC@s|j|jkS(N(t	__class__(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt__eq__8scC@s||kS(N((RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt__ne__;scC@sdS(sGet the target reference of the branch in controldir.

        format probing must have been completed before calling
        this method - it is assumed that the format of the branch
        in controldir is correct.

        :param controldir: The controldir to get the branch data from.
        :param name: Name of the colocated branch to fetch
        :return: None if the branch is not a reference branch.
        N(R(RRRN((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt
get_reference>scC@st|jdS(sSet the target reference of the branch in controldir.

        format probing must have been completed before calling
        this method - it is assumed that the format of the branch
        in controldir is correct.

        :param controldir: The controldir to set the branch reference for.
        :param name: Name of colocated branch to set, None for default
        :param to_branch: branch that the checkout is to reference
        N(R\t
set_reference(RRRNt	to_branch((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRKscC@st|jdS(s4Return the short format description for this format.N(R\tget_format_description(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRYscC@sKtjd}|sdSt||||}x|D]}||q3WdS(Ntpost_branch_init(RR&tBranchInitHookParams(RRRNRSR&RoR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_run_post_branch_init_hooks]s

cC@st|jdS(stCreate a branch of this format in controldir.

        :param name: Name of the colocated branch to create.
        N(R\t
initialize(RRRNR*R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRescC@stS(sIs this format supported?

        Supported formats can be initialized and opened.
        Unsupported formats may not support initialization or committing or
        some other features depending on the reason for not being supported.
        (Rt(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytis_supportedmscC@s
tj|S(sCreate a tags object for branch.

        This method is on BranchFormat, because BranchFormats are reflected
        over the wire via network_name(), whereas full Branch instances require
        multiple VFS method calls to operate at all.

        The default implementation returns a disabled-tags instance.

        Note that it is normal for branch to be a RemoteBranch when using tags
        on a RemoteBranch.
        (t_mod_tagtDisabledTags(RRS((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRvscC@st|jdS(sPA simple byte string uniquely identifying this format for RPC calls.

        MetaDir branch formats use their disk format string to identify the
        repository over the wire. All in one formats such as bzr < 0.8, and
        foreign formats like svn/git and hg should use some marker which is
        unique and immutable.
        N(R\tnetwork_name(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@st|jdS(sReturn the branch object for controldir.

        :param controldir: A ControlDir that contains a branch.
        :param name: Name of colocated branch to open
        :param _found: a private parameter, do not use it. It is used to
            indicate if format probing has already be done.
        :param ignore_fallbacks: when set, no fallback branches will be opened
            (if there are any).  Default is to open fallbacks.
        N(R\R(RRRNt_foundtignore_fallbackstfound_repositoryR'((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@stS(s7True if this format supports set_append_revisions_only.(R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@stS(s0True if this format records a stacked-on branch.(R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@stS(s4True if this format supports leaving locks in place.(R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytsupports_leaving_lockscC@s|jjS(N(Rtrstrip(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt__str__scC@stS(s6True if this format supports tags stored in the branch(R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRTscC@stS(s8Whether the tag container for this branch versions tags.(R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyttags_are_versionedscC@stS(s+True if tags can reference ghost revisions.(Rt(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt supports_tags_referencing_ghostssN(RRRRRRRtclassmethodRRRRRRRRRRRRRRTRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR&s*		
						
							tMetaDirBranchFormatFactorycB@s)eZdZdZdZdZRS(sDA factory for a BranchFormat object, permitting simple lazy registration.
    
    While none of the built in BranchFormats are lazy registered yet,
    bzrlib.tests.test_branch.TestMetaDirBranchFormatFactory demonstrates how to
    use it, and the bzr-loom plugin uses it as well (see
    bzrlib.plugins.loom.formats).
    cC@s#tjj|||||_dS(sCreate a MetaDirBranchFormatFactory.

        :param format_string: The format string the format has.
        :param module_name: Module to load the format class from.
        :param member_name: Attribute name within the module for the format class.
        N(Rt_LazyObjectGetterR)t_format_string(Rt
format_stringtmodule_nametmember_name((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR)scC@s|jS(s#See BranchFormat.get_format_string.(R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytget_format_stringscC@s
|jS(s)Used for network_format_registry support.(tget_obj(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt__call__s(RRRR)RR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs	
	tBranchHookscB@seZdZdZRS(sA dictionary mapping hook name to a list of callables for branch hooks.

    e.g. ['post_push'] Is the list of items to be called when the
    push function is invoked.
    cC@stj|dd|jddd%|jddd&|jddd'|jd
dd(|jddd)|jddd*|jddd+|jddd,|jddd-|jddd.|jd d!d/|jd"d#d0d$S(1sCreate the default hooks.

        These are all empty initially, because by default nothing should get
        notified.
        s
bzrlib.branchsBranch.hooksRsLCalled with the Branch object that has been opened after a branch is opened.iit	post_pushsCalled after a push operation completes. post_push is called with a bzrlib.branch.BranchPushResult object and only runs in the bzr client.iit	post_pullsCalled after a pull operation completes. post_pull is called with a bzrlib.branch.PullResult object and only runs in the bzr client.t
pre_commitsCalled after a commit is calculated but before it is completed. pre_commit is called with (local, master, old_revno, old_revid, future_revno, future_revid, tree_delta, future_tree). old_revid is NULL_REVISION for the first commit to a branch, tree_delta is a TreeDelta object describing changes from the basis revision. hooks MUST NOT modify this delta.  future_tree is an in-memory tree obtained from CommitBuilder.revision_tree() and hooks MUST NOT modify this tree.i[tpost_commitsCalled in the bzr client after a commit has completed. post_commit is called with (local, master, old_revno, old_revid, new_revno, new_revid). old_revid is NULL_REVISION for the first commit to a branch.t
post_uncommitsCalled in the bzr client after an uncommit completes. post_uncommit is called with (local, master, old_revno, old_revid, new_revno, new_revid) where local is the local branch or None, master is the target branch, and an empty branch receives new_revno of 0, new_revid of None.RqsCalled in bzr client and server before a change to the tip of a branch is made. pre_change_branch_tip is called with a bzrlib.branch.ChangeBranchTipParams. Note that push, pull, commit, uncommit will all trigger this hook.iRisCalled in bzr client and server after a change to the tip of a branch is made. post_change_branch_tip is called with a bzrlib.branch.ChangeBranchTipParams. Note that push, pull, commit, uncommit will all trigger this hook.ittransform_fallback_locationsqCalled when a stacked branch is activating its fallback locations. transform_fallback_location is called with (branch, url), and should return a new url. Returning the same url allows it to be used as-is, returning a different one can be used to cause the branch to stack on a closer copy of that fallback_location. Note that the branch cannot have history accessing methods called on it during this hook because the fallback locations have not been activated. When there are multiple hooks installed for transform_fallback_location, all are called with the url returned from the previous hook.The order is however undefined.i	RsCalled to determine an automatic tag name for a revision. automatic_tag_name is called with (branch, revision_id) and should return a tag name or None if no tag name could be determined. The first non-None tag name returned will be used.iRsCalled after new branch initialization completes. post_branch_init is called with a bzrlib.branch.BranchInitHookParams. Note that init, branch and checkout (both heavyweight and lightweight) will all trigger this hook.tpost_switchseCalled after a checkout switches branch. post_switch is called with a bzrlib.branch.SwitchHookParams.N(ii(ii(ii(ii[(ii(ii(ii(ii(ii	(ii(ii(ii(RR)tadd_hook(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR)sJ									
			(RRRR)(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRsRjcB@s)eZdZdZdZdZRS(sObject holding parameters passed to `*_change_branch_tip` hooks.

    There are 5 fields that hooks may wish to access:

    :ivar branch: the branch being changed
    :ivar old_revno: revision number before the change
    :ivar new_revno: revision number after the change
    :ivar old_revid: revision id before the change
    :ivar new_revid: revision id after the change

    The revid fields are strings. The revno fields are integers.
    cC@s1||_||_||_||_||_dS(sZCreate a group of ChangeBranchTip parameters.

        :param branch: The branch being changed.
        :param old_revno: Revision number before the change.
        :param new_revno: Revision number after the change.
        :param old_revid: Tip revision id before the change.
        :param new_revid: Tip revision id after the change.
        N(RSRkRmRlRn(RRSRkRmRlRn((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR)<s
					cC@s|j|jkS(N(t__dict__(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRKscC@s/d|jj|j|j|j|j|jfS(Ns$<%s of %s from (%s, %s) to (%s, %s)>(RRRSRkRlRmRn(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt__repr__Ns(RRRR)RR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRj.s		RcB@s)eZdZdZdZdZRS(sObject holding parameters passed to `*_branch_init` hooks.

    There are 4 fields that hooks may wish to access:

    :ivar format: the branch format
    :ivar bzrdir: the ControlDir where the branch will be/has been initialized
    :ivar name: name of colocated branch, if any (or None)
    :ivar branch: the branch created

    Note that for lightweight checkouts, the bzrdir and format fields refer to
    the checkout, hence they are different from the corresponding fields in
    branch, which refer to the original branch.
    cC@s(||_||_||_||_dS(sCreate a group of BranchInitHook parameters.

        :param format: the branch format
        :param controldir: the ControlDir where the branch will be/has been
            initialized
        :param name: name of colocated branch, if any (or None)
        :param branch: the branch created

        Note that for lightweight checkouts, the bzrdir and format fields refer
        to the checkout, hence they are different from the corresponding fields
        in branch, which refer to the original branch.
        N(RRRNRS(RRRRNRS((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR)cs
			cC@s|j|jkS(N(R(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRuscC@sd|jj|jfS(Ns
<%s of %s>(RRRS(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRxs(RRRR)RR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRTs
		tSwitchHookParamscB@s)eZdZdZdZdZRS(slObject holding parameters passed to `*_switch` hooks.

    There are 4 fields that hooks may wish to access:

    :ivar control_dir: ControlDir of the checkout to change
    :ivar to_branch: branch that the checkout is to reference
    :ivar force: skip the check for local commits in a heavy checkout
    :ivar revision_id: revision ID to switch to (or None)
    cC@s(||_||_||_||_dS(s@Create a group of SwitchHook parameters.

        :param control_dir: ControlDir of the checkout to change
        :param to_branch: branch that the checkout is to reference
        :param force: skip the check for local commits in a heavy checkout
        :param revision_id: revision ID to switch to (or None)
        N(tcontrol_dirRtforceR(RRRRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR)s			cC@s|j|jkS(N(R(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@s#d|jj|j|j|jfS(Ns<%s for %s to (%s, %s)>(RRRRR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs(RRRR)RR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR|s		
	tBranchFormatMetadircB@seZdZdZeddZdZddZdddZ	de
e
dddZedZ
dZd	Zedd
ZRS(sABase class for branch formats that live in meta directories.
    cC@s!tj|tjj|dS(N(RR)Rt	BzrFormat(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR)s
cC@sy|jdd|}Wn,tjk
rGtjd|d|nXy|jd}Wn/tjk
rtjd|jd|nX|jtd|S(s6Return the format for the branch object in controldir.RNRRRRSN(	tget_branch_transportRR/t
NoSuchFileRReR<t_find_formattformat_registry(tklassRRNRPR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytfind_formatscC@st|jdS(s(What class to instantiate on open calls.N(R\t
_branch_class(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@s|r
dSdSdS(Nsappend_revisions_only = True
RZ((RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_get_initial_configsc
C@s|dkr|j}ntd||j|j|d|}tj|dtj}|j	|j
zP|d|jfg7}x0|D](\}}|j||d|j
qWWd|jX|j||dtd|}	|j|||	|	S(	sPInitialize a branch in a control dir, with specified files

        :param a_bzrdir: The bzrdir to initialize the branch in
        :param utf8_files: The files to create as a list of
            (filename, content) tuples
        :param name: Name of colocated branch to create, if any
        :return: a branch in this format
        screating branch %r in %sRNtlockRtmodeNRR(Rt_get_selected_branchRR,Rtlockable_filest
LockableFilestlockdirtLockDirtcreate_lockRt	as_stringR:t_get_file_modeRRRtR(
Rta_bzrdirt
utf8_filesRNR*tbranch_transportR6tfilenametcontentRS((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_initialize_helpers&
	

		c
C@s|dkr|j}n|sdtj|d|}|j|jkrdtd||fqdn|jdd|}yntj|dt	j
}	|dkr|j}n|jd|d|	d|d|d|d|d	|SWn/t
jk
rt
jd
|jd|nXdS(
sSee BranchFormat.open().RNswrong format %r found for %rRRt_control_filesRt_repositoryRR'RRN(RRRRRRRRRRRRRR/RRR<(
RRRNRRRR'RRPR6((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs,cC@stj}|j||S(N(RtBzrDirMetaFormat1R(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_matchingbzrdirs
cC@stS(N(Rt(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRTscC@stS(N(Rt(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@sEtj|d|d|d|tjj|d|d|d|dS(Ntallow_unsupportedtrecommend_upgradetbasedir(Rtcheck_support_statusRR(RR"R#R$((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR%s
N(RRRR)RRRRR
RRRRR!RTRRtR%(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs					tBzrBranchFormat6cB@sSeZdZdZedZdZddddZdZ	dZ
RS(s7Branch format with last-revision and tags.

    Unlike previous formats, this has no explicit revision history. Instead,
    this just stores the last-revision, and the left-hand history leading
    up to there is the history.

    This format was introduced in bzr 0.15
    and became the default in 0.91.
    cC@stS(N(t
BzrBranch6(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@sdS(s%See BranchFormat.get_format_string().s"Bazaar Branch Format 6 (bzr 0.15)
((tcls((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@sdS(s*See BranchFormat.get_format_description().sBranch format 6((R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@s4dd|j|fdg}|j||||S(s+Create a branch of this format in a_bzrdir.s
last-revisions0 null:
sbranch.confRRZ(s
last-revisions0 null:
(stagsRZ(R
R(RRRNR*RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR#s
	cC@s
tj|S(s+See bzrlib.branch.BranchFormat.make_tags().(Rt	BasicTags(RRS((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR-scC@stS(N(Rt(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR1sN(RRRRRRRRRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR&s					tBzrBranchFormat8cB@sbeZdZdZedZdZddddZdZ	dZ
dZeZ
RS(	s@Metadir format supporting storing locations of subtree branches.cC@stS(N(t
BzrBranch8(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR8scC@sdS(s%See BranchFormat.get_format_string().s(Bazaar Branch Format 8 (needs bzr 1.15)
((R(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR;scC@sdS(s*See BranchFormat.get_format_description().sBranch format 8((R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR@scC@s7dd|j|fdd	g}|j||||S(
s+Create a branch of this format in a_bzrdir.s
last-revisions0 null:
sbranch.confRRZt
references(s
last-revisions0 null:
(stagsRZ(R,RZ(R
R(RRRNR*RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRDs	cC@s
tj|S(s+See bzrlib.branch.BranchFormat.make_tags().(RR)(RRS((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyROscC@stS(N(Rt(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRSscC@stS(N(Rt(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRVsN(RRRRRRRRRRRRRtR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR*5s		
			tBzrBranchFormat7cB@sbeZdZddddZdZedZdZdZ	dZ
dZeZ
RS(	sBranch format with last-revision, tags, and a stacked location pointer.

    The stacked location pointer is passed down to the repository and requires
    a repository format with supports_external_lookups = True.

    This format was introduced in bzr 1.6.
    cC@s4dd|j|fdg}|j||||S(s+Create a branch of this format in a_bzrdir.s
last-revisions0 null:
sbranch.confRRZ(s
last-revisions0 null:
(stagsRZ(R
R(RRRNR*RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRes
	cC@stS(N(t
BzrBranch7(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRoscC@sdS(s%See BranchFormat.get_format_string().s'Bazaar Branch Format 7 (needs bzr 1.6)
((R(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRrscC@sdS(s*See BranchFormat.get_format_description().sBranch format 7((R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRwscC@stS(N(Rt(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR{scC@stS(N(Rt(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR~scC@s
tj|S(s+See bzrlib.branch.BranchFormat.make_tags().(RR)(RRS((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRsN(RRRRRRRRRRRRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR-\s						tBranchReferenceFormatcB@steZdZedZdZddZdZdddddZ	dZ
deddeddZRS(	sBzr branch reference format.

    Branch references are used in implementing checkouts, they
    act as an alias to the real branch which is at some other url.

    This format has:
     - A location file
     - a format string
    cC@sdS(s%See BranchFormat.get_format_string().s$Bazaar-NG Branch Reference Format 1
((R(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@sdS(s*See BranchFormat.get_format_description().sCheckout reference format 1((R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@s"|jdd|}|jdS(s!See BranchFormat.get_reference().RNR\N(RRRe(RRRNRP((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@s.|jdd|}|jd|j}dS(s!See BranchFormat.set_reference().RNR\N(RRR:R<(RRRNRRPR\((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRscC@s|dkrtj|ntd|j|jjrRtj||jn|dkrm|j}n|j	|d|}|j
d|j|j
d|j|j||dt
d|jjg}|j||||S(s+Create a branch of this format in a_bzrdir.screating branch reference in %sRNR\RRR'N(RR/tUninitializableFormatRR,Rtfixed_componentstIncompatibleFormatRRR:RRRtRRR(RRRNRR*RRRS((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs	
c@sddfd}|S(s2Create a clone() routine for a branch dynamically.c@sj|dS(sSee Branch.clone().R(R(RxRRy(RdR(s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRzsN(R(RRdRz((RdRs1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_make_reference_clone_functionscC@s|dkr|j}n|sdtj|d|}|j|jkrdtd||fqdn|dkr|j||}ntjj	|d|}	|	j
d|d|}
|j|
|
_|
S(sReturn the branch that the branch reference in a_bzrdir points at.

        :param a_bzrdir: A BzrDir that contains a branch.
        :param name: Name of colocated branch to open, if any
        :param _found: a private parameter, do not use it. It is used to
            indicate if format probing has already be done.
        :param ignore_fallbacks: when set, no fallback branches will be opened
            (if there are any).  Default is to open fallbacks.
        :param location: The location of the referenced branch.  If
            unspecified, this will be determined from the branch reference in
            a_bzrdir.
        :param possible_transports: An optional reusable transports list.
        RNswrong format %r found for %rR'RN(
RRRRRRRRRKRRLR3Rz(RRRNRR\R'RRRtreal_bzrdirR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs			N(
RRRRRRRRRRR3RR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR/s					tBranchFormatRegistrycB@s,eZdZddZdZdZRS(sBranch format registry.cC@s#tt|j|d|_dS(N(tsuperR5R)Rt_default_format(Rtother_registry((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR)scC@s
||_dS(N(R7(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytset_defaultscC@s|jS(N(R7(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytget_defaultsN(RRRRR)R9R:(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR5s	sBazaar-NG branch format 5
sbzrlib.branchfmt.fullhistorytBzrBranchFormat5tBranchWriteLockResultcB@s eZdZdZdZRS(sThe result of write locking a branch.

    :ivar branch_token: The token obtained from the underlying branch lock, or
        None.
    :ivar unlock: A callable which will unlock the lock.
    cC@stj||||_dS(N(RR)tbranch_token(RRR=((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR)	scC@sd|j|jfS(NsBranchWriteLockResult(%s, %s)(R=R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR"	s	(RRRR)R(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR<	s	t	BzrBranchcB@seZdZd#d#d#d#d#ed#dZdZeZdZe	eddZ
e	dZdZdZ
d	Zd
ZdZdZd#d
ZdZeejejdZdZdZedZedZdZdZ dZ!dZ"dZ#edZ$edZ%dZ&ed#dZ'dZ(edZ)ed#dZ*d Z+d!Z,ed"Z-RS($sA branch stored in the actual filesystem.

    Note that it's "local" in the context of the filesystem; it doesn't
    really matter if it's on an nfs/smb/afs/coda/... share, as long as
    it's writable, and can be accessed via the normal filesystem API.

    :ivar _transport: Transport for file operations on this branch's
        control files, typically pointing to the .bzr/branch directory.
    :ivar repository: Repository for this branch.
    :ivar base: The url of the base directory for this branch; the one
        containing the .bzr directory.
    :ivar name: Optional colocated branch name as it exists in the control
        directory.
    cC@s|dkrtdn|dkr6tdn||_|jjjd|_|dkr|jjdtj|n|jj	|_
||_||_|dkrtdn||_
|j|_||_d|_tj||dS(s2Create new branch object at a particular location.sa_bzrdir must be suppliedsname must be supplieds..RZRSs BzrBranch _control_files is NoneN(RRRRPRzt_user_transporttset_segment_parameterRbtescapeR<t_baseRNRR6RR*t
conf_storeRR)(RRRRRNRRR'((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR)7	s&							cC@sd|jj|jfS(Ns%s(%s)(RRR,(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRP	scC@s|jS(s7Returns the directory containing the control directory.(RB(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt	_get_baseU	stdocs$The URL for the root of this branch.cC@s|jS(N(R?(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR[	scC@stj|jdS(Nsbranch.conf(RWtTransportConfigR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR]_	scC@s+|jdkr$tj||_n|jS(N(RCRRWtBranchStore(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_get_config_storeb	scC@s$|j}|dk	r|S|SdS(s7Return the branch that may contain uncommitted changes.N(R8R(RR9((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_uncommitted_branchg	scC@s|j}|dkr,|jjddS|jjdrJtjnt}|j||j	d|jj
d|dS(sStore uncommitted changes from a ShelfCreator.

        :param creator: The ShelfCreator containing uncommitted changes, or
            None to delete any stored changes.
        :raises: ChangesAlreadyStored if the branch already has changes.
        sstored-transformNi(RIRRtdeletethasR/tChangesAlreadyStoredRtwrite_shelftseektput_file(RR_RSt	transform((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR^o	s	

cC@sM|j}y|jjd}Wntjk
r9dSXtjj||S(sReturn a shelf.Unshelver for this branch and tree.

        :param tree: The tree to use to construct the Unshelver.
        :return: an Unshelver or None if no changes are stored.
        sstored-transformN(	RIRRR/RRtshelft	Unshelvertfrom_tree_and_shelf(RRaRSRP((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR`	scC@s
|jjS(N(R6Rv(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRv	scC@s|js?|jd|jj||jjt}nt}y#t|j|j	jd|SWn |r|jjnnXdS(sLock the branch for write operations.

        :param token: A token to permit reacquiring a previously held and
            preserved lock.
        :return: A BranchWriteLockResult.
        twRN(
Rvt
_note_lockR*t_warn_if_deprecatedRRtRR<RR6(RRt	took_lock((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR	s

		cC@s|js?|jd|jj||jjt}nt}y|jjt|j	SWn |r|jj	nnXdS(s`Lock the branch for read operations.

        :return: A bzrlib.lock.LogicalLockResult.
        trN(
RvRUR*RVRRtRR6RR(RRW((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR	s

	
cC@ss|jjdkr1|jdk	r1|jjnz|jjWd|jjsn|jj|jnXdS(Ni(	R6t_lock_countRCRtsave_changesRRvR*R=(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR	s!
cC@s$|jjdkrdS|jjSdS(Ni(R6RYRt
_lock_mode(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR	scC@s
|jjS(N(R6R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR	scC@s|jj||S(sSee Branch.print_file.(R*R(RRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR	scC@s|st|tr2tjd|d|ntj|}|j\}}|jro|j|n|j	|||j
|||j||f|_|j
||dS(NRRS(Rt
basestringR/tInvalidRevisionIdRCtensure_nullRRt_check_history_violationRrt_write_last_revision_infoR=R"Rp(RRRRkRl((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR	s
cC@s|jj|jS(sSee Branch.basis_tree.(R*RNRA(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRO	scC@sXdddg}xB|D]:}y|jj|jdSWqtjk
rOqXqWdS(NRXRIsx-pulls
(RRetstripR/RR(Rt_locstl((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRR	s
cC@stj|j|jdS(N(R/RRR,(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR	scC@s#|jjd|dtjdS(sSee Branch.set_push_location.RftstoreN(RYRsRWtSTORE_LOCATION_NORECURSE(RR\((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRh	s	cC@sI|dkr|jjdn&|jjd|dd|jjdS(NRXs
R(RRRJR:RR(RR2((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR	scC@s
|jdS(sIf bound, unbindN(tset_bound_locationR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRA
scC@s|j|jdS(sBind this branch to the branch other.

        This does not push or pull data between the branches, though it does
        check for divergence to raise an error when the branches are not
        either the same, or one a prefix of the other. That behaviour may not
        be useful, so that check may be removed in future.

        :param other: The branch to bind to
        :type other: Branch
        N(RfR<(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR
scC@s4y|jjdd SWntjk
r/dSXdS(Ntboundi(RReR/RR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR
scC@s+|jdkr$|j||_n|jS(sVReturn the branch we are bound to.

        :return: Either a Branch, or None
        N(R#Rt_get_master_branch(RR'((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR8%
scC@sh|j}|sdSytj|d|SWn4tjtjfk
rc}tj|||nXdS(NR'(RRRRR/RtConnectionErrortBoundBranchConnectionFailure(RR't	bound_locRo((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRh0
scC@sld|_|r8|jjd|dd|jjn0y|jjdWntjk
rct	SXt
SdS(siSet the target where this branch is bound to.

        :param location: URL to the target branch
        Rgs
RN(RR#RR:RRRJR/RRRt(RR\((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRf;
s	cC@sy|j|}|dk	rutj|j}|j|dt|jjj	|tj|jrqdS|SdS(sSynchronise this branch with the master branch if any.

        :return: None or the last_revision that was pivoted out during the
                 update.
        RHN(
R8RRCR^RARIRtR*RzR{(RR'R9told_tip((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRL
scC@sX|jjd}|jdjdd\}}tj|}t|}||fS(Ns
last-revisions
t i(RReRtsplitt
cache_utf8tget_cached_utf8tint(Rtrevision_stringRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRB]
s
!cC@sEtj|}d||f}|jjd|d|jjdS(sSimply write out the revision id, with no checks.

        Use set_last_revision_info to perform this safely.

        Does not update the revision_history cache.
        s%d %s
s
last-revisionRN(RCR^RR:RR(RRRt
out_string((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR`d
scC@s0|jj||jjd|jjdS(sUpdate the feature flags for this branch.

        :param updated_flags: Dictionary mapping feature names to necessities
            A necessity can be None to indicate the feature should be removed
        RN(Rt_update_feature_flagsRR:R(Rt
updated_flags((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytupdate_feature_flagsp
sN(.RRRRRR)RRRDRR<RR]RHRIR^R`RvRRRR/R"t
LockBrokenRRRRRRRRORRRRhRRARRR8RhRfRRBR`Rv(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR>'	sP								
											
			R+cB@seZdZddZdZdZdZdZe	dZ
edZe	dZ
ed	Zd
ZdZddZd
ZdZdZdZdZdZeddZedZRS(s.A branch that stores tree-reference locations.cC@s|jr
dS|dkr+|jjg}ny|j}Wn#tjtjtjfk
r`nlXxUt	j
dD]F}|||}|dkrot	j
j|}td|qoqoW|j
|d|dS(NRs?'transform_fallback_location' hook %s returned None, not a URL.R'(t_ignore_fallbacksRRRRR/R;R
RRR&t
get_hook_nameRR5(RR'R2R(t	hook_name((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR%~
s$	
cO@sD|jdt|_tt|j||d|_d|_dS(NR(	RRRxR6R+R)RR"t_reference_info(RRJRK((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR)
s	cC@s)tt|jd|_d|_dS(N(R6R+R=RR"R{(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR=
s	cC@s}|j}tj|}tj|r.dS|jj}x'|j|D]}||krMdSqMWtj|j	dS(N(
RARCR^RER*Rztiter_lefthand_ancestryR/tAppendRevisionsOnlyViolationR,(RRt
current_revidRARtlh_ancestor((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR_
scC@s9|j\}}|jd|dtt|jS(s9Generate the revision history from last revision
        R>i(RRFRRR (RRRA((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR>
scC@s|jd|dtdS(sSet the parent branchtparent_locationR[N(RRt(RR2((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR
scC@s
|jdS(sSet the parent branchR(R](R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRR
scC@st}tj|}xK|jD]=\}\}}tjd|d|d|}|j|q%W|jjd|j||_	dS(sReplace all reference info stored in a branch.

        :param info_dict: A dict of {file_id: (tree_path, branch_location)}
        RRRR,N(
Rtriot	RioWriterRtStanzatwrite_stanzaRR:tgetvalueR{(Rt	info_dicttstwriterRRRtstanza((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR
s		cC@sl|jdk	r|jS|jjd}z)tj|}td|D}Wd|jX||_|S(s~Return all the reference info stored in a branch.

        :return: A dict of {file_id: (tree_path, branch_location)}
        R,cs@s-|]#}|d|d|dffVqdS(RRRN((RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pys	<genexpr>
sN(R{RRRRtread_stanzasRtclose(Rtrio_filetstanzasR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR
s		cC@s|j}||f||<d||fkrn|dk	rItdn|dk	rdtdn||=n|j|dS(s(Set the branch location to use for a tree reference.

        :param file_id: The file-id of the tree reference.
        :param tree_path: The path of the tree reference in the tree.
        :param branch_location: The location of the branch to retrieve tree
            references from.
        s4tree_path must be None when branch_location is None.s4branch_location must be None when tree_path is None.N(RRRR(RRRRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR
s
cC@s|jj|dS(s~Get the tree_path and branch_location for a tree reference.

        :return: a tuple of (tree_path, branch_location)
        N(NN(RRR(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR
scC@s]|j|d}|dkr5tj||||Stj|j|}tj|d|S(sReturn the parent branch for a tree-reference file_id.

        :param file_id: The file_id of the tree reference
        :param path: The path of the file_id in the tree
        :return: A branch associated with the file_id
        iR'N(RRRRRbRcR,R(RRRR'R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR
scC@s|jd|dS(sSee Branch.set_push_location.RfN(R(RR\((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRhscC@s{d|_d}|j}|dkrQ|jds:tS|jddtSn&|jd|d||jddtS(sSee Branch.set_push_location.RgRtbound_locationRnRtN(RR#R[RRRRtR(RR\Rtconf((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRf	s	cC@s8|j}|jd|kr%dS|jdd|S(shReturn the bound location in the config file.

        Return None if the bound parameter does not matchRgRRnN(R[RRR](RRgR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_get_bound_locationscC@s
|jtS(sSee Branch.get_bound_location.(RRt(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR#scC@s
|jtS(s!See Branch.get_old_bound_location(RR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR'scC@sOtj|}|jdd|}|dkrBtj|n|jdS(NR
Rnsutf-8(RWtBranchOnlyStackR]RR/R
R(RRtstacked_url((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR+s	cC@s|dkrtjS|j\}}|dks=||krRtj||n|dk	rj||dS||}t|j|kr|jd|nt|j|kr|j|Stj||dS(s,Find the revision id of the specified revno.iiR>N(	RCRDRR/R~RR@R RF(RRR?RRRF((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR8s
cC@stj|rdSy|jj|}Wntk
ry|jd|Wn+tjk
rz}tj||j	nXt
|jd}|dkrtj||n|j||krtj||qnX|j|S(s%Given a revision id, return its revnoiR?i(
RCRER RFRRFR/tRevisionNotPresentRRR@R~R(RRRFRo((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRMs
N(RRRRR%R)R=R_R>RRRRRRRRRRRhRfRRRRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR+{
s,													
R.cB@s,eZdZdZdZddZRS(s0A branch with support for a fallback repository.cC@stj||||dS(N(RR(RRRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRdscC@stj||dS(N(RR(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRgscC@stj||||S(N(RR(RRRR'((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRjsN(RRRRRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR.as		R'cB@seZdZdZRS(sSee BzrBranchFormat6 for the capabilities of this branch.

    This subclass of BzrBranch7 disables the new features BzrBranch7 added,
    i.e. stacking.
    cC@stj|j|jdS(N(R/RRR,(R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRvs(RRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR'ost_ResultcB@seZdZRS(cC@sXt|ddsdS|jdx.|jD]#\}}}|jd|fq-WdS(Nt
tag_conflictssConflicting tags:
s    %s
(RRtwriteR(Rtto_fileRNtvalue1tvalue2((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_show_tag_confictss

(RRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR~st
PullResultcB@seZdZdZRS(sResult of a Branch.pull operation.

    :ivar old_revno: Revision number before pull.
    :ivar new_revno: Revision number after pull.
    :ivar old_revid: Tip revision id before pull.
    :ivar new_revid: Tip revision id after pull.
    :ivar source_branch: Source (local) branch object. (read locked)
    :ivar master_branch: Master branch of the target, or the target if no
        Master
    :ivar local_branch: target branch if there is a Master, else None
    :ivar target_branch: Target/destination branch object. (write locked)
    :ivar tag_conflicts: A list of tag conflicts, see BasicTags.merge_to
    :ivar tag_updates: A dict with new tags, see BasicTags.merge_to
    cC@st|dd}t|dd}ts|j|jkrV|jd|jn|rv|jdt|n|j|jkr|r|s|jdq|jdqn|j|dS(NRttag_updatessNow on revision %d.
s%d tag(s) updated.
sNo revisions or tags to pull.
sNo revisions to pull.
(	RRRRlRnRRmR@R(RRRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytreports	(RRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRstBranchPushResultcB@seZdZdZRS(suResult of a Branch.push operation.

    :ivar old_revno: Revision number (eg 10) of the target before push.
    :ivar new_revno: Revision number (eg 12) of the target after push.
    :ivar old_revid: Tip revision id (eg joe@foo.com-1234234-aoeua34) of target
        before the push.
    :ivar new_revid: Tip revision id (eg joe@foo.com-5676566-boa234a) of target
        after the push.
    :ivar source_branch: Source branch object that the push was from. This is
        read locked, and generally is a local (and thus low latency) branch.
    :ivar master_branch: If target is a bound branch, the master branch of
        target, or target itself. Always write locked.
    :ivar target_branch: The direct Branch where data is being sent (write
        locked).
    :ivar local_branch: If the target is a bound branch this will be the
        target, otherwise it will be None.
    cC@st|dd}t|dd}ts|j|jkrYttd|jn|rttddt	|t	|n|j|jkr|r|sttdqttdqn|j
|dS(NRRsPushed up to revision %d.s%d tag updated.s%d tags updated.s!No new revisions or tags to push.sNo new revisions to push.(RRRRlRnRRRmtngettextR@R(RRRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs	)(RRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRsRcB@s eZdZdZdZRS(sDResults of checking branch consistency.

    :see: Branch.check
    cC@s||_g|_dS(N(RSR/(RRS((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR)s	cC@sSttdj|jj|jjx$|jD]}ttd|q2WdS(sReport the check results via trace.note.

        :param verbose: Requests more detailed display of what was checked,
            if any.
        schecked branch {0} format {1}sfound error:%sN(RRRRSR,RR/(Rtverboseterror((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytreport_resultss(RRRR)R(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs	t
Converter5to6cB@seZdZdZRS(s3Perform an in-place upgrade of format 5 to format 6cC@s&t}|j|jdt}|j|j|jz=|j|j|j	|j
|j|jWd|j
X|jji|jjd|jd|jj|jjd|jz9y|jdWntjk
rnX|j	dWd|j
XdS(NRRRsrevision-history(R&RRRtR`RRR	RYRfRRhRgRRt
_set_tag_dictRR:RRRJRR/R(RRSRt
new_branch((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pytconverts,	

(RRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRst
Converter6to7cB@seZdZdZRS(s3Perform an in-place upgrade of format 6 to format 7cC@s6t}|jdd|jjd|jdS(NR
RZR(R-RRR:R(RRSR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs	(RRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRst
Converter7to8cB@seZdZdZRS(s3Perform an in-place upgrade of format 7 to format 8cC@s9t}|jjdd|jjd|jdS(NR,RZR(R*RR:R(RRSR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs	(RRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRsRcB@seZdZgZedZeeddedZ	eededdZ
eddZedddZRS(sThis class represents operations taking place between two branches.

    Its instances have methods like pull() and push() and contain
    references to the source and target repositories these operations
    can be carried out on.
    cC@st|jdS(sReturn an iterable of format tuples for testing.
        
        :return: An iterable of (from_format, to_format) to use when testing
            this InterBranch class. Each InterBranch class should define this
            method itself.
        N(R\t_get_branch_formats_to_test(R
((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR+scC@st|jdS(sMirror source into target branch.

        The target branch is considered to be 'local', having low latency.

        :returns: PullResult instance
        N(R\RI(RRHR?R'Rm((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRI5s	cC@st|jdS(sMirror the source branch into the target branch.

        The source branch is considered to be 'local', having low latency.
        N(R\RL(RRHR?Rt_override_hook_source_branch((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRL@scC@st|jdS(sCopy the content of source into target

        revision_id: if not None, the revision history in the new branch will
                     be truncated to end with revision_id.
        N(R\Rw(RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRwIscC@st|jdS(sFetch revisions.

        :param stop_revision: Last revision to fetch
        :param limit: Optional rough limit of revisions to fetch
        N(R\R(RR?R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRRsN(
RRRt_optimisersRRRRRRIRLRwR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR s
		cC@s*t|tr&|rddgSgSn|S(NR?R(Rtbool(RH((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_fix_overwrite_type\s

tGenericInterBranchc	B@seZdZedZedZedZeddZ	edddZ
ededdZeedde
dedZededdZd	Zdd
Zeddde
dee
dZRS(
s=InterBranch implementation that uses public Branch functions.cC@stS(N(Rt(R
RCRM((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt
is_compatiblehscC@stjtjfgS(N(R	R:(R
((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRmscC@s't|tjr#|j|jS|S(N(RRtRemoteBranchFormatt_ensure_realt_custom_format(R
R((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt
unwrap_formatqs
cC@s|jj|j|jj|j|y|jj}Wn#tjk
ra}td|nX|r{|jj|n|jj	r|jj
j|jj
ndS(sCopy the content of source into target

        revision_id: if not None, the revision history in the new branch will
                     be truncated to end with revision_id.
        s%parent was not accessible to copy: %sN(RCRRMRRYR/RWRR	RVRtmerge_to(RRRXRo((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRwxscC@s|jj|jjkr"dgfS|jjztj}|j|_||_|jj|_	|jj|_
tjj|_
||_|j}|jjj|jjd|SWd|jjXdS(NiR(RMR<RCRRtFetchSpecFactoryt
source_branchtsource_branch_stop_revision_idR*tsource_repottarget_repotTargetRepoKindstPREEXISTINGttarget_repo_kindRtmake_fetch_specR(RR?Rtfetch_spec_factoryR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRs

		c
C@s=|jj\}}d}|dkrI|}tj|r@dS|}ntj|jj}|jd||s|dkr|jj	j
}n|jj||||jrdSn|dkr&|dkr|jj	j
}n|jj\}}	|j|||f|	|fg}n|jj
||dS(NR?(RCRRRCRER^RMRARR*RzRRR(
RR?RHRtother_revnotother_last_revisiont
stop_revnoRRtthis_last_revision((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_update_revisionss.				cC@s:|jj}|r+|r+tjnd}t}	|rtj|}
y%|jj	j
|
}|dk}	Wqtjtjfk
rt}	qXn|r|r|	r|jj
|}|jnzR|r|j|j||dtn|j||d|d|d|d|	SWd|r5|jnXdS(sPull from source into self, updating my master if any.

        :param run_hooks: Private parameter - if false, this branch
            is being called because it's the master of the primary branch,
            so it should not run its hooks.
        RZt	run_hookst_hook_mastert_override_hook_targettmerge_tags_to_masterN(RMRR/tLocalRequiresBoundBranchRRRbt
normalize_urlRCRRRtPathNotChildRR8RRIt_pullR(RRHR?R'RRRmRt
master_branchtsource_is_mastert
normalizedRR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRIs4




	cC@s{|r!tj|j|jntj|j}|j|jjj	|j|jj
j	|j||d|S(s\See InterBranch.push.

        This is the basic concrete implementation of push()

        :param _override_hook_source_branch: If specified, run the hooks
            passing this Branch as the source, rather than self.  This is for
            use of RemoteBranch, where push is delegated to the underlying
            vfs-based Branch.
        R(R/tLossyPushToSameVCSRCRMR2R3t_push_with_bound_branchesR5RRRtrun(RRHR?RRR8((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRLscC@st}|j|_|j|_|jj\|_|_|jj|jt	|}|j|kr|jj
j|jj
}|j|dd|kd|n|jj
r|jjj|jjd|k\|_|_n|jj\|_|_|S(sBasic implementation of push without bound branches or hooks.

        Must be called with source read locked and target write locked.
        RHR?RR(RRCRRMRRRkRlRRR*RzRRVRRRRRmRn(RRHR?RR((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt_basic_push
s 	
'c	@sfd}|jj}|r|jj|kr|jj}|j|j|jtj|j	|}|j
|||j
|||_|j_n-d}|j
|||j_d_|S(sGPush from source into target, and into target's master if any.
        c@s8r_nxtjdD]}|q WdS(NR(RRR&(R((RR(s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt
_run_hooks"
sN(RMRR<R8RR5RRRRCRRtlocal_branchR(	Rt	operationRHR?RRRRtmaster_inter((RRs1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyR
s"
		c	C@s|rtjnt}	|j|	_|dkrE|j|	_n	||	_|jjz(|jj	|j|jj
j|jj
}
|jj\|	_
|	_t|}|j|dd|kd|
|jjj|jjd|kd|\|	_|	_|jj\|	_|	_|rB||	_|	j|	_n|	j|	_d|	_|rx"tjdD]}||	qkWnWd|jjX|	S(s1See Branch.pull.

        This function is the core worker, used by GenericInterBranch.pull to
        avoid duplication when pulling source->master and source->local.

        :param _hook_master: Private parameter - set the branch to
            be supplied as the master to pull hooks.
        :param run_hooks: Private parameter - if false, this branch
            is being called because it's the master of the primary branch,
            so it should not run its hooks.
            is being called because it's the master of the primary branch,
            so it should not run its hooks.
        :param _override_hook_target: Private parameter - set the branch to be
            supplied as the target_branch to pull hooks.
        :param local: Only update the local branch, and not the bound branch.
        RHR?RRt
ignore_masterRN(R/RRRCRRRMRRRR*RzRRkRlRRRRRRRmRnRRRR&R(RRHR?R'RRRRmRRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRF
s<		
		N(RRRRRRRRRRwRRRRtRIRLRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyRes.%'		'	(Lt
__future__Rt
bzrlib.bzrdirtbzrlibt	cStringIORtbzrlib.lazy_importRtglobalsRRtbzrlib.decoratorsRRRtbzrlib.hooksRtbzrlib.interR	tbzrlib.lockR
RRtbzrlib.symbol_versioningR
Rtbzrlib.traceRRRRtControlComponentRtControlComponentFormatRRRRR&tobjectRjRRRRR&R*R-R/tControlComponentFormatRegistryR5tFormatRegistrytnetwork_format_registryR	t	__format6t	__format7t	__format8t
register_lazytregisterR9R<R>R+R.R'RRRRRRRRRRtregister_optimiser(((s1/usr/lib/python2.7/dist-packages/bzrlib/branch.pyt<module>s~	"X&(!o)',g			




U
 ''

<		$

Copyright © 2017 || Recoded By Mr.Bumblebee