-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/hgext/largefiles/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pyc

ó
Ì\,Tc@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/lib/python2.7/dist-packages/hgext/largefiles/basestore.pyt__init__s			cCs/tdƒ|jtj|jƒ|j|jfS(Ns0error getting id %s from url %s for file %s: %s
(RRRthidepasswordRRR(R	((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pytlongmessages	cCsdtj|jƒ|jfS(Ns%s: %s(RRRR(R	((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pyt__str__ s(t__name__t
__module__t__doc__R
RR
(((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pyRs		t	basestorecBsSeZd„Zd„Zd„Zd„Zd„Zed„Zd„Z	d„Z
RS(cCs||_||_||_dS(N(tuitrepoR(R	RRR((s>/usr/lib/python2.7/dist-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/lib/python2.7/dist-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/lib/python2.7/dist-packages/hgext/largefiles/basestore.pytexists-sc		CsCg}g}|j}d}|jtd„|Dƒƒƒ}xæ|D]Þ\}}|jtdƒ|dddt|ƒƒ|d7}|jtdƒ||fƒ|j|ƒsê|jtd	ƒ||t	j
|jƒfƒ|j|ƒqAn|j
||ƒr|j||fƒqA|j|ƒqAW|jtdƒ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.)icss|]\}}|VqdS(N((t.0t	_filenameR((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pys	<genexpr>@ssgetting largefilestunittlfilettotalisgetting %s:%s
s'%s: largefile %s not available from %s
N(RRtsettprogressRtlentnotetgettwarnRRRtappendt_gethashtNone(	R	tfilestsuccesstmissingRtatt	availableRR((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pyR"2s(		


cCs$tjtj|jdƒƒtj|j|ƒ}|d}tj|d|jjjƒ}y|j|||ƒ}Wn/t	k
r£}|j
j|jƒƒd}nX|j
ƒ||krý|dkrì|j
jtdƒ|||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
createmodes*%s: data corruption (expected %s, got %s)
(Rtmakedirstlfutilt	storepathRtatomictempfiletstoreR-t_getfileRRR#RtcloseRtunlinktFalsetrenametlinktousercachetTrue(R	RRt
storefilenamettmpnamettmpfiletgothashterr((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pyR%Us(



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
(
R6RtstatusRR RRtrevRtshortt_verifyfileR9tint(
R	trevstcontentstfailedtverifiedR@tcctxtcsettstandintnumrevstfnametfnodet	numlfiles((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pytverifyss(	

%
+				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	R<RR((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pyR3‘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	RHRIRERJRG((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pyRB™s(RRR
RRR"R%R6ROR3RB(((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pyR#s				#		tfilethttpthttpstsshs^([a-zA-Z0-9+-.]+)://cCs|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	ƒtj|ƒƒ‚dS(
Ntlfpullsourcesdefault-pushtdefaultR,RRPisunsupported URL scheme %rs*%s does not appear to be a largefile store(RtgetattrR&t
expandpathRtparseurltpeerRtsafehasattrRtpatht
_scheme_retmatchtgroupt_storeprovidertKeyErrortAbortRR/tstoreprotonotcapableR(RtremoteRRRTR[t	_branchesR]tschemetstoreproviderstclassobj((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pyt
_openstore±s6		'	

(Rtret	mercurialRRRtmercurial.i18nRR/t	ExceptionRtobjectRt
localstoret	wirestoreR_tcompileR\R&R6Rh(((s>/usr/lib/python2.7/dist-packages/hgext/largefiles/basestore.pyt<module>	s€




Copyright © 2017 || Recoded By Mr.Bumblebee