HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //proc/self/root/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyc
�
1�3\c@@s|dZddlmZddlmZddlmZmZddlm	Z	de
fd��YZd	efd
��YZ
dS(sCbase class for store implementations and store-related utility codei(tabsolute_import(t_(tnodetutili(tlfutilt
StoreErrorcB@s)eZdZd�Zd�Zd�ZRS(sZRaised when there is a problem getting files from or putting
    files to a central store.cC@s(||_||_||_||_dS(N(tfilenamethashturltdetail(tselfRRRR	((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyt__init__s			cC@s/td�|jtj|j�|j|jfS(Ns0error getting id %s from url %s for file %s: %s
(RRRthidepasswordRRR	(R
((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pytlongmessages	cC@sdtj|j�|jfS(Ns%s: %s(RRRR	(R
((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyt__str__ s(t__name__t
__module__t__doc__RR
R(((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyRs		t	basestorecB@sSeZd�Zd�Zd�Zd�Zd�Zed�Zd�Z	d�Z
RS(cC@s||_||_||_dS(N(tuitrepoR(R
RRR((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyR$s		cC@std��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)scC@std��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
C@sHg}g}|j}d}|jtd�|D���}|jtd�dtd�dt|����}x�|D]�\}}	|j|�|d7}|jtd�||	f�|j|	�s�|j	td	�||	t
j|j�f�|j
|�qqn|j||	�r'|j
||	f�qq|j
|�qqWWd
QX||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.)ics@s|]\}}|VqdS(N((t.0t	_filenameR((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pys	<genexpr>@ssgetting largefilestunittfilesttotalisgetting %s:%s
s'%s: largefile %s not available from %s
N(RRtsettmakeprogressRtlentupdatetnotetgettwarnRRRtappendt_gethash(
R
RtsuccesstmissingRtatt	availabletprogressRR((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyR$2s(		


c	C@s#tjtj|jd��tj|j|�}|d}tj|d|jjj��R}y|j|||�}Wn/t	k
r�}|j
j|j��d}nXWdQX||kr�|dkr�|j
jt
d�|||f�ntj|�tStj||�tj|j|�tS(s�Get file with the provided hash and store it in the local repo's
        store and in the usercache.
        filename is for informational messages only.
        ts.tmpt
createmodeNs*%s: data corruption (expected %s, got %s)
(RtmakedirsRt	storepathRtatomictempfiletstoreR.t_getfileRRR%R
RtunlinktFalsetrenametlinktousercachetTrue(R
RRt
storefilenamettmpnamettmpfiletgothashterr((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyR'Us&

cC@s�|jjtd�t|��t�}g}x�|D]�}|j|}d|j�tj|j��f}x�|D]{}t	j
|�}	|	ru||}
|	|
j�f}||kr�|j|�t	j
|
�}|j||	|f�q�ququWq6W|j||�}
t|�}ttg|D]\}}|^q#��}|rj|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
(RtstatusRR!RRtrevRtshortRtsplitstandintfilenodetaddt
readasstandinR&t_verifyfilestint(R
trevstcontentstverifiedtfilestocheckR?tcctxtcsettstandinRtfctxtkeytexpectedhashtfailedtnumrevstfnametfnodet	numlfiles((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pytverifyqs6	

%


$+				cC@std��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
R;RR((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyR3�scC@std��dS(s�Perform the actual verification of files in the store.
        'contents' controls verification of content hash.
        'filestocheck' is list of files to check.
        Returns _true_ if any problems are found!
        sabstract methodN(R(R
RHRJ((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyRE�s(RRRRRR$R'R5RVR3RE(((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyR#s				#	%	N(Rt
__future__Rtmercurial.i18nRt	mercurialRRR-Rt	ExceptionRtobjectR(((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/basestore.pyt<module>	s