ROOTPLOIT
Server: Apache
System: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User: ws67150586 (67150586)
PHP: 8.3.36
Disabled: NONE
Upload Files
File: //kunden/kunden/kunden/lib/python3/dist-packages/mercurial/__pycache__/merge.cpython-313.pyc
�

6�hX����SSKJr SSKrSSKrSSKrSSKrSSKJrJrJrJ	r	J
r
 SSKJr SSK
Jr SSKJr \R"(aSSKrSSKJr SS	KJr SS
KJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r& \R"(a$\'r(\'\)\	\(\)4r*\'\RV\	\(\)4r,\!RZ"SSS
9r.\R^r0\Rbr2Sr3S3Sjr4"SS5r5S4Sjr6S5Sjr7S6Sjr8S7Sjr9S5Sjr:S5Sjr;"SS5r<S8S9Sjjr=S5Sjr>S:S9Sjjr?Sr@SrASrBS5S jrC\R�"SS!9"S"S#55rES3S4S$jjrFS%rGS&rHS'rIS(rJS)rKSrLS;S*jrM\\)\	\
\N\N\	\R*44rOS<S+jrPS=S,jrQS>S-jrRS3S.jrSS>S/jrTS?S0jrUS>S1jrVS@S2jrWg)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��URRX5n/SQnX4;aPSRUVs/sHnSU-S-PM
 sn5n[S5nXqX#U4-n[R
"U5eU$s snf)N)�abortsignore�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��
�W�W�^�^�G�
*�F�*�E�
���:�:��>��1�t�a�x�$���>�?���7�8����x�0�0������$�$��M��	?s�A7c���UR5(agUcUnURX%5=(a0 URU5U;=(a XFRX55$�NF)�
isinmemory�isfileorlink_checkdir�	normalize�cmp)�dirstate�wvfs�dircache�wctx�mctx�f�f2s       r/�_checkunknownfiler>Is^��������	�z�
���"�"�8�/�	"����q�!��1�	"��H�L�L���!��c�$�\rSrSrSrSrSrSrg)�_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�@�[5Ul[5Ulg�N)�set�_unknowndircache�_missingdircache��selfs r/�__init__�_unknowndirschecker.__init__fs��!$����
!$���r?c� �UR5(ag[[[R"U555H�nX@R
;a gX@R;aM%URRRU5(dMQURRU5(a-URRU5UR;aUs $URRU5(dUR
RU5  gURRU5 M� URRRU5(a�URRU5(a�URR!U5HmupEnUHan["R$"URR'XG55nURRUSS9nX�R;dM]Us s $ Mo g)NFT)�isknown)r3�reversed�listr�finddirsrGrFr8�audit�check�isfileorlinkr7r5�lexists�add�isdir�walkr�pconvert�reljoin)	rIr(r:r<�p�dirs�files�fn�relfs	         r/�__call__�_unknowndirschecker.__call__qs{���?�?�����$�x�0�0��3�4�5�A��)�)�)���)�)�)���y�y���$�$�Q�'�'��I�I�*�*�1�-�-��
�
�/�/��2�$�-�-�G��H��y�y�(�(��+�+��)�)�-�-�a�0���%�%�)�)�!�,�6�"�9�9�?�?� � ��#�#��	�	����(:�(:�"&�)�)�.�.��"3�����B��=�=����):�):�1�)A�B�D��=�=�2�2�4��2�F�D��=�=�0� ��	 �#4�r?)rGrFN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rJr_�__static_attributes__�r?r/rArA[s���	&�r?rA�mergeresultc��^^^^�[5m[5m[5m[5m[USS5n[USS5nURRSS5n[	5n	UR
n
URnU(GdAUU4Sjn[5n
UR[R[R45HWn[X�X�X.5(aTRU5 M(U(dM1X�;dM8U
"XU5nUcMFTRU5 MY UR[R/5H0unnn[X�X�X.US5(dMTRU5 M2 TT-nUVs1sH'nUR
R!U5(dM%UiM) nnUU-
nU"UU5 U"UU5 GO![#UR[R$/55H�unnnUunn[X�X�X.5nUR
R!U5(aUnOUnU(d&UR'U[R(US	4S
5 MkU(dUS:Xa(UR'U[R*X�SS	U4S5 M�US:XaTRU5 M�US
:XaTRU5 UR'U[R(US4S
5 M� [-T5HnURR.nUT;aLURR1U5(aU"[3S5U-5 MUU"[3S5U-5 MkU"[3S5U-5 M� T(a[4R6"[3S55e[-T5HsnURR1U5(a)URR/[3S5U-5 MLURR/[3S5U-5 Mu UU4SjnUR9[R[R(U5 gs snf)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>�US:XaTRU5 gUS:XaTRU5 gg)Nr!r")r)�	conflictsr%�abortconflicts�
warnconflictss  ��r/�collectconflicts�,_checkunknownfiles.<locals>.collectconflicts�s4�����!��%�%�i�0��7�"��$�$�Y�/�#r?NrF�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
sLuntracked files in working directory differ from files in requested revisions%s: replacing untracked file
s+%s: replacing untracked files in directory
c�>�UT;=(d> T=(a5 UT;=(d) [U4Sj[R"U555nUunX24$)Nc3�,># �UH	oT;v� M g7frDrg)�.0rZ�
pathconflictss  �r/�	<genexpr>�<_checkunknownfiles.<locals>.transformargs.<locals>.<genexpr>s����H�3G�a�M�)�3G���)�anyrrP)r<�args�backup�flags�
fileconflictsrws    ��r/�
transformargs�)_checkunknownfiles.<locals>.transformargssU���
���
����]�"�I��H�8�3D�3D�Q�3G�H�H�	������r?)rEr0r$�
configbool�dictr7r8rAr\�
mergestatemod�ACTION_CREATED�ACTION_DELETED_CHANGEDr>rU�
getactions�ACTION_LOCAL_DIR_RENAME_GET�_ignorerO�ACTION_CREATED_MERGE�addfile�
ACTION_GET�ACTION_MERGE�sorted�warnrSr
r�
StateError�	mapaction) r(r:r;�force�mresult�
mergeforce�
unknownconfig�
ignoredconfig�
pathconfigr9r7r8rq�checkunknowndirsr<�pathr|r.�allconflicts�c�ignoredconflicts�unknownconflicts�fl2�anc�	differentr%r�r�rorrwrps                             @@@@r/�_checkunknownfilesr��s�����E�M��E�M��E�M��U�N�*�4��?�K�M�*�4��?�K�M����#�#��4��J��v�H��}�}�H��9�9�D��	0�/�0������,�,��4�4�
�
�A�!����I�I��!�!�!�$����
�'��A�6���#�!�%�%�d�+�
�$�.�.�
�
6�
6�7�
�L�A�t�S�!�����a�����!�!�!�$�

�%�}�4��'3�P�|�!�t�}�}�7L�7L�Q�7O�A�|��P�'�*:�:���)�=�9��)�=�9� ����
� B� B�C�D�
�L�A�t�S��H�C��)�����I��}�}�$�$�Q�'�'�&��&�������!�,�,��%�L�%�	��v��1�����!�.�.��4���,�:�	��8�#��"�"�1�%��W�$�!�%�%�a�(�����!�,�,��$�K�%�	�W
�d�N�
#���w�w�|�|���
���y�y�%�%�a�(�(��Q�G�H�1�L�M��Q�G�H�1�L�M���2�3�a�7�8�$�����
�;�
�
�	
��M�
"���9�9�!�!�!�$�$��G�G�L�L��<�=��A�B��G�G�L�L��J�K�a�O�P�	#�
�����$�$�m�&>�&>�
���uQs�$Q�-Qc�D�[RnU(a[RnUR5HnXQ;dM
UR	XTSS5 M U(dAUR5H,nXQ;dM
UR	U[RSS5 M. gg)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.
Nsforget deletedsforget removed)r��
ACTION_FORGET�
ACTION_REMOVE�deletedr��removed)r:r;�branchmerger��mr<s      r/�_forgetremovedr�&s���	�#�#�A���'�'��
�\�\�^���=��O�O�A�$�(9�:�������A��}�����!�/�/��%�	� �r?c�&�UR5nUR5(db[URU55nU(a@[	UR55H#nU"U5(aMUR
U5 M% O[U5nU(Ga�UR[R[R[R[R[R[R45HnURU5 M UR[R45HnUR!U5 M UR#[R$/5H,upVnUup�UR!U5 URU5 M. UR[R&45HnURU5 M UR#[R(/5H5upVnUup�p�n
U(aUR!U
5 URU5 M7 0nUHKn[*R,"U5nX�;a)[/S5nXuX�4-n[0R2"U5eX^U'MM S=n=nn[5UR755Heup�UR9U5(a>UR9U5(d([/S5nUUU4-n[0R2"U5eUS-nUS-nUnMg g)z$
Check for case-folding collisions.
s(case-folding collision between %s and %sr?s5case-folding collision between %s and directory of %s�/N)�narrowmatch�alwaysrErWrOr\�
removefiler��
ACTION_ADD�ACTION_ADD_MODIFIEDr�r��ACTION_CHANGED_DELETEDr�rUr��discardr��ACTION_DIR_RENAME_MOVE_LOCALr�r�r�normcaser
rr�r��items�
startswith)r(�wmfr�r��pmmfr<r|r.r=r~�f1�fa�mover��foldmap�fold�
foldprefix�unfoldprefix�lastfulls                   r/�_checkcollisionr�Gs���
�"�"�$�K�������3�8�8�K�(�)����'�-�-�/�*��"�1�~�~��&�&�q�)�+��
�3�x�������(�(��1�1��+�+��(�(��4�4��4�4�

�	
�A�
�H�H�Q�K�	
����
� ;� ;�=�>�A��L�L��O�?�#�.�.�
�
7�
7�8�
�L�A�S��I�B��L�L����H�H�Q�K�
����
� I� I�K�L�A��H�H�Q�K�M�#�.�.�
�0J�0J�/K�L�L�A�S�$(�!�B�B�c�����R� ��H�H�Q�K�	M��G�
���}�}�Q����?��?�@�C��w�}�%�%�C��"�"�3�'�'���
�
�,/�.�J�.����'�-�-�/�*����?�?�:�&�&�q�|�|�L�/I�/I��L�M�C��H�a�=� �C��"�"�3�'�'��D�[�
��4�x����+r?c#�r# �UH-n[R"U5HnXB;dM
X44v�  M+ M/ g7f)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)rrP)r(�manifestr[r<rZs     r/�_filesindirsr��s5������"�"�1�%�A��y��d�
��&��s�"7�7c
�	�UR5n[5n[5n[5n[5n[5n	UR[R[R
[R[R45HQn
UR[R"U
55 URU
5(dM@URU
5 MS UR[R45Hn
U	RU
5 M UR[R45H'up�nUup�nnnU(dMU	RU
5 M) UR[R45Hup�nUunnU	RU5 M UH�nUU;a)UU;aURU5 OURU5 UR!U5nU(dMLUS[R[R
[R[R4;dM�URU5 M� UH�nUU	;dM[#U5R%S5n[&R("UUU[UR555nUUR+5=(d UnUR-U[R.UU4S5 UR-U[R0US4S5 M� U(Ga[#U5R%S5n[3XU5H�un
nX�;dM
UR!U5nUceUunp�[&R("UUU[UR555nU[R
[R4;aUR-UUX�5 O)USnUR-U[R4UU4S5 UR-U[R0US4S5 UR7U5  O U(aOUH*nUR8R;[=S	5U-5 M, [>R@"[=S
55eg)z�
Check if any actions introduce path conflicts in the repository, updating
actions to record or handle the path conflict accordingly.
r�+slocal path conflict�ls
path conflictNsremote path conflict�rs#%s: is both a file and a directory
s,destination manifest contains path conflicts)!r�rEr\r�r�r�r�r�rrrP�hasdirrUr�r�r��getfile�bytes�rstripr�safename�
copysourcer��ACTION_PATH_CONFLICT_RESOLVE�ACTION_PATH_CONFLICTr�r��remover$r�r
rr�)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��U�N��e�O�
�u���e�O��5�L�
�]�]��(�(��0�0��&�&��.�.�		
���	���x�0�0��3�4�
�9�9�Q�<�<�
����"�� �]�]�M�7�7�9�
:�������;��*�*�M�,F�,F�+H�I���� $����D�#��4����R� �J� �*�*�	�	3�	3�5������	��E������	�����7��D�y�!�$�$�Q�'��"�"�1�%�
�_�_�Q�
��
�2�"�Q�%��(�(��0�0��&�&��.�.�	
�
�
� � ��#�+�0���L� ��D�k�(�(��.�G��=�=��G�T�3�w�}�}��3G�H�D���G�&�&�(�-�A�E��O�O���:�:��E�
�&�	
�
�O�O���2�2��t�� �	
��$���+�$�$�T�*�� ��?�;�D�A�q��$� '���� 2�
�%�0�0�0�,���4��}�}�Q���s�7�=�=�?�7K�L���!�8�8�!�.�.���
�O�O�D�!�T�7��a��B��O�O��%�A�A��B��/�	�����!�6�6��4�L�$�	� �&�&�q�)��A<�D�!�A��G�G�L�L��B�C�a�G�H�"����
�=�>�
�	
�r?c�@�[UR55GHup4U"U5(aMU(dURU5 M/USR(aURU5 MVUSR(avURS5(d3URU5 UR
USUSR5 M�[S5n[S5n[R"XS-US9e[S5n[R"XS-5e 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.
rr�soutside-narrow-merge-actionsBmerge 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�!�
�A�Y�_�_����q�!�
�A�Y�
"�
"��:�:�d�#�#��"�"�1�%��%�%��5�v�a�y�7H�7H���2����C�D���k�k�#�'��5�5��F�G�C��"�"�3�7�+�+�/-r?c�P�\rSrSr%SrS\S'S\S'SSjrSrSS	jrSS
jr	SSSjjr
SSS
jjrS SjrS!S"Sjjr
SS#SjjrS!S$SjjrS Sjr\S5r\S5r\S5r\S%Sj5rSSjrS&SjrSrg)'rhiJz�An 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.zdict[bytes, FileMappingValue]�_filemappingzKdict[mergestatemod.MergeAction, dict[bytes, tuple[MergeResultData, bytes]]]�_actionmappingc��0Ul0Ul0Ul[R"[
5Ul[R"[
5Ulg)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�rHs r/rJ�mergeresult.__init__UsA�������
����&�2�2�4�8���)�5�5�d�;��r?c��XlX lgrD)r�r�)rI�diverge�renamedeletes   r/�updatevalues�mergeresult.updatevaluesgs
���
�)�r?c��XR;a"URUupVnURUU	X#U4URU'X44URUU'g)z�adds 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.addfileksc�� �(�(�(��'�'��1�G�A�!��#�#�A�&�x�0�'-�W�&=����(�#�15�����F�#�H�-r?c���URUnURU	URUnUR5H&unupxU"Xg5nX'U4URU'Xx4XV'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�,��"�j�j�l�N�A�{���Q�%�D�$,�C�#8�D���a� ��k�D�G�+r?Nc�B�XR;aURU$U$)z^returns (action, args, msg) about this file

returns default_return if the file is not present)r�)rIr��default_returns   r/r��mergeresult.getfile�s'���(�(�(��$�$�X�.�.��r?c#�# �UcURShv�N gUHnURUShv�N M gN&N7f)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��
)�2�s�A�<�A�>�
A�Ac�b�URUup#nURU	URUU	g)zPremoves a file from the mergeresult object as the file might
not merging anymoreNr�)rIr�r�r�r�s     r/r��mergeresult.removefile�s:��!%� 1� 1�(� ;���g����h�'�����'��1r?c#�# �UHtnU(a;[URU5HnURUUupVXEU4v� M MEURUR5HunupVXEU4v� M Mv g7f)z�get 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�)rIr
�sortr�r<r|r.s       r/r��mergeresult.getactions�s�����A���� 3� 3�A� 6�7�A� $� 3� 3�A� 6�q� 9�I�D��3�,�&�8�'+�&9�&9�!�&<�&B�&B�&D�N�A�{���3�,�&�'E�
�s�A<A>c�^^�Uc[TR5$[U4SjU55$)z{returns number of files which needs actions

if actions is passed, total of number of files in that action
only is returnedc3�T># �UHn[TRU5v� M g7frD)�lenr�)rvr�rIs  �r/rx�"mergeresult.len.<locals>.<genexpr>�s$����@��1�3�t�*�*�1�-�.�.��s�%()rr��sum)rIr
s` r/r�mergeresult.len�s,����?��t�(�(�)�)��@��@�@�@r?c#�# �U(a,[URR55Shv�N gURR5Shv�N gN(N7frD)r�r�r�)rIrs  r/r��mergeresult.filemap�sG�����d�/�/�5�5�7�8�8�8��(�(�.�.�0�0�0�
9�0�s!�.A�A�"A�A�A�Ac�&�X0RUU'g)z\adds key-value information about filename which will be required
while committing this mergeN�r�)rIr��key�values    r/r��mergeresult.addcommitinfo�s��+0����"�3�'r?c��UR$rD)r�rHs r/r��mergeresult.diverge�s���}�}�r?c��UR$rD)r�rHs r/r��mergeresult.renamedelete�s���!�!�!r?c��UR$rDrrHs r/�
commitinfo�mergeresult.commitinfo�s�����r?c���[R"[5nURR	5H6up#UR	5HunupVXRXEU45 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�rOr�r��append)rI�resr�rr<r|r.s       r/�actionsdict�mergeresult.actionsdict�s^���%�%�d�+���'�'�-�-�/�D�A�"#�'�'�)���;�D���
�
�q��n�-�#,�0��
r?c���Xl[R"[5UlURR5Hunup4nXE4URUU'M grD)r�r�r�r�r�r�)rIr
r<�actr�r.s      r/�
setactions�mergeresult.setactions�sU��#��)�5�5�d�;���#'�#4�#4�#:�#:�#<��A���3�*.�)�D����$�Q�'�$=r?c� �URR5HpnU[R[R[R
[R4;dMGURU(dM]UR(aMp g g)zVtells whether this merge resulted in some actions which can
result in conflicts or notTF)r��keysr�r��ACTION_EXECr�r�r�)rIr�s  r/�hasconflicts�mergeresult.hasconflicts�sr���$�$�)�)�+�A��!�,�,�!�-�-�!�/�/�!�>�>�	���'�'��*�*������,�r?)r�r�r�r�r�)�return�None)r�r�r��mergestatemod.MergeActionr�zMergeResultData | Noner6r7)rr8rr8rD)r�r�r
�FileMappingValue | Noner6r9)r
�*Iterable[mergestatemod.MergeAction] | Noner6zIterator[bytes])r�r�r6r7�F)r
z#Iterable[mergestatemod.MergeAction]r�boolr6zIterator[MergeResultAction])r
r:r6�int)rr<r6z'Iterator[tuple[bytes, MergeResultData]])r6z8dict[mergestatemod.MergeAction, list[MergeResultAction]])r6r<)rarbrcrdre�__annotations__rJr�r�r�r�r\r�r�rr�r��propertyr�r�r&r+r/r4rfrgr?r/rhrhJss��:�
0�/���<�$*�@��@�*�@�%�	@�
�
@�."�-�"�,�"�$JN����/F��	 ��EI�2�A�2�	�2� 2�JO�'�:�'�BF�'�	$�'�$EI�A�A�A�	�A�!�1��1�	0�1�0�
�����"��"�� �� ��	�	A�	��	�4�r?c
�<^�[5n
UbUR5(aSn[TR5X#/-[R
S9Vs/sHnUR
5PM  n[R"5n[R"5n
0nU(a[R"UTX#5up�n[R"[U55n[R"[U55n[R"[U55nURR[S55 URR!SUUU4-5 URR!SUTU4-5 TR
5UR
5UR
5nnn[#UR$R'55nUR)UR*R'55 [#U
R$R'55nUR)U
R*R'55 SU;aNTR-5c=[/U4SjTR055(aUR2R4US'UTU/TR5-;a�U	(d�URR7SS	5(d�UR8S
:Xd�[#UR;U5R=55nUR$R?5HunnUU;dMURAU5 M! UR*HnURAU5 M [RB"UU5nRF"UU5nUR;UUS9nUR?5GH7unuunnun n!U(Ga�U (Ga�UU;a�UR$RIUS5=(d U
R$RIUS5n"Sun#n$U"bUUU"S
URK54n#SU"-n$OUUSS
URK54n#Sn$U
RMU[NRPU#U$5 M�UUR$;aJUR$Un"U
RMU[NRPUU"U"S
URK54SU"-5 GMUU
R$;aJU
R$Un"U
RMU[NRPU"UU"S
URK54SU"-5 GMwUUn%URSU5n&SUU!-U&-;n'U U%:Xa+U!U&:Xa%U
RMU[NRTSS5 GM�UU%:XavUU&:XapUU :Xa&U
RMU[NRVU!4S5 GMU
RMU[NRXU!S
4S5 U(aU
R[USS5 GMBGMEU'(a,U U%:Xa&U
RMU[NRVU!4S5 GMxU'(aJUU%:XaDU
RMU[NRXUS
4S5 U(aU
R[USS5 GM�GM�U
RMU[NRPUUUS
URK54S5 GMU(Ga!UU;aGMUUR*;awUR*Un(U(U;a8U
RMU([NRPUU(SSURK54S5 GMoU
RMU([NR\UU4SU-5 GM�UUR$;aJUR$Un(U
RMU[NRPUU(U(S
URK54SU(-5 GM�UU;GaUUU:wa�U(a%U
RMU[NR^SS5 GM/U
RMU[NR`USUS
URK54S5 U(aU
R[US S!5 GM�GM�UUR2Rb:Xa%U
RMU[NRdSS"5 GM�U
RMU[NR^SS#5 U(aU
R[US S!5 GMGMU
RMU[NRfSS$5 GM*U (dGM4UU;aGM=UU
R*;awU
R*Un(U(U;a8U
RMU([NRPU(USS
URK54S%5 GM�U
RMU([NRhUU!4S&U-5 GM�UU
R$;atU
R$Un(Sun$n#U(U;aU(UU(S
URK54n#S'U(-n$OU(UU(SURK54n#S(U(-n$U
RMU[NRPU#U$5 GMHUU;a�U(d&U
RMU[NRjU!4S)5 GM{U(d&U
RMU[NRjU!4S)5 GM�U
RMU[NRlU!URK54S*5 GM�U UU:wGaSn)URnH9n*URqU*5(dMURnU*U[sU*5S-n) O U)bAU)U;a;U
RMU)[NRPU)UUS
URK54S+U-5 GMvU(a&U
RMU[NRjU!4S,5 GM�U
RMU[NRtSUUS
URK54S-5 U(aU
R[US S!5 GM�GM�U
RMU[NRvSS.5 U(dGM$U
R[US S!5 GM: URR7SS/5(a
[yUTX*5 UR{5n+U+R5(d[}U+XJ5 UR~n,U,R)U
R~5 U
R�UU,5 U
$s snf)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)rsresolving manifests
s) branchmerge: %s, force: %s, partial: %s
s% ancestor: %s, local: %s, remote: %s
�.hgsubstatec3�b># �UH$nTRU5R5v� M& g7frD)�sub�dirty)rv�sr:s  �r/rx� manifestmerge.<locals>.<genexpr>Ns%����:�M�q�t�x�x��{� � �"�"�M�s�,/rksmerge-track-salvagedschangeset-sidedata)r�NNFsboth renamed from %ssboth createdslocal replaced from %ssother replaced from %sr�rgsremote unchangedsupdate permissionssremote is newersfilenode-sourcesothersversions differTs%remote directory rename, both createds&remote directory rename - move from %sslocal copied/moved from %ss
remote deletesprompt changed/deletedsmerge-removal-candidate�yessremote deleteds
other deleteds ancestor missing, remote missings$local directory rename, both createds$local directory rename - get from %ssremote copied from %ssremote moved from %srssremote created, get or merges-local directory rename - respect move from %ssremote recreatingsprompt deleted/changeds#local not present, remote unchangedrl)Arhr�r��parentsr�intrevr�r�
branch_copies�mergecopiesr�bytestrr<r$�noter
�debugrE�copy�valuesr�movewithdir�revr{�substate�
nodeconstants�modifiednodeidr��filecopiesmode�diffr2r�rU�
matchfiles�matchmod�intersectmatchers�get�noder�r�r�r~�ACTION_KEEPr3r�r�r�r�r��addednodeidr��ACTION_KEEP_NEWr�r�r��dirmover�rr��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�filesmatcherrXr<�n1�fl1�n2r�r�r|r.r��fla�nolr=�dfrr�r�s- `                                           r/�
manifestmergers.���*�m�G���w�~�~�/�/���
�����"��1�w�~�~�F��F�A�	
�
�
��F��
�)�)�+�N��)�)�+�N��G��28�2D�2D��$��3
�/����
�
�d�;�/�
0�F����T�%�[�)�E����T�'�]�+�E��G�G�L�L��+�,�-��G�G�M�M�5����8N�N��	�G�G�M�M�;�r�4��n�L�M�����"�+�+�-�����B��B��.�%�%�,�,�.�/�G��N�N�>�-�-�4�4�6�7��.�%�%�,�,�.�/�G��N�N�>�-�-�4�4�6�7�������
� 2��:�D�M�M�:�:�:�!%�!3�!3�!B�!B�B�~��	�D�"�:�����.�/���G�G����0G�H�H��"�"�&;�;��B�G�G�B�K�,�,�.�/�
�#1�"5�"5�";�";�"=��G�Y��M�)��!�!�'�*�#>�)�4�4�J����j�)�5��)�)�$�
�>���,�,�W�l�C��
�7�7�2�W�7�%�D�%)�Z�Z�\�!��!�I�R��y��C�
�"���{�#�(�(�,�,��t��6�#�(�(�,�,�Q��5��'�	��c��>��q�"�e�R�W�W�Y�7�D�1�B�6�C��q�$��r�w�w�y�9�D�)�C�����=�#=�#=�t�S�I��n�)�)�)�#�(�(��+������!�.�.���B��r�w�w�y�1�-��2�	��n�)�)�)�#�(�(��+������!�.�.���B��r�w�w�y�1�-��2�	��q�E���h�h�q�k���#��)�c�/�1����7�s�c�z��O�O��%�1�1��+�	��1�W�����R�x�����)�5�5� �F�1�	� ����)�4�4� �%�L�.�	�'�#�1�1� !�#5�x��'��R�1�W��O�O��%�1�1���-�	��R�1�W��O�O��%�0�0��e��*�	�#��-�-�a�1C�X�N�#��O�O��%�2�2��A�q�%�����3�*�	���G�|���^�/�/�/�#�/�/��2����8��O�O��%�2�2��B��d�B�G�G�I�6�@�	��O�O��%�B�B��C��A�A�E�	��n�)�)�)�#�(�(��+������!�.�.���B��r�w�w�y�1�1�B�6�	��b����A��;�#�����)�7�7� �,�	� ����)�@�@���a�����	�:�5�	�'�#�1�1� !�#=�v��'��4�-�-�9�9�9��O�O��%�3�3��)�	��O�O��%�3�3��(�	�#�
 �-�-��9�6��#�����!�1�1��7�	��R��G�|���n�0�0�0�#�/�/��2����8��O�O��%�2�2��Q��e�R�W�W�Y�7�?�	��O�O��%�A�A��C��?�!�C�	��n�)�)�)�#�(�(��+��&�	��T���8���2�u�b�g�g�i�8�D�2�R�7�C���2�t�R�W�W�Y�7�D�1�B�6�C�����=�#=�#=�t�S�I��"����O�O��%�4�4���)�	�%��O�O��%�4�4���)�	��O�O��%�:�:��b�g�g�i�(�7�	��r�!�u����'�/�/�A��|�|�A���+�3�3�A�6��3�q�6�8��D���	0�
�>�b�B�h��O�O��%�2�2��Q��5�"�'�'�)�4�#�%&�'�	�"��O�O��%�4�4���,�	��O�O��%�<�<��q�!�U�B�G�G�I�6�1�	�#��-�-��9�6��#�
����!�4�4��:�	��;�
�)�)�!�-G��P�c&2�f�w�w���/�+F�G�G��4��r�3��"�"�$�K�������[�+�?�!�.�.�L�����3�3�4�����,�/��N��Is�rc��[UR[R455HHnXS;dM
XR	X55(aM&URU[RSS5 MJ [UR[R455H7nXS;dM
X%R	X55(aM&URU5 M9 g)zTResolves false conflicts where the nodeid changed but the content
remained the same.Nsprompt same)	rOr\r�r�r6r�r�r�r�)r(r:r;�ancestorr�r<s      r/�_resolvetrivialr��s���
�'�-�-��!E�!E� G�H�
I���=�����X�[�!9�!9��O�O��=�.�.��n�
�J��'�-�-��!E�!E� G�H�
I���=�����X�[�!9�!9����q�!�Jr?c
�^^�SSKJn
 Sn[U5S:XaQ[UUUUSUUUUU5	n[	XX%X�5 UR
R
SS5(a[S5 GOUR
R[S5UU[S5RS	U554-5 0n[5nS
up�UGHWnUR
R[S5U-5 [UUUUUUUUUSS
9
n[	XX%UU	5 U
b"[UR5[U
5:aURn
Ub"[U5[UR5:aURnURRUR5 UR!SS9HrunnUunnnUR
R#SUUUR%54-5 UU;a)UUnUU;aUUR'U5 MbU/UU'MjUU/0UU'Mt GMZ UR
R[S5[U5-5 [)UR+55GH�unnUR
R,(a|UR
R#SU-5 [)UR+55HAunmTH5unnnUR
R#SUUR%54-5 M7 MC [U5S:Xa�[/UR+55Sunm[1U4SjTSS55(aPUR
R[S5UUR%54-5 UR2"U/TSQ76 GM9[4R6U;aQUR
R[S5U-5 UR2"U/U[4R6SQ76 GM�[4R8U;aQUR
R[S5U-5 UR2"U/U[4R8SQ76 GM[4R:U;ae[4R<U;aQUR
R[S5U-5 UR2"U/U[4R:SQ76 GM|[4R<U;aQUR
R[S5U-5 UR2"U/U[4R<SQ76 GM�[4R>U;ae[4R@U;aQUR
R[S5U-5 UR2"U/U[4R>SQ76 GMZ[4R@U;a�U[4R@Sm[1U4SjU[4R@SS55(a=UR
R[S5U-5 UR2"U/TQ76 GM�UR
R[S5U-5 [)UR+55HAunmTH5unnnUR
RSUUR%54-5 M7 MC [/UR+55SunmUR
RC[S5UUR%54-5 UR2"U/TSQ76 GM� UR
R[S55 UREX�5 URG5c[IXXK5 U
RKXX$U5 [MXX#SU5 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	��sparseNrsdevelsdebug.abort-updates5note: merging %s and %s using bids from ancestors %s
s and c3�N# �UHn[R"U5v� M g7frD)rrM)rvr�s  r/rx�#calculateupdates.<locals>.<genexpr>�s��� L�)�3��!1�!1�#�!6�!6�)�s�#%rGs"
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
c3�2># �UHoTS:Hv� M g7f)rNrg)rvr��ls  �r/rxr�s����0�%�Q�A�a�D�y�%�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
c3�,># �UH	oT:Hv� M g7frDrg)rvr��ga0s  �r/rxr�Ps����L�)K�A�C�x�)K�rzs %s: picking 'get' action
s% %s: multiple bids for merge action:
s  %s -> %s
s( %s: ambiguous merge - picked %s action
send of auction

)'�r�rrr�r$r��exitrNr
r&rhr�r�r�rr�rO�	__bytes__r)r�r��	debugflagrO�allr�r�r^rbr�r`r�r�r�r�rSr��filterupdatesactionsr�)r(r:r;�	ancestorsr�r�rfrgrer�r�r��fbidsr�r�r��mresult1r<r�r�r|r.r�bids�_fr�r�s                         @@r/�calculateupdatesr��s����0��G�
�9�~��������a�L������

��	�4�t�G�H��7�7���h�(=�>�>���G��	
�����
�G�H����(�� � � L�)� L�L��
�	
����-�� *���!�H��G�G�L�L��B�C�h�N�O�$����������"��H�
�t�4��*�M���#�h�&6�&6�"7�#�g�,�"F�"�*�*���#�s�<�'8�3��%�%�<�(� (�4�4��
���&�&�x�';�';�<� �(�(�d�(�3���1� ���4�����
�
�0�A�s�A�K�K�M�3J�J�K���:��a��A��A�v��!����A�� !�s��!�� !�A�3�x�E�!�H�4�?"�Z	
�����
�B�C��)�n�
�	
��e�k�k�m�,�G�A�t��w�w� � ����
�
�8�1�<�=�"�4�:�:�<�0�D�A�q�)*�
��D�#����
�
�&6�#�q�{�{�}�9M�&M�N�*+�1�
�4�y�A�~��D�J�J�L�)�!�,���1��0�!�A�B�%�0�0�0��G�G�L�L��4�5��A�K�K�M�8J�J���O�O�A�-��!��-���(�(�D�0������Q�>�?�!�C�D�����G�D��)B�)B�$C�A�$F�G���/�/�4�7������Q�E�F��J�K�����N�D��)I�)I�$J�1�$M�N���4�4��<�!�1�1�T�9������Q�I�J�Q�N�O�������]�A�A�B�1�E����,�,��4������Q�B�C�a�G�H�����K�D��)F�)F�$G��$J�K���4�4��<�!�,�,��4������Q�H�I�A�M�N�������]�A�A�B�1�E����'�'�4�/��=�3�3�4�Q�7���L��m�.F�.F�)G���)K�L�L�L��G�G�L�L��#A�!B�Q�!F�G��O�O�A�,��,��
�G�G�L�L��D�E��I�J��t�z�z�|�,���1�%&�M�B��c��G�G�L�L��C�����3G�!G�H�&'�-���
�
��%�a�(�D�A�q��G�G�L�L��>�?��a�k�k�m�$�%�
�
�O�O�A�%��!��%��_-�`	
�����Q�,�-�.����W�3��x�x�z���t�;�8�
����D�w�G��D���l�G�<��Nr?c�N�[R"5$![a gf=frD)r�getcwd�FileNotFoundErrorrgr?r/�_getcwdr�ns&������ � ������s��
$�$c	#��# �URRn[5nSnUH�upgnURRSXh4-5 U(a'URR	[S5U-5 XR
5 XRSS9 US:XaXV4v� SnUS	-
nM� US:�aUW4v� U(aB[5(d2URR[S
5UR-5 ggg![aQn	URR[S5U[R"U	R54-5 Sn	A	N�Sn	A	ff=f7f)zKapply removes to the working directory

yields tuples for progress updates
rs
 %s: %s -> r
�removing %s
T)�
ignoremissings update failed to remove %s: %s!
N�dr	sCcurrent directory was removed
(consider changing to repo root: %s)
)r$�verboser�rOrNr
rQr��OSErrorr�r
�forcebytestr�strerror�root)
r(r:r
r��cwd�ir<r|r.�insts
          r/�batchremover�us<���
�g�g�o�o�G�
�)�C�	�A��������
�
�'�1�(�2�3���G�G�L�L��+�,�q�0�1���
�
��	��G�N�N��N�.�
��8��$�J��A�	�Q��� � 	�1�u���d�
�
�7�9�9�	
�����
�:�
��i�i�	
�	
��s���	��G�G�L�L��6�7��j�-�-�d�m�m�<�=�>�
�
��	�s2�B
E(�
D
�A,E(�

E%�AE �E(� E%�%E(c	#�# �0nURRnURnURnSn	URR	U[U5S9 UGH�un
up�n
URR
SX�4-5 U(a'URR[S5U
-5 U(a�U
nURRU
5(dA[R"U
5H'nURRU5(dM%Un O URRU5(a=[R"X�U5n[R "UR#U5U5 X*nUR%5 UR'SS5nUR)U"U
5R+5USUS9nU(a9UR-5nUR.n[0R2"U5nUUU4XZ'U	S	:Xa	S
X�44v� Sn	U	S-
n	GM� SSS5 U	S:�aS
U	W
44v� SU4v� g!,(df   N#=f7f)
aRapply 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
sgetting %s
rksupdate.atomic-fileT)�backgroundclose�
atomictempr�Fr	N)r$r��filectxr8�backgroundclosingrrOrNr
rTrrPrSr�
backuppathr�rename�wjoin�clearunknownr��writer��lstat�st_moder�mtime_of)r(r;r:�wantfiledatar
�filedatar��fctxr$r�r<r~r}r.�conflictingrZr�wfctxr��sizerE�mode�mtimes                       r/�batchgetr��s�����H��g�g�o�o�G��<�<�D�	
���B�	�A�	
���	$�	$�R�s�7�|�	$�	D�'.�#�A�����G�G�M�M�+�q�h�6�7�������Q��/�!�3�4�� ���y�y�(�(��+�+�%�.�.�q�1���9�9�1�1�!�4�4�*+�K�!�2��9�9�$�$�[�1�1�"�-�-�b��D�D��K�K��
�
�;� 7��>��G�E���� �����8M�N�J��;�;��Q������ $�%�	��D��:�K�K�M���y�y��!�*�*�1�-��#�T�5�1����C�x��a�V�m�#���
��F�A�A(/�
E�D	�1�u��a��V�m��
��.��I
E�	D�s&�AI�B:H;�DH;�I�;
I	�Ic��UR[R[R[R[R
/5n[Rn[RnU"UUR5U"X54/5 g)z�Invoke ``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�
prefetchfilesrYrS)r(�ctxr�r\�prefetchrYs      r/�_prefetchfilesr��s{��
�M�M��$�$��0�0��5�5��&�&�		
�
�E��$�$�H��#�#�J������	��4�'�
�	
�r?)�frozenc��\rSrSr\R
"5r\R
"5r\R
"5r\R
"5r	Sr
Srg)�updateresultic��UR=(d2 UR=(d UR=(d UR(+$rD)�updatedcount�mergedcount�removedcount�unresolvedcountrHs r/�isempty�updateresult.isemptysA�����
$����
$�� � �
$��#�#�	
�	
r?rgN)rarbrcrdr�ibr�r�r�r�r�rfrgr?r/r�r�s3���7�7�9�L��'�'�)�K��7�7�9�L��g�g�i�O�
r?r�c
�L�[XU5 Supxn	URSS9n
U
RUR5R	5UR	5U5 UR
R
5Hup�U
RX�5 M UR[RR5n
UR5U
-
nURR[S5[S5US9nSUR[R ;a["R$"XX2XF5 UR'[R(/SS9H�unnnUunnURR*nU"[S	5U-5 US
:XaU"[S5U-5 OU"[S5U-5 U"[S
5U-5 U
R-UUU5 UR/US9 M� UR15(aSOSn[2R2"URU[4X4[7UR'[R /SS955nUHunnUR/UUS9 M UR[R 45n	UR'[R8/SS9H�unnnURR;SUU4-5 UunnUUR=5(a�URR?[S5UU4-5 X+RA5 X+RCUREU5RG5UREU5RI55 UURK5 UR/US9 M� URRMSS5n2"URU[NXX%4[7UR'[RP/SS95USS9n0nUH&unnU(aUnMUunnUR/UUS9 M( SUR[RP;a["R$"XX2XF5 UR'[RR4SS9H6unnnURR;SUU4-5 UR/US9 M8 UR'[RT4SS9H6unnnURR;SUU4-5 UR/US9 M8 UR'[RV4SS9H6unnnURR;SUU4-5 UR/US9 M8 [RRHNnUR'U4SS9H6unnnURR;SUUURY54-5 M8 MP UR'[RZ4SS9H�unnnURR;SUU4-5 UR/US9 Uunn URR?[S5UU4-5 X+RA5 X+RCUREU5RG5U 5 UURK5 M� UR'[R\4SS9H�unnnURR;SUU4-5 UR/US9 Uunn URR?[S5UU4-5 X+RCUREU5RG5U 5 M� UR'[R^4SS9HfunnnURR;SUU4-5 UR/US9 Uun X+RA5 X+RaS
U ;SU ;5 Mh /n![7UR'[Rb[Rd[Rf/SS95n"U"H�unnnUunn#n$n%n&US:XaMUc[hRj"UU$5n'O%URR;S UU4-5 UUn'U#c[hRj"UU$5n(OUU#n(UU&n)U$U);aU)U$n*OUREU[lS!9n*U
RoU'U(U*U5 UU:wdM�U%(dM�U!RqU5 M� U!H^nX+R=5(dMURR;S"U-5 X+RA5 X+RK5 M` UR[RP[R^[R\[RZ45nU"H�unnnURR;S#UU4-5 U
RUS$S%05 UR/US9 US:Xa)["R$"XX2RsU5XF5 MyX+RA5 U
RuX�5 M� U
R{5 U
R}5n+U
R5un,n-n.UU,-
nUU--
nU	U.-
n	U
R�5n/UR�5 [�XxU	U+5UU/4$![vRxa N�f=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.
)rrrT)�cleansupdatingsfiles)�unit�totalrAr�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
s1resolve manually then use 'hg resolve --mark %s'
)�itemrg����MbP?)�stepr�s %s: %s -> pr
smoving %s to %s
rksworker.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
sgetting %s to %s
s
 %s: %s -> e
�xs! preserving %s for resolve of %s
)�fileidr�s
 %s: %s -> m
smergedrH)Cr�r�start�p1r]r&r�r�rr��MergeAction�
NO_OP_ACTIONSr$�makeprogressr
r�r�r�submerger�r��status�addpathconflict�	incrementr3rr�rOr�rOrTrNrQr�r�r�r~r�r�r�r�r�r�r�r�r�r�r3�setflagsr�r�r�r�
absentfilectxrrUr)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/�applyupdatesrsQ
��*�4�w�'�&��G�W�	
���t��	$�B��H�H�T�W�W�Y�^�^�
�t�y�y�{�F�3��#�#�)�)�+���	�����,�
���M�5�5�C�C�D�I������*�J��w�w�#�#�	�+��Q�x�[�
�$��H���/�/�
�0K�0K�L�L����T��Y�G� �*�*�	�	+�	+�,�4�+����4�����B��G�G�N�N��	�
��
��	
�	
���:�
�a�:�;�b�@�A�
�a�;�<�r�A�B�	�!�A�
B�Q�
F�G�
���1�b�"�%������"�%�,���!�!�1�u�D��=�=������	
���W�
�
��!<�!<� =�D�
�
I�J��D����4�������-���k�k�=�6�6�8�9�G� �*�*�	�	3�	3�4�4�+����4��	
���
�
�(�A�s�8�3�4����V���8������G�G�L�L��/�0�B��7�:�;��G�M�M�O��G�M�M�$�,�,�r�*�/�/�1�4�<�<��3C�3I�3I�3K�L���H�O�O�������"�����#�#��7��J��=�=������	
�T�(��W�
�
��!9�!9� :��
�
F�G����D��K��
��s���K��G�A�t����A�D��1����/�/�
�0H�0H�I�I����T��Y�G� �*�*�	�	$�	$�&�T�+����4��	
���
�
�'�1�c�(�2�3������"�	� �*�*�	�	!�	!�#�$�+����4��	
���
�
�'�1�c�(�2�3������"�	� �*�*�	�	*�	*�,�4�+����4��	
���
�
�(�A�s�8�3�4������"�	��
&�
&�
4�
4��#�.�.��t�$�.�?�L�A�t�S��G�G�M�M�,��3����
�/F�F�G�@�5� �*�*�	�	3�	3�5�D�+����4��	
���
�
�(�A�s�8�3�4������"��	��E������Q�+�,��A�w�6�7���
�
����
�
�d�l�l�2�&�+�+�-�u�5��R������ �*�*�	�	2�	2�4�4�+����4��	
���
�
�(�A�s�8�3�4������"��	��E������Q�,�-��Q��7�8���
�
�d�l�l�2�&�+�+�-�u�5�� �*�*�	�	"�	"�$�4�+����4��	
���
�
�'�1�c�(�2�3������"������
�
�����������
�6��
�E������4�4��4�4��*�*�
�
�
	�	
�	�L�%���4�� $���B��D�#�����
�:��)�)�$��3�C��G�G�M�M�?�2�q�'�I�J��r�(�C�
�:��)�)�$��3�C��r�(�C��C�y��
��:��r�(�C��,�,�r�'�,�2�C�
���s�C��a� �
��7�t�t��L�L���+%�0���7�?�?����G�G�M�M�*�Q�.�/��G�M�M�O��G�N�N��	��k�k��$�$��%�%��5�5��6�6�		
��G��(�L�A�t�S��G�G�M�M�+�q�#�h�6�7����Q��F� 3�4����A��&��N�"��$�$���m�m�D�&9�9����G�M�M�O��J�J�q��)�"	�	�	���#�#�%�J�%'�Y�Y�[�"�I�x���y��G�
�h��F��y��G��:�:�<�L������W�g�z�:������#�%�%�
�	
�
��
	�	�	��s%�"B"k7�7l�l�
l�l�l#c�L�URRSS5nURRSS5n[R"SSS9nUbURRSS5nSS	KJn URS5 URRSS
5S:gnU(ahU(d`X R:XaPX:�aJ[RRS
5(a%URR[S55 gggggg![a SnN~f=f)Ns	fsmonitorswarn_when_unusedswarn_update_file_countr7Trswarn_update_file_count_rustr	)�
extensionssmodesoffF)slinuxsdarwins�(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���w�w�)�)�,�8K�L�����*�*��/����(�(��$�?���#�!�W�W�.�.��*�
��

!� �����%��7�7�>�>�,��@�F�J��	� ��k�k�!��*�� � �+�+�,A�B�B������
�1�
�	
�
C�
+�
"�!�	��	�!� ��!�s�.6D�D#�"D#r!snoneslinears
noconflictc��SSKJn UceU(d9U(d2U
c[n
[[[4n
X�;aSnX�U
4-n[U5eUb+UR
5(a[R"5nOUR5nU UcUSnUR5nUSnXnUbX/nO�URRSS5S/:XakURRUR5UR55n[!U5=(d
 UR"/Vs/sHnUUPM
 nnOUR%UUS	9/nUR5UR5['U5['U54unnnnU=(a U(+nU(d~[)U5S:�a[*R,"[/S
55eUR15nUR35(a+[/S5n[/S5n[*R,"UUS
9eU(Ga0[/S5nUU/:Xa[*R4"U5eUU/:XaTU(dMUR75UR75:Xa+[/S5n[/S5n[*R4"UUS
9eU(dUUR95(dUR;5(a+[/S5n[/S5n[*R,"UUS
9eUR
5(d;[!UR<5H"nUR?U5RA5 M$ O�U(d�UU:Xa;URCSSUSS9 URCSUSSS9 [ESSSS5sSSS5 $U
[:Xa�UU/U/4;aURGSS9nU(ah[HRJ"UUR5/5n XR5U ;aO,[/S5n[/S5n[*RL"UUS
9eU(aU/nO
U(dU/nURROSS5n!U(aSn!OUS(dSn!U(dURGSS9(dSn!Sn"Sn#[P(a�URROSS5(a�[Rb�URU5[V:Xa�U(d�URY5cxUcuUR15R[5(dRSU;aL[\R^"UR`5n$[cU$5n%U%ceU%RdS :Xa[cU$5 U"(Ga�URi5 URkU[VURU5/5 URCSSUUS9 URlRoS!URq55 URROS"S#5(aURRsS"S$S5OSn&[RRuUR`URU5U&5n'URvRy5 URvR{U5 URvR}U5 SSS5 URvRUR75URY55 UR�U5 URCSUUSS9 [R�"URlR�S!55 [EU'SSS5sSSS5 $[�UUUUUUUU!UUS%9
n(U
[:Xa@U(R�5(a+[/S&5n[/S5n[*R,"UUS
9eU(R�S5n)U)(GadSn*U)un+n,n[�R�"U5n-U*U-S''U+[�R�:Xa�URR�[/S(5U--S5(a#U(R�U*[�R�SS)5 O�U*U;a#U(R�U*[�R�SS*5 O�U(R�U*[�R�SS*5 O�U+[�R�:Xa}U,un.n/n0n1nUU/R�5n2URR�[/S+5U--S5S:Xa%U(R�U*[�R�U2S4S,5 OU(R�U*5 [R�"UR�5(dYU(d8U(dURGSSS-9(d[�UUR�5S5 O[�XR�5U(5 [!U(R�R�55H]un*n3URR�[/S.5U*-5 [!U35H!n4URR�S/U4-5 M# M_ [!U(R�R�55H]un*n3URR�[/S05U*-5 [!U35H!n4URR�S/U4-5 M# M_ U(dUUR"US4unnnnUSL=(d UR�5n5U	=(a U5=(a UR
5(+n	U	(aCU#(d<URCSSUUS9 URlRoS!URq55 [�UU(R)[�R�45UR55 U	=(a U(+n6[�UU(UUUU6US19un7n8n9U	(Ga�U9(amU9R�5HYun:n;U;Hn<U(R�"U<SU:/U<SSQ76 M U:[�R�:XdM?U6(dMHU;Hn<SU8U<S'M
 M[ [)U85U6(a U(R)[�R�45OS:XdeURvR{U5 U8(a[�UU85n8UR}UU5 [�R�"UU(R�UU85 U(d8URvRUR75URY55 [R�"URlR�S!55 U(dUR�U5 SSS5 SSS5 U	(aURCSWWW7R2S9 W7$s snf![fa Sn"GN.f=f!,(df   GN�=f![RR�a Sn#GNyf=f!,(df   N�=f!,(df   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)rrjspreferancestor�*)r�soutstanding uncommitted mergesoutstanding merge conflictssuse 'hg resolve' to resolver�s7merging with a working directory ancestor has no effectsnothing to merges#use 'hg update' or check 'hg heads'suncommitted changessuse 'hg status' to list changess	preupdateTr?)�throw�parent1�parent2supdate)rrr)�missings+commit or update --clean to discard changessfollowcopiesFsrustsupdate-from-nullrAs.hgsupdatestatesworkersenabledsnumcpus)rer�sconflicting changes�fsjlocal%(l)s changed %(f)s which other%(o)s deleted
use (c)hanged version or (d)elete?$$ &Changed $$ &Deletes
prompt deletesprompt keepsrother%(o)s changed %(f)s which local%(l)s deleted
use (c)hanged version or leave (d)eleted?$$ &Changed $$ &Deletedsprompt recreating)r�branchs<note: possible conflict - %s was renamed multiple times to:
s %s
s9note: possible conflict - %s was deleted and renamed to:
)r�)br�r��UPDATECHECK_LINEAR�UPDATECHECK_NONE�UPDATECHECK_NO_CONFLICT�
ValueErrorr3r�nullcontextmanager�wlockrIr$�
configlist�	changelog�commonancestorsheadsr]r�rr�r�rrr�r
rr�r�rr\r�rTrC�
bailifchanged�hookr�rDr�
foreground�UpdateAbortr��MAYBE_USE_RUST_UPDATE�rust_update_modrSr�currenttransaction�active�os�scandirr��nextr*�
StopIterationr�re�vfsr��hexr
�update_from_nullr7�
invalidate�changing_parents�
setparents�	setbranch�prunetemporaryincludes�unlinkr&�
FallbackErrorr�r4r�r�
partextrasr�r��promptchoicer�r�r�r�r�r~r�r��fscasesensitiver�r�r�r�r�r�r�r�rr�filter_ambiguous_files�
recordupdatesr+)=r(r]r�r�r��
mergeancestorr�rer��updatedirstate�updatecheck�wcr��okayr.�maybe_wlock�plr�rc�pas�cahsr��fp1�fp2�xp1�xp2r�r�r��m_arErDr*rgr6�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\hs���F������u���,�K� �"4�6M�N���"�;�C���&�&�C��S�/�!�	�~�"�-�-�/�/��-�-�/���j�j�l��	�
�:��d��B�
�Z�Z�\��
��U��
�Z�����>�"�C��w�w�!�!�(�,=�>�4�&�H��~�~�:�:�2�7�7�9�b�g�g�i�P��-3�D�\�-J�d�k�k�]�-J�L�-J�S�t�C�y�-J��L���{�{�2�K�{�8�9���W�W�Y����	�5��9�e�B�i�G���S�#�s��-�+�o�	���2�w��{��&�&�q�)I�'J�K�K�����B��!�!�#�#��6�7���7�8���&�&�s��6�6���N�O�C��r�d�{��k�k�#�&�&�����$������	�	��)C��/�0�C��C�D�D��+�+�c��5�5��b�h�h�j�j�B�J�J�L�L��.�/���;�<���&�&�s��6�6��=�=�?�?�����,�A��F�F�1�I�+�+�-�-����R�x��	�	�,�d�C��	�M��	�	�)�S�#�Q�	�G�#�A�q�!�Q�/�c
��f�0�0�S�����A�6������.���")�!3�!3�D�2�7�7�9�+�!F�J��z���(�J�6��� 6�7�� �!O�P��#�/�/��$�?�?����$�C���$�C��w�w�)�)�(�O�D��� �L��Q�� �L��2�8�8�D�8�#9� �L� ��$)�!�!�!����"�"�7�,?�@�@��+�����G�#���'�'�)�1����M�M�O�*�*�,�,��b�(�!�z�z�$�)�)�4��"�#3�4�O�"�.�.�.��#�#�v�-�,��)�*��

�����N�N�4�'�2�6�6�8�!4�5��I�I�l�$��S�I�I��H�H�N�N�>�2�6�6�8�4��7�7�%�%�i��<�<����!�!�)�Z��>��
�

<� /� @� @��I�I�r�v�v�x��!�
��
�
�(�(�*��]�]�3�3�D�9��M�M�,�,�S�1�:��
�
�'�'��	�	��T�5L�5L�5N�O��-�-�d�3��	�	�)�S�#�Q�	�G����D�H�H�M�M�.�9�:�#�M�1�a��;�_
��d#����������!�
���1�1��#�#�%�%��.�/���G�H���&�&�s��6�6�
���~�.����A��L�A�t�S��*�*�6�2�G��G�D�M��M�8�8�8��7�7�'�'��2��
������O�O��%�3�3��(�	��"�W��O�O��%�9�9��&�	��O�O��%�0�0��&�	��m�:�:�:�(,�%��B��D�#��2�������G�G�(�(��7��
"�"����	��O�O��%�0�0����,�	��&�&�q�)��#�#�D�I�I�.�.���R�X�X�d�5�X�A���b�k�k�m�T�:���k�k�m�W�=��G�O�O�1�1�3�4�E�A�r��G�G�L�L��,���	�
��R�j�������X��]�+�!�5��G�0�0�6�6�8�9�E�A�r��G�G�L�L��)���	�
��R�j�������X��]�+�!�:��!$�d�k�k�3��!;��C��c�3��D��4�G�N�N�$4��'�J�F�J�2�=�=�?�7J���";��I�I�l�$��S�I�I��H�H�N�N�>�2�6�6�8�4�	��'�+�+�}�7�7�9�:�B�G�G�I�	
�&�9�k�/��+7��������,
�(��{�L���+�1�1�3�G�A�t�!������!��a�8�!�A�B�%�8�"��M�4�4�4���!%�A�04�K��!��-�"&� 4��{�#�<H����]�5�5�7�8�a��
�����/�/��5��"8��{�"K�K�����S�)��+�+��'�-�-�{�K��#��M�M�+�+��	�	��T�%<�%<�%>��
���D�H�H�M�M�.�9�:�#��1�1�$�7�'6�_	
�H
��	�	��s�C�u�7L�7L�	�	
��L��{	M��@%�,�'+�$�,��::�9��#�0�0�
1�,0�)�
1��\6�5��_	
��s��B%w*�1v�Iw*�"G
w*�-v�8B:w*�3/v<�"5w*�v*�3Bw*�R=w*�w*�&A(w*�Cw�w*�w*�v'�#w*�&v'�'w*�*
v9	�4w*�<w�w*�w�w*�
w'	�#w*�*
w8c��0nURRnSnSnU(aY[R"URR
5nUS:gnUb'U(a [R"UR5nUc%[R"UR5nUS4nUcgUupxU(aSnUR5Hgup�U
cM
[R"U
SU5nUbUS(aU(aU(dU
SU
SS4X)'MNUS(dMZU
SU
SU4X)'Mi UR5H	up�X�U	'M U$![a N�f=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
NTsnfsF�rr	)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/rArA	sY��H!#�O��-�-�0�0�K��M��N��������
�
�.���6�)����.�%�8�8����B�M���	��&�&�t�x�x�0�C� �%�L�M����&����"�N��O�O�%�D�A��}�$�8�8��1��s�C���#��Q�K��N�
+,�A�$��!��d�);�O�&��a�[�[�+,�A�$��!��h�)?�O�&�#&�$$�)�)�+�D�A��a�L�,����A�	��	�s�$E�
E�Ec
�X�[UR5UR5USUUUS9$)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�rFs    r/�mergerp�	s2������
����	�����
��r?c
�\�[UR5UR5SS/SQUUS9$)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 copysdestinationsworking copy parent)r�r�r�rErFro)r�rErFs   r/rr�	s2������
����	���H��
��r?c�T�[UR5UR5SSUS9$)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�rFro)r�rFs  r/�clean_updaters�	s#���3�8�8�:�s�w�w�y�e�4�B�O�Or?c
�X�[UR5UR5SSSUUS9$)z�Revert 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�rDrerFro)r�rerFs   r/�	revert_toru�	s2������
����	�����
��r?c��U=(d USnUR5nU=(d UR5nURRUR5UR55=(d! UR	5UR	5:Hn[UUR5SSUR5UUUS9n	U(a"U	R(aUR5n
O[URn
UR5nU(a8[U5S:Xa)X+;a$URU5 USR5n
X�R5:XaURn
UR5(a9URUR5U
5 [R"XaU5 U	$URR!U5 URUR5U
5 URR#UR%55 [R"XaU5 SSS5 U	$!,(df   U	$=f)aDo 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)rCr�rFr^r)r�r&�
isancestorr]rSr\r�rrIrr�r3r9r�graftcopiesr7r8r�r.)r(r�rar��
keepparent�keepconflictparentr:�pctxrCrY�potherrIs            r/�graftr}�	s���@��4��:�D��7�7�9�D���3�6�6�8�D����!�!�$�)�)�+�s�x�x�z�:�	$��8�8�:�����#��

�����
����	�	��#���	
�E��e�3�3�����������+�+�-���#�g�,�!�+����N�N�4� ��Q�Z�_�_�&�F�
������������������	�	��V�,����4�d�+��L��]�]�
+�
+�D�
1��O�O�D�I�I�K��0��M�M���� 7� 7� 9�:����t�$�/�	2�
�L�2�
1�
�L�s
�A!H;�;
I
c	���Uc9UR5bSn[R"U5eUR5n[	UR5USSUR
5SS9$)Ns/must specify parent of merge commit to back outTF)r�r�r�rC)rcr�ProgrammingErrorr�r\r(r])r��parentrFr.s    r/�back_outr�
s_��
�~��6�6�8��D�C��(�(��-�-����������
���������
�r?c	�n^^�UU4Sjn	URn
/nU(a/nURUlTRXUS9n
U(Ga(Sn[U
R5n[U
R
5nU(aU(a[
S5nUUU4-nO�U(a[
S5nUU-nOvU(a[
S5nX�-nO_U(aXSnWH9nU"U5(dMTRRU5(aM4US-
nM; U(a[
S	5nUU-nUcUX�l$US
-
nTRRUSS9S:Xa[R"[
S55eU(a�[U
R
U
R-5H_nU(dDTRR[
S
5U-5 U	"TRRU5 URU5 Ma U(a�[WSS9H�nU"U5(dMTRRU5(aM4U(dDTRR[
S5U-5 U	"TRR U5 URU5 M� UX�l$!X�lf=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"U5 g![aU [S5U-nT(a[R"U5eTRR[S5U-5 gf=f)Ns%s cannot be removedswarning: %s
)r�r
rr�r$r�)�removefnr�r��abortonerrorr(s   ��r/r��purge.<locals>.removeF
sZ���	6��T�N���	6��)�*�T�1�A���k�k�!�n�$������Q�/�0�1�4�5�	6�s��AA+�*A+)r�ignored�unknownNs3permanently delete %d unknown and %d ignored files?s$permanently delete %d unknown files?s$permanently delete %d ignored files?rr	s1permanently delete at least %d empty directories?s (yN)$$ &Yes $$ &No)�defaultsremoval cancelledsremoving file %s
T)�reversesremoving directory %s
)�traversedirr)r�rr�r�r
r8�listdirr$r?r�
CanceledErrorr�rNr<�rmdir)r(rer�r��removeemptydirs�removefilesr��noop�confirmr��oldtraversedirr*�directoriesr�r.�
nb_ignored�
nb_unknown�	dir_countr<s`     `            r/�purger�"
s=���H6��(�(�N�
�C�7-���K�"-�"4�"4�G�����7�W��M����C��V�^�^�,�J��V�^�^�,�J��j��N�O���
�J�/�/����?�@���z�!����?�@���!�� ��	�$�A��q�z�z�$�)�)�*;�*;�A�*>�*>�!�Q��	�%���L��C��9�$�C��{��0-��-�-�-���7�7�'�'��Q�'�7�1�<��-�-�a�0D�.E�F�F���F�N�N�V�^�^�;�<����G�G�L�L��#8�!9�A�!=�>��4�9�9�+�+�Q�/��
�
�1�
�	=���K��6���1�:�:�d�i�i�&7�&7��&:�&:�������Q�'A�%B�Q�%F�G��t�y�y����2��J�J�q�M�7��-���n��s,�CJ,�$J,�$J,�1C-J,�"J,�A!J,�,J4rD)r�rh)r�rhr6r7)r�zmergeresult | Noner6r7)r6zIterator[tuple[bytes, bytes]]r;)r6rhr2)NFNNFTNN)re�FileDatar6zOptional[FileData])NFNrG)NNFFN)TFTTFFF)X�
__future__rr�r0�struct�typingrrrrr�i18nr
r]r�
thirdpartyr�
TYPE_CHECKING�utilsr
�
dirstateutilsrr�rrrrrrZrr�rrrrrrrr�tuple�MergeResultDatar��MergeResultActionr��FileMappingValuerr-�pack�_pack�unpack�_unpackr0r>rAr�r�r�r�r�r�rhrr�r�r�r�r�r�rEr�rr�UPDATECHECK_ABORTr rr!r,r\r=r�rArprrsrur}r�r�rgr?r/�<module>r�ss��#��	�
�
�<�<����
�����$�����"
����O��e�X�o�%>��E�F��J���!�!�8�O�#<�e�C�����#�#�H�4�8������
�-�-����$5�5�pP�&1�P�f�BA�H
�J
�Z",�'2�",�	�",�JD�D�b�~��~�B"�6
��G��G�T�$
�NS�l�:���t��
�
��
�,�E�
�E�P2
�j������'������������_�F
��x��c�3���9L�9L�0M�&M� N�O�O�P��s�l�"�,P��*
����	
�I�X
�&
�����	��k-r?