Plan 9 from Bell Labs’s /usr/web/sources/contrib/bichued/root/sys/lib/python/mercurial/statichttprepo.pyc

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


�
�c@s�ddklZddkZddkZddkZddkZddkZddkZddkZddk	Z	ddk
Z
ddkZddkZde
fd��YZd�Zdeifd��YZd�ZdS(	i�(t_NthttprangereadercBs&eZd�Zd�Zdd�ZRS(cCs||_d|_||_dS(Ni(turltpostopener(tselfRR((s+/sys/lib/python/mercurial/statichttprepo.pyt__init__s		cCs
||_dS(N(R(RR((s+/sys/lib/python/mercurial/statichttprepo.pytseeksc	Cs�ti|i�}d}|o|i|d}n|idd|i|f�ye|ii|�}|i�}t|d�o|i	�}n$t|d�o
|i
}nd}Wnttij
o8}|i
djo
ti
pd}t||��n/tij
o}td|id��nX|d	jo3|o||i|i|!}q�||i}n|o|| }n|it|�7_|S(
NtitRangesbytes=%d-%stgetcodetcodei�i�i�(turllib2tRequestRRt
add_headerRtopentreadthasattrR
Rt	HTTPErrorterrnotENOENTtNonetIOErrortURLErrortreasontlen(	RtbytestreqtendtftdataRtinsttnum((s+/sys/lib/python/mercurial/statichttprepo.pyRs4

 
N(t__name__t
__module__RRRR(((s+/sys/lib/python/mercurial/statichttprepo.pyRs		cs8ti||���iti���fd�}|S(Ncs|�d��fd�}|S(s,return a function that opens files over httptrcs+di�ti|�f�}t|��S(Nt/(tjointurllibtquoteR(tpathtmodeR(t	urlopenertp(s+/sys/lib/python/mercurial/statichttprepo.pytoDs((tbaseR,(R*(R+s+/sys/lib/python/mercurial/statichttprepo.pyRAs(RRtadd_handlert	byterangetHTTPRangeHandler(tuitauthinfoR((R*s+/sys/lib/python/mercurial/statichttprepo.pytbuild_opener<ststatichttprepositorycBs/eZd�Zd�Zd�Zed�ZRS(c

Cs�||_||_ti|id�d�\|_}t||�}||i�|_y|id�i�i	�}Wn�t
j
o�}|itijo�ny|id�id�WnNt
j
oB}|itijo�nt
d�|}ti|��nXg}nXx;|D]3}||ijotit
d�|��q!q!Wd�}	ti||i||	�|_|ii|_|ii|_|ii|_ti|i�|_ti|i�|_d|_d|_d|_d|_dS(	NR$s/.hgtrequiress
00changelog.iis+'%s' does not appear to be an hg repositorysrequirement '%s' not supportedcSs|d|S(NR$((tatb((s+/sys/lib/python/mercurial/statichttprepo.pytpjoinls(t_urlR1RtgetauthinfotrstripR(R3RRt
splitlinesRRRRterrort	RepoErrort	supportedtstoretspathtsopenerR%tsjointmanifestt	changelogRt_tagst
nodetagscachet
encodepatst
decodepats(
RR1R(R2RtrequirementsRtmsgR#R8((s+/sys/lib/python/mercurial/statichttprepo.pyRLsB		%!				cCs|iS(N(R9(R((s+/sys/lib/python/mercurial/statichttprepo.pyRzscCstS(N(tFalse(R((s+/sys/lib/python/mercurial/statichttprepo.pytlocal}scCstitd���dS(Ns"cannot lock static-http repository(tutiltAbortR(Rtwait((s+/sys/lib/python/mercurial/statichttprepo.pytlock�s(R!R"RRRMtTrueRQ(((s+/sys/lib/python/mercurial/statichttprepo.pyR4Ks	.		cCs1|otitd���nt||d�S(Ns(cannot create new static-http repositoryi(RNRORR4(R1R(tcreate((s+/sys/lib/python/mercurial/statichttprepo.pytinstance�s(ti18nRRER/RR=t	localrepoRDRNR@R&RRtobjectRR3tlocalrepositoryR4RT(((s+/sys/lib/python/mercurial/statichttprepo.pys<module>
s00$-	8

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].