��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%scCstj|�}|stS||}||j�f}||krEtS|j�dd!} tj|j| �}
|j|�tj|j| �s�|j j
td�|||
f�tS|rtj
|
�}|| kr|j j
td�|||
f�tSntS(Nii(s'changeset %s: %s references missing %s
s)changeset %s: %s references corrupted %s
(R
tsplitstandintFalsetfilenodetdataR
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
|