403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.224
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/breezy/bzr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/breezy/bzr/__pycache__/knitpack_repo.cpython-313.pyc
�

p��g�����SrSSKJr SSKJr SSKJr \"\"5S5 SSKJr SSK	J
r
JrJrJ
r
 SSKJr S	S
KJr S	SKJrJrJrJrJrJrJrJr "SS
\\5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r "SS\5r!"SS\5r""SS\5r#"SS\5r$"S S!\5r%"S"S#\5r&"S$S%\&5r'"S&S'\&5r("S(S)\5r)g*)+z#Knit-based pack repository formats.�)�errors)�	transport)�lazy_importa<
import time

from breezy import (
    controldir,
    debug,
    osutils,
    revision as _mod_revision,
    trace,
    tsort,
    ui,
    )
from breezy.bzr import (
    pack,
    xml5,
    xml6,
    xml7,
    )
from breezy.bzr.knit import (
    _KnitGraphIndex,
    KnitPlainFactory,
    KnitVersionedFiles,
    )
)�btree_index)�CombinedGraphIndex�
GraphIndex�GraphIndexPrefixAdapter�InMemoryGraphIndex)�StreamSource�)�KnitRepository)�NewPack�PackCommitBuilder�Packer�PackRepository�RepositoryFormatPack�RepositoryPackCollection�ResumedPack�_DirectPackAccessc�&�\rSrSrSrSrSrSrg)�KnitPackRepository�Hc���[R"UUUUUU5 URR(a[	S5eUR
R
S5n[UUR
UUR
R
S5UR
R
S5URURSS9Ul
[[URRRURRRSSUR S9URRR"S	S
9Ul[[URR&RURR&RSSUR SS9URR&R"SS
9Ul[[URR*RURR*RSSUR S9URR*R"SS
9Ul[[URR.RURR.RSSUR S9URR.R"S	S
9UlSUlSUlSUlSUlSUlSUlg)
Nzchk not supported�indices�upload�packsF)�
use_chk_indexT��add_callback�deltas�parents�	is_locked����data_access�max_delta_chain)rr r!r"�track_external_parent_refs�)r�__init__�_format�
supports_chks�AssertionError�
_transport�clone�KnitRepositoryPackCollection�index_builder_class�index_class�_pack_collection�KnitVersionedFiles�_KnitGraphIndex�inventory_index�combined_indexrr"r%�inventories�revision_index�	revisions�signature_index�
signatures�
text_index�texts�	chk_bytes�_write_lock_count�_transaction�_reconcile_does_inventory_gc�_reconcile_fixes_text_parents�_reconcile_backsup_inventory)�selfr*�a_controldir�
control_files�_commit_builder_class�_serializer�index_transports       �:/usr/lib/python3/dist-packages/breezy/bzr/knitpack_repo.pyr)�KnitPackRepository.__init__Isy��	�������!��
	
��<�<�%�%� �!4�5�5��/�/�/�/�	�:�� <���O�O���O�O�!�!�(�+��O�O�!�!�'�*��'�'�����	!
���.���%�%�5�5�D�D�!�2�2�B�B�O�O����.�.�
��-�-�=�=�I�I��

���,���%�%�4�4�C�C�!�2�2�A�A�N�N����.�.�+/�

��-�-�<�<�H�H��
���-���%�%�5�5�D�D�!�2�2�B�B�O�O����.�.�
��-�-�=�=�I�I��

���(���%�%�0�0�?�?�!�2�2�=�=�J�J����.�.�
��-�-�8�8�D�D��

��
����"#��� ���,0��)�-1��*�,1��)�c��UR5URR5:Xa[X5$[R"X5$�N)�network_namer*�KnitPackStreamSourcer�_get_source)rD�	to_formats  rJrQ�KnitPackRepository._get_source�s<���!�!�#�t�|�|�'@�'@�'B�B�'��8�8��)�)�$�:�:rLc�<�[XX45nURU5$rN)�KnitReconcilePacker�pack)rD�
collectionr�	extension�revs�pb�packers       rJ�_reconcile_pack�"KnitPackRepository._reconcile_pack�s��$�Z�	�H���{�{�2��rL)r2rCrArBr@r?r>r7r9r;r=N)�__name__�
__module__�__qualname__�__firstlineno__r)rQr\�__static_attributes__�rLrJrrHs��P2�d;�
rLrc�l�\rSrSrSr\r\r\	S5r
\r\
rSrSr\	"\\5r\S5rSrSrg	)
�RepositoryFormatKnitPack1�zRA no-subtrees parameterized Pack repository.

This format was introduced in 0.92.
c�"�[R$rN��xml5�
serializer_v5�rDs rJrH�%RepositoryFormatKnitPack1._serializer�����!�!�!rLc�@�[RRS5$)Nz	pack-0.92��
controldir�format_registry�make_controldirrks rJ�_get_matching_bzrdir�.RepositoryFormatKnitPack1._get_matching_bzrdir�s���)�)�9�9�+�F�FrLc��grNrc�rD�formats  rJ�_ignore_setting_bzrdir�0RepositoryFormatKnitPack1._ignore_setting_bzrdir����rLc��g)�)See RepositoryFormat.get_format_string().s1Bazaar pack repository format 1 (needs bzr 0.92)
rc��clss rJ�get_format_string�+RepositoryFormatKnitPack1.get_format_string�s��ErLc��g)�.See RepositoryFormat.get_format_description().z.Packs containing knits without subtree supportrcrks rJ�get_format_description�0RepositoryFormatKnitPack1.get_format_description����?rLrcN)r^r_r`ra�__doc__r�repository_classrrG�propertyrHr
r0rr1rsrx�_matchingcontroldir�classmethodrr�rbrcrLrJrere�sj���
*��-��
�"��"�-���K�G�
�#�#7�9O�P���E��E�@rLrec�x�\rSrSrSr\r\rSr	Sr
Sr\S5r
\r\rSrSr\"\\5r\S5rSrS	rg
)�RepositoryFormatKnitPack3r#z�A subtrees parameterized Pack repository.

This repository format uses the xml7 serializer to get:
 - support for recording full info about the tree root
 - support for recording tree-references

This format was introduced in 0.92.
Tc�"�[R$rN��xml7�
serializer_v7rks rJrH�%RepositoryFormatKnitPack3._serializer�rmrLc�@�[RRS5$)Nzpack-0.92-subtreerorks rJrs�.RepositoryFormatKnitPack3._get_matching_bzrdir�s���)�)�9�9�:M�N�NrLc��grNrcrvs  rJrx�0RepositoryFormatKnitPack3._ignore_setting_bzrdir�rzrLc��g)r|sFBazaar pack repository format 1 with subtree support (needs bzr 0.92)
rcr}s rJr�+RepositoryFormatKnitPack3.get_format_string�s
��
W�	
rLc��g)r�z,Packs containing knits with subtree support
rcrks rJr��0RepositoryFormatKnitPack3.get_format_description�s��>rLrcN)r^r_r`rar�rr�rrG�rich_root_data�experimental�supports_tree_referencer�rHr
r0rr1rsrxr�r�rr�rbrcrLrJr�r��sw���*��-���N��L�"��
�"��"�-���K�O�
�#�#7�9O�P���
��
�?rLr�c�t�\rSrSrSr\r\rSr	Sr
\S5r\
r\rSrSr\"\\5r\S5rS	rS
rg)�RepositoryFormatKnitPack4��z�A rich-root, no subtrees parameterized Pack repository.

