6hCSSKJr SSKrSSKrSSKJr SSKJrJrJ r J r SSK J r \Rr \Rr\RrSrS\-rS \-rS rS\-rS \-rS r\ "\5rS \-rS rSrSrSr"SS5r"SS5rg)) annotationsN)nullrev)encodingerrorpycompatutil) stringutils-v2s rbc-namessrbc-revss-v1s>4sI@ilg?cX\rSrSrSrSr\S5rSrSr Sr Sr S r S r S rS rg )rbcrevs5zLa byte string consisting of an immutable prefix followed by a mutable suffixc.Xl[5UlgN)_prefix bytearray_rest)selfrevss ?/usr/lib/python3/dist-packages/mercurial/branching/rev_cache.py__init__rbcrevs.__init__8s [ cB[UR5nX[-- $r)lenr _rbcrecsize)rsizes r len_prefixrbcrevs.len_prefix<s4<< k)**rcFUR[UR5-$r)rrrrs r__len__rbcrevs.__len__AsTZZ00rcXR:a/[[[R"UR 5U5$[[[R"UR 5XR- 5$r)r unpack_from _rbcrecfmtr bufferrr)r rbcrevidxs r unpack_recordrbcrevs.unpack_recordDsR  &z4;;t||+DiP P DJJ'OO+ rcURS:aW[5nURSURUSS&URUR5 Xl[5Ulgg)Nr)rrrextendr)rentiretys r make_mutablerbcrevs.make_mutableNsQ ??Q  {H,,'89HQK OODJJ '!J$;DL rcBUR5 URUS2 gr)r/r)rposs rtruncaterbcrevs.truncateVs  JJst rcXR:aUR5 URnXR- nU[-n[ UR5U:aURR SU-5 [ [UUUU5$)N)rr/rrrr- pack_intor')rr)node branchidxbuf start_offset end_offsets rr7rbcrevs.pack_intoZs|  &    jj ??2 !K/ tzz?Z ' JJ  ej0 1        rc8URRU5$r)rr-)r extensions rr-rbcrevs.extendpszz  ++rc<XR:ag[5nURU[X R5USS&UR UR XR- X R- 5 U$UR XR- X R- $r)rrrminr-r)rbeginendaccs rslice rbcrevs.slicess~ ?? "+C\\%#c??*CDCF JJ 5??2S??5JK Jzz%//1C//4IJJr)rrN)__name__ __module__ __qualname____firstlineno____doc__rpropertyrr#r*r/r3r7r-rF__static_attributes__rrrr5sBV!++1' ,,Krrc\rSrSrSrSSjrSrSSjr\RS5r Sr Sr S r S rSS jrS rSrSrg )revbranchcache~aQPersistent cache, mapping from revision number to branch name and close. This is a low level cache, independent of filtering. Branch names are stored in rbc-names in internal encoding separated by 0. rbc-names is append-only, and each branch name is only stored once and will thus have a unique index. The branch info for each revision is stored in rbc-revs as constant size records. The whole file is read into memory, but it is only 'parsed' on demand. The file is usually append-only but will be truncated if repo modification is detected. The record for each revision contains the first 4 bytes of the corresponding node hash, and the record is only used if it still matches. Even a completely trashed rbc-revs fill thus still give the right result while converging towards full recovery ... assuming no incorrectly matching node hashes. The record also contains 4 bytes where 31 bits contains the index of the branch and the last bit indicate that it is a branch close commit. The usage pattern for rbc-revs is thus somewhat similar to 00changelog.i and will grow with it but be 1/8th of its size. c URbeXl/Ul[[ 55UlSUlSUlSnURR[5n[U5UlU(a;URS5Vs/sHn[R "U5PM snUlUR(aUR&R)SS[*R,(+S9nU(dUR[ 5nU(aOURR/[ 5(a+[0R2"[0R4"U55nOUR5nSSS5 O.UR[65nUR5nSSS5 [W5Ul[?[UR 5[@-[URB55Ul"URDS:Xa/Ul[UR5Ul#g![a, URR[5nSnSUlGNf=fs snf![a U(aUR"UlGNf=f!,(df  N=f!,(df  GN=f![a=n UR&R9S[:R<"U 5-5 Sn A GN>/B    q DK!$++.w - ++,=>" (,% - 3"&"2"2 3*1098  @ --d34 sH2&*I0 I+0I0 A J<A'J;J<J**J<22I($I0'I((I00"JJ J'#J<* J94J<< L2K>>LcSUlURSS2 SUl[URR 5Ul[[UR [-55Ul [R"US5 SUl g)Nrs _namesreverseT)rYrWrnrrVrlrmrrrrXr clearcachedpropertyrZr"s r_clearrevbranchcache._clearsi KKNtzz334 $*:*:[*H IJ    '78 $rcTXlURRU5 SUlg)NT)rmrXr3rZ)rrevs r invalidaterevbranchcache.invalidates" s# $rcb[UR5VVs0sHupX!_M snn$s snnfr) enumeraterW)rrbs r _namesreverserevbranchcache._namesreverses)!*4;;!78!7!7888s+c<URRnU[-nU[:XaUR U5$[ UR 5U[-:aURU5$URU5S[nUR RU5upV[U[-5nU(a U[-nUS:XaO~XT:XaURUU4$URR R#SU-5 U[-nUR R'U5 [)UR*U5UlURU5$![a8 URR R#S5 UR%5 NRf=f)zOReturn branch name and close flag for rev, using and updating persistent cache.NssRreferenced branch names not found - rebuilding revision branch cache from scratch sPhistory modification detected - truncating revision branch cache to revision %d )rVrlrrrcrrXrbr8 _rbcnodelenr*bool _rbccloseflag_rbcbranchidxmaskrW IndexErrorrdrjr{r3rBrm) rr~rlr)reponode cachenoder9closer3s rrcrevbranchcache.branchinfosyJJ(( +%  '>'', , t}}  K 7 7##C( (>>#&| 4#}}::9E Y./  * *I  #   " {{9-u44 JJMM  :D $$%  ##J  sE?FFczURRnURU5up4X0R;aURUnO>[ UR 5nUR R U5 XPRU'URU5nU(a U[-nURXU5 X44$)z7Retrieve branch info from changelog and update _rbcrevs) rVrlrcrrrWappendr8r _setcachedata)rr~rlrrr9rs rrbrevbranchcache._branchinfosJJ(( '', "" "**1-IDKK(I KK  q !$-  q !>>#&   &I 3)4xrcURup4X0R;aURUnO>[UR5nURR U5 XPRU'U(a U[ -nUR XRRRU5U5 S[U5;aU?gg)z%add new data information to the cachercN) rcrrrWrrrrVrlr8vars)rr~changelogrevisionbranchrr9s rsetdatarevbranchcache.setdata-s)44  '' '**62IDKK(I KK  v &)2  v &   &I 3 4 4 9 9# > J 4: % &rcU[:XagU[-nURRXBU5 [ UR U5UlUR R5nU(aURSUR5 gg)z:Writes the node's branch data to the in-memory cache data.Nswrite-revbranchcache) rrrXr7rBrmrVcurrenttransaction addfinalizewrite)rr~r8r9r)trs rrrevbranchcache._setcachedataCsl '> +%   ;t//5 ZZ * * , NN2DJJ ? rNcURnSnSnUR(d#UR[UR5:a"UR SS9nSnUR U5 UR[-nUR(dU[UR5:wa%SnUcUR SS9nURX%5 UbUR'5 gg![[R[R4a>nURR!SU["R$"U54-5 SnANwSnAff=f!UbUR'5 ff=f)z!Save branch cache if it is dirty.NrF)waits namess+couldn't write revision branch cache%s: %s )rVrZrnrrWwlock _writenamesrmrrX _writerevsr^rAbort LockErrorrdrjr rkrelease)rrrorstepstartrws rrrevbranchcache.writeOs+zz $$(;(;c$++>N(N  .   &$${2E$$T]]1C(C= JJEJ2E,  ! eoo6  GGMM?00678      !s*B8C)E4E<E EE Ec^SnUR(aSUlSUlUR(dURS:waURR [ S5nUR 5nX0R:XaURS5 O_UR5 UR(aSnO US:aSnOSnURRU[ -5 SUlSUl URS:Xa>URR[SS 9 URR [ S 5nURURSn[R mSR#U4S jU55nURU5 UR 5UlUbUR5 [%UR5Ulg!UbUR5 ff=f) z,write the new branch names to revbranchcacheNrsabr6sresetting content of %s s%s changed - rewriting it s%s is missing - rewriting it T) ignoremissingwbc34># UH nT"U5v M g7frrO).0r from_locals r -revbranchcache._writenames..s;UjmmUs)rZrYrnr[openr]tellrrrdrjrm unlinkpathrXrWr fromlocaljoinr)rrof current_sizedbgnamesrvrs @rrrevbranchcache._writenamesls   !"D "#D  $$(;(;q(@MM&&y%8 vvx #5#55GGENGGI,,:%)<?GGMM# /2*+D''(D$""a' (((FMM&&y%8KK 3 3 56E!++J::;U;;D GGDM!"D } !$++.} s F GG1cJ[[UR5[UR5[-5nU[-nUR (aSn[U[--nUR R[S5nSSS5 UR R[S5nURS[R5 UR5nXb:aSnXb:waU[-n[XF5U- n[XF5U- U:a'SnS[-n URRU 5 OzUS:aCSn XU- U[4-n XF:a Sn XU- -n X- n U S- n URRU 5 O1X$:XdeS n U [Xb- 4-n URRU 5 US:a<URU5 UR!URR#X$55 ObUR%5 UR R[S S S 9n U R!URR#X$55 SSS5 SSS5 X0lS Ulg!,(df  GN=f!,(df  N6=f!,(df  N?=f)z$write the new revs to revbranchcachersa+bNsr+bsresetting content of cache/%s s(overwriting %d bytes from %d in cache/%ss leaving (%d trailing bytes) s,cache/%s contains %d unknown trailing bytes rT) atomictempF)rBrrlrXrrZr[rseekosSEEK_ENDr REWRITE_RATIOmaxrdrjrrFrrm) rrorrrDrr threshold overwrittenrextrarev_files rrrevbranchcache._writerevss73t~~&DMM(:k(IJ[   Eu 34 ]]  & 1Q 2 ]]  & 1Q FF1bkk "668L#$(=8 !#4u< *U2y@Ers #  ??       ; &  $ #66!44  z" +     FKFKRI&I&r