mò óRÅDc@sîdZdkTdklZdklZeeƒdƒdkZdkZdk Z dk Z dk Z de i fd„ƒYZ de eifd „ƒYZ d e e i fd „ƒYZd e e i fd „ƒYZdeifd„ƒYZdS(su bundlerepo.py - repository class for viewing uncompressed bundles This provides a read-only repository interface to bundles as if they were part of the actual repository. Copyright 2006 Benoit Boissinot This software may be used and distributed according to the terms of the GNU General Public License, incorporated herein by reference. (t*(sgettext(s demandloads'changegroup util os struct bz2 tempfileNt bundlerevlogcBswtZdd„Zd„Zd„Zddd„Zd„Zd„Zdddd„Z d d „Z d „Z d „Z RS( Nc s tii||||ƒˆ|_h|_‡d†} |i ƒ}d} x¹| ƒD]®\}} t|ƒ}|djotidƒ‚n| d7} |d8}tid|d ƒ\} }}}| |ijo | } qSnxG||fD]9}||ijo#titdƒt|ƒƒ‚qëqëW|djo |} n ||ƒ} | p |} n|i djo| |d| ||| f}n=|i"| dƒ|dd| |i#|ƒ|i#|ƒ| f}| |i|<|i$i%|ƒ||i| <| } |d7}qSWdS( Nc#s>x7tiˆƒD]&}ˆiƒ}||t|ƒfVqWdS(N(t changegroupt chunkitert bundlefiletchunkttelltpostlen(RR(R(t8/usr/lib/python2.4/site-packages/mercurial/bundlerepo.pyt chunkpositer#s iPsinvalid changegroupt 20s20s20s20ssunknown parent %siiÿÿÿÿi(&trevlogt__init__tselftopenert indexfiletdatafileRtbasemapR tcounttntNonetprevRtstartRtsizetutiltAborttstructtunpacktnodetp1tp2tcstnodemaptpt RevlogErrort_tshortt linkmappertlinktversiontet offset_typetrevtindextappend(RRRRRR&RR RR RRRR'RRR)RR"((RR R sD          " '    <  cCs"|djotSn||ijS(sis rev from the bundleiN(R+tFalseRR(RR+((R tbundleIs cCs |i|S(N(RRR+(RR+((R t bundlebaseNsicCs_|i|ƒptii||||ƒSn|ii|i |ƒƒ|ii |i |ƒƒS(N( RR/R+R RtdftcachelenRtseekRtreadtlength(RR+R1R2((R ROscCsÊ|i|ƒoJ|i|ƒo:|i|i|ƒƒ}||jo|i|ƒSq–n=|i|ƒ o+|i|ƒ otii|||ƒSn|i |i |i |ƒƒ|i |i |ƒƒƒS(s1return or calculate a delta between two revisionsN( RR/trev1trev2R+R0trevbRR tdifftrevisionR(RR6R7R8((R trevdiffXs  "c Cs‡|tjodSnd}g}|}|i|ƒ}xp|i|ƒo_|i o&|i d|jo|i d}Pn|i |ƒ|i |ƒ}|i|ƒ}q9W|djot i i ||ƒ}nx6|o.|i|iƒƒ}|i||gƒ}qÒW|i|ƒ\}}|t i|||ƒjo/t itdƒ|i|i|ƒfƒ‚n||i|ƒ|f|_ |S(s*return an uncompressed revision of a giventiisintegrity check failed on %s:%dN(RtnullidRttexttchaint iter_nodeRR+R/tcacheR-R0R R:RtpoptdeltatpatchestparentsRRthashR#R$R( RRRRR?R>R+RCR@((R R:es4    /cCs t‚dS(N(tNotImplementedError(RR>t transactionR'RRtd((R t addrevision„sicCs t‚dS(N(RG(RtrevsR&RHtunique((R taddgroup†scCs t‚dS(N(RG(RR+tminlink((R tstripˆscCs t‚dS(N(RG(R((R t checksizeŠs( t__name__t __module__RR R/R0RR;R:RJRMRORP(((R Rs 4     tbundlechangelogcBstZd„ZRS(NcCs0tii||ƒti||dd|ƒdS(Ns 00changelog.is 00changelog.d(t changelogR RRRR(RRR((R R Žs(RQRRR (((R RSstbundlemanifestcBstZd„ZRS(NcCs9tii||ƒti|||i|i||ƒdS(N( tmanifestR RRRRRRR&(RRRR&((R R ”s(RQRRR (((R RU“st bundlefilelogcBstZd„ZRS(NcCs<tii|||ƒti|||i|i||ƒdS(N( tfilelogR RRtpathRRRRR&(RRRYRR&((R R šs(RQRRR (((R RW™stbundlerepositorycBs5tZd„Zd„Zd„Zd„Zd„ZRS(Nc CsLtii|||ƒd|_t|dƒ|_ |i i dƒ}|i dƒptitdƒ|ƒ‚n>|i dƒptitdƒ|ƒ‚n|djoÙtidd d d d |iƒ\}} | |_ti|d ƒ} d„}|ti|i dƒƒ}z/| idƒx|D]}| i|ƒq'WWd| iƒ|i iƒXt|idƒ|_ |i idƒn+|djontitdƒ|ƒ‚t|i|i ƒ|_ t!|i|i |i i"ƒ|_#h|_$xVt%i&|i ƒ} | pPn|i i(ƒ|i$|