
    6hx                    P   S SK Jr  S SKrS SKrS SKrS SKrSSKJr  SSKJ	r	J
r
JrJrJrJrJrJrJrJrJrJrJrJrJrJr  SSKJr  SSKJrJrJrJrJ r   SS	K!J"r"  SS
KJrJ#r#  SS jr$SS jr%SS jr&S r'S r(S r)S r*S r+S r,S r-S r.SS jr/ SS jr0S r1S r2S r3S r4 SS jr5g)     )annotationsN   )nullrev   )COMP_MODE_PLAINENTRY_DATA_COMPRESSED_LENGTHENTRY_DATA_COMPRESSION_MODEENTRY_DATA_OFFSETENTRY_DATA_UNCOMPRESSED_LENGTHENTRY_DELTA_BASEENTRY_LINK_REVENTRY_NODE_IDENTRY_PARENT_1ENTRY_PARENT_2 ENTRY_SIDEDATA_COMPRESSED_LENGTHENTRY_SIDEDATA_COMPRESSION_MODEENTRY_SIDEDATA_OFFSETREVIDX_ISCENSOREDREVLOGV0REVLOGV1)_)errormdiffpycompatrevlogutilsutil)storageutil)	constantsdeltasc                   U R                   [        R                  :X  d   U R                   5       eSSKJn  U Vs1 s H  oPR                  U5      iM     nn[        R                  " SU0S5      nUR	                  U R                  U R                  U R                  SSU R                  U R                  U R                  U R                  S9	nUR                  (       a  U R                  (       d   eU R                  5        GHU  nU R!                  U5      nU R#                  U5      u  pX;   ay  UR%                  UUU R'                  U5      U	U
U[        R(                  5        UR+                  U5      [,        :w  a*  [/        S5      n[/        S	5      n[0        R2                  " XS
9eM  U R5                  U5      (       aV  U R+                  U5      [,        :w  a!  [/        S5      n[0        R2                  " U5      eU R6                  R9                  U5      nOU R;                  U5      nUR%                  XU R'                  U5      XXPR=                  U5      5        GMX     UR?                  U R@                  SS9  U R                  (       d  UR?                  U RB                  SS9  U R                  RE                  UR@                  U R@                  5        UR                  (       a  U R                  (       d   eOCU R                  (       a   eU R                  RE                  URB                  U RB                  5        U RG                  5         U RI                  5       u  pU RK                  X5        gs  snf )z*censors a revision in a "version 1" revlogr   )revlog   censored    s   tmpcensoredT)targetradixpostfix
censorabledata_configdelta_configfeature_config
may_inlines0   censored revision stored as delta; cannot censorsE   censoring of revlogs is not fully implemented; please report this bug)hints:   cannot censor due to censored revision having delta storeds   store)locationN)&_format_versionr   r    r!   revr   packmetaopenerr$   r%   r(   r)   r*   _inlinerevsnodeparentsaddrawrevisionlinkrevr   deltaparentr   r   r   Abort
iscensored_inner_chunkrawdataflags	addbackup
_indexfile	_datafilerenameclearcaches
_loadindex_load_inner)rltrcensor_nodes	tombstoner!   r5   censor_revsnewrlr0   p1p2mhrawtextindexchunk_caches                   ?/usr/lib/python3/dist-packages/mercurial/revlogutils/rewrite.py	v1_censorrU   7   s   !3!33GR5G5GG3 ,89LD66$<LK9$$k9%=sCI MM
		yyhhNN__((::  
E bjj11wwywws|D!  

3++   %0IJ/ kk!,,==~~c"g-4 kk!n$ii&&s+GjjoGC"$	
G N LLL2::
R\\H5IIU%%r}}5}}zzz::~
		",,7NNENN5&[ :s   M+c                    U R                   [        :w  d   U R                   5       eU R                   [        :w  d   U R                   5       eU Vs1 s H  o@R                  U5      iM     nn[	        XXS5        gs  snf )z*censors a revision in a "version 2" revlogN)r.   r   r   r0   _rewrite_v2)r!   rH   rI   rJ   r5   rK   s         rT   	v2_censorrX      sj    !!X-Ev/E/EE-!!X-Ev/E/EE-0<=::d#K=K3 >s   A8c                &   U R                   [        :w  d   U R                   5       eU R                   [        :w  d   U R                   5       eU R                  nU R                  n[
        R                  " SU0S5      n[        U5      nU R                  U   nU R                  R                  U-  nU[           S-	  n	U R                  U5      n
[        R                  " SS9 n[        U UUU5      n[        U UU	U
5      nU" 5        nUu  nnnnn[        U[!        U5      5       H*  nUU;   a  [#        U UUUU5        M  [%        U UUUUU5        M,     SSS5        SSS5        UR'                  SSS9  g! , (       d  f       N'= f! , (       d  f       N0= f)	a3  rewrite a revlog to censor some of its content

General principle

We create new revlog files (index/data/sidedata) to copy the content of
the existing data without the censored data.

We need to recompute new delta for any revision that used the censored
revision as delta base. As the cumulative size of the new delta may be
large, we store them in a temporary file until they are stored in their
final destination.

All data before the censored data can be blindly copied. The rest needs
to be copied as we go and the associated index entry needs adjustement.
r"   r#      s   w+bmodeNT)transaction	stripping)r.   r   r   rR   _docketr   r1   min
entry_sizer
   sidedata_cut_offr   unnamedtempfile_precompute_rewritten_delta_setup_new_filesrangelen_rewrite_censor_rewrite_simplewrite)r!   rH   rK   rJ   	old_indexdocketfirst_excl_revfirst_excl_entryindex_cutoffdata_cutoffsidedata_cutofftmp_storagerewritten_entries	all_files
open_filesold_data_fileold_sidedata_filenew_index_filenew_data_filenew_sidedata_filer0   s                        rT   rW   rW      s     !!X-Ev/E/EE-!!X-Ev/E/EE-I^^F$$k9%=sCI%N||N3<<**^;L"#45;K--n=O		!	!v	.+7	
 %	
	 [J !! ^S^<+%#!"! $!")# = % 
/` LLTTL2= [% 
/	.s%    $FAE1F1
E?	;F
Fc                N   [         R                  " U 5      n0 n[        U5      nU R                  5          [	        U[        U5      5       GH<  nXr;   a  M  X   nU[           U;  a  M  U[           S:X  a  [        SS[        4XW'   M=  U R                  U5      n	[        R                  " U[           U R                  U[           5      U R                  U[            5      U	/[        U	5      SU["           S-  S9n
UR%                  XUS9nU R&                  R(                  n[         R*                  " X5      u  pUR-                  5       nUR/                  UR0                  S   5        UR-                  5       nUR2                  XU4XW'   GM?     SSS5        U$ ! , (       d  f       U$ = f)u   Compute new delta for revisions whose delta is based on revision that
will not survive as is.

Return a mapping: {rev → (new_base, data_start, data_end, compression_mode)}
r   N  )r5   rM   rN   btexttextlen
cachedeltar?   )excluded_bases
target_revr   )r   deltacomputerr`   readingrf   rg   r   r   r   r   r>   r   revisioninfor   r5   r   r   r
   finddeltainfor_   default_compression_headerdelta_compressiontellrj   database)r!   rk   excluded_revsrr   dcrs   rm   r0   entrytextinfoddefault_comp	comp_modestartends                   rT   rd   rd      s    
		f	%B'N		Y8C# NE%&m; 349*11a)I!&~~c*"//}-{{5#89{{5#89&I# 12V; $$3 %   &~~HH%77H	#((*!!!&&),!&&(*+&&%i)H!&C 9 
F G 
	F s   EF
F$c           	     b  ^^^^	^
^^^ U R                   nU R                  R                  UR                  5       5      nU R                  R                  UR	                  5       5      mU R                  R                  UR                  5       5      mU R                  R                  UR                  5       5      m
U R                  R                  UR                  5       5      m	U R                  R                  UR                  5       5      m[        R                  " UT
TS9  [        R                  " TT	TS9  [        R                  " TTTS9  U R                  R                  UR                  5       5        U R                  R                  UR	                  5       5        U R                  R                  UR                  5       5        TUl        TUl        TUl        U R                  5         U R!                  US9u  pgU R#                  Xg5        [$        R&                  UUU	U
UUUU4S j5       nU$ )a  

return a context manager to open all the relevant files:
- old_data_file,
- old_sidedata_file,
- new_index_file,
- new_data_file,
- new_sidedata_file,

The old_index_file is not here because it is accessed through the
`old_index` object if the caller function.
)nb_bytes)rl   c            
   3    >#    [        T
S5       n [        TS5       n[        TS5       n[        TS5       n[        T	S5       nUR                  S[        R                  5        UR	                  5       T:X  d   eUR                  S[        R                  5        UR	                  5       T:X  d   eUR                  S[        R                  5        UR	                  5       T:X  d   eU UUUU4v   S S S 5        S S S 5        S S S 5        S S S 5        S S S 5        g ! , (       d  f       N/= f! , (       d  f       N8= f! , (       d  f       NA= f! , (       d  f       NJ= f! , (       d  f       g = f7f)Nrbzr+br   )openseekosSEEK_ENDr   )rv   rw   rx   ry   rz   rp   ro   new_data_filepathnew_index_filepathnew_sidedata_filepathold_data_filepathold_sidedata_filepathrq   s        rT   all_files_opener*_setup_new_files.<locals>.all_files_openerL  s1     #T*m+T26G,e4/7=!15.*//2;;?#1#6#6#8L#HH#H)..q"++>#0#5#5#7;#FF#F-221bkkB#4#9#9#;#NN#N - 1 . - 1#  8 5 3 +*  87 54 32 +*sz   E.EED;D*	B,D0D*	8D; EE	E.
D'#D*	*
D84D;;
E	E
E	E
E+'E.)r_   r2   joinindex_filepathdata_filepathsidedata_filepathrx   ry   rz   r   copyfileregister_file	index_enddata_endsidedata_endrD   rE   rF   
contextlibcontextmanager)r!   ro   rp   rq   rl   old_index_filepathrR   rS   r   r   r   r   r   r   s    ```     @@@@@rT   re   re     s   $ ^^F++F,A,A,CD**6+?+?+AB"MM..v/G/G/IJ++F,A,A,CD**6+?+?+AB"MM..v/G/G/IJMM$&8<PMM#%6MMM 
 MM 5 5 78
MM 4 4 67
MM 8 8 :;#F!FO)F **&*9E
u*  0 r#   c                ,   Uu  nnnn	n
X   nU[            S-  nU[            S-	  nX4;  a>  UR                  U5        U[           nUR                  U5      nU[           nU[
           nO0XC   u  nnnnUU-
  nUR                  U5        UR                  U5      nU	R                  5       nU	R                  U5        U[           nU
R                  5       nSU:  a<  U[           nUR                  U5        UR                  U5      nU
R                  U5        U[           nU[           nUU::  d	   UU45       e[        R                  " UUUUUU[           U[           U[            U["           UUUUS9nU R$                  R'                  U5        U R$                  R)                  U5      nUR                  U5        UR                  5       U R*                  l        U	R                  5       U R*                  l        U
R                  5       U R*                  l        g)z@append a normal revision to the index after the rewritten one(s)r|   rZ   r   r?   data_offsetdata_compressed_lengthdata_uncompressed_lengthdata_delta_baselink_revparent_rev_1parent_rev_2node_idsidedata_offsetsidedata_compressed_lengthdata_compression_modesidedata_compression_modeN)r
   r   r   readr   r	   r   rj   r   r   r   r   r   r   r   r   r   r   rR   appendentry_binaryr_   r   r   r   )r!   rk   rt   r0   rs   rr   rv   rw   rx   ry   rz   r   r?   old_data_offsetnew_data_sizenew_datar   d_comp_moder   r   new_data_offsetsidedata_sizenew_sidedata_offsetold_sidedata_offsetnew_sidedatar   sd_com_mode	new_entry	entry_bins                                rT   ri   ri   h  s/    	NE#$v-E-."4O
#?+:; %%m4 0178 "	
e##M2 $((*O!:;M+002=#$9:23(--m<-$%CD78Kc!9OS#99!!!#,!9'~&>*>*m$+#0)"-I LL	"))#.I#-224FNN+002FNN"3"8"8":FNNr#   c                .   Uu  nnnnn	X   n
[        U5      nUR                  5       nUR                  U5        U
[           nU
[           nU
[
           n[        R                  " [        R                  UUUUUUUU
[           SS[        [        S9nU R                  R                  U5        U R                  R                  U5      nUR                  U5        UR                  5       U R                  l        UR                  5       U R                  l        g)z&rewrite and append a censored revisionr   r   N)rg   r   rj   r   r   r   r   r   r   r   r   r   rR   r   r   r_   r   r   )r!   rk   rt   r0   rJ   rv   rw   rx   ry   rz   r   r   r   r   rM   rN   r   r   s                     rT   rh   rh     s    	NE 	NM#((*O	" ^$H	~	B	~	B!!))#,!.m$#$-"1I LL	"))#.I#-224FNN+002FNNr#   c                    U R                  SS5      S   R                  SS5      n[        U5      S:  a%  [        S5      nX -  n[        R
                  " U5      eUS   $ )N   .r   r      /r   s,   cannot recognize filelog from filename: '%s')rsplitsplitrg   r   r   r:   )path	path_partmsgs      rT    _get_filename_from_filelog_indexr     s[    D!$Q'--dA6I
9~?@kk#Q<r#   c                J    SSK Jn  UR                  U R                  U5      nU$ )zAReturns the filelog for the given `path`. Stolen from `engine.py`r   )filelog)r/   r   svfs)repor   r   fls       rT   _filelog_from_filenamer     s      	D	)BIr#   c                b   SSK Jn  U R                  U R                  5      c  Sn[        R
                  " U5      eUR                  R                  nUR                  U   n[        U5      n	US   US   sU	S'   U	S'   UR                  " U	SS 6 n
UR                  U5        UR                  U
5        g)zASwaps p1 and p2 and overwrites the revlog entry for `rev` in `fp`r   parsersNz*repo needs to be locked to rewrite parents         )purer   _currentlock_lockrefr   ProgrammingErrorIndexObjectindex_formatrR   listpackr   rj   )r   rG   r0   offsetfpr   r   r   r   r   packeds              rT   _write_swapped_parentsr     s    '/:$$S))&&33LHHSMEUI!&q58IaL)A,	"1.FGGFOHHVr#   c           
     $   SSK Jn  U R                  n[        U5      S:  d   eUR                  nUR
                  [        R                  :w  a%  SUR
                  -  n[        R                  " U5      eUR                  nUS-   n[        S5      n	UR                  5           [        R                  " UR                  R!                  U5      UR                  R!                  U5      UR"                  R$                  S9  UR                  USS	9 n
UR&                  (       aq  UR)                  U
R+                  5       5      nUR-                  5        H=  nX;   d  M
  UR/                  U5      n[1        XXU
5        UR3                  XU4-  5        M?     OOUR4                  R6                  nU H3  nXR8                  -  n[1        XXU
5        UR3                  XU4-  5        M5     S
S
S
5        UR                  R;                  X5        UR=                  5         UR?                  5       u  pURA                  X5        [        RB                  " U5         S
S
S
5        g
! , (       d  f       N|= f! [        RB                  " U5        f = f! , (       d  f       g
= f)z
Swaps p1 and p2 for all `to_fix` revisions of filelog `fl` and writes the
new version to disk, overwriting the old one with a rename.
r   r   r   z+expected version 1 revlog, got version '%d's   .tmp-parents-fixs%   repaired revision %d of 'filelog %s'
)
checkambigs   r+r[   N)"r   r   uirg   _revlogr.   r   r   r   r   rA   r   uninterruptibler   r   r2   r   r(   check_ambigr3   InlinedIndexObjectr   r4   _calculate_indexr   rj   r   r   sizerC   rD   rE   rF   	tryunlink)r   r   to_fixr   r   rG   r   
index_filenew_file_pathrepaired_msgr   rR   r0   r   r   rS   s                   rT   _reorder_filelog_parentsr     s   
 	Bv;??	B	Y///;b>P>PP$$S))J!44M>?L					*MM		z*		}->>55 =u5::#66rwwyAE!wwy=%*%;%;C%@F24S"MHH\*4E%EF	  ) $+#6#6#C#CL%!$'8'8!8.tbIj0A!AB  & 6 II]7NN!#ENN5.NN=)9 
	 65( NN=)9 
	sF   J!A,I&AIBIAI&5J
I#	I&&I>>J
Jc                <   ^ ^ UU 4S jnUU 4S jn[        X4TU5      $ )Nc                 :   > TR                   R                  T 5      $ N)r   r>   filerevr   s   rT   <lambda>'_is_revision_affected.<locals>.<lambda>C  s    

**73r#   c                 :   > TR                   R                  T 5      $ r   )r   
parentrevsr  s   rT   r  r  D  s    "**//8r#   )_is_revision_affected_inner)r   r  metadata_cache	full_textparent_revss   ``   rT   _is_revision_affectedr  B  s!    3I8K& r#   c                     U " 5       n[        USS 5      S:H  nUb  XSU'   U(       a  U" 5       u  pgU[        :w  a  U[        :X  a  gg! [         R                   a     gf = f)a|  Mercurial currently (5.9rc0) uses `p1 == nullrev and p2 != nullrev` as a
special meaning compared to the reverse in the context of filelog-based
copytracing. issue6528 exists because new code assumed that parent ordering
didn't matter, so this detects if the revision contains metadata (since
it's only used for filelog-based copytracing) and its parents are in the
"wrong" order.FNr   s   
T)r   CensoredNodeErrorbytesr   )r	  parents_revsr  r  raw_texthas_metarM   rN   s           rT   r  r  J  sl    ; Xbq\"i/H!"*w>=R7] "" s   A AAc           
        ^^	 UR                   m	UU	4S jnUU	4S jnUU	4S jnUU	4S jnUU	4S jn[        UUUUUS TU5      $ )Nc                 &   > TR                  T 5      $ r   )r;   r  rG   s   rT   r  ,_is_revision_affected_fast.<locals>.<lambda>i      "--0r#   c                 &   > TR                  T 5      $ r   )r9   r  s   rT   r  r  j  s    0r#   c                 :   > TR                   R                  T 5      $ r   )r<   r=   r  s   rT   r  r  k  s    BII$$W-r#   c                 &   > TR                  T 5      $ r   )r>   r  s   rT   r  r  l  s    

7+r#   c                 &   > TR                  T 5      $ r   r  r  s   rT   r  r  m  r  r#   )r    _is_revision_affected_fast_inner)
r   r   r  r  is_censored
delta_basedeltar	  r
  rG   s
     `      @rT   _is_revision_affected_fastr   g  sL    	B0K0J-E+I0K
 ,	 	r#   c                D   U " 5       (       a  SXv'   gU" 5       u  pU[         :X  d
  U	[         :w  a  SXv'   gU" 5       n
UR                  U
5      nUcM  Ub9  U" 5       nU[         [         4:X  a  SnOUS   [         :X  a  SnOUS   [         :X  a  SnUc  [        UUUU5      $ U" 5       n[        U5      (       d  XU'   U$ Sn[        U5      U:  a  [        R
                  " [        S5      5      e[        R                  " SUSU 5      u  pnUS	:  a  [        UUUU5      nU$ XU'   U$ )
a7  Optimization fast-path for `_is_revision_affected`.

`metadata_cache` is a dict of `{rev: has_metadata}` which allows any
revision to check if its base has metadata, saving computation of the full
text, instead looking at the current delta.

This optimization only works if the revisions are looked at in order.FTNr   r      s   patch cannot be decodeds   >lllr   )	r   getr  rg   r   r:   r   structunpack)r  r  r  r	  r
  deltabase_parentrevsr  r  rM   rN   delta_parentparent_has_metadatachunkheader_lengthr   _end_lengthis_affecteds                     rT   r  r  ~  sW   $ }}"']FB	W}g"&<L(,,\:"+#7#9 #'99&*#%a(G3 '+#%a(G3&+#&.	  GEu::"5w""M
5zM!kk!6788!==%2GHEqy 2	
  27r#   c                   U R                  [        S5      U-  5        U" 5          [        USS9 nUR                  5       R	                  S5       GHM  nU(       d  M  UR	                  SS5      u  px[        X5      n	UR	                  S5       V
s1 s H'  oR                  [        R                  " U
5      5      iM)     nn
[        5       nU H  n[        X5      (       a  SnU R                  XU4-  5        M,  [        S	5      nU[        R                  " U	R                  U5      5      U4-  nU R                  U5        UR                  U5        M     X-
  nU(       d!  [        S
5      nU R                  X-  5        GM.  U(       a  GM8  [        X[!        U5      5        GMP     SSS5        SSS5        gs  sn
f ! , (       d  f       N= f! , (       d  f       g= f)a  
Fix the revisions given in the `from_report` file, but still checks if the
revisions are indeed affected to prevent an unfortunate cyclic situation
where we'd swap well-ordered parents again.

See the doc for `debug_fix_issue6528` for the format documentation.
s   loading report file '%s'
r   r[      
    r      ,s,   found affected revision %d for filelog '%s'
s)   revision %s of file '%s' is not affected
s*   no affected revisions were found for '%s'
N)rj   r   r   r   r   r   r0   binascii	unhexlifysetr  warnhexlifyr5   addr   sorted)r   r   contextfrom_reportdry_runfline	filenodesfilenamer   nr   excludedr  r   s                  rT   _from_reportrB    ss    HHQ,-;<	D40AFFHNN5)D"&**T1"5I'7B7@t7L7L!x))!,-7L   uH!(55JCGGCH"556IJCH,,RWWW-=>IICGGCLLL) " &FFG(7(6&>B5 * 1 10s<   G	AF8.F3
=CF8F8"G	3F88
G	G		
Gc              #  ~  ^ ^^^^^^^^^#    [         S0n[        R                  " T 5      m[        U[	        T 5      5       GHw  u  p4Uu  mmmnnmmnT R
                  R                  U5      (       d+  [        R                  " UT R                  [        S5      5      eT R                  U5      mT R
                  R                  T5      (       d+  [        R                  " TT R                  [        S5      5      eT R                  T5      mT R
                  R                  T5      (       d+  [        R                  " TT R                  [        S5      5      eT R                  T5      mU4S jnU4S jn	UU4S jn
UU 4S jnUUUUUUUU 4S jn[        UU	U4S jUU
UUU5      nU(       a
  TTTUUTTU4nUv   GMz     g	7f)
z7filter incomind deltas to repaire issue 6528 on the flyFs   unknown parentc                 (   > [        T [        -  5      $ r   )boolr   )r?   s   rT   r  (filter_delta_issue6528.<locals>.<lambda>  s    d5+<#<=r#   c                    > T $ r    )base_revs   rT   r  rF    s    Xr#   c                    > T T4$ r   rH  )p1_revp2_revs   rT   r  rF    s
    vv.r#   c                 &   > TR                  T 5      $ r   r  )rI  r!   s   rT   r  rF    s    v'8'8'Br#   c            	        > [         R                  " T	R                  T5      T5      n [        R                  " TTTS /U TT4T5      nTR                  U5      $ r   )r   patchedsizer   r   r   	buildtext)
r~   revinforI  r  r   r?   r5   p1_nodep2_noder!   s
     rT   r	  )filter_delta_issue6528.<locals>.full_text  s_    
 ''H(=uEG!..5!G !**733r#   c                    > T $ r   rH  )r  s   rT   r  rF  .  s    Er#   N)r   r   r   	enumeraterg   rR   has_noder   LookupErrorr%   r   r0   r  )r!   deltas_iterr  r0   r   linknode	deltabasesidedatar  r  r
  r&  r	  r-  rI  r  r   r?   r5   rR  rK  rS  rL  s   `             @@@@@@@@@rT   filter_delta_issue6528r]    s    u%N((0MKV5 		
 ||$$Y//##6<<+<)=  ::i(||$$W--##GV\\1=N;OPPG$||$$W--##GV\\1=N;OPPG$=%
.B	4 	4$ 7 	
 	A I 6s   F1F=c           
       ^^^ [         R                  UUU4S j5       nU(       a  [        U TXdT5      $ / nU" 5          [        S TR                  R                  5        5       5      nU R                  [        S5      [        S5      [        U5      S9n	Sn
U GH  nU	R                  5         UR                  n[        TUR                  5      n[        5       n[        S0nUR                  5        H  n[        TUUU5      nU(       a]  [!        UU5      nUU:w  aK  [        S5      n["        R$                  " UR'                  U5      5      n[(        R*                  " UUU4-  5      eU(       d  M~  S	nU R-                  UUU4-  5        Sn
T(       a  M  T(       a6  UR/                  ["        R$                  " UR'                  U5      5      5        M  UR/                  U5        M     U(       d  GMU  [1        U5      nT(       a  UR3                  X45        GM|  [5        TX5        GM     U
(       a  U R7                  [        S
5      5        T(       aK  U(       aD  [9        TSS9 nU H+  u  nnUR7                  SSR;                  U5      U4-  5        M-     S S S 5        U	R=                  5         S S S 5        g ! , (       d  f       N'= f! , (       d  f       g = f)Nc               3     >#    T (       d  T(       a  S v   g TR                  5          TR                  5          S v   S S S 5        S S S 5        g ! , (       d  f       N= f! , (       d  f       g = f7fr   )wlocklock)r;  r   	to_reports   rT   r9  !repair_issue6528.<locals>.contextF  s4     ityy{  +{{s2   $A0AAA	A0
A	A
A-)A0c              3  r   #    U  H-  nUR                   (       d  M  UR                  (       d  M)  Uv   M/     g 7fr   )	is_revlog
is_filelog).0r   s     rT   	<genexpr>#repair_issue6528.<locals>.<genexpr>T  s.      
2 #(#3#3 E2s   77	7s   looking for affected revisionss   filelogs)unittotalTFs)   paranoid check failed for '%s' at node %ss)   found affected revision %d for file '%s'
s!   no affected revisions were found
wbr[   s   %s %s
r1  )r   r   rB  r   storedata_entriesmakeprogressr   rg   	increment	target_idr   r4  r   r4   r   r  r2  r6  r5   r   r:   r5  r7  r8  r   r   rj   r   r   complete)r   r   r;  rb  r:  paranoidr9  report_entriesfilesprogressfound_nothingr   r?  r   r   r  r  affectedslowr   r5   r<  r   s    ```                   rT   repair_issue6528rz  C  s[      BgGDDN	 
002
 
 ??/0;e* # 

 E H'eoo>B UF%u-N7795"g~ 0W=Dx' LM'//0@A#kk#40@*@AA8GCGGC7H"556$)M"7$"JJx'7'78H'IJ"JJw/% %( v"))8*<=,T2>C F HHQ<=>id+q$2LD&GGJ$))F*;T)BBC %3 , 	s 
j ,+k 
s8   D-K.KAK-A1K2J1K1
J?	;K
K)r#   r   )FNNF)6
__future__r   r2  r   r   r$  r5   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   i18nr   r/   r   r   r   r   r   utilsr   r   rU   rX   rW   rd   re   ri   rh   r   r   r   r   r  r  r   r  rB  r]  rz  rH  r#   rT   <module>r~     s    #   	     $  T'n4O3d1hHVM;`03f$.*b 	:.M`%CPJ\ INIr#   