403Webshell
Server IP : 74.208.236.16  /  Your IP : 216.73.217.15
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u102440577 ( 7172810)
PHP Version : 8.4.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/mercurial/__pycache__/obsolete.cpython-313.pyc
�

6�h}�����SrSSKJr SSKrSSKrSSKrSSKJr SSKJ	r	J
r
 SSKJrJ
r
JrJrJrJrJr SSKJrJr \R,"S	5r\R0r\R4r\R8r\R<rS
rSr Sr!S
r"Sr#Sr$Sr%\RLr&\RNr'Sr(Sr)Sr*\"\)5r+\"\*5r,Sr-Sr.Sr/Sr0Sr1Sr2Sr3Sr4\"\35r5\"\45r6\"\25r7Sr8Sr9\"\95r:Sr;Sr<Sr=\(\-\.4\1\=\<40r>Sr?\R�SASj5rA\(4S jrBS!\(4S"jrC\R�S#5rD\R�S$5rE\R�S%5rFS&rG"S'S(5rHS)rIS*rJS+rKS,rLS-rMS.rN0rOS/rPS0rQS1rRS2rS\P"S35S45rT\P"S55S65rU\P"S75S85rV\P"S95S:5rW\P"S;5S<5rX\P"S=5S>5rYS?rZSBS@jr[g)Ca�Obsolete marker handling

An obsolete marker maps an old changeset to a list of new
changesets. If the list of new changesets is empty, the old changeset
is said to be "killed". Otherwise, the old changeset is being
"replaced" by the new changesets.

Obsolete markers can be used to record and distribute changeset graph
transformations performed by history rewrite operations, and help
building new tools to reconcile conflicting rewrite actions. To
facilitate conflict resolution, markers include various annotations
besides old and news changeset identifiers, such as creation date or
author name.

The old obsoleted changeset is called a "predecessor" and possible
replacements are called "successors". Markers that used changeset X as
a predecessor are called "successor markers of X" because they hold
information about the successors of X. Markers that use changeset Y as
a successors are call "predecessor markers of Y" because they hold
information about the predecessors of Y.

Examples:

