-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/commandserver.pyc

ó
Ì\,Tc@s­ddlmZddlZddlZddlZddlZddlZddlZda	d„Z
defd„ƒYZdefd„ƒYZ
defd	„ƒYZdS(
iÿÿÿÿ(t_NcGs<ts
dSx!|D]}tjt|ƒƒqWtjƒdS(N(tlogfiletwritetstrtflush(targsta((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pytlogs

tchanneledoutputcBs)eZdZd„Zd„Zd„ZRS(sg
    Write data from in_ to out in the following format:

    data length (unsigned int),
    data
    cCs||_||_||_dS(N(tin_touttchannel(tselfR	R
R((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyt__init__s		cCsS|s
dS|jjtjd|jt|ƒƒƒ|jj|ƒ|jjƒdS(Ns>cI(R
RtstructtpackRtlenR(Rtdata((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyR$s
(cCs+|dkrt|ƒ‚nt|j|ƒS(Ntisattytfileno(sisattysfileno(tAttributeErrortgetattrR	(Rtattr((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyt__getattr__+s(t__name__t
__module__t__doc__R
RR(((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyRs		tchanneledinputcBsYeZdZdZd„Zdd„Zd„Zdd„Zd„Zd	„Z	d
„Z
RS(s/
    Read data from in_.

    Requests for input are written to out in the following format:
    channel identifier - 'I' for plain input, 'L' line based (1 byte)
    how many bytes to send at most (unsigned int),

    The client replies with:
    data length (unsigned int), 0 meaning EOF
    data
    iicCs||_||_||_dS(N(R	R
R(RR	R
R((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyR
?s		iÿÿÿÿcCsw|dkr`|j}|j||jƒ}|}x)|r[|j||jƒ}||7}q3W|S|j||jƒSdS(Ni(tmaxchunksizet_readR(Rtsizetstbuf((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pytreadDs		cCsŽ|s
dS|dkst‚|jjtjd||ƒƒ|jjƒ|jjdƒ}tjd|ƒd}|szdS|jj|ƒSdS(Ntis>cIis>I(	tAssertionErrorR
RRRRR	R!tunpack(RRRtlength((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyRSs
cCs~|dkrj|j}|j|dƒ}|}x6|re|ddkre|j|dƒ}||7}q0W|S|j|dƒSdS(NitLiÿÿÿÿs
(RR(RRRR ((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pytreadlinecs	cCs|S(N((R((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyt__iter__rscCs|jƒ}|st‚n|S(N(R't
StopIteration(Rtl((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pytnextus	cCs+|dkrt|ƒ‚nt|j|ƒS(NRR(sisattysfileno(RRR	(RR((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyR{si(RRRRR
R!RR'R(R+R(((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyR0s				tservercBsXeZdZd„Zd„Zd„Zd„Zd„Zied6ed6Zd„Z	RS(	sq
    Listens for commands on stdin, runs them and writes the output on a channel
    based stream to stdout.
    cCsJtjƒ|_|jdddƒ}|rc|dkrQttjtjdƒaqct	|dƒan|r|j
|_||_|j|_
n||_d|_|_
|dkr-ttjtjdƒ|_ttjtjdƒ|_ttjtjd	ƒ|_ttjtjd
ƒ|_tj|_ntjtdƒ|ƒ‚dS(Nt	cmdserverRt-tdRtpipetetotItrsunknown mode %s(tostgetcwdtcwdtconfigtNoneRtsyststdoutRtopentbaseuituitrepotrepouitstderrtcerrtcoutRtstdintcintcresulttclienttutiltAbortR(RR>R?tmodetlogpath((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyR
…s&		cCs/|s
dS|jj|ƒ}|s+t‚n|S(NR"(RGR!tEOFError(RRR((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyR¥s	c	Csztjd|jdƒƒd}|s.g}n|j|ƒjdƒ}|jjƒ}|g}|jrÊ||j_|jj	|jƒ}|j|_|j
|ƒ||j_|jj_|jj
ƒnx$|D]}|jddddƒqÑWtj|||j|j|j|jƒ}tj|ƒp.dd	@}d
|krTtj|jƒn|jjtjdt|ƒƒƒdS(
sk reads a list of  terminated arguments, executes
        and writes the return code to the result channel s>IiitR>tnonttyttruet
commandserveriÿs--cwds>iN(RR$RtsplitR>tcopyR?R=R@t	__class__tappendtdirstatet_uit
invalidateallt	setconfigtdispatchtrequestRERCRBR5tchdirR7RFRRtint(	RR%RtcopieduituisR@R>treqtret((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyt
runcommand±s*			

cCs|jjtjƒdS(s3 writes the current encoding to the result channel N(RFRtencoding(R((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pytgetencoding×scCsd|jjƒd }|rZ|jj|ƒ}|r>||ƒqZtjtdƒ|ƒ‚n|dkS(Niÿÿÿÿsunknown command %sR"(RGR'tcapabilitiestgetRHRIR(Rtcmdthandler((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pytserveoneÛs
RaRccCswddjt|jƒƒ}|d7}|dtj7}|jj|ƒyx|jƒr\qMWWntk
rrdSXdS(Nscapabilities: t s
s
encoding: ii(tjointsortedRdRbRCRRhRL(Rthellomsg((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pytserveës

(
RRRR
RRaRcRhRdRm(((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyR,€s	 		&		

(ti18nRRR:R5RYRbRHR9RRtobjectRRR,(((s;/usr/lib/python2.7/dist-packages/mercurial/commandserver.pyt<module>s$		P

Copyright © 2017 || Recoded By Mr.Bumblebee