MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 216.73.216.185
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /lib64/python2.7/site-packages/hgext/largefiles/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //lib64/python2.7/site-packages/hgext/largefiles/basestore.pyc
�
Hq�Qc@s�dZddlZddlmZmZmZddlmZddlZde	fd��YZ
defd��YZddl
Z
ddlZie
j
gd	6ejgd
6ejgd6ejgd6Zejd
�Zded�ZdS(sCbase class for store implementations and store-related utility codei����N(tutiltnodethg(t_t
StoreErrorcBs)eZdZd�Zd�Zd�ZRS(sZRaised when there is a problem getting files from or putting
    files to a central store.cCs(||_||_||_||_dS(N(tfilenamethashturltdetail(tselfRRRR((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyt__init__s			cCs&td�|j|j|j|jfS(Ns0error getting id %s from url %s for file %s: %s
(RRRRR(R	((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pytlongmessages	cCsd|j|jfS(Ns%s: %s(RR(R	((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyt__str__s(t__name__t
__module__t__doc__R
RR(((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyRs		t	basestorecBsJeZd�Zd�Zd�Zd�Zed�Zd�Zd�Z	RS(cCs||_||_||_dS(N(tuitrepoR(R	RRR((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyR
#s		cCstd��dS(s>Put source file into the store so it can be retrieved by hash.sabstract methodN(tNotImplementedError(R	tsourceR((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pytput(scCstd��dS(s�Check to see if the store contains the given hashes. Given an
        iterable of hashes it returns a mapping from hash to bool.sabstract methodN(R(R	thashes((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pytexists,sc
	CsCg}g}|j}tjtj|jd��d}|jtd�|D���}x�|D]�\}}|jt	d�|dddt
|��|d7}|jt	d	�||f�|j|�s�|j
t	d
�|||jf�|j|�q]ntj|j|�}	tj|	dd|jjj�}
y|j|
||�}Wn,tk
r{}|j
|j��d}nX|
j�||kr�|dkr�|j
t	d
�|||f�ntj|	d�|j|�q]ntj|	d|	�tj|j|�|j||f�q]W|jt	d�d�||fS(s�Get the specified largefiles from the store and write to local
        files under repo.root.  files is a list of (filename, hash)
        tuples.  Return (success, missing), lists of files successfully
        downloaded and those not found in the store.  success is a list
        of (filename, hash) tuples; missing is a list of filenames that
        we could not get.  (The detailed error message will already have
        been presented to the user, so missing is just supplied as a
        summary.)ticss|]\}}|VqdS(N((t.0t	_filenameR((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pys	<genexpr>Assgetting largefilestunittlfilettotalisgetting %s:%s
s'%s: largefile %s not available from %s
s.tmpt
createmodes*%s: data corruption (expected %s, got %s)
N(RRtmakedirstlfutilt	storepathRRtsettprogressRtlentnotetgettwarnRtappendtatomictempfiletstoreRt_getfileRRtclosetunlinktrenametlinktousercachetNone(
R	tfilestsuccesstmissingRtatt	availableRRt
storefilenamettmpfilethhashterr((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyR&1sJ		





c
Cs1t}|jjtd�t|��t�}xu|D]m}|j|}d|j�tj	|j��f}x2|D]*}|j
|||||�rut}ququWq6Wt|�}	ttg|D]\}
}|
^q���}|r|jjtd�|	|f�n |jjtd�|	|f�t|�S(s�Verify the existence (and, optionally, contents) of every big
        file revision referenced by every changeset in revs.
        Return 0 if all is well, non-zero on any errors.s'searching %d changesets for largefiles
s%d:%ss3verified contents of %d revisions of %d largefiles
s4verified existence of %d revisions of %d largefiles
(
tFalseRtstatusRR$R"RtrevRtshortt_verifyfiletTruetint(
R	trevstcontentstfailedtverifiedR<tcctxtcsettstandintnumrevstfnametfnodet	numlfiles((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pytverifyhs(	

%
+				cCstd��dS(sFetch one revision of one file from the store and write it
        to tmpfile.  Compute the hash of the file on-the-fly as it
        downloads and return the hash.  Close tmpfile.  Raise
        StoreError if unable to download the file (e.g. it does not
        exist in the store).sabstract methodN(R(R	R7RR((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyR+�scCstd��dS(spPerform the actual verification of a file in the store.
        'cset' is only used in warnings.
        'contents' controls verification of content hash.
        'standin' is the standin path of the largefile to verify.
        'verified' is maintained as a set of already verified files.
        Returns _true_ if it is a standin and any problems are found!
        sabstract methodN(R(R	RERFRBRGRD((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyR>�s(
R
RR
RRR&R:RLR+R>(((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyR"s				7	tfilethttpthttpstsshs^([a-zA-Z0-9+-.]+)://c	Cs�|j}|s�t|dd�}|r9|j|�}n|jdd�}|dksc|dkrrd}|}q�tj|�\}}tj|i|�}ntj|d�r�|j	�p�|j
}tj|�}|s�d}n|j
d�}yt|}	Wn*tk
r-tjtd�|��nXx9|	D]1}
y|
|||�SWq5tjk
req5Xq5Wtjtd	�|��dS(
Ntlfpullsourcesdefault-pushtdefaultRRRMisunsupported URL scheme %rs*%s does not appear to be a largefile store(RtgetattrR0t
expandpathRtparseurltpeerRtsafehasattrRtpatht
_scheme_retmatchtgroupt_storeprovidertKeyErrortAbortRR tstoreprotonotcapable(RtremoteRRRQRXt	_branchesRZtschemetstoreproviderstclassobj((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyt
_openstore�s4		'	

(Rtret	mercurialRRRtmercurial.i18nRR t	ExceptionRtobjectRt
localstoret	wirestoreR\tcompileRYR0R:Re(((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyt<module>	sv




MMCT - 2023