-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
šOc@@sšdZddlmZddlmZmZmZmZmZm	Z	ddl
mZdefd„ƒYZ
defd„ƒYZd	efd
„ƒYZdS(sÆReconfigure a controldir into a new tree/branch/repository layout.

Various types of reconfiguration operation are available either by
constructing a class or using a factory method on Reconfigure.
i(tabsolute_import(tbrancht
controldirterrorsttracetuiturlutils(tgettexttReconfigureStackedOncB@seZdZd„ZRS(s6Reconfigures a branch to be stacked on another branch.cC@s‘|jƒ}tj|jtj|ƒƒ}|jƒzK|j|ƒtjƒs~t	j
jtdƒj
|j|jƒƒƒnWd|jƒXdS(Ns{0} is now stacked on {1}
(topen_branchRtrelative_urltbaset
normalize_urlt
lock_writetset_stacked_on_urlRtis_quietRt
ui_factorytnoteRtformattget_stacked_on_urltunlock(tselftbzrdirtstacked_on_urlRton_url((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pytapply+s

	(t__name__t
__module__t__doc__R(((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyR(stReconfigureUnstackedcB@seZd„ZRS(cC@sh|jƒ}|jƒz@|jdƒtjƒsUtjjt	dƒ|j
fƒnWd|jƒXdS(Ns%s is now not stacked
(R	R
RtNoneRRRRRRRR(RRR((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyR>s

(RRR(((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyR<stReconfigurecB@s¿eZdd„Zed„ƒZed„ƒZedd„ƒZedd„ƒZ	ed„ƒZ
ed„ƒZed„ƒZd„Z
dd	„Zd
„Zd„Zd„Zed
„ZRS(cC@s™||_||_d|_y|jjƒ|_Wn&tjk
rYd|_d|_n1X|jj|jjkr|j|_n	d|_yL|jj	ƒ}|j|jkrÃ||_
d|_nd|_
||_Wn&tjk
rþd|_
d|_nXy|j
ƒ|_Wntjk
r1d|_nXt|_t|_t|_t|_t|_t|_t|_t|_t|_t|_d|_dS(N(Rtnew_bound_locationRtlocal_repositorytfind_repositoryt
repositoryRtNoRepositoryPresenttuser_urlR	tlocal_branchtreferenced_branchtNotBranchErrortopen_workingtreettreet
NoWorkingTreetFalset_unbindt_bindt_destroy_referencet_create_referencet_destroy_brancht_create_brancht
_destroy_treet_create_treet_create_repositoryt_destroy_repositoryt_repository_trees(RRR R((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyt__init__MsH				
			
	

										c	C@sPt|ƒ}|jdtdtdtdtƒ|jƒsLtj|ƒ‚n|S(s»Return a Reconfiguration to convert this bzrdir into a branch

        :param bzrdir: The bzrdir to reconfigure
        :raise errors.AlreadyBranch: if bzrdir is already a branch
        t	want_treetwant_brancht
want_boundtwant_reference(Rt
_plan_changesR,tTruetchanges_plannedRt
AlreadyBranch(Rtreconfiguration((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyt	to_branchvs
c	C@sPt|ƒ}|jdtdtdtdtƒ|jƒsLtj|ƒ‚n|S(sµReturn a Reconfiguration to convert this bzrdir into a tree

        :param bzrdir: The bzrdir to reconfigure
        :raise errors.AlreadyTree: if bzrdir is already a tree
        R9R:R;R<(RR=R>R,R?RtAlreadyTree(RRA((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pytto_tree„s
c	C@sSt||ƒ}|jdtdtdtdtƒ|jƒsOtj|ƒ‚n|S(sReturn a Reconfiguration to convert this bzrdir into a checkout

        :param bzrdir: The bzrdir to reconfigure
        :param bound_location: The location the checkout should be bound to.
        :raise errors.AlreadyCheckout: if bzrdir is already a checkout
        R9R:R;R<(RR=R>R,R?RtAlreadyCheckout(Rtbound_locationRA((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pytto_checkout’s
c	C@sS|||ƒ}|jdtdtdtdtƒ|jƒsOtj|ƒ‚n|S(s6Make a Reconfiguration to convert bzrdir into a lightweight checkout

        :param bzrdir: The bzrdir to reconfigure
        :param bound_location: The location the checkout should be bound to.
        :raise errors.AlreadyLightweightCheckout: if bzrdir is already a
            lightweight checkout
        R9R:R;R<(R=R>R,R?RtAlreadyLightweightCheckout(tklassRtreference_locationRA((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pytto_lightweight_checkout¡s	
cC@s>||ƒ}|jdtƒ|jƒs:tj|ƒ‚n|S(s4Convert a standalone branch into a repository brancht
use_shared(t_set_use_sharedR>R?RtAlreadyUsingShared(RIRRA((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyt
to_use_shared±s
cC@s>||ƒ}|jdtƒ|jƒs:tj|ƒ‚n|S(s4Convert a repository branch into a standalone branchRL(RMR,R?RtAlreadyStandalone(RIRRA((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyt
to_standaloneºs
cC@s||ƒ}|jjƒs0tj|jƒ‚n|rW|jjƒrWtj|ƒ‚n2|r€|jjƒr€tj|ƒ‚n	||_|S(s3Adjust a repository's working tree presence default(	R#t	is_sharedRtReconfigurationNotSupportedRtmake_working_treestAlreadyWithTreestAlreadyWithNoTreesR7(RIRt
with_treesRA((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pytset_repository_treesÃs	cC@sÃ|r#|r#tj|jƒ‚n|rD|rDtj|jƒ‚n|jdkrh|s¤t|_q¤n<|r¤|jj|jjkr¤|jjƒs¤t|_	q¤n|j
dkrã|rõt|_|jdk	ràt|_
qàqõn|sõt|_n|jdkr1|tkr|t|_|r.t|_q.q|nK|r[|jjƒdkr|t|_q|n!|jjƒdk	r|t|_n|rž|jdk	ržt|_n|r¿|jdkr¿t|_ndS(s>Determine which changes are needed to assume the configurationN(RRSRR#RR>R5R%RRR6R'R0R&R1R/R2R.tget_bound_locationR-R*R3R4(RR9R:R;R<((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyR=Òs@		cC@sS|dkrdS|r4|jdk	rOt|_qOn|jdkrOt|_ndS(N(RR!R>R6R5(RRL((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyRMúscC@sO|jpN|jpN|jpN|jpN|jpN|jpN|jpN|jpN|jS(s3Return True if changes are planned, False otherwise(	R-R.R3R4R/R2R5R0R6(R((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyR?scC@s—|jr-|jjƒr-tj|jƒ‚n|jr“|jdk	r“tj	j
|jƒƒ}|jƒ|jjƒkr“tj
|j|ƒ‚q“ndS(s4Raise if reconfiguration would destroy local changesN(R3R*thas_changesRtUncommittedChangesR0R&RRtBranchtopent_select_bind_locationt
last_revisiontUnsyncedBranchesR(Rtreference_branch((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyt_checks	cC@sÓ|jdk	r|jS|jdk	r¤|jjƒ}|dk	rD|S|jjƒ}|dk	rc|S|jjƒ}|dk	r‚|S|jjƒ}|dk	r½|Sn|jdk	r½|jjSt	j
|jƒ‚dS(s”Select a location to bind or create a reference to.

        Preference is:
        1. user specified location
        2. branch reference location (it's a kind of bind location)
        3. current bind location
        4. previous bind location (it was a good choice once)
        5. push location (it's writeable, so committable)
        6. parent location (it's pullable, so update-from-able)
        N(R RR&RYtget_old_bound_locationtget_push_locationt
get_parentR'RRtNoBindLocationR(Rtboundt	old_boundt
push_locationtparent((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyR^s$
cC@s§|s|jƒn|jrñ|jr>|jr>|jj}n-|jre|jdk	re|jj}nd}|dk	rƒ|j}nd}|dk	rª|j	|j
ƒ}n|j
jƒ}|jrú|jrú|j|jj|jj
ƒƒqún	|j}|jr4|jdk	r4|j|jj|jj
ƒƒn|jrXtjj|jƒƒ}n|jræ|jr€|jj|jƒqæ|jdk	ræ|jræ|jjjdƒ}tjj|ƒd}|jƒ}|j|jƒqænd}	|jr|jjƒ}	|j
jƒn|jr^|jjƒ}	|jrN|jjj|jƒn|j
jƒn|jrÇ|j
jƒ}
|	dk	r’|
j |	Œn|jrÐ|jjj|
jƒ|jj!|
ƒqÐn	|j}
|jrì|j
j"|ƒn|j#r|j
j$ƒn|j%r|j
j&ƒn|j'r7|jj(ƒn|j)rh|jƒ}|
j*tjj|ƒƒn|jr|j
j+ƒn|j,dk	r£|j-|j,ƒndS(s…Apply the reconfiguration

        :param force: If true, the reconfiguration is applied even if it will
            destroy local changes.
        :raise errors.UncommittedChanges: if the local tree is to be destroyed
            but contains uncommitted changes.
        :raise errors.NoBindLocation: if no bind location was specified and
            none could be autodetected.
        s..iN(.RbR5R&R1R#R2R'Rt_formatt
initializeRtcreate_repositorytfetchR_R0RR\R]R^R6tuser_transporttcloneRt
ControlDirtopen_containing_from_transportR"R/tlast_revision_infotdestroy_branchttagstmerge_tot
create_branchtset_last_revision_infotupdate_referencestset_branch_referenceR3tdestroy_workingtreeR4tcreate_workingtreeR-tunbindR.tbindtdestroy_repositoryR7tset_make_working_trees(Rtforcetold_repotrepository_formattrepoRatupt	up_bzrdirtnew_repoRsR&t
bind_location((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyR3s€

						
												N(RRRR8tstaticmethodRBRDRGtclassmethodRKRORQRXR=RMR?RbR^R,R(((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyRKs )			(
		
	N(Rt
__future__RtbzrlibRRRRRRtbzrlib.i18nRtobjectRRR(((s6/usr/lib/python2.7/dist-packages/bzrlib/reconfigure.pyt<module>s.

Copyright © 2017 || Recoded By Mr.Bumblebee