��c@s
ddlmZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
Z
ddlZdefd��YZd�Zdejfd��YZdejfd ��YZd
�ZdS(i�(t_NthttprangereadercBs8eZd�Zd�Zdd�Zd�Zd�ZRS(cCs(||_d|_||_||_dS(Ni(turltpostopenertname(tselfRR((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyt__init__s cCs
||_dS(N(R(RR((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pytseekscsztj|j�}d}|r2|j|d}n|jsA|ra|jdd|j|f�ny@|jj|���j�}t�d�fd���}Wnntj k
r�}|j
dkr�tjp�d}t||��n,tjk
r}td|jd��nX|dkrN|r>||j|j|!}qa||j}n|ra|| }n|jt|�7_|S( NtitRangesbytes=%d-%stgetcodecst�dd�S(Ntcodei�(tgetattr((tf(s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyt<lambda>'si�i�(turllib2tRequestRRt
add_headerRtopentreadR
t HTTPErrorRterrnotENOENTtNonetIOErrortURLErrortreasontlen(RtbytestreqtendtdataRtinsttnum((Rs</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyRs. "
cCst|j�jd��S(Ni(titerRt
splitlines(R((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyt__iter__9scCsdS(N((R((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pytclose;sN(t__name__t
__module__RRRRR%R&(((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyRs
! csHtj||���jtj��dtjf�fd��Y}|S(Nt
statichttpvfscs/eZd�Zdd�fd�Zd�ZRS(cSs
||_dS(N(tbase(RR*((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyRDstrcsI|dkrtd��ndj|jtj|�f�}t|��S(NR+trbsPermission deniedt/(R+srb(RtjoinR*turllibtquoteR(Rtpathtmodet
atomictempR(t urlopener(s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyt__call__Gs!cSs'|rtjj|j|�S|jSdS(N(tosR1R.R*(RR1((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyR.MsN(R'R(RRR5R.((R4(s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyR)Cs (RRtadd_handlert byterangetHTTPRangeHandlertscmutiltabstractvfs(tuitauthinfoR)((R4s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pytbuild_opener>ststatichttppeercBseZd�Zd�ZRS(cCsdS(N(R(R((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pytlocalVscCstS(N(tFalse(R((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pytcanpushXs(R'R(R@RB(((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyR?Us tstatichttprepositorycBsAeZd�Zd�Zd�Zd�Zd�Zed�ZRS(c
Cs
||_||_||_tj|jd�d�}|j�\|_}t||�}||j�|_ |j |_
g|_ytj
|j |j�}Wn�tk
rK}|jtjkr��nt�}y*|j d�}|jd�|j�WqLtk
rG}|jtjkr%�ntd�|} tj| ��qLXnXtj||j|�|_|jj|_|jj |_|j|_|jj|_i|_||_t j |j�|_ t!j!|j�|_!d|_#d|_$i|_%d|_&d|_'dS(NR-s/.hgs
00changelog.iis+'%s' does not appear to be an hg repository((t_urlR<troottutilRtrstripR=R1R>Rtvfst_phasedefaultsR:treadrequirest supportedRRRtsetRR&Rterrort RepoErrortstoretspathtsopenertsvfsR.tsjoint
_filecachetrequirementstmanifestt changelogRt_tagst
nodetagscachet
_branchcachest
encodepatst
decodepats(
RR<R1tuR=RRUR!tfptmsg((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyR\sL
cCs|jdg�S(Ntpushkey(t
difference(Rtcaps((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyt_restrictcapabilities�scCs|jS(N(RD(R((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyR�scCstS(N(RA(R((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyR@�scCs
t|�S(N(R?(R((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pytpeer�scCstjtd���dS(Ns"cannot lock static-http repository(RFtAbortR(Rtwait((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pytlock�s( R'R(RRcRR@RdtTrueRg(((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyRC[s 1 cCs/|rtjtd���nt||d�S(Ns(cannot create new static-http repositoryi(RFReRRC(R<R1tcreate((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pytinstance�s(ti18nRRWR8RRMt localrepoRVRFR:ROR/RRR6tobjectRR>t localpeerR?tlocalrepositoryRCRj(((s</sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyt<module>
s0<0/ A
|