-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
l<Pc@@s·ddlmZddlmZmZmZmZddlmZddl	m
Z
ddlmZd„Z
eeded„Zed„Zed	„Zd
„Zeded„ZdS(
i(tabsolute_import(terrorstlocktmergetrevision(tBranch(tgettext(tnotecC@s[ddlm}tjd}|s'dS|||||ƒ}x|D]}||ƒqCWdS(Ni(tSwitchHookParamstpost_switch(t
bzrlib.branchRRthooks(tcontrol_dirt	to_branchtforcetrevision_idRRtparamsthook((s1/usr/lib/python2.7/dist-packages/bzrlib/switch.pyt_run_post_switch_hookss

cC@sÖt||ƒy|jƒj}Wntjk
r?|j}nX|rqtj|jƒƒ}|jƒWdQXn|j	ƒzt
|||ƒWd|jƒX|jƒ}t|||||ƒt
||||ƒdS(s€Switch the branch associated with a checkout.

    :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.
    :param store_uncommitted: If True, store uncommitted changes in the
        branch.
    N(t_check_pending_mergestopen_brancht
repositoryRtNotBranchErrorRtwrite_lockedtopen_workingtreetstore_uncommittedt	lock_readt_set_branch_locationtunlockt_updateR(RR
RtquietRRtsource_repositoryttree((s1/usr/lib/python2.7/dist-packages/bzrlib/switch.pytswitch(s


cC@swy|jƒ}Wn&tjk
r8}|r/dS|‚nX|jƒd}t|ƒdkrstjtdƒƒ‚ndS(s€Check that there are no outstanding pending merges before switching.

    :param control: ControlDir of the branch to check
    NiisAPending merges must be committed or reverted before using switch.(RRRtget_parent_idstlentBzrCommandErrorR(tcontrolRR textexisting_pending_merges((s1/usr/lib/python2.7/dist-packages/bzrlib/switch.pyRDs
c	C@sÙ|jƒ}|j|ƒdk	r7|j|d|ƒnž|jƒ}|jƒ}|dk	r6g}y2|r’t||ƒr’tjt	dƒƒ‚nWn2tj
k
rÇ}tjt	dƒ|jƒ‚nX|jƒzS|j
dƒ|j|dtd|ƒ|j
|jƒ|j|jƒjƒƒWd|jƒXnŸ|jƒz‡|jj|jƒ}|jjjr±|s‹|j|jƒ|jƒƒr±|jjƒ|jj|ddƒntjt	dƒƒ‚Wd|jƒXdS(	sîSet location value of a branch reference.

    :param control: 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
    syCannot switch as local commits found in the checkout. Commit these to the bound branch or use --force to throw them away.s_Unable to connect to current master branch %(target)s: %(error)s To switch anyway, use --force.t	overwritetpossible_transportsNtnamets(Cannot switch a branch, only a checkout.(tfind_branch_formatt
get_referencetNonet
set_referenceRtget_bound_locationt_any_local_commitsRR$RtBoundBranchConnectionFailuret__dict__t
lock_writetset_bound_locationtpulltTruetbaset
set_parenttget_master_brancht
get_parentRRRt	get_graphtbzrdirt_formattcolocated_branchestis_ancestort
last_revisiontdestroy_branchtset_branch_reference(	R%R
Rt
branch_formattbtbound_branchR)tetgraph((s1/usr/lib/python2.7/dist-packages/bzrlib/switch.pyRXsB		



cC@s¡tj|jƒƒ}|tjkr|j|ƒ}|jƒ|jƒz;|jƒ}|jj|jƒ}|j||ƒst	SWd|j
ƒ|j
ƒXntS(s;Does this branch have any commits not in the master branch?N(Rtensure_nullRAt
NULL_REVISIONR:RRR<R@R7RtFalse(tthis_branchR)tlast_revtother_branchtother_last_revRH((s1/usr/lib/python2.7/dist-packages/bzrlib/switch.pyR1’s

	
cC@s|r|jƒn
|jƒzß|j}|dkrD|jƒ}n|jƒ|kr{|sèttdƒ|jƒƒqènm|j|jƒƒ}t	j
||||jj|ƒƒ|j|jƒƒ|sèttdƒ|jƒƒn|rû|j
ƒnWd|jƒXdS(sñUpdate a working tree to the latest revision of its branch.

    :param tree: the working tree
    :param source_repository: repository holding the revisions
    :param restore_uncommitted: restore any uncommitted changes in the branch.
    s"Tree is up to date at revision %d.sUpdated to revision %d.N(R4tlock_tree_writetbranchR.RARRtrevnot
revision_treeRtMerge3MergerRtset_last_revisiontrestore_uncommittedR(R RRRRVR
t	base_tree((s1/usr/lib/python2.7/dist-packages/bzrlib/switch.pyR¥s&

	N(t
__future__RtbzrlibRRRRR
Rtbzrlib.i18nRtbzrlib.traceRRRKR.R!RRR1R(((s1/usr/lib/python2.7/dist-packages/bzrlib/switch.pyt<module>s"			:	

Copyright © 2017 || Recoded By Mr.Bumblebee