This repository format uses the xml6 serializer to get:
 - support for recording full info about the tree root

This format was introduced in 1.0.
TFc�"�[R$rN��xml6�
serializer_v6rks rJrH�%RepositoryFormatKnitPack4._serializerrmrLc�@�[RRS5$)Nzrich-root-packrorks rJrs�.RepositoryFormatKnitPack4._get_matching_bzrdir
s���)�)�9�9�:J�K�KrLc��grNrcrvs  rJrx�0RepositoryFormatKnitPack4._ignore_setting_bzrdir
rzrLc��g)r|s?Bazaar pack repository format 1 with rich root (needs bzr 1.0)
rcr}s rJr�+RepositoryFormatKnitPack4.get_format_strings��SrLc��g)r�z.Packs containing knits with rich root support
rcrks rJr��0RepositoryFormatKnitPack4.get_format_descriptions��@rLrcN)r^r_r`rar�rr�rrGr�r�r�rHr
r0rr1rsrxr�r�rr�rbrcrLrJr�r��su���*��-���N�#��
�"��"�-���K�L�
�#�#7�9O�P���S��S�ArLr�c�p�\rSrSrSr\r\rSr	\
r\r
\S5rSrSr\"\\5r\S5rSrS	rg
)�RepositoryFormatKnitPack5iz�Repository that supports external references to allow stacking.

Supports external lookups, which results in non-truncated ghosts after
reconcile compared to pack-0.92 formats.
Tc�"�[R$rNrhrks rJrH�%RepositoryFormatKnitPack5._serializer*rmrLc�@�[RRS5$)Nz1.6rorks rJrs�.RepositoryFormatKnitPack5._get_matching_bzrdir.����)�)�9�9�%�@�@rLc��grNrcrvs  rJrx�0RepositoryFormatKnitPack5._ignore_setting_bzrdir1rzrLc��g)r|s+Bazaar RepositoryFormatKnitPack5 (bzr 1.6)
rcr}s rJr�+RepositoryFormatKnitPack5.get_format_string6���?rLc��g)r�z1Packs 5 (adds stacking support, requires bzr 1.6)rcrks rJr��0RepositoryFormatKnitPack5.get_format_description;s��BrLrcN)r^r_r`rar�rr�rrG�supports_external_lookupsr
r0rr1r�rHrsrxr�r�rr�rbrcrLrJr�r�sl���*��-�� $��,���K�
�"��"�A�
�#�#7�9O�P���?��?�CrLr�c�x�\rSrSrSr\r\rSr	Sr
Sr\r
\r\S5rSrSr\"\\5r\S5rS	rS
rg)�!RepositoryFormatKnitPack5RichRooti@z�A repository with rich roots and stacking.

