-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
î:ïNc@@s–dZddlmZddlZddlZddlmZddlmZm	Z	m
Z
ddlZddlm
Z
dejjfd„ƒYZdS(	s›A store that keeps the full text of every version.

This store keeps uncompressed versions of the full text. It does not
do any sort of delta compression.
i(tabsolute_importN(tosutils(tBzrErrort
NoSuchFilet
FileExists(tmuttert	TextStorecB@sDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(sStore that holds files indexed by unique names.

    Files can be added, but not modified once they are in.  Typically
    the hash is used as the name, or something else known to be unique,
    such as a UUID.

    Files are stored uncompressed, with no delta compression.
    cC@s—ddlm}ddlm}t|tƒr>||ƒ}n|ƒ}tjddd|ƒ}|||ƒ|jƒ|j	dƒ|j
||ƒdS(Ni(tStringIO(tpumpfiletmodetwbtfileobj(t	cStringIORtbzrlib.osutilsRt
isinstancet
basestringtgziptGzipFiletclosetseekt_try_put(tselftfntfRRtsiotgf((s5/usr/lib/python2.7/dist-packages/bzrlib/store/text.pyt_add_compressed-s	


cC@s0|jr|j||ƒn|j||ƒdS(N(t_compressedRR(RRR((s5/usr/lib/python2.7/dist-packages/bzrlib/store/text.pyt_add=s	cC@s y |jj||d|jƒWnytk
r›|js?‚ny)|jjtjj|ƒd|j	ƒWnt
k
r{nX|jj||d|jƒnXdS(NR	(t
_transporttput_filet
_file_modeRt	_prefixedtmkdirtostpathtdirnamet	_dir_modeR(RRR((s5/usr/lib/python2.7/dist-packages/bzrlib/store/text.pyRCs 
	)
cC@s0|jdƒr|j|ƒS|jj|ƒSdS(Ns.gz(tendswitht_get_compressedRtget(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/store/text.pyt_getOs
cC@sZt|tƒo|j|jks@tt|ƒj||||ƒStd||ƒ|j||ƒ}|dkr‹t|dt	|ƒƒ‚ny(|j
j|g|j
d|jƒ}Wn~t
k
r3|jsÒ‚ny&|j
jtj|ƒd|jƒWntk
rnX|j
j|g|j
d|jƒ}nX|dkrVtd|fƒ‚ndS(Ns_copy_one: %r, %rt-R	isUnable to copy file: %r(RRR tsupert	_copy_oneRt	_get_nametNonetKeyErrortstrRtcopy_toRRR!RR$R%RR(RtfileidtsuffixtothertpbR#tresult((s5/usr/lib/python2.7/dist-packages/bzrlib/store/text.pyR,Us*
	&
cC@sŽ|jj|ƒ}t|ddƒdk	r@tjddd|ƒSz<ddlm}||jƒƒ}tjddd|ƒSWd|j	ƒXdS(s/Returns a file reading from a particular entry.ttellR	trbRi(RN(
RR(tgetattrR.RRRRtreadR(RtfilenameRRR((s5/usr/lib/python2.7/dist-packages/bzrlib/store/text.pyR'rs(	t__name__t
__module__t__doc__RRRR)R,R'(((s5/usr/lib/python2.7/dist-packages/bzrlib/store/text.pyR#s					(R>t
__future__RRR"tbzrlibRt
bzrlib.errorsRRRtbzrlib.storetbzrlib.traceRtstoretTransportStoreR(((s5/usr/lib/python2.7/dist-packages/bzrlib/store/text.pyt<module>s

Copyright © 2017 || Recoded By Mr.Bumblebee