
    6hX                      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JrJrJ	r	J
r
  SSKJr  SSKJr  SSKJr  \R"                  (       a  S SKrSSKJ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&  \R"                  (       a$  \'r(\'\)\	\(   \)4   r* \'\RV                  \	\(   \)4   r, \!RZ                  " SSS9r.\R^                  r0\Rb                  r2S r3S3S jr4 " S S5      r5  S4S jr6S5S jr7S6S jr8S7S jr9S5S jr:    S5S jr; " S S5      r< S8 S9S jjr=S5S jr>  S: S9S jjr?S r@S rAS rBS5S  jrC\R                  " SS!9 " S" S#5      5       rE S3 S4S$ jjrFS% rGS&rHS'rIS(rJS)rKSrL        S;S* jrM\\)\	\
\N\N\	\R*                     4      4   rOS<S+ jrPS=S, jrQS>S- jrRS3S. jrSS>S/ jrT     S?S0 jrUS>S1 jrV       S@S2 jrWg)A    )annotationsN)DictIterableIteratorOptionalTuple   )_)nullrev)attr)
stringutil)	timestamp)copiesencodingerror	filemergematch
mergestateobsutilpathutilpolicypycompatscmutilsubrepoutilutilworkerupdateTpyo3c                    U R                   R                  X5      n/ SQnX4;  aP  SR                  U Vs/ s H  nSU-   S-   PM     sn5      n[        S5      nXqX#U4-  n[        R
                  " U5      eU$ s  snf )N)   aborts   ignore   warns   ,    's$   %s.%s not valid ('%s' is none of %s))uiconfigjoinr
   r   ConfigError)reposectionnamer%   validvvalidstrmsgs           1/usr/lib/python3/dist-packages/mercurial/merge.py_getcheckunknownconfigr0   >   sy    WW^^G*F*E::>1tax$>?78x00$$M	 ?s   A7c                    UR                  5       (       a  gUc  UnUR                  X%5      =(       a0    U R                  U5      U ;  =(       a    XF   R                  X5   5      $ NF)
isinmemoryisfileorlink_checkdir	normalizecmp)dirstatewvfsdircachewctxmctxff2s          r/   _checkunknownfiler>   I   s^     	z""8/ 	"q!1	"HLL!    c                  $    \ rS rSrSrS rS rSrg)_unknowndirschecker[   a]  
Look for any unknown files or directories that may have a path conflict
with a file.  If any path prefix of the file exists as a file or link,
then it conflicts.  If the file itself is a directory that contains any
file that is not tracked, then it conflicts.