Supports stacking on other repositories, allowing data to be accessed
without being stored locally.
TFc�"�[R$rNr�rks rJrH�-RepositoryFormatKnitPack5RichRoot._serializerPrmrLc�@�[RRS5$�Nz1.6.1-rich-rootrorks rJrs�6RepositoryFormatKnitPack5RichRoot._get_matching_bzrdirTs���)�)�9�9�:K�L�LrLc��grNrcrvs  rJrx�8RepositoryFormatKnitPack5RichRoot._ignore_setting_bzrdirWrzrLc��g)r|s5Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6.1)
rcr}s rJr�3RepositoryFormatKnitPack5RichRoot.get_format_string\s��IrLc��g)Nz=Packs 5 rich-root (adds stacking support, requires bzr 1.6.1)rcrks rJr��8RepositoryFormatKnitPack5RichRoot.get_format_descriptionas��NrLrcN)r^r_r`rar�rr�rrGr�r�r�r
r0rr1r�rHrsrxr�r�rr�rbrcrLrJr�r�@sy���*��-���N�#�� $��,���K�
�"��"�M�
�#�#7�9O�P���I��I�OrLr�c�~�\rSrSrSr\r\rSr	Sr
Sr\r
\r\S5rSrSr\"\\5r\S5rS	rS
rSrg)
�'RepositoryFormatKnitPack5RichRootBrokenieawA repository with rich roots and external references.

Supports external lookups, which results in non-truncated ghosts after
reconcile compared to pack-0.92 formats.

This format was deprecated because the serializer it uses accidentally
supported subtrees, when the format was not intended to. This meant that
someone could accidentally fetch from an incorrect repository.
TFc�"�[R$rNr�rks rJrH�3RepositoryFormatKnitPack5RichRootBroken._serializerzrmrLc�P�[RRS5nXlU$r�)rprqrr�repository_format)rD�matchings  rJrs�<RepositoryFormatKnitPack5RichRootBroken._get_matching_bzrdir~s$���-�-�=�=�>O�P��%)�"��rLc��grNrcrvs  rJrx�>RepositoryFormatKnitPack5RichRootBroken._ignore_setting_bzrdir�rzrLc��g)r|s3Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6)
rcr}s rJr�9RepositoryFormatKnitPack5RichRootBroken.get_format_string����GrLc��g)NzHPacks 5 rich-root (adds stacking support, requires bzr 1.6) (deprecated)rcrks rJr��>RepositoryFormatKnitPack5RichRootBroken.get_format_description�s
��V�	
rLc��g)NTrcrks rJ�
is_deprecated�5RepositoryFormatKnitPack5RichRootBroken.is_deprecated�s��rLrcN)r^r_r`rar�rr�rrGr�r�r�r
r0rr1r�rHrsrxr�r�rr�r�rbrcrLrJr�r�es|���*��-���N�#�� $��,���K�
�"��"��

�#�#7�9O�P���G��G�
�
rLr�c��\rSrSrSr\r\rSr	\
Rr\
Rr\S5rSrSr\"\\5r\S5rSrS	rg
)�RepositoryFormatKnitPack6i�z�A repository with stacking and btree indexes,
without rich roots or subtrees.

This is equivalent to pack-1.6 with B+Tree indices.
Tc�"�[R$rNrhrks rJrH�%RepositoryFormatKnitPack6._serializer�rmrLc�@�[RRS5$)Nz1.9rorks rJrs�.RepositoryFormatKnitPack6._get_matching_bzrdir�r�rLc��grNrcrvs  rJrx�0RepositoryFormatKnitPack6._ignore_setting_bzrdir�rzrLc��g)r|s+Bazaar RepositoryFormatKnitPack6 (bzr 1.9)
rcr}s rJr�+RepositoryFormatKnitPack6.get_format_string�r�rLc��g)r�z.Packs 6 (uses btree indexes, requires bzr 1.9)rcrks rJr��0RepositoryFormatKnitPack6.get_format_description�r�rLrcN)r^r_r`rar�rr�rrGr�r�BTreeBuilderr0�BTreeGraphIndexr1r�rHrsrxr�r�rr�rbrcrLrJr�r��sx���*��-�� $��%�2�2���-�-�K�
�"��"�A�
�#�#7�9O�P���?��?�@rLr�c��\rSrSrSr\r\rSr	Sr
Sr\Rr\Rr\S5rSrSr\"\\5r\S5rS	rS
rg)�!RepositoryFormatKnitPack6RichRooti�zkA repository with rich roots, no subtrees, stacking and btree indexes.

1.6-rich-root with B+Tree indices.
TFc�"�[R$rNr�rks rJrH�-RepositoryFormatKnitPack6RichRoot._serializer�rmrLc�@�[RRS5$)Nz
1.9-rich-rootrorks rJrs�6RepositoryFormatKnitPack6RichRoot._get_matching_bzrdir�s���)�)�9�9�/�J�JrLc��grNrcrvs  rJrx�8RepositoryFormatKnitPack6RichRoot._ignore_setting_bzrdir�rzrLc��g)r|s3Bazaar RepositoryFormatKnitPack6RichRoot (bzr 1.9)
rcr}s rJr�3RepositoryFormatKnitPack6RichRoot.get_format_string�r�rLc��g)Nz8Packs 6 rich-root (uses btree indexes, requires bzr 1.9)rcrks rJr��8RepositoryFormatKnitPack6RichRoot.get_format_description�s��IrLrcN)r^r_r`rar�rr�rrGr�r�r�rr�r0r�r1r�rHrsrxr�r�rr�rbrcrLrJr�r��s����
*��-���N�#�� $��%�2�2���-�-�K�
�"��"�K�
�#�#7�9O�P���G��G�JrLr�c��\rSrSrSr\r\rSr	Sr
SrSr\
Rr\
R r\S5rSrSr\"\\5r\S5rSrS	rg
)�'RepositoryFormatPackDevelopment2Subtreei�z�A subtrees development repository.

This format should be retained in 2.3, to provide an upgrade path from this
to RepositoryFormat2aSubtree.  It can be removed in later releases.

