-=[ Mr. Bumblebee ]=-
_Indonesia_

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

๓
๎:๏Nc@@sLdZddlmZddlmZdejfd„ƒYZd„ZdS(sฅImplementation of Transport that traces transport operations.

This does not change the transport behaviour at all, merely records every call
and then delegates it.
i(tabsolute_import(t	decoratortTransportTraceDecoratorcB@s%eZdZddd„Zdd„Zdd„Zd„Zd„Ze	d„ƒZ
d„Zd„Zd	„Z
d
„Zdd„Zdd„Zdd
„Zdd„Zdedd„Zd„Zd„Zd„Zedd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(sA tracing decorator for Transports.

    Calls that potentially perform IO are logged to self._activity. The
    _activity attribute is shared as the transport is cloned, but not if a new
    transport is created without cloning.

    Not all operations are logged at this point, if you need an unlogged
    operation please add a test to the tests of this transport, for the logging
    of the operation you want logged.

    See also TransportLogDecorator, that records a machine-readable log in 
    memory for eg testing.
    cC@sAtt|ƒj||ƒ|dkr1g|_n|j|_dS(spSet the 'base' path where files will be stored.

        _decorated is a private parameter for cloning.
        N(tsuperRt__init__tNonet	_activity(tselfturlt
_decoratedt_from_transport((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR+scC@s|jj||d|ƒS(sSee Transport.append_file().tmode(R	tappend_file(RtrelpathtfR((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR8scC@s|jj||d|ƒS(sSee Transport.append_bytes().R(R	tappend_bytes(RR
tbytesR((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR<scC@s&|jjd|fƒ|jj|ƒS(sSee Transport.delete().tdelete(RtappendR	R(RR
((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR@scC@s|jj|ƒS(sSee Transport.delete_tree().(R	tdelete_tree(RR
((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyREscC@sdS(s-Tracing transports are identified by 'trace+'strace+((R((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyt_get_url_prefixIscC@s#|jd|fƒ|jj|ƒS(sSee Transport.get().tget(t_traceR	R(RR
((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyRNscC@s
|jjƒS(N(R	tget_smart_client(R((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyRSscC@s|jj|ƒS(sSee Transport.has().(R	thas(RR
((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyRVscC@s
|jjƒS(sSee Transport.is_readonly.(R	tis_readonly(R((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyRZscC@s)|jd||fƒ|jj||ƒS(sSee Transport.mkdir().tmkdir(RR	R(RR
R((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR^scC@s|jj|d|ƒS(s See Transport.open_write_stream.R(R	topen_write_stream(RR
R((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyRcscC@s|jj|||ƒS(sSee Transport.put_file().(R	tput_file(RR
RR((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyRgscC@s5|jd|t|ƒ|fƒ|jj|||ƒS(sSee Transport.put_bytes().t	put_bytes(RtlenR	R(RR
RR((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyRksc	C@sJ|jd|t|ƒ|||fƒ|jj||d|d|d|ƒS(s#See Transport.put_bytes_non_atomic.tput_bytes_non_atomicRtcreate_parent_dirtdir_mode(RRR	R(RR
RRR R!((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyRps
cC@s
|jjƒS(sSee Transport.listable.(R	tlistable(R((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR"xscC@s
|jjƒS(s%See Transport.iter_files_recursive().(R	titer_files_recursive(R((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR#|scC@s|jj|ƒS(sSee Transport.list_dir().(R	tlist_dir(RR
((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR$€scC@s5|jd||||fƒ|jj||||ƒS(Ntreadv(RR	R%(RR
toffsetstadjust_for_latencytupper_limit((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR%„s
cC@s
|jjƒS(s&See Transport.recommended_page_size().(R	trecommended_page_size(R((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR)scC@s,|jjd||fƒ|jj||ƒS(Ntrename(RRR	R*(Rtrel_fromtrel_to((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR*‘scC@s#|jd|fƒ|jj|ƒS(sSee Transport.rmdir.trmdir(RR	R-(RR
((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR-•scC@s|jj|ƒS(sSee Transport.stat().(R	tstat(RR
((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR.šscC@s|jj|ƒS(sSee Transport.lock_read.(R	t	lock_read(RR
((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR/žscC@s|jj|ƒS(sSee Transport.lock_write.(R	t
lock_write(RR
((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyR0ขscC@s|jj|ƒdS(szRecord that a transport operation occured.

        :param operation: Tuple of transport call name and arguments.
        N(RR(Rtoperation_tuple((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyRฆsN( t__name__t
__module__t__doc__RRRRRRtclassmethodRRRRRRRRRtFalseRR"R#R$R%R)R*R-R.R/R0R(((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyRs:

															cC@s ddlm}t|jfgS(s.Return the permutations to be used in testing.i(ttest_server(tbzrlib.testsR7RtTraceServer(R7((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pytget_test_permutationsฎsN(R4t
__future__Rtbzrlib.transportRtTransportDecoratorRR:(((s:/usr/lib/python2.7/dist-packages/bzrlib/transport/trace.pyt<module>s’

Copyright © 2017 || Recoded By Mr.Bumblebee