-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
î:ïNc@@sµdZddlmZddlZddlmZddlmZddlmZd„Z	d„Z
d	ejfd
„ƒYZdefd„ƒYZ
d
efd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZd!efd"„ƒYZd#efd$„ƒYZd%efd&„ƒYZdS('svVFS operations for the smart server.

This module defines the smart server methods that are low-level file operations
-- i.e. methods that operate directly on files and directories, rather than
higher-level concepts like branches and revisions.

These methods, plus 'hello' and 'get_bundle', are version 1 of the smart server
protocol, as implemented in bzr 0.11 and later.
i(tabsolute_importN(terrors(turlutils(trequestcC@s|dkrdSt|ƒSdS(Nt(tNonetint(tmode((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyt_deserialise_optional_mode$scC@s
dtjkS(sŽIs the VFS enabled ?

    the VFS is disabled when the BZR_NO_SMART_VFS environment variable is set.

    :return: True if it is enabled.
    tBZR_NO_SMART_VFS(tostenviron(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pytvfs_enabled-st
VfsRequestcB@s eZdZd„Zd„ZRS(s`Base class for VFS requests.

    VFS requests are disabled if vfs_enabled() returns False.
    cC@s%tƒs!tj|jjƒ‚ndS(N(RRtDisabledMethodt	__class__t__name__(tself((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyt_check_enabled=s	cC@s(tjj||ƒ}ttj|ƒƒS(N(RtSmartServerRequestttranslate_client_pathtstrRtunescape(Rtrelpathtx((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyRAs(Rt
__module__t__doc__RR(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR
7s	t
HasRequestcB@seZd„ZRS(cC@s=|j|ƒ}|jj|ƒr'dp*d}tj|fƒS(Ntyestno(Rt_backing_transportthasRtSuccessfulSmartServerResponse(RRtr((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pytdoLs(RRR"(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyRJst
GetRequestcB@seZd„ZRS(cC@s1|j|ƒ}|jj|ƒ}tjd|ƒS(Ntok(sok(RRt	get_bytesRR (RRt
backing_bytes((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"Ts(RRR"(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR#Rst
AppendRequestcB@seZd„Zd„ZRS(cC@s+|j|ƒ}||_t|ƒ|_dS(N(Rt_relpathRt_mode(RRR((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"\s	cC@s5|jj|j||jƒ}tjdd|fƒS(Ntappendeds%d(Rtappend_bytesR(R)RR (Rt
body_bytest
old_length((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pytdo_bodyas	(RRR"R.(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR'Zs	t
DeleteRequestcB@seZd„ZRS(cC@s,|j|ƒ}|jj|ƒtjdƒS(NR$(sok(RRtdeleteRR (RR((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"is(RRR"(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR/gstIterFilesRecursiveRequestcB@seZd„ZRS(cC@s`|jdƒs|d7}n|j|ƒ}|jj|ƒ}|jƒ}tjdt|ƒƒS(Nt/tnames(snames(tendswithRRtclonetiter_files_recursiveRR ttuple(RRt	transportt	filenames((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"qs
(RRR"(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR1ostListDirRequestcB@seZd„ZRS(cC@sT|jdƒs|d7}n|j|ƒ}|jj|ƒ}tjdt|ƒƒS(NR2R3(snames(R4RRtlist_dirRR R7(RRR9((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"|s

(RRR"(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR:zstMkdirRequestcB@seZd„ZRS(cC@s5|j|ƒ}|jj|t|ƒƒtjdƒS(NR$(sok(RRtmkdirRRR (RRR((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"†s
(RRR"(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR<„stMoveRequestcB@seZd„ZRS(cC@s>|j|ƒ}|j|ƒ}|jj||ƒtjdƒS(NR$(sok(RRtmoveRR (Rtrel_fromtrel_to((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"s(RRR"(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR>st
PutRequestcB@seZd„Zd„ZRS(cC@s+|j|ƒ}||_t|ƒ|_dS(N(RR(RR)(RRR((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"˜s	cC@s)|jj|j||jƒtjdƒS(NR$(sok(Rt	put_bytesR(R)RR (RR,((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR.s(RRR"R.(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyRB–s	tPutNonAtomicRequestcB@seZd„Zd„ZRS(cC@sI|j|ƒ}||_t|ƒ|_t|ƒ|_|dk|_dS(NtT(RR(Rt	_dir_modeR)t_create_parent(RRRt
create_parenttdir_mode((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"¤s
	c	C@s>|jj|j|d|jd|jd|jƒtjdƒS(NRtcreate_parent_dirRIR$(sok(Rtput_bytes_non_atomicR(R)RGRFRR (RR,((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR.¬s		
(RRR"R.(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyRD¢s	tReadvRequestcB@s#eZd„Zd„Zd„ZRS(cC@s|j|ƒ}||_dS(N(RR((RR((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"·scC@sJ|j|ƒ}djd„|jj|j|ƒDƒƒ}tjd|ƒS(s#accept offsets for a readv request.Rcs@s|]\}}|VqdS(N((t.0toffsettbytes((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pys	<genexpr>¾streadv(sreadv(t_deserialise_offsetstjoinRRPR(RR (RR,toffsetsR&((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR.»scC@sdg}xW|jdƒD]F}|s(qn|jdƒ\}}|jt|ƒt|ƒfƒqW|S(Ns
t,(tsplittappendR(RttextRStlinetstarttlength((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyRQÂs#(RRR"R.RQ(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyRLµs		t
RenameRequestcB@seZd„ZRS(cC@s>|j|ƒ}|j|ƒ}|jj||ƒtjdƒS(NR$(sok(RRtrenameRR (RR@RA((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"Ïs(RRR"(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR[ÍstRmdirRequestcB@seZd„ZRS(cC@s,|j|ƒ}|jj|ƒtjdƒS(NR$(sok(RRtrmdirRR (RR((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"Øs(RRR"(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR]ÖstStatRequestcB@seZd„ZRS(cC@se|jdƒs|d7}n|j|ƒ}|jj|ƒ}tjdt|jƒt|j	ƒfƒS(NR2tstat(
R4RRR`RR Rtst_sizetocttst_mode(RRR`((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR"às
(RRR"(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyR_Þs(Rt
__future__RR
tbzrlibRRtbzrlib.smartRRRRR
RR#R'R/R1R:R<R>RBRDRLR[R]R_(((s4/usr/lib/python2.7/dist-packages/bzrlib/smart/vfs.pyt<module>s,			


			

Copyright © 2017 || Recoded By Mr.Bumblebee