1.6.1-subtree[as it might have been] with B+Tree indices.
Tc�"�[R$rNr�rks rJrH�3RepositoryFormatPackDevelopment2Subtree._serializer�rmrLc�@�[RRS5$)Nzdevelopment5-subtreerorks rJrs�<RepositoryFormatPackDevelopment2Subtree._get_matching_bzrdir�s���)�)�9�9�:P�Q�QrLc��grNrcrvs  rJrx�>RepositoryFormatPackDevelopment2Subtree._ignore_setting_bzrdir�rzrLc��g)r|sQBazaar development format 2 with subtree support (needs bzr.dev from before 1.8)
rcr}s rJr�9RepositoryFormatPackDevelopment2Subtree.get_format_string�s��
1�	
rLc��g)r�zXDevelopment repository format, currently the same as 1.6.1-subtree with B+Tree indices.
rcrks rJr��>RepositoryFormatPackDevelopment2Subtree.get_format_descriptions��
3�	
rLrcN)r^r_r`rar�rr�rrGr�r�r�r�rr�r0r�r1r�rHrsrxr�r�rr�rbrcrLrJr�r��s����*��-���N��L�"�� $��%�2�2���-�-�K�
�"��"�R�
�#�#7�9O�P���
��
�
rLr�c�>^�\rSrSrSrU4SjrSrSrSrSr	U=r
$)rPi
a3A StreamSource used to transfer data between same-format KnitPack repos.

This source assumes:
    1) Same serialization format for all objects
    2) Same root information
    3) XML format inventories
    4) Atomic inserts (so we can stream inventory texts before text
       content)
    5) No chk_bytes
c�@>�[TU]X5 SUlSUlg)N�	unordered)�superr)�
_text_keys�_text_fetch_order)rD�from_repositoryrR�	__class__s   �rJr)�KnitPackStreamSource.__init__s���
����4����!,��rLc�^^^^	^
^^^
^�TRmTRU5nUVs/sHo34PM nnTRRm	[	T	"TRU555m
[	5m[
SS5m[5mUUU	U4Sjm
UVs/sHoU4PM snmUU
UU
UU4SjnSU"54$s snfs snf)Nc	�>�URS;a$[SRUR55eURnURSnT
RX!5up4URS:XaTR
U5nO!URS:XaTRU5nTRT	"WVs/sHofU4PM sn55 gs snf)N)�
knit-delta-gz�
knit-ft-gzz3Unknown content storage kind for inventory text: {}���rr
)	�storage_kind�
ValueErrorrw�_raw_record�key�
_parse_record�get_linedelta_content�get_fulltext_content�update)�record�raw_data�revision_id�content�_�
line_iterator�line�content_text_keys�factory�find_text_keys�knits       ����rJ�find_text_keys_from_content�RKnitPackStreamSource._get_filtered_inv_stream.<locals>.find_text_keys_from_content*s�����"�"�*I�I� �I�P�P��+�+�����)�)�H� �*�*�R�.�K��+�+�K�B�J�G��"�"�o�5� '� =� =�g� F�
��$�$��4� '� <� <�W� E�
��$�$��
�N�
��{� 3�
�N�O�
��Ns�8
Cc3��># �TRnURTSS5nUH@nURS:Xa![R"TUR
5eT"U5 Uv� MB TT-
Tlg7f)NrF�absent)r7�get_record_streamrr�NoSuchRevisionrr)	�	source_vf�streamrrr"�	from_repo�parent_text_keys�
revision_keysrDs	   ������rJ�_filtered_inv_stream�KKnitPackStreamSource._get_filtered_inv_stream.<locals>._filtered_inv_streamAsp����!�-�-�I��0�0���U�S�F� ���&�&�(�2� �/�/�	�6�:�:�F�F�+�F�3���	!�
0�2B�B�D�O�s�A1A4r7)r�_find_parent_ids_of_revisionsrH�_find_text_key_references�set�_inventory_xml_lines_for_keysr3�KnitPlainFactory)rD�revision_ids�
parent_ids�p�parent_keys�rr-rrr r"r*r!r+r,s`      @@@@@@@@rJ�_get_filtered_inv_stream�-KnitPackStreamSource._get_filtered_inv_streams������(�(�	��<�<�\�J�
�%/�0�Z��t�Z��0�"�.�.�H�H����9�B�B�;�O�P�
�� �E��!�$��-��"�$��	�	�*(4�4�|�!��|�4�
�	C�	C��3�5�6�6��U1��<5s�B?�Cc��URRRURURS5nSU4$)NFr=)rr=r&rr)rD�text_streams  rJ�_get_text_stream�%KnitPackStreamSource._get_text_streamMs>���*�*�0�0�B�B��O�O�T�3�3�U�
����%�%rLc#��# �UR5nURU5Shv�N UVs/sHo34PM snUlURU5v� UR	5v� gNBs snf7frN)�get_keys�_fetch_revision_texts�_revision_keysr9r=)rD�searchr4�rev_ids    rJ�
get_stream�KnitPackStreamSource.get_streamUsd������(���-�-�l�;�;�;�7C�D�|�V�y�|�D����+�+�L�9�9��#�#�%�%�	<��D�s�%A1�A*�A1�A,�/A1�,A1)rBrr)r^r_r`rar�r)r9r=rErb�
__classcell__�rs@rJrPrP
s"���	�-�
-7�^&�&�&rLrPc�^�\rSrSrSrSU4SjjrSrSSjrSSjrSSjr	SSjr
S	rS
rSr
SrS
rSrSrSrSrSrSrU=r$)�
KnitPackeri]z"Packer that works with knit packs.c�(>�[TU]UUUUUS9 g)N)r4�reload_func)rr))rD�pack_collectionr�suffixr4rLrs      �rJr)�KnitPacker.__init__`s&���	������%�#�	�	
rLc�v�/n0nURH#n[XA5nURU5 XCU'M% X24$)a!Convert a list of packs to an index pack map and index list.

:param index_attribute: The attribute that the desired index is found
    on.
:return: A tuple (map, list) where map contains the dict from
    index:pack_tuple, and list contains the indices in the preferred
    access order.
)r�getattr�append)rD�index_attributer�pack_map�pack_obj�indexs      rJ�_pack_map_and_index_list�#KnitPacker._pack_map_and_index_listksD�������
�
�H��H�6�E��N�N�5�!�&�U�O�#�� � rLc�`�[U5nUcUR5$URU5$)z�Get an iterable of the index contents from a pack_map.

