Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/mercurial/statichttprepo.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��c@s
ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
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�tjp�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	HTTPErrorRterrnotENOENTtNonetIOErrortURLErrortreasontlen(RtbytestreqtendtdataRtinsttnum((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.pytbuild_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|_ytj
|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:treadrequirest	supportedRRRtsetRR&Rterrort	RepoErrortstoretspathtsopenertsvfsR.tsjoint
_filecachetrequirementstmanifestt	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

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.