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__/metadata.cpython-313.pyc
�

6�h �����SSKJr SSKrSSKrSSKJr SSKJrJr SSK	J
rJr
 "SS5rS	rS
rS+SjrSrS
rSrSrSrS,SjrSrSrSrSrSrSrSr\"SS5r \"SS5r!\"SS5r"\"SS5r#\"SS5r$\"SS5r%\"S S5r&\"S!S5r'\"S S5r(\RR"S"5r*\RR"S#5r+S$r,S%r-S&r.S'r/S(r0S)r1S*r2g)-�)�annotationsN�)�nullrev)�error�util)�flagutil�sidedatac��\rSrSrSrSSjrSr\S5r\	RS5rSrS	r
\	RS
5rSrSr\	RS
5rSrSr\	RS5rSrSr\	RS5rSrSr\	RS5rSrSr\	RS5rSrSrSr g)�
ChangingFiles�aNA class recording the changes made to files by a changeset

Actions performed on files are gathered into 3 sets:

- added:   files actively added in the changeset.
- merged:  files whose history got merged
- removed: files removed in the revision
- salvaged: files that might have been deleted by a merge but were not
- touched: files affected by the merge

and copies information is held by 2 mappings

- copied_from_p1: {"<new-name>": "<source-name-in-p1>"} mapping for copies
- copied_from_p2: {"<new-name>": "<source-name-in-p2>"} mapping for copies

