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

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


��c@sKdZddlmZddlZddlZdejfd��YZdS(s store class for local filesystemi�(t_Nt
localstorecBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(s�localstore first attempts to grab files out of the store in the remote
    Mercurial repository.  Failing that, it attempts to grab the files from
    the user cache.cCs8|j�|_tt|�j|||jj��dS(N(tlocaltremotetsuperRt__init__turl(tselftuitrepoR((s?/sys/lib/python2.7/site-packages/hgext/largefiles/localstore.pyRscCs<tj|j|�rdStj|tj|j|��dS(N(tlfutiltinstoreRtlinkt	storepath(Rtsourcethash((s?/sys/lib/python2.7/site-packages/hgext/largefiles/localstore.pytputscCs4i}x'|D]}tj|j|�||<q
W|S(N(R
RR(RthashestretvalR((s?/sys/lib/python2.7/site-packages/hgext/largefiles/localstore.pytexistss
cCsttj|j|�}|s?tj|||jtd���nt|d�}ztj||�SWd|j	�XdS(Nscan't get file locallytrb(
R
tfindfileRt	basestoret
StoreErrorRRtopentcopyandhashtclose(RttmpfiletfilenameRtpathtfd((s?/sys/lib/python2.7/site-packages/hgext/largefiles/localstore.pyt_getfile%scCstj|�}|stS||}||j�f}||krEtS|j�dd!}	tj|j|	�}
|j|�tj|j|	�s�|j	j
td�|||
f�tS|rtj
|
�}||	kr|j	j
td�|||
f�tSntS(Nii(s'changeset %s: %s references missing %s
s)changeset %s: %s references corrupted %s
(R
tsplitstandintFalsetfilenodetdataR
RtaddRRtwarnRtTruethashfile(RtcctxtcsettcontentststandintverifiedRtfctxtkeyt
expecthashR
t
actualhash((s?/sys/lib/python2.7/site-packages/hgext/largefiles/localstore.pyt_verifyfile0s.

				(t__name__t
__module__t__doc__RRRRR1(((s?/sys/lib/python2.7/site-packages/hgext/largefiles/localstore.pyRs				(R4tmercurial.i18nRR
RR(((s?/sys/lib/python2.7/site-packages/hgext/largefiles/localstore.pyt<module>	s

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.