- When changeset A is replaced by changeset A', one marker is stored:

    (A, (A',))

- When changesets A and B are folded into a new changeset C, two markers are
  stored:

    (A, (C,)) and (B, (C,))

- When changeset A is simply "pruned" from the graph, a marker is created:

    (A, ())

- When changeset A is split into B and C, a single marker is used:

    (A, (B, C))

  We use a single marker to distinguish the "split" case from the "divergence"
  case. If two independent operations rewrite the same changeset A in to A' and
  A'', we have an error case: divergent rewriting. We can detect it because
  two markers will be created independently:

  (A, (B,)) and (A, (C,))

Format
------

Markers are stored in an append-only file stored in
'.hg/store/obsstore'.

The file starts with a version header:

- 1 unsigned byte: version number, starting at zero.

The header is followed by the markers. Marker format depend of the version. See
comment associated with each format for details.

�)�annotationsN�)�_)�bin�hex)�encoding�error�obsutil�phases�policy�pycompat�util)�dateutil�hashutil�parsers�
createmarkerss
allowunstablesallowdivergencesexchangec��SU-nURRSU5nUbU$URRSS5$![R[4ah [URR
SS55nSU;agURRSS5nU(aURS5 X;s$f=f)�LReturns True if the given repository has the given obsolete option
enabled.
sevolution.%s�experimentals	evolutionsallTsevolution.createmarkersr)	�ui�
configboolr	�ConfigError�AttributeError�set�
configlist�config�add)�repo�option�	configkey�	newconfig�results     �4/usr/lib/python3/dist-packages/mercurial/obsolete.py�_getoptionvaluer$ns��� �&�(�I����"�"�?�I�>�I����� ��w�w�!�!�/�<�@�@�����~�.�
 ��T�W�W�'�'���F�G���V����G�G�N�N�?�4N�O�	���J�J�'�(����
 �s�A�AC�8C�Cc���[U[5nU(a1[U[5n[U[5n[U[5nOSnSnSn[U[U[U[U0$)z5Returns dicts showing state of obsolescence features.F)r$�createmarkersopt�allowunstableopt�allowdivergenceopt�exchangeopt)r�createmarkersvalue�
unstablevalue�divergencevalue�
exchangevalues     r#�
getoptionsr.�sm��)��/?�@���'��.>�?�
�)�$�0B�C��'��k�:�
��
����
�	�,��-��O��]�	��c��[U5U$)r)r.)rrs  r#�	isenabledr1�s���d��F�#�#r/s>BIB20ss20sc#�# �X:Ga�XU[-nU[-
n[[U5upEpgSnU(a&[U-n	XX-n[[U-U5nX-
nXX-n
[U
5U:wa-[R"[S5U[U
54-5eX-
n[U
5n
U
RSS5RS5up�[U5[U54n
SnSU
;a%U
RSS5U
RSS54nO"SU
;aU
RSS54nOS	U
;aSnUb0[S
U55nUHn[U5S:wdMSn O [[%U
R'555n
XxXjX�4v� X:aGM�gg![a Sn
N�f=f![ R"a SnN]f=f7f)N�sIparsing obsolete marker: metadata is too short, %d bytes expected, got %d�dates0 0� )grsp2sp1�p0c3�8# �UHn[U5v� M g7f�N)r��.0�ps  r#�	<genexpr>�"_fm0readmarkers.<locals>.<genexpr>�s���8��1��A����s��)�	_fm0fsize�_unpack�	_fm0fixed�
_fm0fnodesize�_fm0node�lenr	�Abortr�_fm0decodemeta�pop�split�float�int�
ValueError�tuple�binascii�Error�sorted�items)�data�off�stop�cur�numsuc�mdsize�flags�pre�sucs�s�metadata�when�offset�date�parentsr;s                r#�_fm0readmarkersr`�s����

�*���y��)���y���%,�Y��%<�"��������&�A��S�W�%�C��8�f�,�c�2�D��H�C��c�l�+���x�=�F�"��+�+��8���3�x�=�)�	*��
�	�
��!�(�+��	�#�<�<���8�>�>�t�D�L�D���;��F��+�D����H���|�|�E�4�0�(�,�,�u�d�2K�L�G�
�h�
��|�|�E�4�0�2�G�
�h�
��G���	
��8��8�8�� �A��1�v��|�"&���!������ 0�1�2���%�4�9�9�g�*�*��8�	��D�	��"�>�>�
���
�sg�B.G
�19F�*AG
�=$F1�%F1�(G
�)F1�+/G
�G
�F.�+G
�-F.�.G
�1G
�G
�	G
�
G
c��Uupp4pVU[-(a[R"[S55e[	U5nUupxSXx4-US'Ub2U(dSUS'[US5Hup�[
U
5USU	-'M [U5n[U5n[[U--nU[U5X1/n
U
RU5 [U/U
Q76U-$)Ns-cannot handle sha256 with old obsstore formats%r %ir4r/r6rsp%i)
�usingsha256r	rEr�dict�	enumerater�_fm0encodemetarDrArC�extend�_pack)�markerrXrYrWr[r^r_�time�tz�ir;rU�formatrQs              r#�_fm0encodeonemarkerrms���06�-�C�u���{���k�k�!�L�M�N�N��H�~�H��H�D� �D�:�-�H�W�����!�H�U�O��g�q�)�D�A�#&�q�6�H�V�a�Z� �*��h�'�H�
��Y�F�
�(�V�+�
,�F��C��M�5�.�D��K�K������$��(�*�*r/c	���UR5H-upSU;dSU;a[S5eSU;dM$[S5e SR[U5Vs/sHnSX0U4-PM sn5$s snf)ziReturn encoded metadata string to string mapping.

Assume no ':' in key and no '' in both key and value.�:�s*':' and '' are forbidden in metadata key's#':' is forbidden in metadata value's%s:%s)rPrK�joinrO)�meta�key�value�ks    r#rerest���j�j�l�
���3�;�%�3�,��K�L�L��E�>��C�D�D�	#�
�:�:��t��E��1�x�1�1�g�,�.��E�F�F��Es�A4c�|�0nURS5H$nU(dMURSS5up4XAU'M& U$)z8Return string to string dictionary from encoded version.rpror)rH)rQ�d�lrsrts     r#rFrF#s?��
�A�
�Z�Z��
���1�����q�)�J�C��c�F��
�Hr/s>IdhHBBBs32s�sBBc#�# �[n[n[n[n[n[
n[n	[n
[n[n[R"[5Rn
X:GaX-nU
"XU5unnnnnnnUU-(aUnUnOUnUnU"UXUU-5unUU-
nUS:XaUU-nXU4nOUUU--nU"UU-XU5nUU:XaUnSnO)US:XaUU-nUUU4nOUUU--nU"UU-UUU5nUU	U--nU"SU
U--UUU5n/n[S[U5S5H/nUUU-nUUUS--nUR!XUXU45 UnM1 UUU[#U5UUS-4U4v� X:aGMgg7f)Nr�>r��<)�_fm1parentnonerb�_fm1nodesha1size�_fm1nodesha256size�_fm1nodesha1�_fm1nodesha256�_fm1metapairsize�_fm1metapair�	_fm1fsizer@�struct�Struct�	_fm1fixed�unpack�rangerD�appendrL) rQrRrS�noneflag�sha2flag�sha1size�sha2size�sha1fmt�sha2fmt�metasize�metafmt�fsizer��ufixed�o1�t�secsrjrWrU�numpar�nummeta�nodefmt�nodesize�prec�o2rY�o3r_�metapairsizer[�idxs                                 r#�_fm1purereadmarkersr�[s�����H��H��H�!�H��G��G��H��G��E�
�F��]�]�9�
%�
,�
,�F�

�*�
�[��6<�T�b�\�6J�3��4��U�F�F�G��8���G��H��G��H���$�B��M�":�;���
�h����Q�;��h��B��B�K�>�D��h��'�'�B��'�F�*�D�B�K�8�D��X���B��G�
�q�[��h��B��B�r�{�n�G��h��'�'�B��W�v�-�t�B�r�{�;�G��8�g�%�%���d�g��&7�8�$�r�#�,�G������C��-�q�1�C��|�C�(�(�B��l�3��7�+�+�B��O�O�T�b�\�4�2�;�7�8��C�	2��T�5�%��/�D�"�r�'�?�G�L�L�Y�*�*�s�FF	�F	c	�8�Uupp4pV[nU[-(a[n[U5nSU-n	Uc[n
O[U5n
X�-
n	Xy-n[
[U5-n[U-U-n
USS-nSUSX�X�[U5U/nURU5 UbURU5 [U
5nUH�unn[U5n[U5nUS:�aSUU4-n[R"U5eUS:�aSUUU4-n[R"U5eURU5 URU5 UUU--
nM� UUS'[U
/UQ76/nUH(unnURU5 URU5 M* SRU5$)Nrr}r�sLobsstore metadata key cannot be longer than 255 bytes (key "%s" is %u bytes)s]obsstore metadata value cannot be longer than 255 bytes (value "%s" for key "%s" is %u bytes)r/)r�rbr�rDr~r�r�rf�	_calcsizer	�ProgrammingErrorr�rgrq)rhrXrYrWr[r^r_�_fm1noderU�
numextranodesr��formatnodes�
formatmetarlrjrQ�	totalsizersrt�lk�lv�msgs                      r#�_fm1encodeonemarkerr��s���06�-�C�u���H��{��!��
��Y�F���J�M������W�����
��*�K���H�
�-�J�
��
$�z�
1�F�	
�a��B��B��$�q�'�2�f�c�(�m�S�I�D��K�K��������G���&�!�I��
��U�
��X��
��Z��
��8�+��b�	��C��(�(��-�-�
��8�:���R� �!�C��(�(��-�-����B�����B���R�"�W��	�#�$�D��G��&� �4� �!�D��
��U����C�����E����8�8�D�>�r/c�\�[[SS5nU(d[XU5$U"XU5$)N�fm1readmarkers)�getattrrr�)rQrRrS�natives    r#�_fm1readmarkersr��s.��
�W�.��
5�F��"�4�d�3�3��$�T�"�"r/c�&�[SUSS5S$)N�>Brr)r@)rQs r#�_readmarkerversionr��s���5�$�q��)�$�Q�'�'r/c���[U5nU(dSnUc[U5nU[;a"[S5U-n[R
"XCS9eU[US"XU54$)z(Read and enumerate markers from raw datars+parsing obsolete marker: unknown version %r��versionr)r�rD�formatsrr	�UnknownVersion)rQrRrS�diskversionr�s     r#�_readmarkersr��si��%�T�*�K�����|��4�y���'�!��>�?�+�M���"�"�3�<�<����,�Q�/��4�@�@�@r/c��[SU5$)Nr�)rgr�s r#�encodeheaderr��s����� � r/Fc#�r# �[USnU(a
[U5v� UH
nU"U5v� M g7f�Nr)r�r�)�markers�	addheaderr��	encodeonerhs     r#�
encodemarkersr��s9����� ��#�I���7�#�#��������s�57c�n�UH/nURUS[55RU5 M1 g)Nr��
setdefaultrr)�
successorsr��marks   r#�_addsuccessorsr��s-�������d�1�g�s�u�-�1�1�$�7�r/c��UH8nUSH,nURU[55RU5 M. M: gr�r�)�predecessorsr�r��sucs    r#�_addpredecessorsr�s7������7�C��#�#�C���/�3�3�D�9��r/c��UH?nUSnUcM
UH,nURU[55RU5 M. MA g)N�r�)�childrenr�r�r_r;s     r#�_addchildrenr�sB�����q�'�������#�#�A�s�u�-�1�1�$�7��r/c�z�UH5nURUS;dM[R"[S55e g)z�search for marker with invalid data and raise error if needed

Exist as a separated function to allow the evolve extension for a more
subtle handling.
rs;bad obsolescence marker detected: invalid successors nullidN)�nullidr	rEr)rr�r�s   r#�_checkinvalidmarkersr�s<�����;�;�$�q�'�!��+�+��1���
�r/c��\rSrSrSrSr\S4Sjr\S5r	Sr
SrS	r\r
\S
5rSSjrS
rSr\S5r\S5r\S5r\S5r\S5r\S5rSrSrSSjrSrg)�obsstorei z�Store obsolete markers

Markers can be accessed with two mappings:
- predecessors[x] -> set(markers on predecessors edges of x)
- successors[x] -> set(markers on successors edges of x)
- children[x]   -> set(markers on predecessors edges of children(x)
)sprecssuccssflagsmetar4sparentsFc�l�0UlX l[R"U5UlX0lX@lgr8)�caches�svfs�weakref�ref�_repo�_defaultformat�	_readonly)�selfrr��
defaultformat�readonlys     r#�__init__�obsstore.__init__2s)������	��[�[��&��
�+��!�r/c�\�UR5nUcSn[R"U5eU$)Nz(using the obsstore of a deallocated repo)r�r	r�)r��rr�s   r#r�
obsstore.repo:s-���J�J�L���9�<�C��(�(��-�-��r/c�,�[UR5$r8)�iter�_all�r�s r#�__iter__�obsstore.__iter__Bs���D�I�I��r/c�,�[UR5$r8)rDr�r�s r#�__len__�obsstore.__len__Es���4�9�9�~�r/c�P�SSKJn [URUR5(a[UR5S:�$URS5(d)URRS5RS:�$[UR5$![a N!f=f)Nr)�statichttprepor��obsstore)�r��
isinstancer�statichttprepositoryrD�_data�_cachedr��stat�st_size�FileNotFoundError�boolr�)r�r�s  r#�__nonzero__�obsstore.__nonzero__Hs���$��d�i�i��!D�!D�E�E��t�z�z�?�Q�&�&��|�|�F�#�#�
��y�y�~�~�k�2�:�:�Q�>�>�
�D�I�I����	%�
��
�s�'B�
B%�$B%c��UR$)z_True if marker creation is disabled

Remove me in the future when obsolete marker is always on.)r�r�s r#r��obsstore.readonlyZs��
�~�~�r/Nc		��[U5nUc0nUcoSU;a&[R"URS55nOCUb+UR	SS5nUc[R
"5nO[R
"5nU[-(a>[U5S:wa[U5eUHn	[U	5S:wdM[U	5e O=[U5S:wa[U5eUHn	[U	5S:wdM[U	5e X#;a[SUR5-5e[[UR555nUH(up�U
RS5 URS5 M* ['U5[U5XGXe4n[)UR+X/55$![aD [R "S["R$"U
5["R$"U54-5ef=f)	a>obsolete: add a new obsolete marker

* ensuring it is hashable
* check mandatory metadata
* encode metadata

If you are a human writing code creating marker you want to use the
`createmarkers` function in this module instead.

return True if a new marker have been added, False if the markers
already existed (no op).
r4�develsdefault-date� r>zin-marker cycle with %szutf-8sEobsstore metadata must be valid UTF-8 sequence (key = %r, value = %r))rJr�	parsedaterG�
configdate�makedaterbrDrKrrLrOrP�decode�UnicodeDecodeErrorr	r�r
�bytestr�bytesr�r)
r��transactionr��succs�flagr_r^r[r�succru�vrhs
             r#�create�obsstore.createas���.�4�y�����H��<��(�"��)�)�(�,�,�w�*?�@�����}�}�X��?���<�#�,�,�.�D���(�(�*���+���4�y�B�� ��&�&����t�9��?�$�T�*�*���4�y�B�� ��&�&����t�9��?�$�T�*�*���=��6�����C�D�D������ 0�1�2���D�A�	
�����!�����!�	���+�u�U�|�T�T�K���D�H�H�[�(�3�4�4��&�
��,�,�.��'�'��*�H�,<�,<�Q�,?�@�A���
�s
�"F0�0AG>c��UR(a[R"[S55e[	5nUR
Rn/nUH=nXd"USS5;dMXc;dMURU5 URU5 M? U(a�URSS5nUR5nURSU5 SR[XXS:HUR55n	URU	5 UR5 UR R
S5n
U
bU
R#U5 UR%XY5 UR&R)5 [+UR,R
SS	55nS
U[/U5--UR,S'[/U5$!UR5 f=f)z`Add new markers to the store

Take care of filtering duplicate.
Return the number of new marker.s5creating obsolete markers is not enabled on this reporr3r�sabr/s
obsmarkerssnew_obsmarkers�0�%d)r�r	rErrr��getrr�r��tellrqr��_version�write�close�changes�update�_addmarkersr��clearrJ�hookargsrD)r�r
r��known�
getsuccessors�new�m�fr]rQ�addedmarkers�previouss            r#r�obsstore.add�sz��
�>�>��+�+��J�K��
�������+�+�
����A��
�a��d�B�/�/�A�N��	�	�!���
�
�1�
����	�	�+�u�-�A�	
����������V�4��x�x�
�c�Q�;��
�
� N�O������
����	�&�.�.�2�2�=�A�L��'��#�#�C�(����S�'��K�K�����{�+�+�/�/�0A�4�H�I��27�8�c�#�h�;N�2O����.�/��3�x������	�s
�0AG�Gc�>�[U5up4URX5$)z^merge a binary stream of markers inside the obsstore

Returns the number of new markers added.)r�r)r�r
rQr�r�s     r#�mergemarkers�obsstore.mergemarkers�s ��(��-����x�x��-�-r/c�8�URRS5$)Nr�)r��tryreadr�s r#r��obsstore._data�s���y�y� � ��-�-r/c�v�[UR5S:�a[UR5$UR$r�)rDr�r�r�r�s r#r�obsstore._version�s-���t�z�z�?�a��%�d�j�j�1�1��&�&�&r/c��URnU(d/$[U5uUln[U5n[	UR
U5 U$r8)r�r�r�listr�r)r�rQr�s   r#r��
obsstore._all�s@���z�z����I�!-�d�!3���
�w��w�-���T�Y�Y��0��r/c�4�0n[XR5 U$r8)r�r�)r�r�s  r#r��obsstore.successors�s���
��z�9�9�-��r/c�4�0n[XR5 U$r8)r�r�)r�r�s  r#r��obsstore.predecessors�s������y�y�1��r/c�4�0n[XR5 U$r8)r�r�)r�r�s  r#r��obsstore.children�s�����X�y�y�)��r/c��XR;$r8)�__dict__)r��attrs  r#r��obsstore._cached�s���}�}�$�$r/c��[U5nURU-UlURRU5 UR	S5(a[URU5 UR	S5(a[URU5 UR	S5(a[URU5 [URU5 g)Nr�r�r�)
r2r�r�rfr�r�r�r�r�r�r�r�r)r�r��rawdatas   r#r�obsstore._addmarkers�s����w�-���Z�Z�'�)��
��	�	����!��<�<��%�%��4�?�?�G�4��<�<��'�'��T�.�.��8��<�<�
�#�#������0��T�Y�Y��0r/c���Uc
[5nUc
[5nURR5RRn[5nUR
nURnURnUH%nX�;dX�;dX�;dMURU5 M' UH-n	U"U	5nX�;dX�;dX�;dMURU5 M/ [5n
UR5nU(a�[5nUH�n
URURU
S55 URU
S5Vs/sHo�S(aMUPM nnURU5 URU
S5Vs/sHo�S(aMUPM nnURU5 M� X�-nUVs1sHo�SiM	 nnX�-n
XK-nX�-nU(aM�U
$s snfs snfs snf)a[return a set of all obsolescence markers relevant to a set of
nodes or revisions.

"relevant" to a set of nodes or revisions mean:

- marker that use this changeset as successor
- prune marker of direct children on this changeset
- recursive application of the two rules on predecessors of these
  markers

It is a set so you cannot rely on order.r3rr)rr�
unfiltered�	changelog�noder�r�r�r�copyrr)r��nodes�revs�tonode�pendingnodes�precursorsmarkers�succsmarkersr�rD�rev�seenmarkers�	seennodes�direct�currentr$�pruneds                r#�relevantmarkers�obsstore.relevantmarkerss����=��E�E��<��5�D����%�%�'�1�1�6�6���u�� �-�-�������=�=���D��)��'��#�� � ��&�
��C��#�;�D��)��'��#�� � ��&���e�� �%�%�'�	���U�F�'���
�
�/�3�3�G�R�@�A�%-�\�\�'�2�%>�K�%>���d�!�%>��K��
�
�f�%�%1�%5�%5�g�r�%B�O�%B��A�$�!�%B��O��
�
�f�%�(�
�!�F�*0�1�&�Q�a�D�&�L�1��!�K��%�L��%�I��l����L��O��2s�:
G�G�8
G�	G�.G)r�r�r�r�rr�r�)r3rNNNN�NN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�fields�_fm1versionr��propertyrr�r�r��__bool__r�rrr*�
propertycacher�rr�r�r�r�r�rrR�__static_attributes__r3r/r#r�r� s���H�F�2=�u�"�������� �H�
�����
��
���A5�F%�N.��.��.��'��'���������
����
����
%�
1�4r/r�c��URSS5n0nUbX#S'[U[5(+n[XR4SU0UD6nU(a6U(a/UR[
S5[[U55-5 U$)z(Create an obsstore instance from a repo.sformatsobsstore-versionr�r�s5"obsolete" feature not enabled but %i markers found!
)	�	configintr1r&r�r��warnrrDr2)rrr��kwargsr��stores      r#�	makestorere?s����L�L��,?�@�M�
�F�� �"/����T�#3�4�4�H��T�9�9�B�x�B�6�B�E���
���
�G�H��$�u�+��
�	
��Lr/c�P�URSS9 UHnU[;dMUs $ g)ztReturn the newest version listed in both versions and our local formats.

Returns None if no common version exists.
T)�reverseN)�sortr�)�versionsrs  r#�
commonversionrjRs-��

�M�M�$�M��
����<��H��r/i�c��0n/n[S-nUHXn[U5n[U5U-[:�a/nSnURU5 WRU5 U[U5-
nMZ [	[U55HDupxSR
[S[5/U-5n	[R"U	5USU-'MF U$)z�encode markers into a dict suitable for pushkey exchange

- binary data is base85 encoded
- split in chunks smaller than 5300 bytesr|rr/r�sdump%i)�_maxpayloadrmrDr�rd�reversedrqrg�_fm0versionr�	b85encode)
r��keys�parts�
currentlenrh�nextdata�currentpartr��partrQs
          r#�_pushkeyescapervfs���
�D��E��q��J���&�v�.���x�=�:�%��3��K��J��L�L��%����8�$��c�(�m�#�
���x���/�	���x�x��u�k�2�3�d�:�;�� $���t� 4��Y��_��0��Kr/c�d�UR(d0$[[UR55$)zList markers over pushkey)r�rvrO�rs r#�listmarkersry|s"���=�=��	��&����/�0�0r/c��URS5(d(URR[S5U-5 gU(a(URR[S5U-5 g[R
"U5nUR
5 URS5nURRXT5 UR5 SSS5 SSS5 g!,(df   O=fSSS5 g!,(df   g=f)zPush markers over pushkeysdumpsunknown key: %rFsunexpected old value for %rspushkey: obsolete markersNT)�
startswithrrbrr�	b85decode�lockr
r�r*�invalidatevolatilesets)rrs�oldr#rQ�trs      r#�
pushmarkerr��s����>�>�'�"�"������Q�)�*�S�0�1��
������Q�5�6��<�=���>�>�#��D�	
����d�&�&�'C�D���
�
�"�"�2�,��#�#�%��E���D�D�����s$�C>�&-C$�C>�$
C2	�.C>�>
Dc�^�U4SjnU$)zADecorator to register a function as computing the cache for a setc�v>�T[;a$Sn[R"UT[T4-5eU[T'U$)Ns;duplicated registration for volatileset '%s' (existing: %r))�
cachefuncsr	r�)�funcr��names  �r#�	decorator�cachefor.<locals>.decorator�s?����:��P�C��(�(���j��6F�/G�)G�H�H��
�4���r/r3)r�r�s` r#�cacheforr��s�����r/c�~�UR5n[R"SU5 UR(d[	5sSSS5 $XRR
;a&[U"U5URR
U'URR
UsSSS5 $!,(df   g=f)zuReturn the set of revision that belong to the <name> set

Such access may compute the set and cache it for future usez
getrevs %sN)rBr�timedcmr��	frozensetr�r�)rr�s  r#�getrevsr��s����?�?��D�	
���l�D�	)��}�}��;�
*�	)��}�}�+�+�+�)3�D�)9�$�)?�D�M�M� � ��&��}�}�#�#�D�)�
*�	)�	)�s�B.�
AB.�.
B<c�n�SUR;a%URRR5 gg)z�Remove all obsolescence related cache from a repo

This remove all cache in obsstore is the obsstore already exist on the
repo.

(We could be smarter here given the exact event that trigger the cache
clearing)r�N)�
_filecacher�r�rrxs r#�clearobscachesr��s+���d�o�o�%��
�
���"�"�$�&r/c�V�URRU[R5$)z-the set of mutable revision in the repository)�_phasecache�	getrevsetr�relevant_mutable_phasesrxs r#�_mutablerevsr��s!�����%�%�d�F�,J�,J�K�Kr/�obsoletec�^^�URRm[U5nURRR
m[
UU4SjU55$)zthe set of obsolete revisionsc3�R># �UHnT"T"U55(dMUv� M g7fr8r3)r:r��getnode�isobss  ��r#r<�&_computeobsoleteset.<locals>.<genexpr>�s����?�	�1�U�7�1�:�->�Q�Q�	�s�'�	')rCrDr�r�r��__contains__r�)r�	notpublicr�r�s  @@r#�_computeobsoletesetr��sD����n�n�!�!�G��T�"�I��M�M�$�$�1�1�E��?�	�?�?�?r/�orphanc��URRn[U5n[US5nX#-
n[	5n[U5H0nU"U5H!nXs;dXu;dMUR
U5  M. M2 [U5$)z7the set of non obsolete revisions with obsolete parentsr�)rC�
parentrevsr�r�rrOrr�)r�pfunc�mutable�obsolete�others�unstabler�r;s        r#�_computeorphansetr��sz��
�N�N�%�%�E��4� �G��t�[�)�H�
�
�F��u�H�
�F�^���q��A��}��
����Q������X��r/�	suspendedc�^�URR[US55m[U4Sj[US555$)z9the set of obsolete parents with non obsolete descendantsr�c3�6># �UHoT;dM
Uv� M g7fr8r3)r:r��	suspendeds  �r#r<�'_computesuspendedset.<locals>.<genexpr>�s����M� :�1�9�n�Q�Q� :�s�	�	r�)rC�	ancestorsr�r�)rr�s @r#�_computesuspendedsetr��s8������(�(���y�)A�B�I��M���k� :�M�M�Mr/sextinctc�4�[US5[US5-
$)z<the set of obsolete parents without non obsolete descendantsr�r�)r�rxs r#�_computeextinctsetr��s���4��%���l�(C�C�Cr/sphasedivergentc���[5nURRn[RnUR
nURRnURnURn[[U5[US5-
5nUHYn	U"U	5n
[R"Xz/[S9H0nU"U5nUcMU"X5U::dMUR!U	5  MW M[ [#U5$)z3the set of revs trying to obsolete public revisionsr�)�ignoreflags)rr��phaser�publicrC�index�get_revrDr�rOr�r�r
�allpredecessors�	bumpedfixrr�)
r�bumpedr�r��cl�torevrHr��
candidatesrLrD�pnode�prevs
             r#�_computephasedivergentsetr��s����U�F����"�"�E�
�]�]�F�	
���B��H�H���E�
�W�W�F��}�}�H���T�*�W�T�;�-G�G�H�J����c�{���,�,��f�)�
�E���<�D�� �u�T�'8�F�'B��
�
�3���
�	��V��r/scontentdivergentc�^
�[5nURn0nURRn[	[U5[
US5-
5nUGHnU"U5m
URRT
S5n[U5n[5n	U(dMFUR5Sn
X�;aM#U	RU
5 X�;a[R"X
US9 X:Vs/sH
o�(dMUPM nn[U5S:�a-[U
4SjU55(aURU5 M�URURRU
S55 U(aM�GM [!U5$s snf)zHthe set of rev that compete to be the final successors of some revision.r�r3r)�cacherc3�8># �UHnTU;dMUv� M g7fr8r3)r:�nrDs  �r#r<�._computecontentdivergentset.<locals>.<genexpr>"s����%H��A�$�a�-�a�a��s�
�	)rr�rCrDrOr�r�r�rrGrr
�successorssetsrD�anyrr�)r�	divergentr��newermaprHr�rLr��	toprocess�seenr�r��newerrDs             @r#�_computecontentdivergentsetr�s;�����I��}�}�H��H�
�^�^�
 �
 �F���T�*�W�T�;�-G�G�H�J����c�{���$�$�(�(��r�2����I�	��u���i��=�=�?�1�%�D��|���H�H�T�N��#��&�&�t��B� (��4��1�!�Q��E�4��5�z�A�~�#�%H��%H�"H�"H��
�
�c�"�����X�2�2�6�6�t�R�@�A��i��&�Y����5s�$
E:�2E:c��[R"U5nUSUS-HDnURSUR5-5 URUR	55 MF [UR
55SS$)Nrrr�)r�sha1rrLrDr�digest)�relation�user�
folddigestr;s    r#�
makefoldidr�)sp�����t�$�J�
�a�[�8�A�;�
&�����%�!�%�%�'�/�*����!�&�&�(�#�'�
�z� � �"�#�B�Q�'�'r/c
�2�Uc0nSU;aVURRSS5=(d URR5n[R"U5US'URRSS5nU(aU(aXTS'URRSS5nUR
S	5n	/n
UGH�nUS
n[U[5(dU4n[U5S:�a9[US5S:wa'Sn
[R"U
[US5-5eSn[U5nSU:a[X�S5n[US5GHIunnUSnUR5n[U5S
:�aURUS
5 UbUUS'SU-US'SU-US'UR!5(d![R""[%S5U-SS9eUR'5n[SU55nSnU(d [SUR)555nUU;a"[R""[%S5U-5eU(a-[*R,"UU5nSU-U[*R.'U
R1UUUU45 GML GM� U
HNnUunnnnUR2R5U	UUUUUUURS9 UR6R95 MP SSS5 g!,(df   g=f)a�Add obsolete markers between changesets in a repo

<relations> must be an iterable of ((<old>,...), (<new>, ...)[,{metadata}])
tuple. `old` and `news` are changectx. metadata is an optional dictionary
containing metadata for this marker only. It is merged with the global
metadata specified through the `metadata` argument of this function.
Any string values in metadata must be UTF-8 bytes.

Trying to obsolete a public changeset will raise an exception.

Current user and date are used except if specified otherwise in the
metadata attribute.

This function operates within a transaction of its own, but does
not take any lock on the repo.
Nsuserrsuser.obsmarkerrsevolution.track-operations	operationsevolution.effect-flagssadd-obsolescence-markerrrs/Fold markers can only have 1 successors, not %dr|sfold-idrsfold-idxs	fold-sizes$cannot obsolete public changeset: %ss see 'hg help phases' for details)�hintc3�@# �UHoR5v� M g7fr8�rD)r:rZs  r#r<� createmarkers.<locals>.<genexpr>ys���5��1�f�f�h�h����c3�@# �UHoR5v� M g7fr8r�r9s  r#r<r�|s���!C�N�q�&�&�(�(�N�r�s#changeset %s cannot obsolete itself)r_r^r[r)rr�usernamer�	fromlocalrr
r�rLrDr	r�r�rdrErr�rErrDr_r
�
geteffectflag�EFFECTFLAGFIELDr�r�r�filteredrevcacher)r�	relationsrr^r[�	operation�luser�useoperation�saveeffectflagr��
markerargs�relr�r��foldid�foldsize�foldidxr�rY�
localmetadata�nprec�nsucs�npare�
effectflag�argss                         r#�
createmarkersr�3s���(�����h���G�G�N�N�8�%6�7�M�4�7�7�;K�;K�;M�	�%�.�.�u�5�����7�7�%�%��5��L��	�!*����W�W�'�'��2��N�
�	�	�4�	5���
��C��q�6�L��l�E�2�2� ,����<� �1�$��S��V���)9�H���,�,�S�3�s�1�v�;�->�?�?��F��<�(�H��8�|�#�C�'�):�;��!*�<��!;�
����1�v�� (�
�
��
��s�8�a�<�!�(�(��Q��0��%�06�M�*�-�16���M�+�.�27�(�2B�M�,�/��|�|�~�~��+�+��A�B�T�I�@����	�	����5��5�5�����!�!C�D�L�L�N�!C�C�E��E�>��+�+��@�A�D�H���
"�")�!6�!6�t�T�!B�J�=B�Z�=O�M�'�"9�"9�:��!�!�5�%��
�"F�G�I"<��d�D�15�.�E�5�%���M�M� � �������&��7�7�
!�	
�
�!�!�'�'�)��i
6�	5�	5�s
�=IL�
LrT)rNNN)\rY�
__future__rrMr�r��i18nrrDrrr�rr	r
rrr
r�utilsrr�	importmodr�packrgr�r@�calcsizer�r^r&r'r(r)r$r.r1r�rbrnrArCr?rBr`rmrerFr[r�r�r�rr�r�r~r�r�r�r�r�r�r��nogcr�r�r�r�r�r�r�r�rerjrlrvryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r3r/r#�<module>r�s���<�|#��
��������
�
�
�9�
%������
�-�-���O�O�	��"�"�
�$��#��'���� �<�.$�
���	��!�!��,���	����i� �	��(�#�
�5:�p+�*	G�
�X���	������\�*���~�.���i� �	������\�*��<M�~.�b#��/�#6�7��/�#6�7���(����
A��
A�%�!�&+�K� ����8��8�
���:��:����8��8�
� \�\�~�&
�"���,1�� �
�
�
*�&
%�L�

�+��@��@�
�)�����"
�,��N��N�
�*��D��D�

�
�����4
�
�� �� �:(�BF�h*r/

Youez - 2016 - github.com/yon3zu
LinuXploit