See their inline help for details.
Nc��[UcSOU5Ul[UcSOU5Ul[UcSOU5Ul[UcSOU5Ul[UcSOU5UlURR
UR5 URR
UR5 URR
UR5 [UcSOU5Ul[UcSOU5Ul	g)N�)
�set�_added�_merged�_removed�_touched�	_salvaged�update�dict�
_p1_copies�
_p2_copies)�self�touched�added�removed�merged�salvaged�	p1_copies�	p2_copiess        �4/usr/lib/python3/dist-packages/mercurial/metadata.py�__init__�ChangingFiles.__init__-s�����
�"�5�9������2�V�<����'�/�B�w�?��
��'�/�B�w�?��
��8�#3�R��B����
�
���T�[�[�)��
�
���T�\�\�*��
�
���T�]�]�+��Y�%6�r�I�F����Y�%6�r�I�F���c��URUR:H=(a� URUR:H=(a� URUR:H=(ay URUR:H=(aY URUR:H=(a9 UR
UR
:H=(a URUR:H$�N)rrrrr�copied_from_p1�copied_from_p2)r�others  r!�__eq__�ChangingFiles.__eq__Bs����J�J�%�+�+�%�
<����u�|�|�+�
<�����
�
�-�
<��
�
����/�
<�����
�
�-�	
<�
�#�#�u�';�';�;�
<��#�#�u�';�';�;�	
r$c���[UR=(dE UR=(d2 UR=(d UR=(d UR
5$r&)�boolrrrr'r(�rs r!�has_copies_info�ChangingFiles.has_copies_infoMsN����L�L�
#��{�{�
#��}�}�
#��"�"�
#��"�"�
�	
r$c�,�[UR5$)afiles actively added in the changeset

Any file present in that revision that was absent in all the changeset's
parents.

In case of merge, this means a file absent in one of the parents but
existing in the other will *not* be contained in this set. (They were
added by an ancestor)
)�	frozensetrr.s r!r�ChangingFiles.addedWs������%�%r$c�~�S[U5;aU?URRU5 UR	U5 g)Nr)�varsrr�add�mark_touched�r�filenames  r!�
mark_added�ChangingFiles.mark_addedds1���d�4�j� ��
�������!����(�#r$c�8�UHnURU5 M gr&)r:�r�	filenames�fs   r!�update_added�ChangingFiles.update_addedjs���A��O�O�A��r$c�,�[UR5$)z�files actively merged during a merge

Any modified files which had modification on both size that needed merging.

In this case a new filenode was created and it has two parents.
)r2rr.s r!r�ChangingFiles.mergedns������&�&r$c�~�S[U5;aU?URRU5 UR	U5 g)Nr)r5rrr6r7r8s  r!�mark_merged�ChangingFiles.mark_mergedxs3���t�D�z�!���������"����(�#r$c�8�UHnURU5 M gr&)rEr=s   r!�
update_merged�ChangingFiles.update_merged~s���A����Q��r$c�,�[UR5$)aWfiles actively removed by the changeset

In case of merge this will only contain the set of files removing "new"
content. For any file absent in the current changeset:

a) If the file exists in both parents, it is clearly "actively" removed
by this changeset.

b) If a file exists in only one parent and in none of the common
ancestors, then the file was newly added in one of the merged branches
and then got "actively" removed.

c) If a file exists in only one parent and at least one of the common
ancestors using the same filenode, then the file was unchanged on one
side and deleted on the other side. The merge "passively" propagated
that deletion, but didn't "actively" remove the file. In this case the
file is *not* included in the `removed` set.

d) If a file exists in only one parent and at least one of the common
ancestors using a different filenode, then the file was changed on one
side and removed on the other side. The merge process "actively"
decided to drop the new change and delete the file. Unlike in the
previous case, (c), the file included in the `removed` set.

Summary table for merge:

case | exists in parents | exists in gca || removed
 (a) |       both        |     *         ||   yes
 (b) |       one         |     none      ||   yes
 (c) |       one         | same filenode ||   no
 (d) |       one         |  new filenode ||   yes
)r2rr.s r!r�ChangingFiles.removed�s��D����'�'r$c�~�S[U5;aU?URRU5 UR	U5 g)Nr)r5rrr6r7r8s  r!�mark_removed�ChangingFiles.mark_removed�s3����T�
�"����
�
���(�#����(�#r$c�8�UHnURU5 M gr&)rMr=s   r!�update_removed�ChangingFiles.update_removed�����A����a� �r$c�,�[UR5$)afiles that might have been deleted by a merge, but still exists.

During a merge, the manifest merging might select some files for
removal, or for a removed/changed conflict. If at commit time the file
still exists, its removal was "reverted" and the file is "salvaged"
)r2rr.s r!r�ChangingFiles.salvaged�s������(�(r$c�~�S[U5;aU?URRU5 UR	U5 g)Nr)r5rrr6r7r8s  r!�
mark_salvaged�ChangingFiles.mark_salvaged�s3����d��#��
������8�$����(�#r$c�8�UHnURU5 M gr&)rVr=s   r!�update_salvaged�ChangingFiles.update_salvaged�s���A����q�!�r$c�,�[UR5$)z0files either actively modified, added or removed)r2rr.s r!r�ChangingFiles.touched�s������'�'r$c�\�S[U5;aU?URRU5 g)Nr)r5rrr6r8s  r!r7�ChangingFiles.mark_touched�s%����T�
�"����
�
���(�#r$c�8�UHnURU5 M gr&)r7r=s   r!�update_touched�ChangingFiles.update_touched�rRr$c�6�URR5$r&)r�copyr.s r!r'�ChangingFiles.copied_from_p1�������#�#�%�%r$c�B�S[U5;aU?XRU'g)Nr')r5r'r�r�source�dests   r!�mark_copied_from_p1�!ChangingFiles.mark_copied_from_p1�� ���t�D�z�)��#� &����r$c�X�UR5Hup#URX25 M gr&)�itemsrj�r�copiesrirhs    r!�update_copies_from_p1�#ChangingFiles.update_copies_from_p1��"��"�L�L�N�L�D��$�$�V�2�+r$c�6�URR5$r&)rrcr.s r!r(�ChangingFiles.copied_from_p2�rer$c�B�S[U5;aU?XRU'g)Nr()r5r(rrgs   r!�mark_copied_from_p2�!ChangingFiles.mark_copied_from_p2�rlr$c�X�UR5Hup#URX25 M gr&)rnrwros    r!�update_copies_from_p2�#ChangingFiles.update_copies_from_p2�rsr$)rrrrrrr)NNNNNNN)!�__name__�
__module__�__qualname__�__firstlineno__�__doc__r"r*�propertyr/r�
propertycacherr:r@rrErHrrMrPrrVrYrr7r`r'rjrqr(rwrz�__static_attributes__rr$r!rrs:���(�������G�*	
��
��
�
���
&��
&�$��
���'��'�$� �
���!(��!(�F$�!�
���)��)�$�"�
���(��(�$�
!�
���&��&�'�
3�
���&��&�'�
3r$rc��UR5nUR5nUR5[:Xa#UR5[:Xa[	U5$UR5[:wa#UR5[:Xa[X5$UR5[:Xa"UR5[:wa
[X SS9$UR5UR5:Xa[X5$[
XU5$)z'compute the files changed by a revision�)�parent)�p1�p2�revr�
_process_root�_process_linear�_process_merge)�ctxr�r�s   r!�compute_all_files_changesr��s���	����B�	����B�	�v�v�x�7��r�v�v�x�7�2��S�!�!�	����W�	�����W�!4��r�'�'�	����W�	�����W�!4��r�q�1�1�	����R�V�V�X�	��r�'�'��b�c�*�*r$c�n�[5nUR5nUHnURU5 M U$)zEcompute the appropriate changed files for a changeset with no parents)r�manifestr:)r��mdr�r9s    r!r�r��s1��
��B��|�|�~�H���
�
�
�h���
�Ir$c�"�[5nUR5nUR5n/nURU5R5H_upxUSScUR	U5 M!URU5 USScUR
U5 MNURU5 Ma US:Xa
URn	OUS:Xa
URn	O
SU-5eUH*nXR5n
U
(dMU
up�U	"X�5 M, U$)zJcompute the appropriate changed files for a changeset with a single parentrrr�zbad parent value %d)rr��diffrnrM�appendr:r7rjrw�renamed)
�
parent_ctx�children_ctxr�r��parent_manifest�children_manifest�copies_candidater9�d�copied�	copy_inforh�srcnodes
             r!r�r�	s��	��B� �)�)�+�O�$�-�-�/����&�+�+�,=�>�D�D�F����Q�4��7�?��O�O�H�%��#�#�H�-���t�A�w���
�
�h�'�����)�G���{��'�'��	�1���'�'��4�+�f�4�4�u�$�� �*�2�2�4�	��9�'�O�F��6�$�	%��Ir$c�H^�UR5n[5nUR5nUR5nUR5nURU5nURU5n	UR5RRUR
5UR
55n
U
(d[/n
U
Vs/sH#o�R5UR5PM% nn/n
UR5GH_umnU	RTS5nUc[XLTU5 M+USSc-USSc$URT5 U
RT5 MaUSScUSScURT5 M�USSb�USSb�USSb	USSc>[U4SjU55(aURT5 OqUR!T5 O_UR#TUSSS9nUR%5R'5[:XaUR!T5 OUR)T5 U
RT5 GM[S5e U	R5Humn[XLTU5 M U
H�mUTR+5nU(dMUunnUU;a+UUR-5U:XaUR/UT5 MUUU;dM]UUR-5U:XdMvUR1UT5 M� U$s snf)u_compute the appropriate changed files for a changeset with two parents

This is a more advance case. The information we need to record is summarise
in the following table:

┌──────────────┬──────────────┬──────────────┬──────────────┬──────────────┐
│ diff ╲  diff │       ø      │ (Some, None) │ (None, Some) │ (Some, Some) │
│  p2   ╲  p1  │              │              │              │              │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤
│              │              │🄱  No Changes │🄳  No Changes │              │
│  ø           │🄰  No Changes │      OR      │     OR       │🄵  No Changes │
│              │              │🄲  Deleted[1] │🄴  Salvaged[2]│     [3]      │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤
│              │🄶  No Changes │              │              │              │
│ (Some, None) │      OR      │🄻  Deleted    │       ø      │      ø       │
│              │🄷  Deleted[1] │              │              │              │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤
│              │🄸  No Changes │              │              │   🄽 Touched  │
│ (None, Some) │     OR       │      ø       │🄼   Added     │OR 🅀 Salvaged │
│              │🄹  Salvaged[2]│              │   (copied?)  │   (copied?)  │
├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤
│              │              │              │   🄾 Touched  │   🄿 Merged   │
│ (Some, Some) │🄺  No Changes │      ø       │OR 🅁 Salvaged │OR 🅂 Touched  │
│              │     [3]      │              │   (copied?)  │   (copied?)  │
└──────────────┴──────────────┴──────────────┴──────────────┴──────────────┘

Special case [1]:

  The situation is:
    - parent-A:     file exists,
    - parent-B:     no file,
    - working-copy: no file.

  Detecting a "deletion" will depend on the presence of actual change on
  the "parent-A" branch:

  Subcase 🄱 or 🄶 : if the state of the file in "parent-A" is unchanged
  compared to the merge ancestors, then parent-A branch left the file
  untouched while parent-B deleted it. We simply apply the change from
  "parent-B" branch the file was automatically dropped.
  The result is:
      - file is not recorded as touched by the merge.

  Subcase 🄲 or 🄷 : otherwise, the change from parent-A branch were explicitly dropped and
  the file was "deleted again". From a user perspective, the message
  about "locally changed" while "remotely deleted" (or the other way
  around) was issued and the user chose to deleted the file.
  The result:
      - file is recorded as touched by the merge.


Special case [2]:

  The situation is:
    - parent-A:     no file,
    - parent-B:     file,
    - working-copy: file (same content as parent-B).

  There are three subcases depending on the ancestors contents:

  - A) the file is missing in all ancestors,
  - B) at least one ancestor has the file with filenode ≠ from parent-B,
  - C) all ancestors use the same filenode as parent-B,

  Subcase (A) is the simpler, nothing happend on parent-A side while
  parent-B added it.

    The result:
        - the file is not marked as touched by the merge.

  Subcase (B) is the counter part of "Special case [1]", the file was
    modified on parent-B side, while parent-A side deleted it. However this
    time, the conflict was solved by keeping the file (and its
    modification). We consider the file as "salvaged".

    The result:
        - the file is marked as "salvaged" by the merge.

  Subcase (C) is subtle variation of the case above. In this case, the
    file in unchanged on the parent-B side and actively removed on the
    parent-A side. So the merge machinery correctly decide it should be
    removed. However, the file was explicitly restored to its parent-B
    content before the merge was commited. The file is be marked
    as salvaged too. From the merge result perspective, this is similar to
    Subcase (B), however from the merge resolution perspective they differ
    since in (C), there was some conflict not obvious solution to the
    merge (That got reversed)

Special case [3]:

  The situation is:
    - parent-A:     file,
    - parent-B:     file (different filenode as parent-A),
    - working-copy: file (same filenode as parent-B).

  This case is in theory much simple, for this to happens, this mean the
  filenode in parent-A is purely replacing the one in parent-B (either a
  descendant, or a full new file history, see changeset). So the merge
  introduce no changes, and the file is not affected by the merge...

  However, in the wild it is possible to find commit with the above is not
  True. For example repository have some commit where the *new* node is an
  ancestor of the node in parent-A, or where parent-A and parent-B are two
  branches of the same file history, yet not merge-filenode were created
  (while the "merge" should have led to a "modification").

  Detecting such cases (and not recording the file as modified) would be a
  nice bonus. However do not any of this yet.
Nrrc3�@># �UHn[UT5SLv� M g7fr&��_find��.0�mar9s  �r!�	<genexpr>�!_process_merge.<locals>.<genexpr>�s����I�S�r�5��X�.�d�:�S���)�fileid�unreachable)�reporr�r��	changelog�commonancestorsheads�noderrn�pop�_process_other_unchangedr:r�rM�anyrVr7�filectxr�r�rEr��filenoderjrw)�p1_ctx�p2_ctxr�r�r��m�p1m�p2m�diff_p1�diff_p2�cahs�r�mas�copy_candidates�d1�d2�fctxr�rhr�r9s                    @r!r�r�.s����^�8�8�:�D�	��B�����A�
�/�/�
�C�
�/�/�
�C��h�h�q�k�G��h�h�q�k�G��8�8�:���4�4����
�v�{�{�}��D���y��-1�
2�T��8�8�:�a�=�!�!�#�T�C�
2��O� �
�
����"�
�[�[��4�
(��
�:�$�R�h��;��!�u�Q�x��B�q�E�!�H�$4��
�
�h�'��&�&�x�0��A��q��!�b��e�A�h�&6�����)��A��q��%�"�Q�%��(�*>��a�5��8�#�r�!�u�Q�x�'7��I�S�I�I�I��(�(��2�����1��<�<���A��q��<�B�D��w�w�y�}�}��'�1�����1����x�0��&�&�x�0�,�m�+�u�I(�P �
�
����"� ��(�B�7�(�$����M�)�)�+�	��9�'�O�F�G����F�6�N�$;�$;�$=��$H��&�&�v�x�8��6�!�f�V�n�&=�&=�&?�7�&J��&�&�v�x�8�$��I��y3s�*Lc�6�X;agURU5S$)z%return the associate filenode or NoneNr��find)r�r9s  r!r�r��s������=�=��"�1�%�%r$c�^^�USSmUSSnTb1Uc.[UU4SjU55(aURT5 ggTc0Ub-[U4SjU55(aURT5 ggTbUbgS5e)Nrrc3�D># �UHn[UT5T:X+v� M g7fr&r�)r�r�r9�source_nodes  ��r!r��+_process_other_unchanged.<locals>.<genexpr>�s����D��"�5��X�&�+�5��s� c3�@># �UHn[UT5SLv� M g7fr&r�r�s  �r!r�r��s����=��2�u�R��"�$�.��r�r�)r�rMrV)r�r�r9r��target_noder�s  `  @r!r�r��s�����q�'�!�*�K��q�'�!�*�K���;�#6��D��D�D�D��O�O�H�%�E�
�	��!8��=��=�=�=����X�&�>�
�	 �[�%<�	
�	$�m�#�ur$c�.^�[U4SjU55$)Nc3�@># �UHn[UT5SLv� M g7fr&r�r�s  �r!r��._missing_from_all_ancestors.<locals>.<genexpr>
s����9�S�r�u�R��"�d�*�S�r���all)r�r9s `r!�_missing_from_all_ancestorsr�s����9�S�9�9�9r$c�^�/nUR5H>m[U4SjUR555(aM-URT5 M@ U$)z-return the list of files added in a changesetc3�.># �UH
nTU;v� M g7fr&r)r��pr?s  �r!r��-computechangesetfilesadded.<locals>.<genexpr>s����1�=�a�1��6�=�s�)�filesr��parentsr�)r�rr?s  @r!�computechangesetfilesaddedr�sA����E�
�Y�Y�[���1�3�;�;�=�1�1�1��L�L��O���Lr$c��^^^^^^�UbUummmmO@TR5mTR5mTR5mTR5m[RUUU4Sj5mUUU4SjnU$)a�return a function to detect files "wrongly" detected as `removed`

When a file is removed relative to p1 in a merge, this
function determines whether the absence is due to a
deletion from a parent, or whether the merge commit
itself deletes the file. We decide this by doing a
simplified three way merge of the manifest entry for
the file. There are two ways we decide the merge
itself didn't delete a file:
- neither parent (nor the merge) contain the file
- exactly one parent contains the file, and that
  parent has the same filelog entry as the merge
  ancestor (or all of them if there two). In other
  words, that parent left the file unchanged while the
  other one deleted it.
One way to think about this is that deleting a file is
similar to emptying it, so the list of changed files
should be similar either way. The computation
described above is not done directly in _filecommit
when creating the list of changed files, however
it does something very similar by comparing filelog
nodes.
c� >�TR5nTR5nTR5RRX5nU(d[/nUVs/sH$nTR5UR5PM& sn$s snfr&)r�r�r�r�rr�)�p1n�p2nr�r�r�r�r�s    ���r!r��get_removal_filter.<locals>.mas:sj����g�g�i���g�g�i���x�x�z�#�#�8�8��B����9�D�26�7�$�Q����
�1�
�&�&�(�$�7�7��7s�+Bc�>^�TT;a'TT;=(a [UU4SjT"555$TT;a[UU4SjT"555$g)Nc3�># �UH4nTU;=(a# URT5TRT5:Hv� M6 g7fr&r�)r�r�r?�m1s  ��r!r��Aget_removal_filter.<locals>.deletionfromparent.<locals>.<genexpr>Es5����'�?D���R��4�B�G�G�A�J�"�'�'�!�*�4�4�u���<?c3�># �UH4nTU;=(a# URT5TRT5:Hv� M6 g7fr&r�)r�r�r?�m2s  ��r!r�r�Is2����L�e��q�B�w�;�2�7�7�1�:������#;�;�e�r�Tr�)r?r�r�r�s`���r!�deletionfromparent�.get_removal_filter.<locals>.deletionfromparentCsP�����7��B�;��3�'�?B�u�'�$�
��"�W��L�c�e�L�L�L�r$)r�r�r�r�	cachefunc)r��xr�r�r�r�r�r�s`  @@@@@r!�get_removal_filterr�sf���2	�}����B��B�
�V�V�X��
�V�V�X��
�[�[�]��
�[�[�]��	�^�^�8��8���r$c���/nUR5HnX ;dM
URU5 M U(a+[U5nUVs/sHoC"U5(aMUPM nnU$s snf)z/return the list of files removed in a changeset)r�r�r�)r�rr?�rfr�s     r!�computechangesetfilesremovedr�Ps[���G�
�Y�Y�[���<��N�N�1����
��
$��%�3�g��R��U�1�g��3��N��4s�A&�A&c�>�/n[UR55S:aU$UR5HgnX ;dM
XnURRUR5nUSUR5R:wdMVURU5 Mi U$)z.return the list of files merged in a changesetr�r)�lenr�r��_filelog�	_filenoder��nullidr�)r�rr?r�r�s     r!�computechangesetfilesmergedr�\s~��
�F�
�3�;�;�=��A���
�
�Y�Y�[���8��6�D��m�m�+�+�D�N�N�;�G��q�z�S�X�X�Z�.�.�.��
�
�a� ���Mr$c��0n0nUR5nUR5nURR5nUR	5HznU"U5(aX`;aMXR5nU(dM2Uup�X�;aX8R
5U	:XaX�U'MWX�;dM^XHR
5U	:XdMvX�U'M| X4$)z�return the copies data for a changeset

The copies data are returned as a pair of dictionnary (p1copies, p2copies).

Each dictionnary are in the form: `{newname: oldname}`
)r�r��_repo�narrowmatchr�r�r�)
r��p1copies�p2copiesr�r�r��dstr��srcr�s
          r!�computechangesetcopiesr�js����H��H�	����B�	����B��)�)�'�'�)�K��y�y�{���3���3�>����!�!�#��������9���)�)�+�w�6��S�M�
�Y�2�7�+�+�-��8��S�M����r$c���/n[U5H$up4XA;dMURSX1U4-5 M& [U5[U5:wa[R"S5eSRU5$)Ns%d%ss(some copy targets missing from file list�
)�	enumerater�r�r�ProgrammingError�join)r�rprn�ir�s     r!�encodecopiesr�sn���E��E�"����=��L�L��a���%5�5�6�#��5�z�S��[� ��$�$�7�
�	
��:�:�e��r$c���0nU(dU$URS5H)nURS5upE[U5nXnXRU'M+ U$![[4a gf=f)Nr��)�split�int�
ValueError�
IndexError)r��datarp�l�strindexr�r�r�s        r!�decodecopiesr
�sm��
�����M����E�"�A��G�G�E�N�M�H��H�
�A��(�C��3�K�	#�
�
���
�#����s�
A
�?A
�
A �A c��[U5n/n[U5H up4XA;dMURSU-5 M" SRU5$)Ns%dr�)rr�r�r�)r��subset�indicesr�r?s     r!�encodefileindicesr�sG��
��[�F��G��%� ����;��N�N�5�1�9�%�!��:�:�g��r$c���/nU(dU$URS5H8n[U5nUS:dU[U5:�a gURX5 M: U$![[
4a gf=f)Nr�r)rrr�r�rr)r�rrr	r�s     r!�decodefileindicesr�sr��
�����M��
�
�5�)�H��H�
�A��1�u��S��Z����M�M�%�(�#�	*�
�
���
�#����s�
A�5A�A�A/�.A/�11100r��00100�01000�01100�10000�10100�11�10z>Lz>bLLc�4�[UR5nURURR	55 URUR
R	55 [
U5n[U5VVs0sHup#X2_M	 nnnSUS'[R[U55/nSnUGH#n[U5nXg-
nSnX0R;a
U[-nOcX0R;a
U[-nOJX0R;a
U[ -nO1X0R";a
U[$-nOX0R;a	U[&-nSn	X0R;a%U[(-nURR+U5n	O3X0R
;a$UR
R+U5n	U[,-nXIn
UR/[0RX�U
55 GM& UR3U5 [4R6SR9U50$s snnf)Nrr$)rrrr'�valuesr(�sortedr��INDEX_HEADER�packr�r�
ADDED_FLAGr�MERGED_FLAGr�REMOVED_FLAGr�
SALVAGED_FLAG�TOUCHED_FLAG�COPIED_FROM_P1_FLAG�get�COPIED_FROM_P2_FLAGr��INDEX_ENTRY�extend�sidedatamod�SD_FILESr�)r��	all_filesr�r?�file_idx�chunks�filename_length�
filename_size�flagrc�copy_idxs           r!�encode_files_sidedatar1�s����E�M�M�"�I�
���U�)�)�0�0�2�3�
���U�)�)�0�0�2�3��y�!�I�#,�Y�#7�8�#7��!���#7�H�8��H�T�N�����I��/�
0�F��O�
���A��
��(���������J��D�
�,�,�
��K��D�
�-�-�
��L� �D�
�.�.�
 ��M�!�D�
�-�-�
��L� �D����$�$�$��'�'�D��'�'�+�+�A�.�D�
�&�&�
&��'�'�+�+�A�.�D��'�'�D��>���
�
�k�&�&�t�h�G�H�/�0�M�M�)��� � �#�(�(�6�"2�3�3��?9s�Hc�`�[5nUR[R5nUcU$/n/n[	U5[
R:�de[
RUS5Sn[
RnU[RU--nUn[	U5U:�de[U5GHcn	[RX&5up�nX�-
nX(Un
X�-
n[	U
5U:XdeU[R-
nUnURU
5 U
[-[:XaURU
5 O�U
[-[:XaURU
5 OhU
[-[ :XaUR#U
5 OEU
[-[$:XaUR'U
5 O"U
[-[(:XaUR+U
5 SnU
[,-[.:Xa
UR0nOU
[,-[2:XaUR4nUcGMPURX�U45 GMf UHup�nU"XLU
5 M U$�Nr)rr$r(r)r�r�size�unpack_fromr&�ranger��ACTION_MASKrr:rrEr rMr!rVr"r7�COPIED_MASKr#rjr%rw)r	r��rawrpr*�total_files�offset�file_offset_base�file_offset_last�idxr/�file_endr0r9�filesizer�s                r!�decode_files_sidedatarA�s��	��B�
�,�,�{�+�+�
,�C�
�{��	�
�F��I��s�8�|�(�(�(�(�(��*�*�3��2�1�5�K�
�
�
�F���!1�!1�K�!?�@��'���s�8�'�'�'�'��[�!��#.�#:�#:�3�#G� ����$����1���.���8�}��(�(�(��+�"�"�"��#������"��+���+��M�M�(�#�
�K�
�;�
.��N�N�8�$�
�K�
�<�
/��O�O�H�%�
�K�
�=�
0����X�&�
�K�
�<�
/��O�O�H�%����+��!4�4��+�+�F�
�K�
�#6�
6��+�+�F����M�M�6�X�6�7�7"�:'-�"��(��y�"�H�-�'-��Ir$c�N�Xn[U5n[U5UR4$r&)r�r1r/)�srcrepor�r�r�s    r!�_getsidedatarD+s)��
�,�C�%�c�*�E� ��'��)>�)>�>�>r$c�X�[X5upEU(a[ROSnXFS44$r3)rD�sidedataflag�REVIDX_HASCOPIESINFO)r��revlogr��existing_sidedatar	r/�flags_to_adds       r!�copies_sidedata_computerrK1s,�� ,�T� 7��H�8G�<�4�4�Q�L��A�&�&�&r$c���UR5 UR5nUbB[X5nURXE45 UR5 UR5nUbMBUR	5 g)a�The function used by worker precomputing sidedata

It read an input queue containing revision numbers
It write in an output queue containing (rev, <sidedata-map>)

The `None` input value is used as a stop signal.

The `tokens` semaphore is user to avoid having too many unprocessed
entries. The workers needs to acquire one token before fetching a task.
They will be released by the consumer of the produced data.
N)�acquirer$rD�put�release)rC�
revs_queue�sidedata_queue�tokensr�rs      r!�_sidedata_workerrS7sb���N�N��
�.�.�
�C�

�/��G�)�����C�;�'������n�n���	�/��N�N�r$�2c�^^^^
�SSKJn URUR5n[R
"U[-5m
[R"5n[R"5mURbeURR5HnURU5 M [U5HnURS5 M /n[U5HBnXTT
4n[R"[US9n	URU	5 U	R!5 MD 0mUUU
4Sjn
U
$)z�The parallel version of the sidedata computation

This code spawn a pool of worker that precompute a buffer of sidedata
before we actually need themr)�workerN)�target�argsc�>�T
RUS5nUc5T	R5upTXR:waUT
U'T	R5upTXR:waMTR5 UupgSnU(a[RnXhS44$r3)r�r$rOrFrG)r�rHr��old_sidedatarr�r	r/�new_flag�	sidedataq�stagingrRs         ���r!�sidedata_companion�6_get_worker_sidedata_adder.<locals>.sidedata_companionys}����{�{�3��%���<� �m�m�o�G�A��(�!���
�#�-�-�/����(�	����$(�!�����#�8�8�H��A��&�&r$)�rV�_numworkers�ui�multiprocessing�BoundedSemaphore�BUFF_PER_WORKER�Queue�
filternamer��revsrNr6�ProcessrSr��start)rC�destreporV�	nbworkers�revsqr�r��
allworkersrX�wr^r\r]rRs           @@@r!�_get_worker_sidedata_adderrpQs�����"�"�7�:�:�.�I�
�
-�
-�i�/�.I�
J�F��!�!�#�E��%�%�'�I����%�%�%��
�
�
#�
#�
%��
�	�	�!��&��9�
��
�	�	�$����J�
�9�
���	�6�2���#�#�+;�$�G�����!��	���	�	��G�'�"�r$)rr&)3�
__future__rrc�structr�rr`rr�revlogutilsrrFr	r(rr�r�r�r�r�r�r�r�r�r�r�r�rr
rrrr7rrr r!r"r8r#r%�Structrr&r1rArDrKrSrerprr$r!�<module>rus0��#��
���
�P3�P3�f+�$�"�Jy�x&�$�6:��4�n	���4	��"��&�*�a� ��
��Q�
�
��*�a� ���:�q�!���J��"�
��:�q�!���$��l���$��l���$��l���}�}�T�"���m�m�F�#��$4�N3�l?�'��.��9r$

Youez - 2016 - github.com/yon3zu
LinuXploit