:param indices: The list of indices to query
:param key_filter: An optional filter to limit the keys returned.
)r�iter_all_entries�iter_entries)rDr�
key_filter�	all_indexs    rJ�_index_contents�KnitPacker._index_contents|s4��'�w�/�	����-�-�/�/��)�)�*�5�5rLc
��[RR5nURXX4XeS9sSSS5 $!,(df   g=f)zqCopy knit nodes between packs with no graph references.

:param output_lines: Output full texts of copied items.
��output_linesN)�ui�
ui_factory�nested_progress_bar�_do_copy_nodes)rD�nodes�	index_map�writer�write_indexrbrZs       rJ�_copy_nodes�KnitPacker._copy_nodes�s<��
�]�]�
.�
.�
0�B��&�&��&�r�'��1�
0�
0�s	�:�
Ac�\�[SS5n[U5n0nUH#up�nX�;a/X�'X�RX�45 M% SnURSU[	U55 UR5GH|up�/nU
HMup�USSR
S5n[US5[US5nnURUUX�SS445 MO UR5 X)nUR5unn[RUUUVs/sHnUSSPM
 sn5n[UR!5U5H�uunnunnun
nU"S5nUbU"UR#U
SU5S5 O%UR%U
U5unnUR'5 UR)U/[	U5U5unnUR+U
USUU4--5 URSU5 US-
nM� GM gs snf![Ra URbUR5 ef=f)Nr(�
Copied recordr� rr�%d %d)r3�sortedrRr�len�items�split�int�sort�access_tuplerV�make_readv_reader�_mod_transport�
NoSuchFile�_reload_func�zip�iter_recordsr�_parse_record_header�close�add_bytes_record�add_node) rDrgrhrirjrZrbr!�request_groupsrVr�value�record_indexrs�pack_readv_requests�bits�offset�lengthrUr�path�reader�names�	read_func�_1�_2�eol_flagr�dfr�pos�sizes                                 rJrf�KnitPacker._do_copy_nodes�sL��"�$��-���u�
��
��!&��E���*�(*��%��!�(�(�#��6�"'���
�	�	�/�<��U��<�*�0�0�2�L�E�"$��#�
���Q�R�y���t�,��!$�T�!�W��s�4��7�|���#�*�*�F�F�S��!�*�<M�+N�O�	$�
 �$�$�&� �'�H�&�3�3�5�O�I�t�
��/�/��t�@S�%T�@S�f�f�Q�q�k�@S�%T���BE��#�#�%�':�B�=�"��	�$=�R��_�c�8�%�T�?���+� ��!3�!3�C��G�X�!F�q�!I�J� �5�5�c�8�D�E�B���H�H�J�"�3�3�X�J��H�
�u�U�	��T��$�$�S�(�X��d��5K�*K�L��	�	�/�<�8���!��B�)3��&U��!�,�,�
��$�$�0��%�%�'��
�s�4G8�	G3�G8�3G8�83H+c
#�# �[RR5nURUUUUUUU5Shv�N SSS5 gN
!,(df   g=f7f)z�Copy knit nodes between packs.

:param output_lines: Return lines present in the copied data as
    an iterator of line,version_id.
N)rcrdre�_do_copy_nodes_graph)rDrhrirj�readv_group_iter�total_itemsrbrZs        rJ�_copy_nodes_graph�KnitPacker._copy_nodes_graph�s[����]�]�
.�
.�
0�B��0�0������ ���
�
�1�
0�
�1�
0�s,�A�A�A
�A�	A�
A�
A�Ac	#�p# �[SS5nU(a
[5n	Sn
URSX�5 UGHDup�n
XnUR5unn[RUUU5n[UR5U
5H�uunnunnnU"S5nU(a]URUSU5unn[US5S:XaW	RU5nOW	RU5nUH	nUU4v� M O%URUU5unnUR!5 UR#U/[U5U5unnUR%UUSUU4--U5 URSU
5 U
S-
n
M� GMG g![Ra URbUR5 ef=f7f)Nr(rnrrpr)r3r3rrwrVrxryrzr{r|r}rrrrrr~rr�r�)rDrhrirjrbrZr�r�r!rr�rV�readv_vector�node_vectorrUrr�r�r�r�rr��
referencesrrrrrr�r�r�s                               rJr��KnitPacker._do_copy_nodes_graph�s����"�$��-���&�(�G���
�	�	�/�<�=�0@�,�E�� �'�H�&�3�3�5�O�I�t�
��/�/�	�4��N��
DG��#�#�%�{�D�?�"��	�$?�S�(�J�%�T�?���!%�!3�!3�C��G�X�!F�J�G�Q��:�b�>�*�a�/�(/�(D�(D�W�(M�
�(/�(E�(E�g�(N�
� -��"�C�i��!.�!�5�5�c�8�D�E�B���H�H�J�"�3�3�X�J��H�
�u�U�	��T��$�$�S�(�X��d��5K�*K�Z�X��	�	�/�<�8���!��)D�1A��"�,�,�
��$�$�0��%�%�'��
�s�AF6�F�,DF6�3F3�3F6c��URRnURXR5n/nUR	5H(upVURUVs/sHouU4PM sn5 M* X@lgs snf)z;Use up the inv_lines generator and setup a text key filter.N)r2�repo�'_find_file_ids_from_xml_inventory_linesr,rs�extend�_text_filter)rD�	inv_linesr��fileid_revisions�text_filter�fileid�file_revids�
file_revids        rJ�_process_inventory_lines�#KnitPacker._process_inventory_linessv���$�$�)�)���G�G��)�)�
����#3�#9�#9�#;��F����{�S�{��� 4�{�S�T�$<�'��� Ts�
A7
c	�J�URnURS5up#URX15nURR	SS5 URU5upV[
UR5nURUURRURRUUUS9nUR(aURU5 O[U5 SUlS[R ;a�["R%S[&R)5UR*R,R.URR0URRR35[&R'5URR4-
5 gg)Nr5zCopying inventory textsrrarVz;%s: create_pack: inventories copied: %s%s %d items t+%6.3fs)rBrWr^rZr�_least_readv_node_readv�boolr4r��new_pack�_writerr5r��listr��debug�debug_flags�trace�mutter�time�ctimer2�_upload_transport�base�random_name�	key_count�
start_time)	rD�inv_keys�inventory_index_map�inventory_indices�	inv_nodesr�r�rbr�s	         rJ�_copy_inventory_texts� KnitPacker._copy_inventory_textssQ���&�&��26�1N�1N��2
�.���(�(�):�E�	�	
�����0�!�4�(,�(D�(D�Y�(O�%���D�-�-�.���*�*���M�M�!�!��M�M�)�)���%�
+�
�	�����)�)�)�4�
��O� $�D���U�&�&�&��L�L�M��
�
���%�%�7�7�<�<��
�
�)�)��
�
�-�-�7�7�9��	�	��d�m�m�6�6�6�

�'rLc���/n[5nUH3nUSnXd;dMURX&5 URU5 M5 [U5[UR5:Xa*S[
R;a[RS5 g[U5nURH,nX�;dM
URU5 URU5 M. S[
R;adURV	s/sHo�R5SPM n
n	UV	s/sHo�R5SPM nn	[RSX�5 X0lgs sn	fs sn	f)a�Determine how we want our packs to be ordered.

This changes the sort order of the self.packs list so that packs unused
by 'entries' will be at the end of the list, so that future requests
can avoid probing them.  Used packs will be at the front of the
self.packs list, in the order of their first use in 'entries'.

:param entries: A list of (index, ...) tuples
:param index_to_pack_map: A mapping from index objects to pack objects.
r(rVz'Not changing pack list, all packs used.Nrz"Reordering packs
from: %s
  to: %s)
r1rR�addrrrr�r�r�r�rw)rD�entries�index_to_pack_mapr�seen_indexes�entryrV�
seen_packsrVr6�	old_names�	new_namess            rJ�_update_pack_order�KnitPacker._update_pack_orderFs�����u���E��!�H�E��(����.�5�6�� � ��'�	�
�u�:��T�Z�Z��(���*�*�*����F�G����Z�
��J�J�D��%����T�"����t�$���U�&�&�&�6:�j�j�A�j����)�!�,�j�I�A�6;�<�e����)�!�,�e�I�<��L�L�?��V��
��B��<s�;E�Ec	�^�UR(aURVs/sHo4PM nnOSnURS5up4URXB5n[U5nUR	XS5 UR
R
SS5 URU5upg[URUURRURRUU55 S[R;a�[RS[ R#5UR$R&R(URR*URRR-5[ R!5URR.-
5 X lgs snf)Nr8zCopying revision textsrrVz9%s: create_pack: revisions copied: %s%s %d items t+%6.3fs)r4rWr^r�r�rZr�_revision_node_readvr�r�r�r8r�r�r�r�r�r�r2r�r�r�r�r�rB)rDrr,�revision_index_map�revision_indices�revision_nodesr�r�s        rJ�_copy_revision_texts�KnitPacker._copy_revision_textsgsU�����?C�?P�?P�Q�?P��^�?P�M�Q�M� �M�/3�/L�/L��0
�,���-�-�.>�N���n�-������C������/��3�(,�(A�(A�.�(Q�%����"�"�"��
�
�%�%��
�
�,�,� ��
�	
��U�&�&�&��L�L�K��
�
���%�%�7�7�<�<��
�
�)�)��
�
�,�,�6�6�8��	�	��d�m�m�6�6�6�

�,���?Rs�F*c�`�URS5upXRX R54$)Nr<)rWr^r�)rD�text_index_map�text_indicess   rJ�_get_text_nodes�KnitPacker._get_text_nodes�s/��'+�'D�'D�\�'R�$���3�3�L�BS�BS�T�T�TrLc	�X�UR5upURb�[U5nUVs1sHo3SiM	 nn[UR5U-
nU(aC[R	SU5 UR5n[R"USUS5eURRSS5 URU5upx[URUURRURRUU55 UR!5 gs snf)Nrzmissing keys during fetch: %rr(�Copying content texts�)r�r�r1r�r��popr�RevisionNotPresentrZrr�r�r�r�r�r<�_log_copied_texts)	rDr��
text_nodes�_node�present_text_keys�missing_text_keys�
a_missing_keyr�r�s	         rJ�_copy_text_texts�KnitPacker._copy_text_texts�s��%)�%9�%9�%;�"�����(��Z��J�7A� B�z�e�q��z�� B� #�D�$5�$5� 6�9J� J�� ����<�>O�P� 1� 5� 5� 7�
��/�/�
�a�0@�-�PQ�BR�S�S������.��2�(,�(D�(D�Z�(P�%����"�"���
�
�%�%��
�
�(�(� ��
�	
�	
��� ��)!Cs�D'c	���URRSSS5 UR5UlURnUR	S5 S[
R;a�URVs/sH3nSRURRUR5PM5 nnURb[UR5nOSn[RS[ R#5UR$R&RUR(UU5 UR+5 UR-5 UR/5 UR0nUR3S	5upgUR5Xu5nURRS
S5 UR7UUUR8UR:5 S[
R;a�[RS[ R#5UR$R&RUR(UR:R=5[ R!5UR>-
5 URA5 URCU5(dURE5 gURRS
S5 URG5 UR$RIU5 U$s snf)NzOpening packr(�irVz{}{}�allzQ%s: create_pack: creating pack from source packs: %s%s %s revisions wanted %s t=0r:zCopying signature texts�zC%s: create_pack: revision signatures copied: %s%s %d items t+%6.3fszFinishing pack)%rZr�	open_packr��set_write_cache_sizer�r�rrw�pack_transportr��namer4rrr�r�r�r�r2r�r�r�r�r�rBrWr^rkr�r:r�r��_check_references�	_use_pack�abort�finish�allocate)	rDr��a_pack�plain_pack_list�	rev_count�signature_filter�signature_index_map�signature_indices�signature_nodess	         rJ�_create_pack_from_packs�"KnitPacker._create_pack_from_packs�sT�������~�q�!�,����(��
��=�=��	�%�%�k�2��U�&�&�&�#�j�j��(�F��
�
�f�3�3�8�8�&�+�+�F�(�
��� � �,��� 1� 1�2�	�!�	��L�L�2��
�
���%�%�7�7�<�<��$�$���
�	
�!�!�#��"�"�$������.�.��15�1N�1N��2
�.���.�.�/@�S�������0�!�4����������$�$�		
��U�&�&�&��L�L�U��
�
���%�%�7�7�<�<��$�$��(�(�2�2�4��	�	��h�1�1�1�

�	�"�"�$��~�~�h�'�'��N�N��������'��+��������&�&�x�0����es�2:K*c	�&�[U5n[U5n0nUH$upEpgXC;a/X4'X4RXVU45 M& /nUR5H�upI/n
U	HNupVnUSSR	S5n[US5[US5p�U
RX�4XVSSU445 MP U
R
5 U
VVs/sHup�UPM	 nnnU
VVs/sHup�UPM	 nnnURUUU45 M� X(4$s snnfs snnf)a�Generate request groups for nodes using the least readv's.

:param nodes: An iterable of graph index nodes.
:return: Total node count and an iterator of the data needed to perform
    readvs to obtain the data for nodes. Each item yielded by the
    iterator is a tuple with:
    index, readv_vector, node_vector. readv_vector is a list ready to
    hand to the transport readv method, and node_vector is a list of
    (key, eol_flag, references) for the node retrieved by the
    matching readv_vector.
rNror()rqrrrRrsrtrurv)rDrg�totalr�rVrr�r��resultrsr�r�r�r��readv�node�
pack_readvr�s                  rJr��"KnitPacker._least_readv_node_readv�s2���u�
���E�
����-2�)�E���*�(*��%��!�(�(�#�j�)A�B�.3���*�0�0�2�L�E�"$��*/�&��J��Q�R�y���t�,��!$�T�!�W��s�4��7�|��#�*�*��%��1�Q�Z��'D�E��	+0�
 �$�$�&�3F�G�3F�K�E�%�3F�J�G�3F�G�3F�K�E�4�3F�K�G��M�M�5�*�k�:�;�3��}���H��Gs�D�D
c�$�URU5$)z�Return the total revisions and the readv's to issue.

:param revision_nodes: The revision index contents for the packs being
    incorporated into the new pack.
:return: As per _least_readv_node_readv.
)r�)rDr�s  rJr��KnitPacker._revision_node_readvs���+�+�N�;�;rL)rBr�r�r)NNrN)F)r^r_r`rar�r)rWr^rkrfr�r�r�r�r�r�r�r�r�r�r�rbrGrHs@rJrJrJ]sw���,�NR�	
�!�"
6��GK�4"�z��2/"�b	(�'�R�B",�HU�!�B:�x$�L<�<rLrJc�>^�\rSrSrSrU4SjrSrSrSrSr	U=r
$)rUiz�A packer which regenerates indices etc as it copies.

This is used by ``brz reconcile`` to cause parent text pointers to be
regenerated.
c�4>�[TU]"U0UD6 SUlg)NF)rr)�
_data_changed)rD�args�kwargsrs   �rJr)�KnitReconcilePacker.__init__#s���
���$�)�&�)�"��rLc��URRnURRU5nX0lSUlg)z>Generate a text key reference map rather for reconciling with.N)r2r�rHr0�
_text_refsr�)rDr�r��refss    rJr��,KnitReconcilePacker._process_inventory_lines's8���$�$�)�)�����9�9�)�D����!��rLc�4	^�URRSS5 URRnURR
R
5VVVVs0sHup#pEUS[SUS55_M! nnnnnURURU5n/n/n	/n
[RnUR5up�U
H�n[X~S5nX�4:XaSnX�SS:XaURU5 M:USSUSSSS:Xa5SUlURUSUSUSX�SS445 SUlM�U	RUSU45 SUlM� AA
UR!U5unn[#UR%UURR&URR(UU55 [*R-U5n[/[1U[3[5U5555mU	R7U4S	jS
9 UR95 [;URR(SSURR(R<S9 [?URR(URRA505nURCURR&URR(URRA55 [E[GURR(URR(R<SSURHS
9USS9nU	H�unnURRK5 /nUHInUSUS:wa&[LRN"SRQUU55eURUS5 MK [SURTRWU/SS55RYS5nUR[UUUSSS9 M� URR(R]5nU(a%[LR^"SRQU55eURa5 gs snnnnf![a U
RU5 SUlGM�f=f)z1Generate what texts we should have and then copy.r�r�r(c3�*# �UH	oSv� M g7f)r(Nrc)�.0�refs  rJ�	<genexpr>�7KnitReconcilePacker._copy_text_texts.<locals>.<genexpr>;s���4�G�S�a�&�G�s�rrcTrc�4>�TRUSSS5$)Nr(r)�get)r�	rev_orders �rJ�<lambda>�6KnitReconcilePacker._copy_text_texts.<locals>.<lambda>~s���y�}�}�S��V�A�Y��'BrL)r)�blank)�add_nodes_callbackrr#r$zMismatched key parent {!r}:{!r}r�linesF)�	random_id�
check_contentz-Reference to missing compression parents {!r}N)1rZrr2r�r�r8rZ�tuple�_generate_text_key_indexr
�
_mod_revision�
NULL_REVISIONr�rRr�KeyErrorr�r�r�r�r<�tsort�	topo_sort�dictr|�rangerrrv�get_transactionr	�	add_nodesrrw�
set_writerr3r4r"�flushr�BzrErrorrw�nextr=r&�get_bytes_as�	add_lines�_external_references�
BzrCheckErrorr�)rDr�r�rr�r�	ancestors�ideal_index�ok_nodes�	bad_texts�discarded_nodesr#r�r�r�
ideal_parentsr�r��
topo_orderr%�output_textsr7r!�
parent_key�
text_linesr�rs                          @rJr��$KnitReconcilePacker._copy_text_texts4sI��������.��2��$�$�)�)��&*�]�]�%A�%A�%R�%R�%T�
�%T�!���
��F�E�4�D��G�4�4�4�%T�	�
��3�3�D�O�O�Y�O�����	���%�3�3�
�%)�%9�%9�%;�"���D�

.� %�k�q�'�&:� ;�
�
!�$4�4�$&�M� ��G�A�J�.��O�O�D�)�"�1�Q�'�4��7�1�:�a��?�:�*.�D�&��O�O��a��$�q�'�4��7�]��G�A�J�4O�P��*.�D�&��$�$�d�1�g�}�%=�>�)-�D�&�9�<
��(,�(D�(D�X�(N�%��%���"�"���
�
�%�%��
�
�(�(� ��
�	
�(�_�_�Y�/�
���Z��s�:��)?�@�A�	����B��C�������M�M�$�$��
�#�}�}�7�7�A�A�		
�(�
�]�]�
%�
%�t�}�}�'A�'A�'C�D�
��	����M�M�!�!��M�M�$�$��M�M�&�&�(�	
�
*���
�
�(�(�!�]�]�5�5�?�?����.�.�
�$��

��!*��C��
�M�M���!��G�)�
��a�=�C��F�*� �/�/�9�@�@��k�R������z�!�}�-�
*���
�
�,�,�c�U�K��F���l�7�#�
�
�"�"��[�*��E�
#�
�!!*�(!�M�M�4�4�I�I�K����&�&�?�F�F�%���
�
	
��� ��u
��&�
*��&�&�t�,�%)��"�"�
*�s�&Q(
�Q0�0"R�Rc��[5nURRRnUR	5HnURUS5 M [5nURR	5HnURUS5 M XR:waSUlUR5=(a UR$)zAOverride _use_pack to check for reconcile having changed content.rT)r1r2r5r6rZr�r�
data_inserted)rDr��original_inventory_keys�	inv_indexr��new_inventory_keyss      rJr��KnitReconcilePacker._use_pack�s���#&�%���)�)�9�9�H�H�	��/�/�1�E�#�'�'��a��1�2� �U���-�-�>�>�@�E��"�"�5��8�,�A��8�!%�D���%�%�'�>�D�,>�,>�>rL)rr�r
)r^r_r`rar�r)r�r�r�rbrGrHs@rJrUrUs#����#�!�@!�D?�?rLrUc�2^�\rSrSrSrSrU4SjrSrU=r$)�OptimisingKnitPackeri�z>A packer which spends more time to create better disk layouts.c	�N�0n0nUHupEpgUSX%'XFU4X5'M [RU5n[U5n	/n
[U5HUnX5upFnUSSR	S5n[US5[US5p�U
R
XLU
4/XVSSU4/45 MW X�4$)a"Return the total revisions and the readv's to issue.

This sort places revisions in topological order with the ancestors
after the children.

:param revision_nodes: The revision index contents for the packs being
    incorporated into the new pack.
:return: As per _least_readv_node_readv.
r(rNro)r%r&rr�reversedrtrurR)rDr�r3�by_keyrVrr�r��orderr��requestsr�r�r�s              rJr��)OptimisingKnitPacker._revision_node_readv�s����	���-;�)�E��'��]�I�N� ��4�F�K�.<����	�*���E�
�����E�?�C�'-�{�$�E�*����9�?�?�4�(�D� ��a��\�3�t�A�w�<�F��O�O��&�)�*�c��1�:�z�-J�,K�L�
�#���rLc��>�[TU]5nURRSS9 URRSS9 UR
RSS9 URRSS9 U$)z)Open a pack for the pack we are creating.T)�for_size)rr�r8�set_optimizer5r<r:)rDr�rs  �rJr��OptimisingKnitPacker.open_pack�sq����7�$�&�����,�,�d�,�;�� � �-�-�t�-�<����(�(�$�(�7�� � �-�-�t�-�<��rLrc)	r^r_r`rar�r�r�rbrGrHs@rJrErE�s���H��>�rLrEc�(�\rSrSrSr\r\r\	r
\rSr
g)r/i�zA knit pack collection.rcN)r^r_r`rar�r�pack_factoryr�resumed_pack_factoryrJ�normal_packer_classrE�optimising_packer_classrbrcrLrJr/r/�s��!��L�&��$��2�rLr/N)*r��rrryr�globals�bzrr�	bzr.indexrrr	r
�bzr.vf_repositoryr�knitrepor
�	pack_reporrrrrrrrrrer�r�r�r�r�r�r�r�rPrJrUrEr/rcrLrJ�<module>r\s-��"*��*�%���I���8���-�$�	�	�	�Z���Z�z @� 4� @�F)?� 4�)?�X%A� 4�%A�P!C� 4�!C�H"O�(<�"O�J.�.B�.�b!@� 4�!@�H!J�(<�!J�H,
�.B�,
�^M&�<�M&�`|<��|<�~
f?�*�f?�R*�:�*�Z3�#;�3rL

Youez - 2016 - github.com/yon3zu
LinuXploit