Returns the shortest path at which a conflict occurs, or None if there is
no conflict.
c                @    [        5       U l        [        5       U l        g N)set_unknowndircache_missingdircacheselfs    r/   __init___unknowndirschecker.__init__f   s     !$
 !$r?   c                    UR                  5       (       a  g[        [        [        R                  " U5      5      5       H  nX@R
                  ;   a    g X@R                  ;   a  M%  UR                  R                  R                  U5      (       d  MQ  UR                  R                  U5      (       a-  UR                  R                  U5      UR                  ;  a  Us  $ UR                  R                  U5      (       d  U R
                  R                  U5          g U R                  R                  U5        M     UR                  R                  R                  U5      (       a  UR                  R                  U5      (       a  UR                  R!                  U5       Hm  u  pEnU Ha  n["        R$                  " UR                  R'                  XG5      5      nUR                  R                  USS9nXR                  ;  d  M]  Us  s  $    Mo     g )NFT)isknown)r3   reversedlistr   finddirsrG   rF   r8   auditcheckisfileorlinkr7   r5   lexistsaddisdirwalkr   pconvertreljoin)	rI   r(   r:   r<   pdirsfilesfnrelfs	            r/   __call___unknowndirschecker.__call__q   s{   ?? $x00345A))))))yy$$Q''II**1--//2$--GHyy((++))--a0%%))!, 6" 99??  ##		(:(:"&)).."3B==):):1)ABD==2242FD==0 	   #4 r?   )rG   rF   N)__name__
__module____qualname____firstlineno____doc__rJ   r_   __static_attributes__ r?   r/   rA   rA   [   s    	&r?   rA   mergeresultc                  ^^^^ [        5       m[        5       m[        5       m[        5       m[        U SS5      n[        U SS5      nU R                  R                  SS5      n[	        5       n	U R
                  n
U R                  nU(       GdA  UU4S jn[        5       nUR                  [        R                  [        R                  45       HW  n[        XXX.5      (       a  TR                  U5        M(  U(       d  M1  X;  d  M8  U" XU5      nUc  MF  TR                  U5        MY     UR                  [        R                  /5       H0  u  nnn[        XXX.US   5      (       d  M  TR                  U5        M2     TT-  nU Vs1 s H'  nU R
                  R!                  U5      (       d  M%  UiM)     nnUU-
  nU" UU5        U" UU5        GO![#        UR                  [        R$                  /5      5       H  u  nnnUu  nn[        XXX.5      nU R
                  R!                  U5      (       a  UnOUnU(       d&  UR'                  U[        R(                  US	4S
5        Mk  U(       d  US:X  a(  UR'                  U[        R*                  XSS	U4S5        M  US:X  a  TR                  U5        M  US:X  a  TR                  U5        UR'                  U[        R(                  US4S
5        M     [-        T5       H  nU R                  R.                  nUT;   aL  U R                  R1                  U5      (       a  U" [3        S5      U-  5        MU  U" [3        S5      U-  5        Mk  U" [3        S5      U-  5        M     T(       a  [4        R6                  " [3        S5      5      e[-        T5       Hs  nU R                  R1                  U5      (       a)  U R                  R/                  [3        S5      U-  5        ML  U R                  R/                  [3        S5      U-  5        Mu     UU4S jnUR9                  [        R                  [        R(                  U5        gs  snf )z
Considers any actions that care about the presence of conflicting unknown
files. For some actions, the result is to abort; for others, it is to
choose a different action.
   merges   checkunknowns   checkignored   experimental   merge.checkpathconflictsc                f   > US:X  a  TR                  U 5        g US:X  a  TR                  U 5        g g )Nr!   r"   )r   )	conflictsr%   abortconflictswarnconflictss     r/   collectconflicts,_checkunknownfiles.<locals>.collectconflicts   s4    !%%i07"$$Y/ #r?   Nr   F   remote createdr!   s#   remote differs from untracked localr"   Ts,   %s: untracked file conflicts with directory
s,   %s: untracked directory conflicts with file
s   %s: untracked file differs
sL   untracked files in working directory differ from files in requested revisions   %s: replacing untracked file
s+   %s: replacing untracked files in directory
c                   > U T;   =(       d>    T=(       a5    U T;   =(       d)    [        U4S j[        R                  " U 5       5       5      nUu  nX24$ )Nc              3  ,   >#    U  H	  oT;   v   M     g 7frD   rg   ).0rZ   pathconflictss     r/   	<genexpr><_checkunknownfiles.<locals>.transformargs.<locals>.<genexpr>  s     H3GaM)3G   )anyr   rP   )r<   argsbackupflagsfileconflictsrw   s       r/   transformargs)_checkunknownfiles.<locals>.transformargs  sU      ]" IH83D3DQ3GHH 	 r?   )rE   r0   r$   
configbooldictr7   r8   rA   r\   mergestatemodACTION_CREATEDACTION_DELETED_CHANGEDr>   rU   
getactionsACTION_LOCAL_DIR_RENAME_GET_ignorerO   ACTION_CREATED_MERGEaddfile
ACTION_GETACTION_MERGEsortedwarnrS   r
   r   
StateError	mapaction) r(   r:   r;   forcemresult
mergeforceunknownconfigignoredconfig
pathconfigr9   r7   r8   rq   checkunknowndirsr<   pathr|   r.   allconflictscignoredconflictsunknownconflictsfl2anc	differentr%   r   r   ro   r   rw   rp   s                                @@@@r/   _checkunknownfilesr      s    EMEMEMUN*4?KM*4?KM##4J vH}}H99D 	0 /0,,44
A !II!!!$'A6#!%%d+
 $..667
LAtS !a  !!!$
 %}4'3P|!t}}7L7LQ7OA|P'*::)=9)=9  B BCD
LAtS HC)I }}$$Q''&& !,,%L%	 v1!..4,:	 8#""1%W$!%%a(!,,$K%	W
d N#ww||yy%%a((QGH1LMQGH1LM23a78 $ ;
 	
 M"99!!!$$GGLL<=ABGGLLJKaOP	 #
 $$m&>&>u Qs   $Q-Qc                D   [         R                  nU(       a  [         R                  nU R                  5        H  nXQ;  d  M
  UR	                  XTSS5        M     U(       dA  U R                  5        H,  nXQ;  d  M
  UR	                  U[         R                  SS5        M.     gg)a  
Forget removed files

If we're jumping between revisions (as opposed to merging), and if
neither the working directory nor the target rev has the file,
then we need to remove it from the dirstate, to prevent the
dirstate from listing the file when it is no longer in the
manifest.

If we're merging, and the other revision has removed a file
that is not present in the working directory, we need to mark it
as removed.
Ns   forget deleteds   forget removed)r   ACTION_FORGETACTION_REMOVEdeletedr   removed)r:   r;   branchmerger   mr<   s         r/   _forgetremovedr   &  s     	##A''\\^=OOA$(9:  A}!//%	   r?   c                &   U R                  5       nUR                  5       (       db  [        UR                  U5      5      nU(       a@  [	        UR                  5       5       H#  nU" U5      (       a  M  UR                  U5        M%     O[        U5      nU(       Ga  UR                  [        R                  [        R                  [        R                  [        R                  [        R                  [        R                  45       H  nUR                  U5        M     UR                  [        R                  45       H  nUR!                  U5        M     UR#                  [        R$                  /5       H,  u  pVnUu  pUR!                  U5        UR                  U5        M.     UR                  [        R&                  45       H  nUR                  U5        M     UR#                  [        R(                  /5       H5  u  pVnUu  ppnU(       a  UR!                  U
5        UR                  U5        M7     0 nU HK  n[*        R,                  " U5      nX;   a)  [/        S5      nXuX   4-  n[0        R2                  " U5      eX^U'   MM     S=n=nn[5        UR7                  5       5       He  u  pUR9                  U5      (       a>  UR9                  U5      (       d(  [/        S5      nUUU4-  n[0        R2                  " U5      eUS-   nUS-   nUnMg     g)z$
Check for case-folding collisions.
s(   case-folding collision between %s and %sr?   s5   case-folding collision between %s and directory of %s   /N)narrowmatchalwaysrE   rW   rO   r\   
removefiler   
ACTION_ADDACTION_ADD_MODIFIEDr   r   ACTION_CHANGED_DELETEDr   rU   r   discardr   ACTION_DIR_RENAME_MOVE_LOCALr   r   r   normcaser
   r   r   r   items
startswith)r(   wmfr   r   pmmfr<   r|   r.   r=   r~   f1famover   foldmapfold
foldprefixunfoldprefixlastfulls                      r/   _checkcollisionr   G  s   
 ""$K388K()'--/*"1~~&&q) +
 3x((11++((4444	
A HHQK	
  ; ;=>ALLO ?#..778
LAS IBLLHHQK
  I IKLAHHQK M#..0J0J/KLLAS$(!BBcR HHQK	 M G}}Q??@Cw}%%C""3''  ,/.J.'--/*??:&&q||L/I/ILMCHa= C""3''D[
4x +r?   c              #  r   #    U H-  n[         R                  " U5       H  nXB;   d  M
  X44v     M+     M/     g7f)z
Generator that yields pairs of all the files in the manifest that are found
inside the directories listed in dirs, and which directory they are found
in.
N)r   rP   )r(   manifestr[   r<   rZ   s        r/   _filesindirsr     s5      ""1%Ayd
 & s   "77c           
     	   UR                  5       n[        5       n[        5       n[        5       n[        5       n[        5       n	UR                  [        R                  [        R
                  [        R                  [        R                  45       HQ  n
UR                  [        R                  " U
5      5        UR                  U
5      (       d  M@  UR                  U
5        MS     UR                  [        R                  45       H  n
U	R                  U
5        M     UR                  [        R                  45       H'  u  pnUu  pnnnU(       d  M  U	R                  U5        M)     UR                  [        R                  45       H  u  pnUu  nnU	R                  U5        M     U H  nUU;   a)  UU;   a  UR                  U5        OUR                  U5        UR!                  U5      nU(       d  ML  US   [        R                  [        R
                  [        R                  [        R                  4;   d  M  UR                  U5        M     U H  nUU	;  d  M  [#        U5      R%                  S5      n[&        R(                  " UUU[        UR                  5       5      5      nUU   R+                  5       =(       d    UnUR-                  U[        R.                  UU4S5        UR-                  U[        R0                  US4S5        M     U(       Ga  [#        U5      R%                  S5      n[3        XU5       H  u  n
nX;  d  M  UR!                  U5      nUc   eUu  np[&        R(                  " UUU[        UR                  5       5      5      nU[        R
                  [        R                  4;   a  UR-                  UUX5        O)US   nUR-                  U[        R4                  UU4S5        UR-                  U[        R0                  US4S5        UR7                  U5          O   U(       aO  U H*  nU R8                  R;                  [=        S	5      U-  5        M,     [>        R@                  " [=        S
5      5      eg)z
Check if any actions introduce path conflicts in the repository, updating
actions to record or handle the path conflict accordingly.
r      +s   local path conflict   ls   path conflictNs   remote path conflict   rs#   %s: is both a file and a directory
s,   destination manifest contains path conflicts)!r   rE   r\   r   r   r   r   r   r   r   rP   hasdirrU   r   r   r   getfilebytesrstripr   safename
copysourcer   ACTION_PATH_CONFLICT_RESOLVEACTION_PATH_CONFLICTr   r   remover$   r   r
   r   r   )r(   r:   r;   r   mflocalconflictsremoteconflictsinvalidconflictscreatedfiledirsdeletedfilesr<   r|   r.   r   r=   r   r   r   r~   rZ   pdctxnamepnewporigmapping_valuer   fls                              r/   checkpathconflictsr     s   
 
B UN eO
 u eO 5L]]((00&&..		
 	x003499Q<< "  ]]M779: ;**M,F,F+HI $D#4R  J  **		3	35 	E	 7Dy !$$Q' ""1%__Q2"Q%((00&&..	
 
   #+ 0 L Dk((.G==GT3w}}3GHDG&&(-AEOO::E
&	 OO22t 	 $ +$$T* ?;DAq$ ' 2 %000,4}}Qs7==?7KL!88!.. 
 OOD!T7 aBOO%AAB/	 !664L$	  &&q)A <D !AGGLLBCaGH "=>
 	
 r?   c                @   [        UR                  5       5       GH   u  p4U " U5      (       a  M  U(       d  UR                  U5        M/  US   R                  (       a  UR                  U5        MV  US   R                  (       av  UR                  S5      (       d3  UR                  U5        UR                  USUS   R                  5        M  [        S5      n[        S5      n[        R                  " XS-  US9e[        S5      n[        R                  " XS-  5      e   g)	z
Filters out actions that can ignored because the repo is narrowed.

Raise an exception if the merge cannot be completed because the repo is
narrowed.
r   r   s   outside-narrow-merge-actionsB   merge affects file '%s' outside narrow, which is not yet supporteds'   merging in the other direction may workhints-   conflict in file '%s' is outside narrow cloneN)rO   filemapr   no_opnarrow_safeendswithaddcommitinfochangesr
   r   Abortr   )r   r   r   r<   actionr.   r   s          r/   _filternarrowactionsr   %  s     '//+,	q>>q!AY__q!AY""::d##""1%%%5vay7H7H 2 CDkk#'55FGC""37++/ -r?   c                  P   \ rS rSr% SrS\S'   S\S'   SS jrS r        SS	 jr    SS
 jr	 S     SS jjr
 S   SS jjrS S jr S!     S"S jjr S   S#S jjr S!   S$S jjrS S jr\S 5       r\S 5       r\S 5       r\  S%S j5       rSS jrS&S jrSrg)'rh   iJ  zAn object representing result of merging manifests.

It has information about what actions need to be performed on dirstate
mapping of divergent renames and other such cases.zdict[bytes, FileMappingValue]_filemappingzKdict[mergestatemod.MergeAction, dict[bytes, tuple[MergeResultData, bytes]]]_actionmappingc                    0 U l         0 U l        0 U l        [        R                  " [
        5      U l        [        R                  " [
        5      U l        g)a	  
filemapping: dict of filename as keys and action related info as values
diverge: mapping of source name -> list of dest name for
         divergent renames
renamedelete: mapping of source name -> list of destinations for files
              deleted on one side and renamed on other.
commitinfo: dict containing data which should be used on commit
            contains a filename -> info mapping
actionmapping: dict of action names as keys and values are dict of
               filename as key and related data as values
N)r   _diverge_renamedeletecollectionsdefaultdictr   _commitinfor   rH   s    r/   rJ   mergeresult.__init__U  sA     &2248)55d;r?   c                    Xl         X l        g rD   )r   r   )rI   divergerenamedeletes      r/   updatevaluesmergeresult.updatevaluesg  s    )r?   c                    XR                   ;   a"  U R                   U   u  pVnU R                  U   U	 X#U4U R                   U'   X44U R                  U   U'   g)zadds a new file to the mergeresult object

filename: file which we are adding
action: one of mergestatemod.ACTION_*
data: a tuple of information like fctx and ctx related to this merge
message: a message about the merge
Nr   r   )rI   filenamer   datamessageadr   s           r/   r   mergeresult.addfilek  sc      (((''1GA!##A&x0'-W&=(#15F#H-r?   c                    U R                   U   nU R                   U	 U R                   U   nUR                  5        H&  u  nu  pxU" Xg5      nX'U4U R                  U'   Xx4XV'   M(     g)zuchanges all occurrences of action `actionfrom` into `actionto`,
transforming its args with the function `transform`.
N)r   r   r   )	rI   
actionfromactionto	transformorigdestr<   r   r.   s	            r/   r   mergeresult.mapaction  sp     "":.
+""8,"jjlNA{Q%D$,C#8Da kDG +r?   Nc                B    XR                   ;   a  U R                   U   $ U$ )z^returns (action, args, msg) about this file

returns default_return if the file is not present)r   )rI   r   default_returns      r/   r   mergeresult.getfile  s'     ((($$X..r?   c              #     #    Uc  U R                    Sh  vN   gU H  nU R                  U    Sh  vN   M     g N& N7f)zfreturns files on which provided action needs to perfromed

If actions is None, all files are returned
Nr   )rI   actionsr   s      r/   r\   mergeresult.files  sE      ?(((( ..q111  ) 2s   A <A >
A A c                b    U R                   U   u  p#nU R                   U	 U R                  U   U	 g)zPremoves a file from the mergeresult object as the file might
not merging anymoreNr   )rI   r   r   r   r   s        r/   r   mergeresult.removefile  s:     !% 1 1( ;gh''1r?   c              #     #    U Ht  nU(       a;  [        U R                  U   5       H  nU R                  U   U   u  pVXEU4v   M     ME  U R                  U   R                  5        H  u  nu  pVXEU4v   M     Mv     g7f)zget list of files which are marked with these actions
if sort is true, files for each action is sorted and then added

Returns a list of tuple of form (filename, data, message)
N)r   r   r   )rI   r  sortr   r<   r|   r.   s          r/   r   mergeresult.getactions  s      A 3 3A 67A $ 3 3A 6q 9ID3,& 8 '+&9&9!&<&B&B&DNA{3,& 'E s   A<A>c                ^   ^  Uc  [        T R                  5      $ [        U 4S jU 5       5      $ )z{returns number of files which needs actions

if actions is passed, total of number of files in that action
only is returnedc              3  T   >#    U  H  n[        TR                  U   5      v   M     g 7frD   )lenr   )rv   r   rI   s     r/   rx   "mergeresult.len.<locals>.<genexpr>  s$     @13t**1-..s   %()r  r   sum)rI   r  s   ` r/   r  mergeresult.len  s,     ?t(())@@@@r?   c              #     #    U(       a,  [        U R                  R                  5       5       S h  vN   g U R                  R                  5        S h  vN   g  N( N7frD   )r   r   r   )rI   r  s     r/   r   mergeresult.filemap  sG      d//557888((..000 90s!   .AA"AAAAc                &    X0R                   U   U'   g)z\adds key-value information about filename which will be required
while committing this mergeNr   )rI   r   keyvalues       r/   r   mergeresult.addcommitinfo  s     +0"3'r?   c                    U R                   $ rD   )r   rH   s    r/   r   mergeresult.diverge  s    }}r?   c                    U R                   $ rD   )r   rH   s    r/   r   mergeresult.renamedelete  s    !!!r?   c                    U R                   $ rD   r  rH   s    r/   
commitinfomergeresult.commitinfo  s    r?   c                    [         R                  " [        5      nU R                  R	                  5        H6  u  p#UR	                  5        H  u  nu  pVX   R                  XEU45        M     M8     U$ )zureturns a dictionary of actions to be perfomed with action as key
and a list of files and related arguments as values)r   r   rO   r   r   append)rI   resr   r   r<   r|   r.   s          r/   actionsdictmergeresult.actionsdict  s^     %%d+''--/DA"#'');Dqn- #, 0 
r?   c                    Xl         [        R                  " [        5      U l        U R                   R                  5        H  u  nu  p4nXE4U R                  U   U'   M     g rD   )r   r   r   r   r   r   )rI   r  r<   actr   r.   s         r/   
setactionsmergeresult.setactions  sU    #)55d;#'#4#4#:#:#<A3*.)D$Q' $=r?   c                    U R                   R                  5        Hp  nU[        R                  [        R                  [        R
                  [        R                  4;  d  MG  U R                   U   (       d  M]  UR                  (       a  Mp    g   g)zVtells whether this merge resulted in some actions which can
result in conflicts or notTF)r   keysr   r   ACTION_EXECr   r   r   )rI   r   s     r/   hasconflictsmergeresult.hasconflicts  sr     $$))+A!,,!--!//!>>	 ''** , r?   )r   r   r   r   r   )returnNone)r   r   r   mergestatemod.MergeActionr   zMergeResultData | Noner6  r7  )r  r8  r  r8  rD   )r   r   r
  FileMappingValue | Noner6  r9  )r  *Iterable[mergestatemod.MergeAction] | Noner6  zIterator[bytes])r   r   r6  r7  F)r  z#Iterable[mergestatemod.MergeAction]r  boolr6  zIterator[MergeResultAction])r  r:  r6  int)r  r<  r6  z'Iterator[tuple[bytes, MergeResultData]])r6  z8dict[mergestatemod.MergeAction, list[MergeResultAction]])r6  r<  )ra   rb   rc   rd   re   __annotations__rJ   r   r   r   r   r\   r   r   r  r   r   propertyr   r   r&  r+  r/  r4  rf   rg   r?   r/   rh   rh   J  ss   :
 0/ <$*@@ *@ %	@ 
@."-" ,"$ JN/F	  EI2A2	2 2 JO':'BF'	$'$ EIAAA	A !11	010
   " "     		A	 	4r?   c
                <  ^ [        5       n
Ub  UR                  5       (       a  Sn[        TR                  5       X#/-   [        R
                  S9 Vs/ s H  nUR                  5       PM       n[        R                  " 5       n[        R                  " 5       n0 nU(       a  [        R                  " U TX#5      u  pn[        R                  " [        U5      5      n[        R                  " [        U5      5      n[        R                  " [        U5      5      nU R                  R                  [        S5      5        U R                  R!                  SUUU4-  5        U R                  R!                  SUTU4-  5        TR                  5       UR                  5       UR                  5       nnn[#        UR$                  R'                  5       5      nUR)                  UR*                  R'                  5       5        [#        UR$                  R'                  5       5      nUR)                  UR*                  R'                  5       5        SU;   aN  TR-                  5       c=  [/        U4S jTR0                   5       5      (       a  U R2                  R4                  US'   UTU/TR                  5       -   ;  a  U	(       d  U R                  R7                  SS	5      (       d  U R8                  S
:X  d  [#        UR;                  U5      R=                  5       5      nUR$                  R?                  5        H  u  nnUU;   d  M  URA                  U5        M!     UR*                   H  nURA                  U5        M     [        RB                  " U U5      n[D        RF                  " UU5      nUR;                  UUS9nUR?                  5        GH7  u  nu  u  nnu  n n!U(       Ga  U (       Ga  UU;  a  UR$                  RI                  US5      =(       d    UR$                  RI                  US5      n"Su  n#n$U"b  UUU"SURK                  5       4n#SU"-  n$OUUSSURK                  5       4n#Sn$U
RM                  U[N        RP                  U#U$5        M  UUR$                  ;   aJ  UR$                  U   n"U
RM                  U[N        RP                  UU"U"SURK                  5       4SU"-  5        GM  UUR$                  ;   aJ  UR$                  U   n"U
RM                  U[N        RP                  U"UU"SURK                  5       4SU"-  5        GMw  UU   n%URS                  U5      n&SUU!-   U&-   ;  n'U U%:X  a+  U!U&:X  a%  U
RM                  U[N        RT                  SS5        GM  UU%:X  av  UU&:X  ap  UU :X  a&  U
RM                  U[N        RV                  U!4S5        GM  U
RM                  U[N        RX                  U!S4S5        U(       a  U
R[                  USS5        GMB  GME  U'(       a,  U U%:X  a&  U
RM                  U[N        RV                  U!4S5        GMx  U'(       aJ  UU%:X  aD  U
RM                  U[N        RX                  US4S5        U(       a  U
R[                  USS5        GM  GM  U
RM                  U[N        RP                  UUUSURK                  5       4S5        GM  U(       Ga!  UU;   a  GM  UUR*                  ;   aw  UR*                  U   n(U(U;   a8  U
RM                  U([N        RP                  UU(SSURK                  5       4S5        GMo  U
RM                  U([N        R\                  UU4SU-  5        GM  UUR$                  ;   aJ  UR$                  U   n(U
RM                  U[N        RP                  UU(U(SURK                  5       4SU(-  5        GM  UU;   Ga  UUU   :w  a  U(       a%  U
RM                  U[N        R^                  SS5        GM/  U
RM                  U[N        R`                  USUSURK                  5       4S5        U(       a  U
R[                  US S!5        GM  GM  UU R2                  Rb                  :X  a%  U
RM                  U[N        Rd                  SS"5        GM  U
RM                  U[N        R^                  SS#5        U(       a  U
R[                  US S!5        GM  GM  U
RM                  U[N        Rf                  SS$5        GM*  U (       d  GM4  UU;   a  GM=  UUR*                  ;   aw  UR*                  U   n(U(U;   a8  U
RM                  U([N        RP                  U(USSURK                  5       4S%5        GM  U
RM                  U([N        Rh                  UU!4S&U-  5        GM  UUR$                  ;   at  UR$                  U   n(Su  n$n#U(U;   a  U(UU(SURK                  5       4n#S'U(-  n$OU(UU(SURK                  5       4n#S(U(-  n$U
RM                  U[N        RP                  U#U$5        GMH  UU;  a  U(       d&  U
RM                  U[N        Rj                  U!4S)5        GM{  U(       d&  U
RM                  U[N        Rj                  U!4S)5        GM  U
RM                  U[N        Rl                  U!URK                  5       4S*5        GM  U UU   :w  Ga  Sn)URn                   H9  n*URq                  U*5      (       d  M  URn                  U*   U[s        U*5      S -   n)  O   U)bA  U)U;   a;  U
RM                  U)[N        RP                  U)UUSURK                  5       4S+U-  5        GMv  U(       a&  U
RM                  U[N        Rj                  U!4S,5        GM  U
RM                  U[N        Rt                  SUUSURK                  5       4S-5        U(       a  U
R[                  US S!5        GM  GM  U
RM                  U[N        Rv                  SS.5        U(       d  GM$  U
R[                  US S!5        GM:     U R                  R7                  SS/5      (       a  [y        U TX*5        U R{                  5       n+U+R                  5       (       d  [}        U+XJ5        UR~                  n,U,R)                  UR~                  5        U
R                  UU,5        U
$ s  snf )0a  
Merge wctx and p2 with ancestor pa and generate merge action list

branchmerge and force are as passed in to update
matcher = matcher to filter file lists
acceptremote = accept the incoming changes without prompting

Returns an object of mergeresult class
N)r  s   resolving manifests
s)    branchmerge: %s, force: %s, partial: %s
s%    ancestor: %s, local: %s, remote: %s
   .hgsubstatec              3  b   >#    U  H$  nTR                  U5      R                  5       v   M&     g 7frD   )subdirty)rv   sr:   s     r/   rx    manifestmerge.<locals>.<genexpr>N  s%     :Mqtxx{  ""Ms   ,/rk   s   merge-track-salvageds   changeset-sidedata)r   NNFs   both renamed from %ss   both createds   local replaced from %ss   other replaced from %sr   rg   s   remote unchangeds   update permissionss   remote is newers   filenode-sources   others   versions differTs%   remote directory rename, both createds&   remote directory rename - move from %ss   local copied/moved from %ss   remote deletes   prompt changed/deleteds   merge-removal-candidate   yess   remote deleteds   other deleteds    ancestor missing, remote missings$   local directory rename, both createds$   local directory rename - get from %ss   remote copied from %ss   remote moved from %srs   s   remote created, get or merges-   local directory rename - respect move from %ss   remote recreatings   prompt deleted/changeds#   local not present, remote unchangedrl   )Arh   r   r   parentsr   intrevr   r   branch_copiesmergecopiesr   bytestrr<  r$   noter
   debugrE   copyvaluesr   movewithdirrevr{   substatenodeconstantsmodifiednodeidr   filecopiesmodediffr2  r   rU   
matchfilesmatchmodintersectmatchersgetnoder   r   r   r~   ACTION_KEEPr3  r   r   r   r   r   addednodeidr   ACTION_KEEP_NEWr   r   r   dirmover   r  r   ACTION_KEEP_ABSENTr   r   r   r   r   )-r(   r:   p2par   r   matcheracceptremotefollowcopiesforcefulldiffr   xbranch_copies1branch_copies2r   boolbmboolfboolmm1m2macopied1copied2relevantfilescopykey	copyvalue
movedirkeyfilesmatcherrX  r<   n1fl1n2r   r   r|   r.   r   flanolr=   dfr   r   r   s-    `                                           r/   manifestmerger    s.   * mGw~~//
 "1w~~FFA 	


F
 ))+N))+NG 282D2D$3
/ d;/0FT%[)ET']+EGGLL+,-GGMM58NN 	GGMM;r4nLM"++-BB.%%,,./GNN>--4467.%%,,./GNN>--4467
 2 :DMM:::!%!3!3!B!BB~ 	D":./GG0GHH""&;; BGGBK,,./ #1"5"5";";"=GYM)!!'* #> )44Jj) 5))$>,,WlC772W7%D%)ZZ\!!IRyC"{#((,,t 6#((,,Q5  '	c>q"eRWWY7D1B6Cq$rwwy9D)C=#=#=tSIn)))#((+!..Brwwy1-2	 n)))#((+!..Brwwy1-2	 qEhhqk#)c/17sczOO%11+	 1WRx)55 F1	  )44 %L.	 '#11 !#5x ' R1WOO%11-	 R1WOO%00e*	 #--a1CXN # OO%22Aq%3*	 G|^///#//28OO%22BdBGGI6@	 OO%BBCAAE	 n)))#((+!..Brwwy11B6	 bA;#)77 ,	  )@@a	:5	 '#11 !#=v ' 4--999 OO%33)	 OO%33(	 #
  --96 # !117	 RG|n000#//28OO%22QeRWWY7?	 OO%AAC?!C	 n)))#((+&	T82ubggi8D2R7C2tRWWY7D1B6C=#=#=tSI" OO%44)	 %OO%44)	 OO%::bggi(7	 r!u'//A||A+33A63q68D	 0
 >bBhOO%22Q5"'')4#%&'	 "OO%44,	 OO%<<q!UBGGI61	 #--96 #
 !44:	 ;
 ))!-GPc &2f ww/+FGG4r3""$K[+?!..L334,/NIs   rc                   [        UR                  [        R                  45      5       HH  nXS;   d  M
  X   R	                  X5   5      (       a  M&  UR                  U[        R                  SS5        MJ     [        UR                  [        R                  45      5       H7  nXS;   d  M
  X%   R	                  X5   5      (       a  M&  UR                  U5        M9     g)zTResolves false conflicts where the nodeid changed but the content
remained the same.Ns   prompt same)	rO   r\   r   r   r6   r   r   r   r   )r(   r:   r;   ancestorr   r<   s         r/   _resolvetrivialr    s    
 '--!E!E GHI=X[!9!9OO=..n J '--!E!E GHI=X[!9!9q! Jr?   c
                  ^^ SSK Jn
  Sn[        U5      S:X  aQ  [        U UUUS   UUUUU5	      n[	        XX%X5        U R
                  R                  SS5      (       a  [        S5        GOU R
                  R                  [        S5      UU[        S5      R                  S	 U 5       5      4-  5        0 n[        5       nS
u  pU GHW  nU R
                  R                  [        S5      U-  5        [        U UUUUUUUUSS9
n[	        XX%UU	5        Ub"  [        UR                  5      [        U5      :  a  UR                  nUb"  [        U5      [        UR                  5      :  a  UR                  nUR                  R                  UR                  5        UR!                  SS9 Hr  u  nnUu  nnnU R
                  R#                  SUUUR%                  5       4-  5        UU;   a)  UU   nUU;   a  UU   R'                  U5        Mb  U/UU'   Mj  UU/0UU'   Mt     GMZ     U R
                  R                  [        S5      [        U5      -  5        [)        UR+                  5       5       GH  u  nnU R
                  R,                  (       a|  U R
                  R#                  SU-  5        [)        UR+                  5       5       HA  u  nmT H5  u  nnnU R
                  R#                  SUUR%                  5       4-  5        M7     MC     [        U5      S:X  a  [/        UR+                  5       5      S   u  nm[1        U4S jTSS  5       5      (       aP  U R
                  R                  [        S5      UUR%                  5       4-  5        UR2                  " U/TS   Q76   GM9  [4        R6                  U;   aQ  U R
                  R                  [        S5      U-  5        UR2                  " U/U[4        R6                     S   Q76   GM  [4        R8                  U;   aQ  U R
                  R                  [        S5      U-  5        UR2                  " U/U[4        R8                     S   Q76   GM  [4        R:                  U;   ae  [4        R<                  U;   aQ  U R
                  R                  [        S5      U-  5        UR2                  " U/U[4        R:                     S   Q76   GM|  [4        R<                  U;   aQ  U R
                  R                  [        S5      U-  5        UR2                  " U/U[4        R<                     S   Q76   GM  [4        R>                  U;   ae  [4        R@                  U;   aQ  U R
                  R                  [        S5      U-  5        UR2                  " U/U[4        R>                     S   Q76   GMZ  [4        R@                  U;   a  U[4        R@                     S   m[1        U4S jU[4        R@                     SS  5       5      (       a=  U R
                  R                  [        S5      U-  5        UR2                  " U/TQ76   GM  U R
                  R                  [        S5      U-  5        [)        UR+                  5       5       HA  u  nmT H5  u  nnnU R
                  R                  SUUR%                  5       4-  5        M7     MC     [/        UR+                  5       5      S   u  nmU R
                  RC                  [        S5      UUR%                  5       4-  5        UR2                  " U/TS   Q76   GM     U R
                  R                  [        S5      5        URE                  X5        URG                  5       c  [I        XXK5        U
RK                  XX$U5        [M        XX#S   U5        U$ ) an  
Calculate the actions needed to merge mctx into wctx using ancestors

Uses manifestmerge() to merge manifest and get list of actions required to
perform for merging two manifests. If there are multiple ancestors, uses bid
merge if enabled.

Also filters out actions which are unrequired if repository is sparse.

Returns mergeresult object same as manifestmerge().
r	   sparseNr   s   devels   debug.abort-updates5   note: merging %s and %s using bids from ancestors %s
s    and c              3  N   #    U  H  n[         R                  " U5      v   M     g 7frD   )r   rM  )rv   r   s     r/   rx   #calculateupdates.<locals>.<genexpr>  s      L)3!1!1#!6!6)s   #%rG  s"   
calculating bids for ancestor %s
T)rh  r      %s: %s -> %s
s/   
auction for merging merge bids (%d ancestors)
s    list of bids for %s:
s      %s -> %s
c              3  2   >#    U  H  oTS    :H  v   M     g7f)r   Nrg   )rv   r   ls     r/   rx   r    s     0%QAaDy%s   s    %s: consensus for %s
s    %s: picking 'keep' action
s"    %s: picking 'keep absent' action
s&    %s: picking 'changed/deleted' action
s    %s: picking 'keep new' action
s%    %s: picking 'delete/changed' action
c              3  ,   >#    U  H	  oT:H  v   M     g 7frD   rg   )rv   r   ga0s     r/   rx   r  P  s     L)KACx)Krz   s    %s: picking 'get' action
s%    %s: multiple bids for merge action:
s     %s -> %s
s(    %s: ambiguous merge - picked %s action
s   end of auction

)' r  r  r  r   r$   r   exitrN  r
   r&   rh   r   r   r   r   r   rO  	__bytes__r)  r   r   	debugflagrO   allr   r   r^  rb  r   r`  r   r   r   r   rS  r   filterupdatesactionsr  )r(   r:   r;   	ancestorsr   r   rf  rg  re  r   r  r   fbidsr   r   r  mresult1r<   r   r   r|   r.   r   bids_fr  r  s                            @@r/   calculateupdatesr    s   0 G
9~aL

 	4tGH77h(=>>G 	GH(   L) LL	
 - *!HGGLLBChNO$"H t4*M #h&6&6"7#g,"F"**#s<'83%%< (  (44 &&x';';< ((d(31 40AsAKKM3JJK:aAAv!A !s! !A3xE!H 4? "Z 	BC)n	
 ekkm,GAtww  81<="4::<0DAq)*D#&6#q{{}9M&MN *+ 1
 4yA~DJJL)!,10!AB%000GGLL45AKKM8JJ OOA-!-((D0Q>?!CDGD)B)B$CA$FG//47QEFJKND)I)I$J1$MN 44<!11T9QIJQNO]AAB1E ,,4QBCaGHKD)F)F$G$JK 44<!,,4QHIAMN]AAB1E ''4/=334Q7Lm.F.F)G)KLLLGGLL#A!BQ!FGOOA,, GGLLDEIJtzz|,1%&MBcGGLLC3G!GH &' - 

%a(DAqGGLL>?akkm$% OOA%!%_ -` 	Q,-.W3xxzt;8
DwGDlG<Nr?   c                 N     [         R                  " 5       $ ! [         a     g f = frD   )r   getcwdFileNotFoundErrorrg   r?   r/   _getcwdr  n  s&       s    
$$c           	   #    #    U R                   R                  n[        5       nSnU H  u  pgnU R                   R                  SXh4-  5        U(       a'  U R                   R	                  [        S5      U-  5        X   R                  5          X   R                  SS9  US:X  a  XV4v   SnUS	-  nM     US:  a  UW4v   U(       aB  [        5       (       d2  U R                   R                  [        S
5      U R                  -  5        ggg! [         aQ  n	U R                   R                  [        S5      U[        R                  " U	R                  5      4-  5         Sn	A	NSn	A	ff = f7f)zKapply removes to the working directory

yields tuples for progress updates
r   s    %s: %s -> r
   removing %s
T)ignoremissings    update failed to remove %s: %s!
Nd   r	   sC   current directory was removed
(consider changing to repo root: %s)
)r$   verboser  rO  rN  r
   rQ   r   OSErrorr   r   forcebytestrstrerrorroot)
r(   r:   r  r  cwdir<   r|   r.   insts
             r/   batchremover  u  s<    
 ggooG
)C	A'1(23GGLL+,q01	GNNN. 8$JA	Q    	1ud

799 	: ii		
 s  	GGLL67j--dmm<=> 	s2   B
E(D
A,E(

E%AE E( E%%E(c           	   #    #    0 nU R                   R                  nUR                  nU R                   nSn	U R                  R	                  U[        U5      S9   U GH  u  n
u  pnU R                   R                  SX4-  5        U(       a'  U R                   R                  [        S5      U
-  5        U(       a  U
nU R                  R                  U
5      (       dA  [        R                  " U
5       H'  nU R                  R                  U5      (       d  M%  Un  O   U R                  R                  U5      (       a=  [        R                  " XU5      n[        R                   " U R#                  U5      U5        X*   nUR%                  5         UR'                  SS5      nUR)                  U" U
5      R+                  5       USUS9nU(       a9  UR-                  5       nUR.                  n[0        R2                  " U5      nUUU4XZ'   U	S	:X  a	  S
X44v   Sn	U	S-  n	GM     SSS5        U	S:  a  S
U	W
44v   SU4v   g! , (       d  f       N#= f7f)aR  apply gets to the working directory

mctx is the context to get from

Yields arbitrarily many (False, tuple) for progress updates, followed by
exactly one (True, filedata). When wantfiledata is false, filedata is an
empty dict. When wantfiledata is true, filedata[f] is a triple (mode, size,
mtime) of the file f written for each action.
r   )expectedcounts    %s: %s -> g
s   getting %s
rk   s   update.atomic-fileT)backgroundclose
atomictempr  Fr	   N)r$   r  filectxr8   backgroundclosingr  rO  rN  r
   rT   r   rP   rS   r   
backuppathr   renamewjoinclearunknownr   writer   lstatst_moder   mtime_of)r(   r;   r:   wantfiledatar  filedatar  fctxr$   r  r<   r~   r}   r.   conflictingrZ   r  wfctxr  sizerE  modemtimes                          r/   batchgetr    s     HggooG<<D	B	A		$	$Rs7|	$	D'.#AGGMM+qh67Q/!34  yy((++%..q19911!44*+K! 2 99$$[11"--bDDKK

; 7>GE 8MNJ;;Q $%	  D : KKMyy!**1-#T51CxaVm#FAA (/ 
ED 	1uaVm
.I 
E	Ds&   AIB:H;DH;I;
I	Ic                   UR                  [        R                  [        R                  [        R                  [        R
                  /5      n[        R                  n[        R                  nU" U UR                  5       U" X5      4/5        g)zInvoke ``scmutil.prefetchfiles()`` for the files relevant to the dict
of merge actions.  ``ctx`` is the context being merged in.N)
r\   r   r   r   r   r   r   prefetchfilesrY  rS  )r(   ctxr   r\   prefetchrY  s         r/   _prefetchfilesr    s{     MM$$0055&&		
E $$H##J 	4'	
r?   )frozenc                      \ rS rSr\R
                  " 5       r\R
                  " 5       r\R
                  " 5       r\R
                  " 5       r	S r
Srg)updateresulti  c                    U R                   =(       d2    U R                  =(       d    U R                  =(       d    U R                  (       + $ rD   )updatedcountmergedcountremovedcountunresolvedcountrH   s    r/   isemptyupdateresult.isempty  sA     $$  $ ##	
 	
r?   rg   N)ra   rb   rc   rd   r   ibr  r  r  r  r  rf   rg   r?   r/   r  r    s3    779L'')K779LggiO
r?   r  c                L   [        XU5        Su  pxn	UR                  SS9n
U
R                  UR                  5       R	                  5       UR	                  5       U5        UR
                  R                  5        H  u  pU
R                  X5        M     UR                  [        R                  R                  5      nUR                  5       U-
  nU R                  R                  [        S5      [        S5      US9nSUR                  [        R                      ;   a  ["        R$                  " XX2XF5        UR'                  [        R(                  /SS9 H  u  nnnUu  nnU R                  R*                  nU" [        S	5      U-  5        US
:X  a  U" [        S5      U-  5        OU" [        S5      U-  5        U" [        S5      U-  5        U
R-                  UUU5        UR/                  US9  M     UR1                  5       (       a  SOSn[2        R2                  " U R                  U[4        X4[7        UR'                  [        R                   /SS95      5      nU H  u  nnUR/                  UUS9  M     UR                  [        R                   45      n	UR'                  [        R8                  /SS9 H  u  nnnU R                  R;                  SUU4-  5        Uu  nnUU   R=                  5       (       a  U R                  R?                  [        S5      UU4-  5        X+   RA                  5         X+   RC                  URE                  U5      RG                  5       URE                  U5      RI                  5       5        UU   RK                  5         UR/                  US9  M     U R                  RM                  SS5      n[2        R2                  " U R                  U[N        XX%4[7        UR'                  [        RP                  /SS95      USS9n0 nU H&  u  nnU(       a  UnM  Uu  nnUR/                  UUS9  M(     SUR                  [        RP                     ;   a  ["        R$                  " XX2XF5        UR'                  [        RR                  4SS9 H6  u  nnnU R                  R;                  SUU4-  5        UR/                  US9  M8     UR'                  [        RT                  4SS9 H6  u  nnnU R                  R;                  SUU4-  5        UR/                  US9  M8     UR'                  [        RV                  4SS9 H6  u  nnnU R                  R;                  SUU4-  5        UR/                  US9  M8     [        R                  R                   HN  nUR'                  U4SS9 H6  u  nnnU R                  R;                  SUUURY                  5       4-  5        M8     MP     UR'                  [        RZ                  4SS9 H  u  nnnU R                  R;                  SUU4-  5        UR/                  US9  Uu  nn U R                  R?                  [        S5      UU4-  5        X+   RA                  5         X+   RC                  URE                  U5      RG                  5       U 5        UU   RK                  5         M     UR'                  [        R\                  4SS9 H  u  nnnU R                  R;                  SUU4-  5        UR/                  US9  Uu  nn U R                  R?                  [        S5      UU4-  5        X+   RC                  URE                  U5      RG                  5       U 5        M     UR'                  [        R^                  4SS9 Hf  u  nnnU R                  R;                  SUU4-  5        UR/                  US9  Uu  n X+   RA                  5         X+   Ra                  S
U ;   SU ;   5        Mh     / n![7        UR'                  [        Rb                  [        Rd                  [        Rf                  /SS95      n"U" H  u  nnnUu  nn#n$n%n&US:X  a  M  Uc  [h        Rj                  " UU$5      n'O%U R                  R;                  S UU4-  5        UU   n'U#c  [h        Rj                  " UU$5      n(OUU#   n(U U&   n)U$U);   a  U)U$   n*OU RE                  U[l        S!9n*U
Ro                  U'U(U*U5        UU:w  d  M  U%(       d  M  U!Rq                  U5        M     U! H^  nX+   R=                  5       (       d  M  U R                  R;                  S"U-  5        X+   RA                  5         X+   RK                  5         M`     UR                  [        RP                  [        R^                  [        R\                  [        RZ                  45      n U" H  u  nnnU R                  R;                  S#UU4-  5        U
R                  US$S%05        UR/                  US9  US:X  a)  ["        R$                  " XX2Rs                  U5      XF5        My  X+   RA                  5         U
Ru                  X5        M     U
R{                  5         U
R}                  5       n+U
R                  5       u  n,n-n.UU,-  nUU--  nU	U.-  n	U
R                  5       n/UR                  5         [        XxU	U+5      UU/4$ ! [v        Rx                   a     Nf = f! U
R{                  5         f = f)&a  apply the merge action list to the working directory

mresult is a mergeresult object representing result of the merge
wctx is the working copy context
mctx is the context to be merged into the working copy

Return a tuple of (counts, filedata), where counts is a tuple
(updated, merged, removed, unresolved) that describes how many
files were affected by the update, and filedata is as described in
batchget.
)r   r   r   T)cleans   updatings   files)unittotalrA  r  sD   %s: path conflict - a file or link has the same name as a directory
r   s&   the local file has been renamed to %s
s'   the remote file has been renamed to %s
s1   resolve manually then use 'hg resolve --mark %s'
)itemr   gMbP?)stepr  s    %s: %s -> pr
s   moving %s to %s
rk   s   worker.wdir-get-thread-safe)
threadsafe	hasretvals    %s: %s -> f
s    %s: %s -> a
s    %s: %s -> am
r  s    %s: %s -> dm
s    %s: %s -> dg
s   getting %s to %s
s    %s: %s -> e
   xs!    preserving %s for resolve of %s
)fileidr  s    %s: %s -> m
s   mergedrH  )Cr  r   startp1r]  r&  r   r   r  r   MergeActionNO_OP_ACTIONSr$   makeprogressr
   r   r   r   submerger   r   statusaddpathconflict	incrementr3   r   r  rO   r   rO  rT   rN  rQ   r  r  r   r~   r   r   r  r   r   r   r   r  r   r   r3  setflagsr   r   r   r   absentfilectxr   rU   r)  r  resolver   InterventionRequiredcommitr  countsr  completer  )0r(   r   r:   r;   	overwriter  labelsupdatedmergedr   msr<   op	num_no_op
numupdatesprogressr|   r.   r   forE  costprogr  r  f0origf0r  getfiledatafinalr*  r   r~   movesmergeactionsr=   r   r   r   fclfcoactxfca
unresolved	msupdatedmsmerged	msremovedextraactionss0                                                   r/   applyupdatesr    sQ
   * 4w'&GW	t	$BHHTWWY^^tyy{F3##))+ 	 ,
 M55CCDI*Jww##	+Qx[
 $ H //0K0KLLTYG  **		+	+,4 + 4 BGGNN	 		
 :a:;b@Aa;<rAB	!A
BQ
FG
1b"%"%, !!1uD ==	W!<!< =DIJD 4- kk=6689G  **		3	344 + 4 	(As834V8GGLL/0B7:;GMMOGMM$,,r*//14<<3C3I3I3KLHOO" ##7J ==	T(W!9!9 :FGD K
sKGAtAD1  //0H0HIITYG  **		$	$&T + 4 	'1c(23"	  **		!	!#$ + 4 	'1c(23"	  **		*	*,4 + 4 	(As834"	 &&44#..t$.?LAtSGGMM,3/FFG @ 5  **		3	35D + 4 	(As834"	EQ+,Aw67dll2&++-u5R  **		2	244 + 4 	(As834"	EQ,-Q78dll2&++-u5  **		"	"$4 + 4 	'1c(23"6 E 4444**
  	 	
	L %4 $BD#:))$3CGGMM?2q'IJr(C:))$3Cr(CCy:r(C ,,r',2C
sCa 7ttLL+ %0 7??GGMM*Q./GMMOGNN	  kk$$%%5566		
G(LAtSGGMM+q#h67QF 34A&N"$$mmD&99 GMMOJJq )" 			##%J%'YY["IxyG
hFyG::<LWgz: # %%  	
 			s%   "B"k7 7ll ll l#c                L   U R                   R                  SS5      nU R                   R                  SS5      n[        R                  " SSS9nUb  U R                   R                  SS5      n SS	KJn  UR                  S5        U R                   R                  SS
5      S:g  nU(       ah  U(       d`  X R                  :X  aP  X:  aJ  [        R                  R                  S5      (       a%  U R                   R                  [        S5      5        g g g g g g ! [         a    Sn N~f = f)Ns	   fsmonitors   warn_when_unuseds   warn_update_file_countr7   Tr   s   warn_update_file_count_rustr	   )
extensionss   modes   offF)s   linuxs   darwins   (warning: large working directory being used without fsmonitor enabled; enable fsmonitor to improve performance; see "hg help -e fsmonitor")
)r$   r   	configintr   
importrustr  r	  findr%   KeyErrornullidr   sysplatformr   r   r
   )r(   num_getsp1nodefsmonitorwarningfsmonitorthresholddirstate_rustmodr	  fsmonitorenableds           r/   _advertisefsmonitorr  '  s    ww)),8KL**/ (($?#!WW..*


! %77>>,@FJ 	 kk!*  ++,ABB1	
 C + " ! 		  ! !s   .6D D#"D#r!   s   nones   linears
   noconflictc                   SSK Jn  Uc   eU(       d9  U(       d2  U
c  [        n
[        [        [        4nX;  a  SnXU4-  n[        U5      eUb+  UR                  5       (       a  [        R                  " 5       nOU R                  5       nU   Uc  U S   nUR                  5       nUS   nX   nUb  X   /nOU R                  R                  SS5      S/:X  ak  U R                  R                  UR                  5       UR                  5       5      n[!        U5      =(       d    U R"                  / Vs/ s H  nU U   PM
     nnOUR%                  UUS	9/nUR                  5       UR                  5       ['        U5      ['        U5      4u  nnnnU=(       a    U(       + nU(       d~  [)        U5      S:  a  [*        R,                  " [/        S
5      5      eUR1                  5       nUR3                  5       (       a+  [/        S5      n[/        S5      n[*        R,                  " UUS9eU(       Ga0  [/        S5      nUU/:X  a  [*        R4                  " U5      eUU/:X  aT  U(       dM  UR7                  5       UR7                  5       :X  a+  [/        S5      n[/        S5      n[*        R4                  " UUS9eU(       dU  UR9                  5       (       d  UR;                  5       (       a+  [/        S5      n[/        S5      n[*        R,                  " UUS9eUR                  5       (       d;  [!        UR<                  5       H"  nUR?                  U5      RA                  5         M$     OU(       d  UU:X  a;  U RC                  SSUSS9  U RC                  SUSSS9  [E        SSSS5      sSSS5        $ U
[        :X  a  UU/U/4;  a  URG                  SS9nU(       ah  [H        RJ                  " U UR                  5       /5      n X   R                  5       U ;   a  O,[/        S5      n[/        S5      n[*        RL                  " UUS9e U(       a  U/nO
U(       d  U/nU R                  RO                  SS5      n!U(       a  Sn!OUS   (       d  Sn!U(       d  URG                  SS9(       d  Sn!Sn"Sn#[P        (       a  U R                  RO                  SS5      (       a  [R        b  URU                  5       [V        :X  a  U(       d  U RY                  5       cx  Ucu  UR1                  5       R[                  5       (       dR  SU;  aL  [\        R^                  " U R`                  5      n$[c        U$5      n%U%c   eU%Rd                  S :X  a   [c        U$5        U"(       Ga  U Ri                  5         URk                  U [V        URU                  5       /5        U RC                  SSUUS9  U Rl                  Ro                  S!URq                  5       5        U R                  RO                  S"S#5      (       a  U R                  Rs                  S"S$S5      OSn& [R        Ru                  U R`                  URU                  5       U&5      n'U Rv                  Ry                  5         U Rv                  R{                  U 5         U Rv                  R}                  U5        SSS5        U Rv                  R                  UR7                  5       U RY                  5       5        UR                  U 5        U RC                  SUUSS9  [        R                  " U Rl                  R                  S!5      5        [E        U'SSS5      sSSS5        $ [        U UUUUUUU!UUS%9
n(U
[        :X  a@  U(R                  5       (       a+  [/        S&5      n[/        S5      n[*        R,                  " UUS9eU(R                  S5      n)U)(       Gad  Sn*U)u  n+n,n[        R                  " U5      n-U*U-S''   U+[        R                  :X  a  U R                  R                  [/        S(5      U--  S5      (       a#  U(R                  U*[        R                  SS)5        OU*U;   a#  U(R                  U*[        R                  SS*5        OU(R                  U*[        R                  SS*5        OU+[        R                  :X  a}  U,u  n.n/n0n1nUU/   R                  5       n2U R                  R                  [/        S+5      U--  S5      S:X  a%  U(R                  U*[        R                  U2S4S,5        OU(R                  U*5        [        R                  " U R                  5      (       dY  U(       d8  U(       d  URG                  SSS-9(       d  [        U UR                  5       S5        O[        XR                  5       U(5        [!        U(R                  R                  5       5       H]  u  n*n3U R                  R                  [/        S.5      U*-  5        [!        U35       H!  n4U R                  R                  S/U4-  5        M#     M_     [!        U(R                  R                  5       5       H]  u  n*n3U R                  R                  [/        S05      U*-  5        [!        U35       H!  n4U R                  R                  S/U4-  5        M#     M_     U(       d  UU R"                  US4u  nnnnUSL =(       d    UR                  5       n5U	=(       a    U5=(       a    UR                  5       (       + n	U	(       aC  U#(       d<  U RC                  SSUUS9  U Rl                  Ro                  S!URq                  5       5        [        U U(R)                  [        R                  45      UR                  5       5        U	=(       a    U(       + n6[        U U(UUUU6US19u  n7n8n9U	(       Ga  U9(       am  U9R                  5        HY  u  n:n;U; H  n<U(R                  " U<S   U:/U<SS Q76   M     U:[        R                  :X  d  M?  U6(       d  MH  U; H  n<SU8U<S   '   M     M[     [)        U85      U6(       a   U(R)                  [        R                  45      OS:X  d   eU Rv                  R{                  U 5         U8(       a  [        U U85      n8U R}                  UU5        [        R                  " U U(R                  UU85        U(       d8  U Rv                  R                  UR7                  5       U RY                  5       5        [        R                  " U Rl                  R                  S!5      5        U(       d  UR                  U 5        SSS5        SSS5        U	(       a  U RC                  SWWW7R2                  S9  W7$ s  snf ! [f         a    Sn" GN.f = f! , (       d  f       GN= f! [R        R                   a    Sn# GNyf = f! , (       d  f       N= f! , (       d  f       N= f)2a  
Perform a merge between the working directory and the given node

node = the node to update to
branchmerge = whether to merge between branches
force = whether to force branch merging or file overwriting
matcher = a matcher to filter file lists (dirstate not updated)
mergeancestor = whether it is merging with an ancestor. If true,
  we should accept the incoming changes for any prompts that occur.
  If false, merging with an ancestor (fast-forward) is only allowed
  between different named branches. This flag is used by rebase extension
  as a temporary fix and should be avoided in general.
labels = labels to use for local, other, and base
mergeforce = whether the merge was run with 'merge --force' (deprecated): if
  this is True, then 'force' should be True as well.

The table below shows all the behaviors of the update command given the
-c/--check and -C/--clean or no options, whether the working directory is
dirty, whether a revision is specified, and the relationship of the parent
rev to the target rev (linear or not). Match from top first. The -n
option doesn't exist on the command line, but represents the
experimental.updatecheck=noconflict option.

This logic is tested by test-update-branches.t.

-c  -C  -n  -m  dirty  rev  linear  |  result
 y   y   *   *    *     *     *     |    (1)
 y   *   y   *    *     *     *     |    (1)
 y   *   *   y    *     *     *     |    (1)
 *   y   y   *    *     *     *     |    (1)
 *   y   *   y    *     *     *     |    (1)
 *   *   y   y    *     *     *     |    (1)
 *   *   *   *    *     n     n     |     x
 *   *   *   *    n     *     *     |    ok
 n   n   n   n    y     *     y     |   merge
 n   n   n   n    y     y     n     |    (2)
 n   n   n   y    y     *     *     |   merge
 n   n   y   n    y     *     *     |  merge if no conflict
 n   y   n   n    y     *     *     |  discard
 y   n   n   n    y     *     *     |    (3)

x = can't happen
* = don't-care
1 = incompatible options (checked in commands.py)
2 = abort: uncommitted changes (commit or update --clean to discard changes)
3 = abort: uncommitted changes (checked in commands.py)

The merge is performed inside ``wc``, a workingctx-like objects. It defaults
to repo[None] if None is passed.

Return the same tuple as applyupdates().
r	   r  Nz&Invalid updatecheck %r (can accept %r)r   rj   s   preferancestor   *)r   s   outstanding uncommitted merges   outstanding merge conflictss   use 'hg resolve' to resolver   s7   merging with a working directory ancestor has no effects   nothing to merges#   use 'hg update' or check 'hg heads's   uncommitted changess   use 'hg status' to list changess	   preupdateTr?   )throwparent1parent2s   update)r  r  r   )missings+   commit or update --clean to discard changess   followcopiesFs   rusts   update-from-nullrA  s   .hgs   updatestates   workers   enableds   numcpus)re  r   s   conflicting changes   fsj   local%(l)s changed %(f)s which other%(o)s deleted
use (c)hanged version or (d)elete?$$ &Changed $$ &Deletes   prompt deletes   prompt keepsr   other%(o)s changed %(f)s which local%(l)s deleted
use (c)hanged version or leave (d)eleted?$$ &Changed $$ &Deleteds   prompt recreating)r  branchs<   note: possible conflict - %s was renamed multiple times to:
s    %s
s9   note: possible conflict - %s was deleted and renamed to:
)r  )br  r  UPDATECHECK_LINEARUPDATECHECK_NONEUPDATECHECK_NO_CONFLICT
ValueErrorr3   r   nullcontextmanagerwlockrI  r$   
configlist	changelogcommonancestorsheadsr]  r   r  r  r   r  r   r   r
   r   r  r   r  r\   r   rT  rC  bailifchangedhookr  rD  r   
foregroundUpdateAbortr   MAYBE_USE_RUST_UPDATErust_update_modrS  r   currenttransactionactiveosscandirr  nextr*   StopIterationr   re  vfsr  hexr
  update_from_nullr7   
invalidatechanging_parents
setparents	setbranchprunetemporaryincludesunlinkr&   FallbackErrorr  r4  r   r   
partextrasr   r   promptchoicer   r   r   r   r   r~   r   r   fscasesensitiver   r   r   r   r   r   r   r   r  r  filter_ambiguous_filesrecordupdatesr+  )=r(   r]  r   r   r  mergeancestorr  re  r   updatedirstateupdatecheckwcr  okayr.   maybe_wlockplr  rc  pascahsr   fp1fp2xp1xp2r  r  r   m_arE  rD  r*  rg  r6  update_from_null_fallbackworking_dir_itermaybe_hg_foldernum_cpusupdated_countr   valsr<   r   r|   promptsr   r=   r   r   r~   r   nfr   r  statsr  r  kactsr   s=                                                                r/   _updater\  h  s   F  u ,K "46MN";C&&CS/!	~"--//--/jjl	:dBZZ\UZ>"Cww!!(,=>4&H~~::2779bggiP-3D\-Jdkk]-JL-JStCy-JL{{2K{89WWY	59eBiGS#s-+o	2w{&&q)I'JKKB!!##6778&&s66NOCrd{kk#&&$		)C/0CCDD++c55bhhjjBJJLL./;<&&s66==??,AFF1I++- - Rx		,dC	M		)S#Q	G#Aq!Q/c 
f 00SA 6 . ")!3!3D2779+!FJz(J6 67 !OP#//$?? $C$C ww))(OD LQ L288D8#9 L $)!!!""7,?@@+G# '')1MMO**,,b(!zz$))4"#34O"...##v-,)* 
 NN4'2668!45IIl$SIIHHNN>26684 77%%i<< !!)Z> 
< / @ @IIrvvx! ((* ]]33D9MM,,S1 :''		T5L5L5NO--d3		)S#Q	GDHHMM.9:#M1a;_ 
d #!
 11##%%./GH&&s66
 ~.ALAtS**62GGDMM88877''2
    OO%33(	 "WOO%99&	 OO%00&	 m:::(,%BD#2GG((7
 ""  	 OO%00,	 &&q)##DII..RXXd5XAbkkmT:kkmW= GOO1134EArGGLL, 	 RjX]+ ! 5 G006689EArGGLL) 	 RjX]+ ! : !$dkk3!;Cc3 D4GNN$4'JFJ2==?7J";IIl$SIIHHNN>26684 	'++}779:BGGI	
 &9k/+7,
({L +113GAt!!a8!AB%8 "M444!%A04K!- "&  4 {#<H]5578a   //5"8{"KKS)++'--{K #MM++		T%<%<%>
 DHHMM.9: #11$7' 6_	 
H
 		sCu7L7L 	 	
 L{	 M@ % ,'+$,: :9 #00 1,0)1\ 65_	 
s   B%w*1v Iw*"G
w*-v8B:w*3/v<"5w*v*3Bw*R=w*w*&A(w*Cww*w*v'#w*&v''w**
v9	4w*<ww*ww*
w'	#w**
w8c                   0 nU R                   R                  nSnSnU(       aY  [        R                  " U R                  R
                  5      nUS:g  nUb'  U(       a   [        R                  " U R                  5      nUc%   [        R                  " U R                  5      nUS4nUc  gUu  pxU(       a  SnUR                  5        Hg  u  pU
c  M
  [        R                  " U
S   U5      nUb  US   (       a  U(       a  U(       d  U
S   U
S   S4X)'   MN  US   (       d  MZ  U
S   U
S   U4X)'   Mi     UR                  5        H	  u  pXU	'   M     U$ ! [         a     Nf = f)u(  We've gathered "cache" information for the clean files while updating
them: their mtime, size and mode.

At the time this comment is written, there are various issues with how we
gather the `mode` and `mtime` information (see the comment in `batchget`).

We are going to smooth one of these issues here: mtime ambiguity.

i.e. even if the mtime gathered during `batchget` was correct[1] a change
happening right after it could change the content while keeping
the same mtime[2].

When we reach the current code, the "on disk" part of the update operation
is finished. We still assume that no other process raced that "on disk"
part, but we want to at least prevent later file changes to alter the
contents of the file right after the update operation so quickly that the
same mtime is recorded for the operation.

To prevent such ambiguities from happenning, we will do (up to) two things:
    - wait until the filesystem clock has ticked
    - only keep the "file data" for files with mtimes that are strictly in
      the past, i.e. whose mtime is strictly lower than the current time.

We only wait for the system clock to tick if using dirstate-v2, since v1
only has second-level granularity and waiting for a whole second is
too much of a penalty in the general case.

Although we're assuming that people running dirstate-v2 on Linux
don't have a second-granularity FS (with the exclusion of NFS), users
can be surprising, and at some point in the future, dirstate-v2 will become
the default. To that end, we limit the wait time to 100ms and fall back
to the filtering method in case of a timeout.

+------------+------+--------------+
|   version  | wait | filter level |
+------------+------+--------------+
|     V1     | No   | Second       |
|     V2     | Yes  | Nanosecond   |
| V2-slow-fs | No   | Second       |
+------------+------+--------------+

This protects us from race conditions from operations that could run right
after this one, especially other Mercurial operations that could be waiting
for the wlock to touch files contents and the dirstate.

In an ideal world, we could only get reliable information in `getfiledata`
(from `getbatch`), however this filtering approach has been a successful
compromise for many years. A patch series of the linux kernel might change
this in 6.12³.

At the time this comment is written, not using any "cache" file data at all
here would not be viable, as it would result is a very large amount of work
(equivalent to the previous `hg update` during the next status after an
update).

[1] the current code cannot grantee that the `mtime` and `mode`
are correct, but the result is "okay in practice".
(see the comment in `batchget`)

[2] using nano-second precision can greatly help here because it makes the
"different write with same mtime" issue virtually vanish. However,
dirstate v1 cannot store such precision and a bunch of python-runtime,
operating-system and filesystem parts do not provide us with such
precision, so we have to operate as if it wasn't available.

[3] https://lore.kernel.org/all/20241002-mgtime-v10-8-d1c4717f5284@kernel.org
NTs   nfsF   r   r	   )r7   _use_dirstate_v2r   	getfstyper4  baser   wait_until_fs_tick
get_fs_nowr  r   make_mtime_reliable)r(   	file_dataambiguous_mtimedirstate_v2fs_now_resultfast_enough_fsfstypenow	timed_outr<   r   reliables               r/   rA  rA  	  sY   H !#O--00KMN.6).%88BM	&&txx0C %LM  &"NOO%DA}$881sC#QKN
 +,A$!d);O&a[[ +,A$!h)?O&# &$ $))+DAaL ,A  		s   $E 
EEc           
     X    [        U R                  5       U R                  5       USUUUS9$ )z}Merge another topological branch into the working copy.

force = whether the merge was run with 'merge --force' (deprecated)
T)r  r   r   r   rF  r\  r(   rS  )r  r  r   rF  s       r/   mergerp  	  s2     
	 r?   c           
     \    [        U R                  5       U R                  5       SS/ SQUUS9$ )a  Do a regular update to the given commit, aborting if there are conflicts.

The 'updatecheck' argument can be used to control what to do in case of
conflicts.

Note: This is a new, higher-level update() than the one that used to exist
in this module. That function is now called _update(). You can hopefully
replace your callers to use this new update(), or clean_update(), merge(),
revert_to(), or graft().
F)s   working copys   destinations   working copy parent)r   r   r  rE  rF  ro  )r  rE  rF  s      r/   r   r   	  s2     
	H r?   c                T    [        U R                  5       U R                  5       SSUS9$ )z}Do a clean update to the given commit.

This involves updating to the commit and discarding any changes in the
working copy.
FT)r   r   rF  ro  )r  rF  s     r/   clean_updaters  	  s#     388:swwye4BOOr?   c           
     X    [        U R                  5       U R                  5       SSSUUS9$ )zRevert the working copy to the given commit.

The working copy will keep its current parent(s) but its content will
be the same as in the given commit.
FT)r   r   rD  re  rF  ro  )r  re  rF  s      r/   	revert_toru  	  s2     
	 r?   c                   U=(       d    U S   nUR                  5       nU=(       d    UR                  5       nU R                  R                  UR                  5       UR                  5       5      =(       d!    UR	                  5       UR	                  5       :H  n[        U UR                  5       SSUR                  5       UUUS9n	U(       a"  U	R                  (       a  UR                  5       n
O[U R                  n
UR                  5       nU(       a8  [        U5      S:X  a)  X+;   a$  UR                  U5        US   R                  5       n
XR                  5       :X  a  U R                  n
UR                  5       (       a9  UR                  UR                  5       U
5        [        R                  " XaU5        U	$ U R                  R!                  U 5         U R                  UR                  5       U
5        U R                  R#                  U R%                  5       5        [        R                  " XaU5        SSS5        U	$ ! , (       d  f       U	$ = f)a  Do a graft-like merge.

This is a merge where the merge ancestor is chosen such that one
or more changesets are grafted onto the current changeset. In
addition to the merge, this fixes up the dirstate to include only
a single parent (if keepparent is False) and tries to duplicate any
renames/copies appropriately.

ctx - changeset to rebase
base - merge base, or ctx.p1() if not specified
labels - merge labels eg ['local', 'graft']
keepparent - keep second parent if any
keepconflictparent - if unresolved, keep parent used for the merge

NT)rC  r  rF  r^  r   )r  r&  
isancestorr]  rS  r\  r  r  rI  r  r   r3   r9  r   graftcopiesr7   r8  r  r.  )r(   r  ra  r  
keepparentkeepconflictparentr:   pctxrC  rY  potherrI  s               r/   graftr}  	  s   @ 4:D779D3668D!!$))+sxxz: 	$88:# 
 
		#	E e33++-#g,!+NN4 QZ__&F		V,4d+ L ]]++D1OODIIK0MM 7 7 9:t$/	 2
 L 21
 Ls   A!H;;
I
c           	         Uc9  U R                  5       b  Sn[        R                  " U5      eU R                  5       n[	        U R                  5       USSU R                  5       SS9$ )Ns/   must specify parent of merge commit to back outTF)r   r   r  rC  )rc  r   ProgrammingErrorr  r\  r(   r]  )r  parentrF  r.   s       r/   back_outr  
  s_    ~668DC((--
 r?   c	                n  ^ ^ UU 4S jn	UR                   n
/ n U(       a  / nUR                  Ul         T R                  XUS9nU(       Ga(  Sn[        UR                  5      n[        UR
                  5      nU(       a  U(       a  [        S5      nUUU4-  nOU(       a  [        S5      nUU-  nOvU(       a  [        S5      nX-  nO_U(       aX  SnW H9  nU" U5      (       d  M  T R                  R                  U5      (       a  M4  US-  nM;     U(       a  [        S	5      nUU-  nUc  UXl         $ US
-  nT R                  R                  USS9S:X  a  [        R                  " [        S5      5      eU(       a  [        UR
                  UR                  -   5       H_  nU(       dD  T R                  R                  [        S5      U-  5        U	" T R                  R                  U5        UR                  U5        Ma     U(       a  [        WSS9 H  nU" U5      (       d  M  T R                  R                  U5      (       a  M4  U(       dD  T R                  R                  [        S5      U-  5        U	" T R                  R                   U5        UR                  U5        M     UXl         $ ! Xl         f = f)a  Purge the working directory of untracked files.

``matcher`` is a matcher configured to scan the working directory -
potentially a subset.

``unknown`` controls whether unknown files should be purged.

``ignored`` controls whether ignored files should be purged.

``removeemptydirs`` controls whether empty directories should be removed.

``removefiles`` controls whether files are removed.

``abortonerror`` causes an exception to be raised if an error occurs
deleting a file or directory.

``noop`` controls whether to actually remove files. If not defined, actions
will be taken.

``confirm`` ask confirmation before actually removing anything.

Returns an iterable of relative paths in the working directory that were
or would be removed.
c                   >  U " U5        g ! [          aU    [        S5      U-  nT(       a  [        R                  " U5      eTR                  R                  [        S5      U-  5         g f = f)Ns   %s cannot be removeds   warning: %s
)r  r
   r   r   r$   r   )removefnr   r   abortonerrorr(   s      r/   r   purge.<locals>.removeF
  sZ    	6TN 	6)*T1Akk!n$Q/0145	6s    AA+*A+)r   ignoredunknownNs3   permanently delete %d unknown and %d ignored files?s$   permanently delete %d unknown files?s$   permanently delete %d ignored files?r   r	   s1   permanently delete at least %d empty directories?s    (yN)$$ &Yes $$ &No)defaults   removal cancelleds   removing file %s
T)reverses   removing directory %s
)traversedirr)  r  r  r  r  r
   r8   listdirr$   r?  r   CanceledErrorr   rN  r<  rmdir)r(   re  r  r  removeemptydirsremovefilesr  noopconfirmr   oldtraversedirr*  directoriesr  r.   
nb_ignored
nb_unknown	dir_countr<   s   `     `            r/   purger  "
  s=   H6 ((N
C7-K"-"4"4G7WMCV^^,JV^^,JjNO
J//?@z!?@! 	$Aqzz$))*;*;A*>*>!Q	 % LC 9$C{0 -- --77''Q'71<--a0D.EFFFNNV^^;<GGLL#8!9A!=>499++Q/

1	 = K61::dii&7&7&:&:Q'A%BQ%FGtyy2JJqM 7  -ns,   CJ, $J, $J, 1C-J, "J, A!J, ,J4rD   )r   rh   )r   rh   r6  r7  )r   zmergeresult | Noner6  r7  )r6  zIterator[tuple[bytes, bytes]]r;  )r6  rh   r2   )NFNNFTNN)re  FileDatar6  zOptional[FileData])NFNrG  )NNFFN)TFTTFFF)X
__future__r   r   r0  structtypingr   r   r   r   r   i18nr
   r]  r   
thirdpartyr   TYPE_CHECKINGutilsr   dirstateutilsr   r  r   r   r   r   r   rZ  r   r   r   r   r   r   r   r   r   r   tupleMergeResultDatar   MergeResultActionr  FileMappingValuer  r-  pack_packunpack_unpackr0   r>   rA   r   r   r   r   r   r   rh   r  r  r  r  r  r  r  rE  r  r  r  UPDATECHECK_ABORTr   r  r!  r,  r\  r=  r  rA  rp  r   rs  ru  r}  r  r  rg   r?   r/   <module>r     ss   #  	   < <    
  $   " 
OeXo%>EFJ!!8O#<eC ##H48
--$5 5pP&1PfBAH
J
Z",'2",	",JD Db ~ ~B"6 G GT$
NSl: t
 
 
, EEP2
j    '    _F xc39L9L0M&M NOOPsl",P* 
	IX& 	k-r?   