\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sdZddlmZddlZddlZddlmZddlmZddl m Z m Z m Z m Z mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZdejfd YZd ee j fd YZd eej fd YZ!dejfdYZ"dej#fdYZ$dej%fdYZ&dZ'de(fdYZ)dddZ+dZ,de(fdYZ-dde.dZ/dS(sRepository class for viewing uncompressed bundles. This provides a read-only repository interface to bundles as if they were part of the actual repository. i(tabsolute_importNi(t_(tnullid(tbundle2t changegroupt changelogtcmdutilt discoverytencodingterrortexchangetfilelogt localrepotmanifesttmdifftnodetpathutiltphasestpycompattrevlogtutiltvfst bundlerevlogcB@sbeZdZd dZdZd edZdZdZ dZ dZ dZ RS( c C@stj|}tjj|||||_t|}|d|_t|_xy|j D]k}|\}}} } } } } t| }|j |}|| }||j kr|jj |j |q`nxD|| fD]6}||j krt j||jtdqqW| |j krIt| |jtdn|j| }tj|| |d|||j||j| |f}|jj|||j |<|jj ||d7}q`WdS(Nisunknown parentsunknown delta basei(tvfsmodt readonlyvfsRt__init__tbundletlent repotiprevtsett bundlerevst deltaiterttelltnodemaptaddR t LookupErrort indexfileRtrevt offset_typetindextappend(tselftopenerR$t cgunpackert linkmappertnt deltadataRtp1tp2tcst deltabasetdeltatflagstsizetstarttlinktptbaserevte((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyR-s8       ! cC@sT||jkr"tjj||S|jj|j||jj|j|S(N(RRt_chunkRtseekR6treadtlength(R)R%tdf((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyR;YscC@s||jkrK||jkrK|j|d}||kr|j|Sn4||jkr||jkrtjj|||Stj|j|dt|j|dtS(s1return or calculate a delta between two revisionsitraw( RR'R;RtrevdiffRttextdifftrevisiontTrue(R)trev1trev2trevb((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRAbs c C@sst|tr'|}|j|}n|}|j|}|tkrLdSd}g}|}x^||jkr|jr|jd|kr|jd}Pn|j||j |d}qaW|dkr|j |}nx4|r|j |j } t j|| g}qW|j||j|dd|\} } | r]|j| |d|n|||f|_| S( sTreturn an uncompressed revision of a given node or revision number. tiiiR=R@R%N(t isinstancetintRR%RtNoneRt_revisioncacheR(R't baserevisionR;tpopRtpatchest _processflagsR4t checkhash( R)t nodeorrevt_dfR@R%RtrawtexttchaintiterrevR3ttextt validatehash((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRCos6     cC@stjj||dtS(NR@(RRCRD(R)RR((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRMscO@s tdS(N(tNotImplementedError(R)targstkwargs((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyt addrevisionscO@s tdS(N(RY(R)RZR[((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pytaddgroupscO@s tdS(N(RY(R)RZR[((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pytstripscC@s tdS(N(RY(R)((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyt checksizesN( t__name__t __module__RRKR;RAtFalseRCRMR\R]R^R_(((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyR,s , &    tbundlechangelogcB@seZdZdZRS(cC@s<tjj||d}tj|||j||dS(NcS@s|S(N((tx((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyts(RRRR$(R)R*R+R,((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRs cC@s@|j}z&d|_tjj||dtSWd||_XdS(NR@((t filteredrevsRRCRD(R)RRt oldfilter((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRMs   (R`RaRRM(((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRcs tbundlemanifestcB@s)eZdddZdZdZRS(RHcC@stjj||d|tj|||j|||dkrni}|jjdkrnt|j}qnn||_ ||_ dS(Nttreet03( R tmanifestrevlogRRR$RKRtversiont_getfilestartst _dirlogstartst _linkmapper(R)R*R+R,t dirlogstartstdir((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRs  cC@si|}t|tr'|j|}n||jkrJd|j|}ntjj||dt}|S(Ns%sR@(RIRJRt fulltextcacheR RkRCRD(R)RRRtresult((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRMscC@sa||jkrK|jj|j|t|j|j|j|jd|Stt|j|S(NRq(RnRR<RhR*Rotsupertdirlog(R)td((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRus N(R`RaRKRRMRu(((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRhs t bundlefilelogcB@seZdZdZRS(cC@s5tjj|||t||j|||_dS(N(R RRR$t_revlog(R)R*tpathR+R,((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRs cC@stjj||dtS(NR@(R RCRD(R)RR((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRMs(R`RaRRM(((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRws t bundlepeercB@seZdZRS(cC@stS(N(Rb(R)((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pytcanpushs(R`RaR{(((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRzstbundlephasecachecB@s,eZdZdZdZdZRS(cO@sGtt|j||tj|drCtj|j|_ndS(NR*(RtR|RRt safehasattrRRR*(R)RZR[((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyRscC@s tdS(N(RY(R)((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pytwritescC@s tdS(N(RY(R)tfp((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyt_writescC@s$||j|<|jt|_dS(N(t phaserootst invalidateRDtdirty(R)tphasetnewrootsttr((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyt _updaterootss  (R`RaRR~RR(((s:/usr/lib64/python2.7/site-packages/mercurial/bundlerepo.pyR|s   c@sdi}xWtjiD]C}|d}j|| s&  |{   ! %