�t�c@sbddlZddlZddlZddlZddlZddlZdefd��YZdS(i�Nt sshservercBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
d �Zd
�Zd�Z
iee6e ej6e
ej6eej6eej6Zd�Zd
�Zd�Zd�Zd�ZRS(cCsz||_||_d|_|j|_|j|_tjt�|j |_|j_t
j|j�t
j|j�dS(N(tuitrepotNonetlocktfintfoutthooktredirecttTruetferrtutilt setbinary(tselfRR((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pyt__init__
s
cCs6i}|j�}xtt|��D]�|jj�d }|j�\}}||krrtjd|��n|dkr�}xatt|��D]M} |jj�d }|j�\}}|jjt|��}
|
||<q�W||d<q%|jjt|��}
|
||<q%Wg|D]} || ^q"S(Ni�sunexpected parameter %rt*( tsplittxrangetlenRtreadlineRtAborttinttread(R
targstdatatkeystntarglinetargtltstartktval((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pytgetargss$
cCs|j|�dS(Ni(R!(R
tname((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pytgetarg0scCsa|jd�t|jj��}x8|r\|j|jj|��t|jj��}q%WdS(Nt(tsendresponseRRRtwriteR(R
tfpouttcount((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pytgetfile3s
cCsdS(N((R
((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pyR:sccs/x(tr*|jd�}|s"Pn|VqWdS(Ni(R R(R
tchangegrouptd((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pytgroupchunks=s
cCs;|jjdt|��|jj|�|jj�dS(Ns%d
(RR&Rtflush(R
tv((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pyR%DscCs;|jj}x|jD]}||�qW|jj�dS(N(RR&tgenR-(R
tsourceR&tchunk((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pyt
sendstreamIscCs'|jd�|jt|j��dS(NR$(R%tstrtres(R
trsp((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pytsendpushresponseOs
cCs|j|j�dS(N(R%R4(R
R5((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pyt
sendpusherrorSscCsK|jjjd|j�|jjj�|jjd�|jj�dS(Ns%s
-
s
(RR
R&tmessageR-R(R
R5((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pytsendooberrorVscCsKzx|j�rqWWd|jdk r9|jj�nXtjd�dS(Ni(t serve_oneRRtreleasetsystexit(R
((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pyt
serve_forever\scCs�|jj�d }|rZ|tjkrZtj|j||�}|j|j||�nZ|r�t|d|d�}|r�|�}|dk r�|j
|�q�q�|j
d�n|dkS(Ni�tdo_R$(RRt wireprototcommandstdispatchRthandlerst __class__tgetattrRR%(R
tcmdR5timpltr((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pyR:ms cCs|jj�|_dS(s<DEPRECATED - allowing remote client to lock repo is not safeR$(RR(R
((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pytdo_lock{scCs&|jr|jj�nd|_dS(t
DEPRECATEDR$N(RR;R(R
((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pyt do_unlock�s cCsq|js|jd�dS|jd�tj|jd�}|jj|d|j��}|jj�t |�S(RJs
not lockedNR$tUNtserve(
RR%R*t
unbundle10RRtaddchangegroupt_clientR;R3(R
tcgRH((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pytdo_addchangegroup�s
cCs-tjjdd�jdd�d}d|S(Nt
SSH_CLIENTR$t iisremote:ssh:(tostenvirontgetR(R
tclient((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pyRP�s%(t__name__t
__module__RR!R#R)RR,R%R2R6R7R9R>R3R@t streamrestpushrestpusherrtooberrorRCR:RIRKRRRP(((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pyRs.
(RRR@R*RUR<tobjectR(((s7/sys/lib/python2.7/site-packages/mercurial/sshserver.pyt<module> s0
|