-=[ Mr. Bumblebee ]=-
_Indonesia_

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

σ
	ƒ_Oc@@sˆddlmZddlZddlmZddlmZmZddlm	Z	ddl
mZddlZde	fd„ƒYZ
dS(	i(tabsolute_importN(twarn(terrorstosutils(tTransportStore(tmuttertVersionedFileStorecB@sΕeZdZeedddied„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd„Zdd	„Z
edd
„Zd„Zd„Zdddd
„Zdddd„Zd„ZRS(s2Collection of many versioned files in a transport.c		C@s\tt|ƒj|d|d|d|dtd|ƒ||_||_||_d|_dS(Ntdir_modet	file_modetprefixedt
compressedtescaped(	tsuperRt__init__tFalset	_precioust_versionedfile_classt_versionedfile_kwargstNonet	get_scope(	tselft	transportR	tpreciousRRtversionedfile_classtversionedfile_kwargsR((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyR
(s			cC@s
|j|ƒS(s/Return the path relative to the transport root.(t_relpath(Rtfile_id((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pytfilename6scc@s«|jjƒ}tƒ}xŒ|jƒD]~}xu|D]m}|j|ƒr2tjj|t|ƒ ƒ}|j	j
|ƒd}||kr›|j|ƒ|VnPq2q2Wq%WdS(Ni(Rtget_suffixestsett_iter_files_recursivetendswithtostpathtbasenametlent_mappertunmaptadd(Rtsuffixestidstrelpathtsuffixt
escaped_idR((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyt__iter__:s	

cC@sM|jjƒ}|j|ƒ}x(|D] }|jj||ƒs%tSq%WtS(N(RRRt
_transportthasRtTrue(RRR'RR*((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pythas_idHs
cC@s2|j|ƒr"|j||ƒn|j||ƒS(sBGet an empty weave, which implies deleting the existing one first.(R0tdeletetget_weave_or_empty(RRttransaction((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyt	get_emptyPscC@sG|jjƒ}|j|ƒ}x"|D]}|jj||ƒq%WdS(sRemove file_id from the store.N(RRRR-R1(RRR3R'RR*((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyR1Vs
cC@s|jj|j|ƒƒS(N(R-tgetR(RR((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyt_get]scC@s—|j|ƒ}y |jj||d|jƒSWnatjk
r’|jsQ‚n|jjtj	j
|ƒd|jƒ|jj||d|jƒSXdS(Ntmode(RR-tput_filet
_file_modeRt
NoSuchFilet	_prefixedtmkdirR R!tdirnamet	_dir_mode(RRtftfn((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyt_put`s 	%cC@s‘|dkr|j|ƒ}n|jƒrW|j||j|jd|j|j}n6|j||j|jdtddd|j|j}|S(sReturn the VersionedFile for file_id.

        :param _filename: filename that would be returned from self.filename for
        file_id. This is used to reduce duplicate filename calculations when
        using 'get_weave_or_empty'. FOR INTERNAL USE ONLY.
        Rtcreatetaccess_modetrN(	RRt	writeableRR-R9RRR(RRR3t	_filenametw((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyt	get_weavejs		c	C@sύ|r)|j|ƒr)|j||ƒn|dkrG|j|ƒ}ny4|j||j|jdtd|j|j	}Wn{t
jk
rψ|js‚nt
j|ƒ}|jj|d|jƒ|j||j|jdtd|j|j	}nX|S(sύMake a new versioned file.

        :param _filename: filename that would be returned from self.filename for
        file_id. This is used to reduce duplicate filename calculations when
        using 'get_weave_or_empty'. FOR INTERNAL USE ONLY.
        RBRR7N(R0R1RRRR-R9R/RRRR:R;RR=R<R>(RRR3t
known_missingRFtweaveR=((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyt_make_new_versionedfile€s"	cC@sc|j|ƒ}y|j||d|ƒSWn3tjk
r^|j||dtd|ƒ}|SXdS(s4Return a weave, or an empty one if it doesn't exist.RFRIN(RRHRR:RKR/(RRR3RFRJ((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyR2žscC@sN|j||ƒ}|j|jg|jƒD]}|f^q+dtƒƒdS(s-Preserved here for upgrades-to-weaves to use.ttopologicalN(RKtinsert_record_streamtget_record_streamtversionsR(RRRJR3tmyweavetversion((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyt
_put_weave­sc	C@sξ|d
krtdddƒn|d
kr>tdddƒn|jƒs\tj|ƒ‚ng}xCt|ƒD]5\}}|r—|jd||ƒn|j|ƒqoW|r»|jƒnt	d|ƒ|j
||d|d|d	|ƒd
S(s0Copy all the file ids from store_from into self.s?Please pass from_transaction into versioned_store.copy_all_ids.t
stacklevelis=Please pass to_transaction into versioned_store.copy_all_ids.s
listing filesscopy_all ids: %rtpbtfrom_transactiontto_transactionN(RRtlistableRtUnlistableStoret	enumeratetupdatetappendtclearRt
copy_multi(Rt
store_fromRTRURVR(tcountR((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pytcopy_all_ids΄s&	
	


cC@s0ddlm}|d
kr;tdtddƒ|ƒ}n|d
krftdtddƒ|ƒ}ntjjjƒ}z¦xŸt	|ƒD]‘\}}t
d||ƒ|jd|t|ƒƒ|j
||ƒ}	|j||ƒ}
|	j|
jg|
jƒD]}|f^qϊd	tƒƒqˆWWd
|jƒXd
S(s“Copy all the versions for multiple file_ids from from_store.

        :param from_transaction: required current transaction in from_store.
        i(tPassThroughTransactionstVersionedFileStore.copy_multi without a from_transaction parameter is deprecated. Please provide a from_transaction.RSispVersionedFileStore.copy_multi without a to_transaction parameter is deprecated. Please provide a to_transaction.scopy weave {%s} into %stcopyRLN(tbzrlib.transactionsRaRRtDeprecationWarningtbzrlibtuit
ui_factorytnested_progress_barRYRRZR#RKRHRMRNRORtfinished(Rt
from_storetfile_idsRTRURVRaR_R?ttargettsourceRQ((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyR]Λs,cC@s8tt|ƒjƒ\}}|t|jjƒƒ|fS(N(RRt
total_sizeR#RR(RR_tbytes((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyRnρsN(t__name__t
__module__t__doc__RRR
RR,R0R4R1R6RARHRKR2RRR`R]Rn(((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyR#s,
							
		%(t
__future__RR twarningsRReRRtbzrlib.storeRtbzrlib.traceRt	bzrlib.uiR(((sC/usr/lib/python2.7/dist-packages/bzrlib/store/versioned/__init__.pyt<module>s

Copyright © 2017 || Recoded By Mr.Bumblebee