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

p��gf"��	�SSKrSSKrSSKrSSKrSSKJrJr SSKrSSK	J
r
JrJrJ
r
JrJrJrJrJrJrJrJr SSK	Jr SSK	Jr SSK	Jr SSK	Jr SS	K	Jr SS
K
J r  SSK!J"r" SSK
J#r#J$r$ SS
K%J&r& SSK'J(r( SSKJ)r)J*r* SSKJ+r+ SSK,J-r-J.r.J/r/J0r0 SSK	J
r1 SSK	J2r3 SSK	J4r4J5r5J6r6 SSK	J7r8 SSK
J9r9 SSK:J;r; SSK<J=r= SSK>J?r@ SSKAJBrBJCrC SSKAJrD SSKEJFrF SrG"SS\
R�5rI"S S!5rJS"rK"S#S$\3R�5rM"S%S&\R�5rO"S'S(\3R�\J5rQ"S)S*\=5rR"S+S,\5R�5rT"S-S.\R�\J\R�5rW"S/S0\5R�5rY"S1S2\5R�5r["S3S4\(5r\"S5S6\
R�5r^"S7S8\R�5r_"S9S:\
R�\J\R�5ra"S;S<5rb"S=S>\b5rc"S?S@\b5rd\R�\f\4"5rg\R�\f\4"5rhSAri\gR�SBSC5 \gR�SDSE5 \gR�SFSG5 SHrk\gR�SI\k5 \gR�SJSK5 \gR�SLSM5 \gR�SNSO5 \gR�SPSQ5 \gR�SRSS5 STrl\gR�SU\l5 \gR�SVSW5 \gR�SXSY5 \gR�SZS[5 \gR�S\S]5 \gR�S^S_5 \gR�S`Sa5 \hR�SbSc5 \hR�SdSe5 \hR�SfSg5 \hR�ShSi5 \hR�SjSk5 \hR�SlSm5 \hR�SnSo5 \hR�SpSq5 \hR�SrSs5 \hR�StSu5 \hR�SvSw5 Sxrm\hR�Sy\m5 Szrn\hR�S{\n5 \hR�S|\n5 \hR�S}S~5 \hR�SS�5 \hR�S�S�5 \hR�S�S�5 g)��N)�Callable�Optional�)�branch�
controldir�debug�errors�gpg�graph�lock�lockdir�osutils�registry�ui�urlutils)�bzr)�config��
repository)�revision��	transport)�BranchWriteLockResult)�only_raises)�NoSuchRevision�SmartProtocolError)�gettext)�
LockableFiles)�RepositoryWriteLockResult�
_LazyListJoin)�
NULL_REVISION)�log_exception_quietly�mutter�note�warning��r)�bzrdir)�inventory_delta�
vf_repository�	vf_search)�	testament)�BranchReferenceFormat)�	Inventory)�InventoryRevisionTree)�format_registry)�client�vfs)�_SmartClient�dc�&�\rSrSrSrSrSrSrSrg)�UnknownErrorFromSmartServer�Ca�An ErrorFromSmartServer could not be translated into a typical breezy
error.

This is distinct from ErrorFromSmartServer so that it is possible to
distinguish between the following two cases:

 - ErrorFromSmartServer was uncaught.  This is logic error in the client
   and so should provoke a traceback to the user.
 - ErrorFromSmartServer was caught but its error_tuple could not be
   translated.  This is probably because the server sent us garbage, and
   should not provoke a traceback.
z0Server sent an unexpected error: %(error_tuple)rFc�2�XlURUlg)zPConstructor.

:param error_from_smart_server: An ErrorFromSmartServer instance.
N��error_from_smart_server�error_tuple)�selfr:s  �3/usr/lib/python3/dist-packages/breezy/bzr/remote.py�__init__�$UnknownErrorFromSmartServer.__init__Us��
(?�$�2�>�>���r9N)	�__name__�
__module__�__qualname__�__firstlineno__�__doc__�_fmt�internal_errorr>�__static_attributes__�r@r=r6r6Cs���>�D��N�?r@r6c�0�\rSrSrSrSrSrSrSrSr	g)	�
_RpcHelper�^z)Mixin class that helps with issuing RPCs.c��URR"U/UQ76$![RanUR"U40UD6 SnAgSnAff=f�N)�_client�callr	�ErrorFromSmartServer�_translate_error�r<�method�args�err_context�errs     r=�_call�_RpcHelper._callasJ��	6��<�<�$�$�V�3�d�3�3���*�*�	6��!�!�#�5��5��	6����A�A�Ac��URR"U/UQ76$![RanUR"U40UD6 SnAgSnAff=frN)rO�call_expecting_bodyr	rQrRrSs     r=�_call_expecting_body�_RpcHelper._call_expecting_bodygsJ��	6��<�<�3�3�F�B�T�B�B���*�*�	6��!�!�#�5��5��	6�rZc��URRXU5$![RanUR"U40UD6 SnAgSnAff=frN)rO�call_with_body_bytesr	rQrR�r<rTrU�
body_bytesrVrWs      r=�_call_with_body_bytes� _RpcHelper._call_with_body_bytesmsG��	6��<�<�4�4�V�:�N�N���*�*�	6��!�!�#�5��5��	6����A�A
�
Ac��URRXU5$![RanUR"U40UD6 SnAgSnAff=frN)rO�#call_with_body_bytes_expecting_bodyr	rQrRras      r=�$_call_with_body_bytes_expecting_body�/_RpcHelper._call_with_body_bytes_expecting_bodyssN��	6��<�<�C�C��j��
���*�*�	6��!�!�#�5��5��	6�rerIN)
rArBrCrDrErXr]rcrhrHrIr@r=rKrK^s��3�6�6�6�6r@rKc�|�[5nUSS:HUlUSS:HUlUSS:HUlUSUlU$)zDConvert a response tuple describing a repository format to a format.r�yesr&r�)�RemoteRepositoryFormat�_rich_root_data�_supports_tree_reference�_supports_external_lookups�
_network_name)�response�formats  r=�response_tuple_to_repo_formatrt~sN��
#�
%�F�%�a�[�F�2�F��&.�q�k�V�&;�F�#�(0���v�(=�F�%�#�A�;�F���Mr@c���\rSrSrSrSrSrSrSrSr	Sr
SrS	rS
r
SrSrSSjrSrSrSrSrSr\"\\R0R25rSrg
)�RemoteBzrDirFormat�z8Format representing bzrdirs accessed via a smart server.Fc�P�[RRU5 SUlgrN)�_mod_bzrdir�BzrDirMetaFormat1r>rq�r<s r=r>�RemoteBzrDirFormat.__init__�s ���%�%�.�.�t�4�
"��r@c�b�SRURRUR5$�Nz{}(_network_name={!r})�rs�	__class__rArqr{s r=�__repr__�RemoteBzrDirFormat.__repr__��*��'�.�.��N�N�#�#�T�%7�%7�
�	
r@c��UR(a=[RRUR5nSUR	5-$g![
a gf=f)N�Remote: zbzr remote bzrdir)rqr�network_format_registry�get�get_format_description�KeyError)r<�real_formats  r=r��)RemoteBzrDirFormat.get_format_description�s_�����
I�(�@�@�D�D�T�EW�EW�X��"�K�$F�$F�$H�H�H�"��	�
��#�	
�s�)A�
A�Ac�,�[UR5erN)�NotImplementedError�get_format_stringr{s r=r��$RemoteBzrDirFormat.get_format_string�s��!�$�"8�"8�9�9r@c�R�UR(aUR$[S5e)NzNo network name set.)rq�AssertionErrorr{s r=�network_name�RemoteBzrDirFormat.network_name�s#������%�%�%� �!7�8�8r@c��UR5n[
U5nUR"U5nUR"SU5nWSS:wa%[R"SRU55e[5nURU5 [X5$![Ra) [R"5nURU5s$f=f![Ran[XuS9 SnAN�SnAff=f)NsBzrDirFormat.initialize��pathr�ok�unexpected response code {})�get_smart_mediumr	�
NoSmartMediumryrz�initialize_on_transportr3�remote_path_from_transportrPrQrRrrsrv�_supply_sub_formats_to�RemoteBzrDir)	r<r�
client_medium�local_dir_formatr1r�rrrWrss	         r=r��*RemoteBzrDirFormat.initialize_on_transport�s���	G�%�6�6�8�M�
�m�,���0�0��;��	-��{�{�#=�t�D�H��A�;�%���+�+�-�4�4�X�>��
�$�%���#�#�F�+��I�.�.��!�#�#�	G�*�<�<�>��#�;�;�I�F�F�	G���*�*�	-��S�,��	-�s(�B�C�:C�C�C>�+	C9�9C>c�b�U(dgUS:XagUS:Xag[SRU55e)N�FalseF�TrueTzinvalid arg {!r})r�rs�r<�args  r=�parse_NoneTrueFalse�&RemoteBzrDirFormat.parse_NoneTrueFalse�s3�����(�?���'�>���/�6�6�s�;�<�<r@c� �USLagU(agg)NFr�r�r@rIr�s  r=�_serialize_NoneTrueFalse�+RemoteBzrDirFormat._serialize_NoneTrueFalse�s���%�<����r@c��U=(d S$�Nr@rIr�s  r=�_serialize_NoneString�(RemoteBzrDirFormat._serialize_NoneString�s���z�c�r@Nc

�6�UR5n
U
R5(aU
R5nUS:waSnOSnOSnU(d5[
W
5n
U
R"U5nU
RS5(aSnU(a>[R"5nURU5 URUUUUUUUUU	SS9
$URW
WUUUUUUUUU	5$![Ra SnN�f=f![R
a SnN�f=f)N�2TF�r&��	�use_existing_dir�
create_prefix�force_new_repo�
stacked_on�stack_on_pwd�repo_format_name�make_working_trees�shared_repo�vfs_only)r��should_probe�protocol_versionr	rr�r3r��_is_remote_beforeryrzr��initialize_on_transport_ex�_initialize_on_transport_ex_rpc)r<rr�r�r�r�r�r�r�r�r��server_version�do_vfsr1r�r�s                r=r��-RemoteBzrDirFormat.initialize_on_transport_ex�sK��	�%�6�6�8�M��)�)�+�+�	"�%2�%C�%C�%E�N�%��,�!%��!&�����!�-�0�F��4�4�Y�?�D��.�.�w�7�7����*�<�<�>���'�'�(8�9�#�>�>��!1�+�-�%�)�!1�#5�'��?��
��3�3������������
�	
��7�0�0�"�"�F�"���#�#�	��F�	�s(�C?�C#�C#�#C<�;C<�?D�Dc��/nURURU55 URURU55 URURU55 URURU55 U(a*URU5R	S5nU(dSnURURU55 URURU	55 URURU
55 URURU55 UR=(d, [RR5R5n
UR"SX�/UQ76nWSnUS	nUS
nUR-U5n[/5nUUlUR#U5 [1UUUS9nU(GaV[3USS5nUS:XaS
nUR+S5nU(a0[/5nUSUl[1UR5U5U5nOUnUS=(d SnU(aUR+S5nUS=(d SnU(a0[6R8"UR:UR+S55n[=UU5n[?U5S:�a6US=(d SnURAUSS9 U(aURC5 OURA5 [RD"UUUU5nURG5 OSnSnURHRKURM55 U(aURHROSS9 UUUU4$![
Ra GN�f=f![
Ra\ URRS5 [R "5nUR#U5 UR%UUUUUUU	U
USS9
s$[
R&a$n[)UUR+S5S9 SnAGN�SnAff=f)N�utf-8�.sBzrDirFormat.initialize_ex_1.16r�Tr�r�r��)rOr&r@���	�
��	_skip_rpc)�
_skip_repo)(�appendr�r��relpath�encoder	�PathNotChildrqry�BzrDirFormat�get_default_formatr�rP�UnknownSmartMethod�_medium�_remember_remote_is_beforerzr�r�rQrR�decoder�rvr�rt�cloner�join�base�RemoteRepository�len�
lock_write�dont_leave_lock_in_place�UseExistingRepository�acquire_repository�_format�set_branch_format�get_branch_format�require_stacking)r<r1r�rr�r�r�r�r�r�r�r�rU�request_network_namerrr�rW�	repo_path�bzrdir_namer�rsr(�repo_format�repo_bzrdir_format�repo_bzr�final_stack�final_stack_pwd�remote_repo�repo_lock_token�policys                              r=r��2RemoteBzrDirFormat._initialize_on_transport_ex_rpc s��������D�1�1�2B�C�D����D�1�1�-�@�A����D�1�1�.�A�B����D�.�.�z�:�;��
�(�0�0��>�E�E�g�N��#�#'�L�	
���D�.�.�|�<�=����D�.�.�/?�@�A����D�1�1�2D�E�F����D�1�1�+�>�?����
L��'�'�:�:�<�I�I�K�	�	=��{�{�2�4H��QU��H�*�Q�K�	��q�k��#�A�;���3�3�4D�E��#�%��*����#�#�F�+��i���@���7�����E�K��D� ��	�!�(�(��1�I��%7�%9�"�3;�A�;�"�0�'�	���	�(B�DV�W��!��"�1�+�-��K��)�0�0��9��&�q�k�1�T�O��"*�-�-��N�N�O�$:�$:�7�$C�#��+�8�[�A�K��8�}�r�!�"*�2�,�"6�$���&�&��$�&�G�"��8�8�:���&�&�(� �6�6��[�/�;K��F�
�%�%�'��K��F����(�(��)?�)?�)A�B��
�N�N�+�+�t�+�<��F�$4�f�<�<��a�&�&�
��
���(�(�	��N�N�5�5�g�>�*�<�<�>���'�'�(8�9�#�>�>��!1�+�-�%�)�!1�#5�'��?��
��*�*�	=��S�t�{�{�7�';�<�<��	=�s1�)N�4N!�N�N�!A-Q�Q�#Q�Qc��[X5$rN)r�)r<rs  r=�_open�RemoteBzrDirFormat._open�s
���I�,�,r@c�p�[U[5(dgUR5UR5:H$�NF)�
isinstancervr��r<�others  r=�__eq__�RemoteBzrDirFormat.__eq__�s0���%�!3�4�4���*�*�,��0L�0L�0N�N�Nr@c�|�[5n[USS5nU(a[U[5(aU$X!lU$)N�_repository_format)rm�getattrr��_custom_format)r<�result�
custom_formats   r=�__return_repository_format�-RemoteBzrDirFormat.__return_repository_format�s?��(�)����&:�D�A�
���-�)?�@�@�$�$�
)6�%��
r@c��[RRU5n[U[5(d#[	5nXlUR
U5 UnU$rN)ryrzr�r��RemoteBranchFormatrr�)r<r�
new_results   r=r��$RemoteBzrDirFormat.get_branch_format�sL���.�.�@�@��F���&�"4�5�5�+�-�J�(.�%��"�"�:�.��F��
r@�rq)FFFNNNNF)rArBrCrDrE�supports_workingtrees�colocated_branchesr>r�r�r�r�r�r�r�r�r�r�r�r��-_RemoteBzrDirFormat__return_repository_formatr��propertyryrz�_set_repository_format�repository_formatrHrIr@r=rvrv�s���B�!����"�
�
#�:�9�/�,=�����������B
�Hi=�V-�O�
� �!�"�K�$A�$A�$X�$X��r@rvc�f^�\rSrSrSrU4SjrS
SjrSrSrU4Sjr	Sr
S	rS
rSr
SrU=r$)�RemoteControlStorei�z|Control store which attempts to use HPSS calls to retrieve control store.

Note that this is specific to bzr-based formats.
c�<>�[TU]5 XlSUlgrN)�superr>r�_real_store)r<r(r�s  �r=r>�RemoteControlStore.__init__�s���
���� ����r@c�X�UR5 URRU5$rN)�_ensure_realrr�)r<�tokens  r=r��RemoteControlStore.lock_write�s%���������*�*�5�1�1r@c�V�UR5 URR5$rN)rr�unlockr{s r=r�RemoteControlStore.unlock�s#���������&�&�(�(r@c�x�UR5 UR5 SSS5 g!,(df   g=frN)r��save_without_lockingr{s r=�save�RemoteControlStore.save�s$��
�_�_�
��%�%�'��
�
�s�+�
9c�">�[TU]5 grN)rr!�r<r�s �r=r �'RemoteControlStore.save_without_locking�s���
���r@c��URR5 URc&[R"UR5UlggrN)rrr�_mod_config�ControlStorer{s r=r�RemoteControlStore._ensure_real�s:�����$�$�&����#�*�7�7����H�D��$r@c�X�[R"URRS5$)Nzcontrol.conf�rr�r�user_urlr{s r=�external_url�RemoteControlStore.external_url�s���}�}�T�[�[�1�1�>�B�Br@c��URRURR5nURRSU5up#[U5(aUSS:wa[R"U5eUR5$![R
a- UR
5 URR5s$f=f)N�BzrDir.get_config_filerr�)r�_path_for_remote_callrOr]r	r�rr�
_load_contentr��UnexpectedSmartServerResponse�read_body_bytes�r<r�rr�handlers    r=r2� RemoteControlStore._load_content�s������4�4�T�_�_�5L�5L�M��	4� $��� D� D�)�4�!��H��x�=�=�X�a�[�E�1��6�6�x�@�@��&�&�(�(���(�(�	4������#�#�1�1�3�3�	4�s�B�>C�Cc�X�UR5 URRU5$rN)rr�
_save_content)r<�contents  r=r9� RemoteControlStore._save_content�s'��	
�������-�-�g�6�6r@)rrrN)rArBrCrDrEr>r�rr!r rr-r2r9rH�
__classcell__�r�s@r=rr�s<����
 �
2�)�(�
�I�
C�)�7�7r@rc�v�\rSrSrSr\S5r\S5rS/SjrSr	Sr
S	rS
rSr
SrS
rSrSrS0SjrS0SjrS0SjrSrS1SjrS2SjrS3SjrS2SjrSrS/SjrS2SjrS2SjrSrS2SjrS4Sjr S5Sjr!S r"S!r#S"r$S#r%S$r&S6S%jr'S&r(S2S'jr)S(r*S)r+S*r,S+r-S,r.S-r/S.r0g)7r�i�zEControl directory on a remote server, accessed via bzr:// or similar.c��UR$rN)�root_transportr{s r=�user_transport�RemoteBzrDir.user_transport�s���"�"�"r@c��UR$rNrr{s r=�control_transport�RemoteBzrDir.control_transport�s���~�~�r@Nc��[RRXU5 SUlSUlSUlUc,UR
5n[R"U5Ul	OX0l	U(dgUR5 g)z}Construct a RemoteBzrDir.

:param _client: Private parameter for testing. Disables probing and the
    use of a real bzrdir.
N)ry�BzrDirr>�_real_bzrdir�_has_working_tree�_next_open_branch_resultr�r1r3rO�
_probe_bzrdir)r<rrsrO�_force_probe�mediums      r=r>�RemoteBzrDir.__init__�sr��	���#�#�D�V�<�!���!%���)-��%��?��/�/�1�F�!�.�.�v�6�D�L�"�L������r@c�b�SRURRUR5$)Nz{}({!r}))rsr�rArOr{s r=r��RemoteBzrDir.__repr__s#��� � ����!8�!8�$�,�,�G�Gr@c�R�URRnURUR5nURS5(aUR	U5 gURU5 g![Ra% URS5 UR	U5 gf=f)N�rr&)	rOr�r1r��	_rpc_open�
_rpc_open_2_1r	r�r�)r<rMr�s   r=rK�RemoteBzrDir._probe_bzrdirs������%�%���)�)�$�,�,�7���#�#�F�+�+��N�N�4� ��	!����t�$����(�(�	!��-�-�f�5��N�N�4� �	!�s�A-�-6B&�%B&c�0�URSU5nUS:Xa([R"URRS9eUSS:Xa8USS:XaSUlgUSS:XaS	Ulg[R"U5e[R"U5e)
NsBzrDir.open_2.1��nor�rrkr&TrXF)rXr	�NotBranchErrorr@r�rIr3�r<r�rrs   r=rT�RemoteBzrDir._rpc_open_2_1s����:�:�0�$�7���x���'�'�T�-@�-@�-E�-E�F�F�
�a�[�F�
"���{�f�$�)-��&��!���%�).��&��:�:�8�D�D��6�6�x�@�@r@c��URSU5nUS;a[R"U5eUS:Xa([R"URR
S9eg)NsBzrDir.open))rkrWrWr�)rXr	r3rYr@r�rZs   r=rS�RemoteBzrDir._rpc_open,sV���:�:�n�d�3���0�0��6�6�x�@�@��x���'�'�T�-@�-@�-E�-E�F�F� r@c��UR(d�S[R;a-SSKn[	SSRUR
555 [RRUR[R/S9UlURRR5URlgg)zREnsure that there is a _real_bzrdir set.

Used before calls to self._real_bzrdir.
�hpssvfsrNzVFS BzrDir access triggered
%s�)�probers)rHr�debug_flags�	tracebackr%r��format_stackryrG�open_from_transportr@�_mod_bzr�	BzrProberr�r�rq�r<rcs  r=r�RemoteBzrDir._ensure_real3s���
� � ��E�-�-�-� ��5�r�w�w�y�?U�?U�?W�7X��!,� 2� 2� F� F��#�#�h�.@�.@�-A�!G�!�D��*.�):�):�)B�)B�)O�)O�)Q�D�L�L�&�!r@c� �[U4SU0UD6 g�Nr()rR�r<rW�contexts   r=rR�RemoteBzrDir._translate_errorDs����5�T�5�W�5r@c�N�SUl[RRU5$rN)rJryrG�
break_lockr{s r=rp�RemoteBzrDir.break_lockGs#��)-��%��!�!�,�,�T�2�2r@c�V�UR5 URR5$rN)rrH�checkout_metadirr{s r=�_vfs_checkout_metadir�"RemoteBzrDir._vfs_checkout_metadirMs#������� � �1�1�3�3r@c��URRnURS5(aUR5$UR	UR5nURRSU5n[U5S:wa[R"U5eUupEn[RRU5nU(a&[ RRU5n	X�lU(a1UR%[&RRU55 U$U$![Ra$ URS5 UR5s$f=f![an[R"SUS9UeSnAff=f![an[R"SUS9UeSnAff=f![an[R"SUS9UeSnAff=f)	z@Retrieve the controldir format to use for checkouts of this one.)rr�sBzrDir.checkout_metadirrl�control��kindrsNrr)rOr�r�rtr1rPr	r�r�r�r3rr�r�r��UnknownFormatError�_mod_repositoryrr�r)
r<rMr�rr�control_name�	repo_name�branch_namers�er�s
          r=rs�RemoteBzrDir.checkout_metadirQs������%�%���#�#�F�+�+��-�-�/�/��)�)�$�,�,�7��	0��|�|�(�(�)C�T�J�H��x�=�A���6�6�x�@�@�/7�,���	X��7�7�;�;�L�I�F��
�-�E�E�I�I�)�T��
(3�$��
��(�(��2�2�6�6�{�C���
�v�
��7�(�(�	0��-�-�f�5��-�-�/�/�	0���	X��+�+��<�P�VW�W��	X��
�
��/�/�%�i�����
���
��/�/�!�+�����
�sZ�D&� E!�F	�4.F1�&5E�E�!
F�+F�F�	
F.�F)�)F.�1
G�;G�Gc�T�UR5 URRUS9$)N�r�)rrH�cloning_metadir)r<r�s  r=�_vfs_cloning_metadir�!RemoteBzrDir._vfs_cloning_metadirvs)������� � �0�0�BR�0�S�Sr@c��URRnURS5(aURUS9$SnU(aSnOSnUR	UR5nURX5U5n[U5S:wa[R"U5eUup�n[U5S:wa[R"U5eUup�[R R#U	5nU
(a%[(R R#U
5UlUS:XaP[,R.R1U
5nUR5R35nUR5U5 U$US
:Xa:U
(a1[6R R#U
5nUR5U5 U$[R"U5e![Ra# URS5 URUS9s$[aEnURS:waeUR5nURR5sSnA$SnAff=f![$an[R&"S	U	S
9UeSnAff=f![$an[R&"SU
S
9UeSnAff=f![$an[R&"SU
S
9UeSnAff=f)N�r&�
r�sBzrDir.cloning_metadirr�r�)sBranchReferencerlrrwrxr�ref�branchr)rOr�r�r�r1rXr	r�r�r6r;�open_branchrr�r�r3r�r�r�rzr{rryrG�openr�r�r)r<r�rM�verb�stackingr�rrrW�referenced_branchr|r}�branch_info�
branch_refr~rsr�
ref_bzrdir�
branch_formats                  r=r��RemoteBzrDir.cloning_metadirzs������%�%���#�#�G�,�,��,�,�>N�,�O�O�(����H��H��)�)�$�,�,�7��
	B��z�z�$�h�7�H��x�=�A���6�6�x�@�@�/7�,����{��q� ��6�6�x�@�@�"-��
�	X��7�7�;�;�L�I�F��
�+:�+R�+R�+V�+V��,��(����%�+�+�0�0��=�J�&�6�6�8�J�J�L�M��$�$�]�3��
��9�
$���$*�$B�$B�$F�$F�{�$S�M�
�(�(��7��
��6�6�x�@�@��a�(�(�	P��-�-�g�6��,�,�>N�,�O�O�*�	B����"7�7��
!%� 0� 0� 2��$�/�/�?�?�A�A��	B��"�	X��+�+��<�P�VW�W��	X���
��/�/�%�i�����
�� �� �3�3�%�k������sl�&G�I
�3$I2�;J�4I�9	I�:I�<I�I�

I/�I*�*I/�2
J�<J�J�
J?�$J:�:J?c��URRRX5n[U[5(dUR5$U$rN)r�r�
initializer�r��open_repository)r<�sharedrs   r=�create_repository�RemoteBzrDir.create_repository�s@�����/�/�:�:�4�H���&�"2�3�3��'�'�)�)��Mr@c�.�URUR5nURSU5nUSS:wa[SRU55eg![Ra- UR5 URR5 gf=f)zSee BzrDir.destroy_repository.sBzrDir.destroy_repositoryNrr�r�)
r1rOrXr	r�rrH�destroy_repositoryrrsrZs   r=r��RemoteBzrDir.destroy_repository�s����)�)�$�,�,�7��	��z�z�">��E�H�
�A�;�%��$�%B�%I�%I�(�%S�T�T� ��	�(�(�	��������0�0�2��	�s�A�>B�Bc�f�UcUR5nUS:wa[R"U5eURR	5RUUUUS9n[
U[5(d:[
U[5(d[SRU55e[XXAS9nOUnXPlU$)Nr`)�namer�append_revisions_onlyz:need a RemoteRepository to use with RemoteBranch, got {!r}�r�)�_get_selected_branchr�NoColocatedBranchSupportr�r�r�r��RemoteBranchr�r�rsrJ)r<r�rr��real_branchrs      r=�
create_branch�RemoteBzrDir.create_branch�s����<��,�,�.�D��2�:��5�5�d�;�;��l�l�4�4�6�A�A���!�"7�	B�
���+�|�4�4��j�*:�;�;�$�P�W�W�"����
"�$�K�K�F� �F�)/�%��
r@c���UcUR5nUS:wa[R"U5eURUR5nUS:waU4nOSnUR
"SU/UQ76nSUlUSS:wa[SRU55eg![Ra3 UR5 URRUS9 SUlgf=f)	zSee BzrDir.destroy_branch.Nr`rIsBzrDir.destroy_branchr�rr�r�)r�rr�r1rOrXr	r�rrH�destroy_branchrJrrs)r<r�r�rUrrs     r=r��RemoteBzrDir.destroy_branch�s����<��,�,�.�D��2�:��5�5�d�;�;��)�)�$�,�,�7��
	��r�z��w�����z�z�":�D�H�4�H�H�)-��%��A�;�%��$�%B�%I�%I�(�%S�T�T� ��
�(�(�	��������,�,�$�,�7�,0�D�)��		�s� B�AC�Cc�V�[R"URR5erN)r	�NotLocalUrlrr�)r<�revision_id�from_branch�accelerator_tree�hardlinks     r=�create_workingtree�RemoteBzrDir.create_workingtrees��� � ����!4�!4�5�5r@c�8�URUS9nUR$)zkFind the branch 'format' for this bzrdir.

This might be a synthetic object for e.g. RemoteBranch and SVN.
r�)r�r�)r<r��bs   r=�find_branch_format�RemoteBzrDir.find_branch_format	s!��

���$��'���y�y�r@c���URUR5nURSU5up#USS:wa[R"U5e[R"UR55n/nUR5H'upgURS5nURU5 M) U$![Ra- UR5 URR5s$f=f)N�BzrDir.get_branchesr�successr�)r1rOr]r	r�rrH�branch_namesr3�bencode�bdecoder4�itemsr�r�)r<r�rrr6�body�retr��_values        r=r��RemoteBzrDir.branch_namess����)�)�$�,�,�7��	4� $� 9� 9�:P�RV� W��H��A�;�*�$��6�6�x�@�@����w�6�6�8�9���� �J�J�L�L�D��;�;�w�'�D��J�J�t��)��
���(�(�	4������$�$�1�1�3�3�	4�s�B3�3>C4�3C4c	� �URUR5nURSU5upEUSS:wa[R"U5e[R"UR55n0nUR5H@up�URS5nURUU	SRS5U	SUUS9Xx'MB U$![Ra- UR5 URR5s$f=f)Nr�rr�r��asciir&��possible_transports�ignore_fallbacks)r1rOr]r	r�rrH�get_branchesr3r�r�r4r�r��_open_branch)
r<r�r�r�rrr6r�r�r��values
          r=r��RemoteBzrDir.get_branches!s���)�)�$�,�,�7��	4� $� 9� 9�:P�RV� W��H��A�;�*�$��6�6�x�@�@����w�6�6�8�9�����:�:�<�K�D��;�;�w�'�D��)�)���a�����(��a��$7�!1�*��C�I�(��
��!�(�(�	4������$�$�1�1�3�3�	4�s�C�>D
�D
c��UcUR5nUS:wa[R"U5eUR5 URRXS9$)z"See BzrDir.set_branch_reference().r`r�)r�rr�rrH�set_branch_reference)r<�
target_branchr�s   r=r��!RemoteBzrDir.set_branch_reference7sS���<��,�,�.�D��2�:��5�5�d�;�;������ � �5�5�m�5�O�Or@c��UcUR5nUS:wa[R"U5eUR5nUSS:XaUSR	S5$g)z"See BzrDir.get_branch_reference().Nr`r�refr&r�)r�rr��_get_branch_referencer�)r<r�rrs   r=�get_branch_reference�!RemoteBzrDir.get_branch_reference@s_���<��,�,�.�D��2�:��5�5�d�;�;��-�-�/���A�;�%���A�;�%�%�g�.�.�r@c� �URUR5nURRn/SQnUH6upEU(aURU5(aM$UR	XA5n O WS:Xa0WSS:wa[
R"U5eUSS:waSUS4$gWSS	;a[
R"U5eUSRS
5US4$![
Ra UceURU5 M�f=f)z�Get branch reference information.

:return: Tuple with (kind, location_or_format)
    if kind == 'ref', then location_or_format contains a location
    otherwise, it contains a format name
))sBzrDir.open_branchV3rR)sBzrDir.open_branchV2r�)�BzrDir.open_branchNr�rr�r&r@r�)rr@)r�r�r�)
r1rOr�r�rXr	r�r�r3r�)r<r�rM�candidate_callsr��required_versionrrs       r=r��"RemoteBzrDir._get_branch_referenceLs���)�)�$�,�,�7�����%�%��
��
'6�"�D��F�$<�$<�=M�$N�$N��
��:�:�d�1���'6��(�(���{�e�#��:�:�8�D�D���{�c�!��x��{�+�+�&��A�;�1�1��6�6�x�@�@����"�"�7�+�X�a�[�9�9���,�,�
D�#�+���1�1�2B�C�
D�s�C � )D
�D
c�$�SURUS94$)zSee BzrDir._get_tree_branch().Nr��r�)r<r�s  r=�_get_tree_branch�RemoteBzrDir._get_tree_branchps���T�%�%�4�%�0�0�0r@c	��US:XaN[5n[R"URUR	S55nURUUSUUUS9$UnU(dSn[
US9n[UUR5UU(+UUS9$)Nr�r�T)r��_found�locationr�r��r�)rs�setup_stackingr�r�)	r-rr�r,r�r�rr��find_repository)	r<r�ry�location_or_formatr�r�rs�ref_loc�branch_format_names	         r=r��RemoteBzrDir._open_branchts����5�=�*�,�F��m�m�D�M�M�3E�3L�3L�W�3U�V�G��;�;���� �!1�$7�
��
�0��!�!%��#�1C�D����� � �"��/�/�� 3�

�	
r@c��UcUR5nUS:wa[R"U5eU(a[S5eURbURnSUlU$UR5nUR
UUSUSUUS9$)Nr`z-unsupported flag support not implemented yet.rr&r�)r�rr�r�rJr�r�)r<r��unsupportedr�r�rrrs       r=r��RemoteBzrDir.open_branch�s����<��,�,�.�D��2�:��5�5�d�;�;��%�&U�V�V��(�(�4��2�2�F�,0�D�)��M��-�-�/��� � ���Q�K��Q�K� 3�-�!�
�	
r@c��SnURX!5nUSS:wa[R"U5eUR5 URR5nUSURR54-nX44$)NsBzrDir.find_repositoryrr�rX�rXr	r3rrHr�r�r��r<r�r�rr�repos     r=�
_open_repo_v1�RemoteBzrDir._open_repo_v1�sx��(���:�:�d�)���A�;�%���6�6�x�@�@�	
����� � �0�0�2���u�d�l�l�&?�&?�&A�B�B���~�r@c��SnURX!5nUSS:wa[R"U5eUR5 URR5nX4RR54-nX44$)NsBzrDir.find_repositoryV2rr�r�r�s     r=�
_open_repo_v2�RemoteBzrDir._open_repo_v2�sr��*���:�:�d�)���A�;�%���6�6�x�@�@������ � �0�0�2���|�|�8�8�:�<�<���~�r@c�H�SnURRnURS5(a[R"U5eURX!5nUSS:wa[R"U5eUS4$![Ra UR
S5 ef=f)NsBzrDir.find_repositoryV3r�rr�)rOr�r�r	r�rXr�r3)r<r�r�rMrrs     r=�
_open_repo_v3�RemoteBzrDir._open_repo_v3�s���*�����%�%���#�#�G�,�,��+�+�D�1�1�	��z�z�$�-�H��A�;�%���6�6�x�@�@���~����(�(�	��-�-�g�6��	�s�A:�:'B!c�R�URUR5nSnURURUR4HnU"U5up$ O Uc[
R"S5eUSS:wa[
R"U5e[U5S:wa[SRU55eUSS:Xa;[USS5nXl[X5nXelWbURU5 U$[
R "U5e![
Ra M�f=f)	NsBzrDir.find_repository{3,2,}rr�r�zincorrect response length {}r&r@r)r1rOr�r�r�r	r�r3r�rrsrt�_creating_bzrdirr��_creating_repo�_set_real_repository�NoRepositoryPresent)r<r�rr�probe�	real_reporsr�s       r=r��RemoteBzrDir.open_repository�s$���)�)�$�,�,�7�����(�(�$�*<�*<�d�>P�>P�Q�E�
�&+�D�k�#���R����+�+�,K�L�L��A�;�%���6�6�x�@�@��x�=�A��$�%C�%J�%J�8�%T�U�U��A�;�#��2�8�A�B�<�@�F�&*�#�*�4�8�K�$/�!��$��0�0��;����,�,�T�2�2��'�,�,�
��
�s�
D�D&�%D&c��URcjURUR5nURSU5nUSS;a[	SRU55eUSS:HUlUR$UR$![Ra= UR5 URR5UlUR$f=f)NsBzrDir.has_workingtreer�rkrXr�rk)rIr1rOrXrrsr	r�rrH�has_workingtreerZs   r=r�RemoteBzrDir.has_workingtree�s����!�!�)��-�-�d�l�l�;�D�

?��:�:�&?��F��
�A�;�o�5�,�5�<�<�X�F���*2�!���)>��&��%�%�%�t�%�%�%���,�,�
M��!�!�#�)-�):�):�)J�)J�)L��&��%�%�%�
M�s�B�AC�Cc��UR5(a [R"UR5e[R"URR
5erN)rr	r�r@�
NoWorkingTreer�)r<�recommend_upgrades  r=�open_workingtree�RemoteBzrDir.open_workingtreesE�����!�!��$�$�T�%8�%8�9�9��&�&�t�':�':�'?�'?�@�@r@c��UR"UR5nURS5n[R"U5up4URS5nU$)z<Return the path to be used for this bzrdir in a remote call.r�)r�r@r�r�split_segment_parameters_rawr�)r<r1�remote_path�base_url�segment_parameterss     r=r1�"RemoteBzrDir._path_for_remote_callsS���7�7��8K�8K�L��!�(�(��1��'/�'L�'L��(
�$���?�?�7�+���r@c�T�UR5 URRXS9$)Nr�)rrH�get_branch_transport)r<r�r�s   r=r�!RemoteBzrDir.get_branch_transports(������� � �5�5�m�5�O�Or@c�X�UR5 URRU5$rN)rrH�get_repository_transport)r<rs  r=r�%RemoteBzrDir.get_repository_transports&������� � �9�9�:K�L�Lr@c�X�UR5 URRU5$rN)rrH�get_workingtree_transport)r<�workingtree_formats  r=r�&RemoteBzrDir.get_workingtree_transports&������� � �:�:�;M�N�Nr@c��g�z1Upgrading of remote bzrdirs is not supported yet.FrIr{s r=�can_convert_format�RemoteBzrDir.can_convert_format���r@c��grrI)r<rss  r=�needs_format_conversion�$RemoteBzrDir.needs_format_conversion rr@c��[U5$rN)�RemoteBzrDirConfigr{s r=�_get_config�RemoteBzrDir._get_config$�
��!�$�'�'r@c��[U5$rN)rr{s r=�_get_config_store�RemoteBzrDir._get_config_store'r#r@)rOrIrJrHr��F�NNNrN�NNNF�FN)NFFN�T)1rArBrCrDrErrArDr>r�rKrTrSrrRrprtrsr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr1rrrrrr!r%rHrIr@r=r�r��s!��O�
�#��#������2H�!�A�G�R�"6�3�4�#�JT�=�~�
U��@U�.SX�6�
�� �,P�
�":�H1�� �

�F��� �
�6
���3�8&� A��P�M�O���(�(r@r�c�f^�\rSrSrU4SjrSU4Sjjr\R4U4SjjrSr	U=r
$)�RemoteInventoryTreei+c�&>�[TU]XU5 grN)rr>)r<r�invr�r�s    �r=r>�RemoteInventoryTree.__init__,s���
����+�6r@c	�>�U(a[TU]UUUUUUS9$URRUR	5XX4US9nUc[TU]UUUUUUS9$U$)N)�force_mtime�recurse_nested)r2)r�archive�_repository�_revision_archive�get_revision_id)	r<rsr��root�subdirr2r3r�r�s	        �r=r4�RemoteInventoryTree.archive/s������7�?�����'�-�
#��
����0�0�� � �"�F�$�K�1�
���;��7�?�����'�-�
#��
��
r@c�|>�URRUR5USUS9nUc
[TU]XS9$U$)amReturn an iterator of revision_id, line tuples.

For working trees (and mutable trees in general), the special
revision_id 'current:' will be used for lines that are new in this
tree, e.g. uncommitted changes.
:param default_revision: For lines that don't match a basis, mark them
    with this revision id. Not all implementations will make use of
    this value.
N)�file_id�default_revision)r=)r5�_annotate_file_revisionr7r�
annotate_iter)r<r�r=r�r�s    �r=r?�!RemoteInventoryTree.annotate_iterPsT������6�6�� � �"���-�	7�
���;��7�(��(�Q�Q��
r@rIr))rArBrCrDr>r4�
_mod_revision�CURRENT_REVISIONr?rHr<r=s@r=r-r-+s2���7������B4A�3Q�3Q��r@r-c�@�\rSrSrSr\"5rSrSrSr	Sr
SrSr\
S5r\
S5r\
S	5r\
S
5r\
S5r\
S5r\
S
5r\
S5rSrSSjrSrSr\
S5r\
S5r\
S5rSrSrSr\
S5r \
S5r!Sr"g)rmiea�Format for repositories accessed over a _SmartClient.

Instances of this repository are represented by RemoteRepository
instances.

The RemoteRepositoryFormat is parameterized during construction
to reflect the capabilities of the real, remote format. Specifically
the attributes rich_root_data and supports_tree_reference are set
on a per instance basis, and are not set (and should not be) at
the class level.

:ivar _custom_format: If set, a specific concrete repository format that
    will be used when initializing a repository with this
    RemoteRepositoryFormat.
:ivar _creating_repo: If set, the repository object that this
    RemoteRepositoryFormat was created for: it can be called into
    to obtain data like the network name.
TFc���[RRU5 SUlSUlSUlSUlSUlSUlSUl	SUl
SUlSUlgrN)
r{�RepositoryFormatr>rrqr��&_revision_graph_can_have_wrong_parents�_supports_chksrpro�_supports_funky_characters�_supports_nesting_repositoriesrnr{s r=r>�RemoteRepositoryFormat.__init__sf���(�(�1�1�$�7�"���!��� $���6:��3�"���*.��'�(,��%�*.��'�.2��+�#��r@c�b�SRURRUR5$r~rr{s r=r��RemoteRepositoryFormat.__repr__�r�r@c�N�UR5 URR$rN)rr�fast_deltasr{s r=rN�"RemoteRepositoryFormat.fast_deltas�� �������"�"�.�.�.r@c��URc+UR5 URRUlUR$rN)rnrr�rich_root_datar{s r=rR�%RemoteRepositoryFormat.rich_root_data�s:�����'�����#'�#6�#6�#E�#E�D� ��#�#�#r@c��URc+UR5 URRUlUR$rN)rGrr�
supports_chksr{s r=rU�$RemoteRepositoryFormat.supports_chks�s:�����&�����"&�"5�"5�"C�"C�D���"�"�"r@c��URc+UR5 URRUlUR$rN)rprr�supports_external_lookupsr{s r=rX�0RemoteRepositoryFormat.supports_external_lookups��?���*�*�2������#�#�=�=�
�+��.�.�.r@c��URc+UR5 URRUlUR$rN)rHrr�supports_funky_charactersr{s r=r\�0RemoteRepositoryFormat.supports_funky_characters�rZr@c��URc+UR5 URRUlUR$rN)rIrr�supports_nesting_repositoriesr{s r=r_�4RemoteRepositoryFormat.supports_nesting_repositories�s?���.�.�6������#�#�A�A�
�/��2�2�2r@c��URc+UR5 URRUlUR$rN)rorr�supports_tree_referencer{s r=rb�.RemoteRepositoryFormat.supports_tree_reference�s:���(�(�0�����,0�,?�,?�,W�,W�D�)��,�,�,r@c��URc+UR5 URRUlUR$rN)rFrr�%revision_graph_can_have_wrong_parentsr{s r=re�<RemoteRepositoryFormat.revision_graph_can_have_wrong_parents�s?���6�6�>������#�#�I�I�
�7��:�:�:r@c��UR(aURRXS9nO�URbNURR5nUR	5 UR
RRXS9nO)UR	5 URRUS9n[U[5(dURU5$U$)z%Helper for common code in initialize.�r�)rr�r�r�r�_real_repositoryr�rHr�r�r�r�)r<�a_controldirr�r�
prior_repos     r=�_vfs_initialize�&RemoteRepositoryFormat._vfs_initialize�s�������(�(�3�3�L�3�P�F�
�
"�
"�
.��.�.�>�>�@�J��#�#�%��0�0�8�8�C�C��D��F�
�%�%�'�!�.�.�@�@��@�O�F��&�"2�3�3��9�9�\�*�*��Mr@c��[U[5(dURX5$URRnURS5(aURX5$UR(aURR5nO^UR(a
URnO@[RRS5"5nURnUR5nURUR5nSnU(aSn	OSn	URX�XI5n
[U
SS5nXl[#X5nX�lU$![&R(a% UR+S5 URX5s$f=f)Nr��defaultsBzrDir.create_repositoryr�r�r&)r�r�rlrOr�r�rr�rqrr0r�rr1rXrtr�r�r�r	r�r�)
r<rjr�rMr��reference_bzrdir_format�reference_formatr�r��
shared_strrrrsr�s
             r=r��!RemoteRepositoryFormat.initialize�s_���,��5�5��'�'��=�=��%�%�-�-���#�#�G�,�,��'�'��=�=�����.�.�;�;�=�L�
�
�
��-�-�L�'1�&@�&@�&D�&D�Y�&O�&Q�#�6�H�H��+�8�8�:�L��1�1�,�2F�2F�G��*��� �J�!�J�
	�#�)�)�$�l�O�H�3�8�A�B�<�@�F�&2�#�*�<�@�K�$/�!�����(�(�	>��-�-�g�6��'�'��=�=�	>�s�E�6F
�	F
c��[U[5(d[SRU55eUR	5$)Nz{!r} is not a RemoteBzrDir)r�r�r�rsr�)r<rjs  r=r��RemoteRepositoryFormat.opens5���,��5�5� �!=�!D�!D�\�!R�S�S��+�+�-�-r@c���URc0[RRUR5Ulgg![
a%n[R"SURS9UeSnAff=f)Nrrx)rr{r�r�rqr�r	rz�r<rs  r=r�#RemoteRepositoryFormat._ensure_realsm�����&�
�&5�&M�&M�&Q�&Q��&�&�'��#�'��
�
��/�/�%�d�.@�.@�����
���.?�
A.�	 A)�)A.c�N�UR5 URR$rN)rr�_fetch_orderr{s r=r{�#RemoteRepositoryFormat._fetch_order!s �������"�"�/�/�/r@c�N�UR5 URR$rN)rr�_fetch_uses_deltasr{s r=r~�)RemoteRepositoryFormat._fetch_uses_deltas&s �������"�"�5�5�5r@c�N�UR5 URR$rN)rr�_fetch_reconciler{s r=r��'RemoteRepositoryFormat._fetch_reconcile+s �������"�"�3�3�3r@c�\�UR5 SURR5-$�Nr��rrr�r{s r=r��-RemoteRepositoryFormat.get_format_description0�(�������D�/�/�F�F�H�H�Hr@c�2�URURL$rNr=r�s  r=r��RemoteRepositoryFormat.__eq__4s���~�~����0�0r@c���UR(aUR$URR5 URRRR5$rN)rqr�rrir�r�r{s r=r��#RemoteRepositoryFormat.network_name7sJ������%�%�%����(�(�*��"�"�3�3�;�;�H�H�J�Jr@c�N�UR5 URR$rN)rr�pack_compressesr{s r=r��&RemoteRepositoryFormat.pack_compresses=s �������"�"�2�2�2r@c�N�UR5 URR$rN)rr�_serializerr{s r=r��"RemoteRepositoryFormat._serializerBrPr@)
r�rrqrFrnrGrprHrIroNr')#rArBrCrDrErv�_matchingcontroldir�supports_full_versioned_files�supports_leaving_lock�supports_overriding_transport�supports_ghostsr>r�rrNrRrUrXr\r_rbrerlr�r�rr{r~r�r�r�r�r�r�rHrIr@r=rmrmes]���&-�.��$(�!� ��$)�!��O�$�
�
�/��/��$��$��#��#��/��/��/��/��3��3��-��-��;��;��4&�P.�
	��0��0��6��6��4��4�I�1�K��3��3��/��/r@rmc�R�\rSrSr%Sr\\S'\\R\S'S{S\
S\S\\R4S	jjr\S
5r
\S5rSr\rS|S
jr\S5rSrSrSrS}SjrSrSrSrSrSrSrSrSrSrSr Sr!Sr"Sr#S r$S~S!jr%S"r&S{S#jr'S|S$jr(S%r)S&r*S'r+S(r,S)r-S~S*jr.S+r/S,r0SS-jr1S.r2S/r3S0\R4S1jr4S2r5S3r6\7"\8Rr\8Rt5S45r;S5r<S6r=S~S7jr>S8r?S9r@S:rAS�S;jrBS<rCS=rDS>rESS?jrFS~S@jrGSArHSBrISCrJS~SDjrKS~SEjrLS~SFjrMSGrNSHrOS~SIjrPSJrQSKrRSLrSS�SMjrTS�SNjrUS~SOjrVSPrWSQrXSRrYSSrZSTr[SUr\SVr]SWr^SXr_SSYjr`SZraS[rbS\rcS]rdS^reS�S_jrfS~S`jrgS~Sajrh\Sb5riSScjrj\Sd5rkSerl\Sf5rmSgrn\Sh5roSirpSjrqSkrr\Sl5rsSmrtSnruSorvSprwS~SqjrxS~SrjrySsrzS~Stjr{Sur|Svr}Swr~S~SxjrSyr�Szr�g)�r�iHz}Repository accessed over rpc.

For the moment most operations are performed using local transport-backed
Repository objects.
r�riN�
remote_bzrdirrs�real_repositoryc��U(aX0lOSUlXlUcURUlOX@lX lSUlSUlSUlSUlSUl[R"URS9UlURR5 SUlSUlSUlURR"R$Ul/Ulg)a�Create a RemoteRepository instance.

:param remote_bzrdir: The bzrdir hosting this repository.
:param format: The RemoteFormat object to use.
:param real_repository: If not None, a local implementation of the
    repository logic for the repository, usually accessing the data
    via the VFS.
:param _client: Private testing parameter - override the smart client
    to be used by the repository.
NrF)�get_parent_map)rirrOr��
_lock_mode�_lock_token�_write_group_tokens�_lock_count�_leave_lockr�CachingParentsProvider�_get_parent_map_rpc�_unstacked_provider�
disable_cache�_reconcile_does_inventory_gc�_reconcile_fixes_text_parents�_reconcile_backsup_inventoryrr��_fallback_repositories)r<r�rsr�rOs     r=r>�RemoteRepository.__init__Rs���"�$3�!�$(�D�!�'���?�(�0�0�D�L�"�L���������#'�� ���� ���$)�#?�#?��3�3�$
�� �	
� � �.�.�0�-2��)�-2��*�,1��)��O�O�-�-�2�2��	�&(��#r@c�.�URR$rN)rrAr{s r=rA�RemoteRepository.user_transport�s�����-�-�-r@c�8�URRS5$rN)rrr{s r=rD�"RemoteRepository.control_transport�s��
���7�7��=�=r@c�b�SRURRUR5$�Nz{}({})�rsr�rAr�r{s r=�__str__�RemoteRepository.__str__��!�����t�~�~�6�6��	�	�B�Br@c��UR(a)UR5 URRUS9$UR5(d)U(a[	S5 g[
R"S5eURRUR5nURSUURURVs/sHo3RS5PM sn5nUS:wa[
R"U5eSUlgs snf![aCnSUlU(de[	S5 [#5 [%['S	5U5 SnAgSnAff=f)
a)Complete a write group on the decorated repository.

Smart methods perform operations in a single step so this API
is not really applicable except as a compatibility thunk
for older plugins that don't use e.g. the CommitBuilder
facility.

:param suppress_errors: see Repository.abort_write_group.
)�suppress_errorsz(suppressed) not in write groupN�not in write groupsRepository.abort_write_groupr��r�zabort_write_group failedzbzr: ERROR (ignored): %s)rir�abort_write_group�is_in_write_groupr#r	�BzrErrorrr1rOrXr�r�r�r3�	Exception�_write_groupr"r$r)r<r�r�rrr�excs      r=r��"RemoteRepository.abort_write_group�s.��� � ������(�(�:�:� /�;��
��%�%�'�'���8�9���/�/�"6�7�7����4�4�T�\�\�B��	,��z�z�/��� � �48�4L�4L�M�4L�5���g�&�4L�M�	�H��8�#��:�:�8�D�D�'+�D�$��N���	;� $�D��"���-�.�!�#���3�4�c�:�:��
	;�s*�&D�D
�D�
D�
E�9E�Ec�N�UR5 URR$�z�Decorate the real repository for now.

In the long term a full blown network facility is needed to avoid
creating a real repository object locally.
)rri�	chk_bytesr{s r=r��RemoteRepository.chk_bytes�s"��	
�����$�$�.�.�.r@c��UR(a*UR5 URR5$UR5(d[R
"S5eURRUR5nURSUURURVs/sHo"RS5PM sn5nUS:wa[R"U5eSUlUR5 gs snf)z�Complete a write group on the decorated repository.

Smart methods perform operations in a single step so this API
is not really applicable except as a compatibility thunk
for older plugins that don't use e.g. the CommitBuilder
facility.
r�sRepository.commit_write_groupr�r�N)rir�commit_write_groupr�r	r�rr1rOrXr�r�r�r3�refresh_data)r<r�rrrs    r=r��#RemoteRepository.commit_write_group�s���� � ������(�(�;�;�=�=��%�%�'�'��/�/�"6�7�7����4�4�T�\�\�B���:�:�,�����04�0H�0H�I�0H�u�\�\�'�
"�0H�I�	
���x���6�6�x�@�@�#'�� ������

Js�2Dc��UR(aURRU5$URRUR5nURSUURUVs/sHo3RS5PM sn5nUS:wa[R"U5eXlgs snf![Ra. UR5 URRU5s$f=f)NsRepository.check_write_groupr�r�)
ri�resume_write_grouprr1rOrXr�r�r	r�rr3r�)r<�tokensr�rrrs     r=r��#RemoteRepository.resume_write_group�s���� � ��(�(�;�;�F�C�C����4�4�T�\�\�B��		D��z�z�/��� � �4:�;�F�5���g�&�F�;�	�H��x���6�6�x�@�@�#)� ��<���(�(�	D������(�(�;�;�F�C�C�	D�s$�B8�/B3�	B8�3B8�8?C:�9C:c��UR(aURR5$UR=(d /nSUlU$rN)ri�suspend_write_groupr�)r<r�s  r=r��$RemoteRepository.suspend_write_group�s=��� � ��(�(�<�<�>�>��&�&�,�"��#'�� ��
r@c�T�UR5 URRUS9$)N)�check_for_missing_texts)rri�get_missing_parent_inventories)r<r�s  r=r��/RemoteRepository.get_missing_parent_inventories�s0�������$�$�C�C�$;�D�
�	
r@c�X�UR5 URRX5$rN)rri�get_rev_id_for_revno)r<�revno�
known_pairs   r=�_get_rev_id_for_revno_vfs�*RemoteRepository._get_rev_id_for_revno_vfs�s%�������$�$�9�9�%�L�Lr@c
���URRUR5nURRR	S5(aURX5$UR
SX1U5nUS	S
:XaSUS4$US	S:Xa>USSnUR$H%nUR'X5up�U(aSU	4s $U	nM' S
U4$[R("U5e![Ra9 URRRS5 URX5s$[a�n[UR5S:aeURSSS:wae[R"SURS5nU(de[R"[!UR#S55S	[!UR#S5545UeSnAff=f)z$See Repository.get_rev_id_for_revno.)r&�sRepository.get_rev_id_for_revnorlNr)serrors
ValueErrorsIrequested revno \(([0-9]+)\) is later than given known revno \(([0-9]+)\)r&rr�Tshistory-incompleteF)rr1rOr�r�r�rXr	r�r�r6r�r;�re�match�RevnoOutOfBounds�int�groupr�r�r3)
r<r�r�r�rrr�m�fallback�foundrs
          r=r��%RemoteRepository.get_rev_id_for_revnos������4�4�T�\�\�B��	X��|�|�#�#�5�5�g�>�>��5�5�e�H�H��z�z�2�D���H�*�A�;�%����!��$�$�
�a�[�1�
1�!�!�A��J� �7�7�� (� =� =�e� P�
�����<�'�!'�J�8��*�$�$��6�6�x�@�@��?�(�(�	E��L�L� � �;�;�G�D��1�1�%�D�D�*�	X��1�=�=�!�A�%���}�}�R�a� �$=�=�����-��
�
�a� ��A�
���)�)�#�a�g�g�a�j�/�A�s�1�7�7�1�:��;O�P�VW�W��	X�s%�:C"�"C"�"A
G �.	G �7B$G�G c��URc�S[R;a-SSKn[	SSRUR
555 URRR5 URR5 URURRR55 gg)a4Ensure that there is a _real_repository set.

Used before calls to self._real_repository.

Note that _ensure_real causes many roundtrips to the server which are
not desirable, and prevents the use of smart one-roundtrip RPC's to
perform complex operations (such as accessing parent data, streaming
revisions etc). Adding calls to _ensure_real should only be done when
bringing up new functionality, adding fallbacks for smart methods that
require a fallback path, and never to replace an existing smart method
invocation. If in doubt chat to the bzr network team.
Nr_rz"VFS Repository access triggered
%sr`)rirrbrcr%r�rdr��missing_keys�clearrrr�rHr�rhs  r=r�RemoteRepository._ensure_real-s���� � �(��E�-�-�-� ��9��G�G�I�2�2�4�5��
�$�$�1�1�7�7�9��O�O�(�(�*��%�%�d�o�o�&B�&B�&R�&R�&T�U�)r@c�B�URR"U4SU0UD6 g�Nr)rrRrls   r=rR�!RemoteRepository._translate_errorFs�����(�(��I��I��Ir@c�V�UR5 URR5$)a8Find the text key references within the repository.

:return: A dictionary mapping text keys ((fileid, revision_id) tuples)
    to whether they were referred to by the inventory of the
    revision_id that they contain. The inventory texts from all present
    revision ids are assessed to generate this report.
)rri�find_text_key_referencesr{s r=r��)RemoteRepository.find_text_key_referencesI�%��	
�����$�$�=�=�?�?r@c�V�UR5 URR5$)z�Generate a new text key index for the repository.

This is an expensive function that will take considerable time to run.

:return: A dict mapping (file_id, revision_id) tuples to a list of
    parents, also (file_id, revision_id) tuples.
)rri�_generate_text_key_indexr{s r=r��)RemoteRepository._generate_text_key_indexTr�r@c��UcSnO[R"U5(a0$URRUR5nURSX!5nUupEUSS:wa[R"U5eUR5nUS:Xa0$URS5n0nUH&n	[U	R55n
U
SSX�S'M( U$)z>Private method for using with old (< 1.2) servers to fallback.Nr@sRepository.get_revision_graphrr��
r&)rA�is_nullrr1rOr]r	r3r4�split�tuple)r<r�r�rr�response_tuple�response_handler�coded�lines�revision_graph�line�ds           r=�_get_revision_graph�$RemoteRepository._get_revision_graph_s������K�
�
"�
"�;�
/�
/��I����4�4�T�\�\�B���,�,�,�d�
��,4�(���!���%��6�6�~�F�F� �0�0�2���C�<��I����E�"�����D��d�j�j�l�#�A�#$�Q�R�5�N�Q�4� ���r@c��[U5$)zSee Repository._get_sink().)�RemoteStreamSinkr{s r=�	_get_sink�RemoteRepository._get_sinkys
����%�%r@c��[X5$)z3Return a source for streaming from this repository.)�RemoteStreamSource)r<�	to_formats  r=�_get_source�RemoteRepository._get_source}s
��!�$�2�2r@c��UR5 [R"UR5sSSS5 $!,(df   g=frN)�	lock_readr�Graph�textsr{s r=�get_file_graph�RemoteRepository.get_file_graph�s(��
�^�^�
��;�;�t�z�z�*��
�
�s	� ;�
A	c��UR5 XRU45;sSSS5 $!,(df   g=f)z3True if this repository has a copy of the revision.N)r	�
has_revisions�r<r�s  r=�has_revision�RemoteRepository.has_revision�s-���^�^�
��"4�"4�k�^�"D�D��
�
�s�/�
=c��UR5 URU5n[U5n[RU;aUR[R5 UsSSS5 $!,(df   g=f)z�Probe to find out the presence of multiple revisions.

:param revision_ids: An iterable of revision_ids.
:return: A set of the revision_ids that were present.
N)r	r��setrAr!�add)r<�revision_ids�
parent_maprs    r=r�RemoteRepository.has_revisions�sV���^�^�
��,�,�\�:�J���_�F��*�*�l�:��
�
�=�6�6�7��
�
�
�s�AA,�,
A:c��URnURn[U5[U5:wag[S[X#555$)z9Returns true if the repositories have the same fallbacks.Fc3�H# �UHupURU5v� M g7frN)�has_same_location)�.0�f�gs   r=�	<genexpr>�7RemoteRepository._has_same_fallbacks.<locals>.<genexpr>�s"���K�6J�d�a�1�&�&�q�)�)�6J�s� ")r�r��all�zip)r<�
other_repo�my_fb�other_fbs    r=�_has_same_fallbacks�$RemoteRepository._has_same_fallbacks�sC���+�+���4�4���u�:��X��&���K�c�%�6J�K�K�Kr@c���URURL=(aA URRRURRR:H$rN)r�rrr�r�s  r=r�"RemoteRepository.has_same_location�sI��

�N�N�e�o�o�-�
R����)�)�.�.�%�2B�2B�2L�2L�2Q�2Q�Q�	
r@c�P�URU5n[R"U5$)z,Return the graph for this repository format.)�_make_parents_providerrr
)r<�other_repository�parents_providers   r=�	get_graph�RemoteRepository.get_graph�s$���6�6�7G�H���{�{�+�,�,r@c�,�UR5 UR5RU5VVs0sHup#UcM
X#_M nnn[R"U5n[
R"U5sSSS5 $s snnf!,(df   g=f)zEReturn the known graph for a set of revision ids and their ancestors.N)r	r.�
iter_ancestryr{�_strip_NULL_ghostsr�
KnownGraph)r<r�keyr�r�s     r=�get_known_graph_ancestry�)RemoteRepository.get_known_graph_ancestry�s��
�^�^�
�#'�.�.�"2�"@�"@��"N��"N�J�C����
�"N�
��
-�?�?��O�N��#�#�N�3��
����
�s"�#B�	A?�A?�.B�?B�
Bc�h�URRUR5nUb[R"U5(aSnOUnUbU(dSnOSnURSX4U5upgUSS:wa[R"U5eUR5n0n	URS5Hn
U
(dMU
RS	5up�URS
5nUS;a[U5X�'MEUS;dMMURS
5SSn
[U
S5[U
S54X�'M� U	$)zSee Repository.gather_stats().Nr@rXrksRepository.gather_statsrr�r��:r�)�	revisions�size�
committers)�firstrev�	latestrev� r&)
rr1rOrAr�r]r	r3r4r�r�r��float)r<�revidr;r��	fmt_revid�fmt_committersr�r�r�rr�r4�val_text�valuess              r=�gather_stats�RemoteRepository.gather_stats�s%�����4�4�T�\�\�B���=�M�1�1�%�8�8��I��I���Z�"�N�#�N�+/�+D�+D�&���,
�(���!���%��6�6�~�F�F��/�/�1�����J�J�u�%�D��� �J�J�t�,�M�C��*�*�W�%�C��9�9�!�(�m����1�1�!����-�a�b�1��$�V�A�Y�/��V�A�Y��@���&��
r@c�T�UR5 URRUS9$)zSee Repository.find_branches().)�using)rri�
find_branches)r<rHs  r=rI�RemoteRepository.find_branches�s*��	
�����$�$�2�2��2�?�?r@c�H�URRUR5nURSU5nUSS;a[R"U5eUSS:H$![R
a- UR
5 URR5s$f=f)z*See Repository.get_physical_lock_status().s#Repository.get_physical_lock_statusrr�rk)
rr1rOrXr	r�rri�get_physical_lock_statusr3rZs   r=rL�)RemoteRepository.get_physical_lock_status�s������4�4�T�\�\�B��	D��z�z�"H�$�O�H��A�;�o�-��6�6�x�@�@���{�f�$�$���(�(�	D������(�(�A�A�C�C�	D�s�A � >B!� B!c�v�URbgUR(aURR5$g)znReturn True if there is an open write group.

write groups are only applicable locally for the smart server..
NT)r�rir�r{s r=r��"RemoteRepository.is_in_write_group�s6��
�#�#�/��� � ��(�(�:�:�<�<�!r@c� �URS:�$�Nr&�r�r{s r=�	is_locked�RemoteRepository.is_locked�������1�$�$r@c���URRUR5nURSU5nUSS;a[	SRU55eUSS:H$)zSee Repository.is_shared().sRepository.is_sharedrr�r�rk)rr1rOrXrrsrZs   r=�	is_shared�RemoteRepository.is_shared�s]�����4�4�T�\�\�B���:�:�5�t�<���A�;�o�-�$�%B�%I�%I�(�%S�T�T���{�f�$�$r@c� �URS:H$)N�w�r�r{s r=�is_write_locked� RemoteRepository.is_write_lockeds�����#�%�%r@c��grNrI�r<rs  r=�_warn_if_deprecated�$RemoteRepository._warn_if_deprecateds��	
r@c��UR(d�URS5 SUlSUlURR	SS9 UR
bUR
R
5 URHnUR
5 M OU=RS-
sl[R"UR5$)zTLock the repository for read operations.

:return: A breezy.lock.LogicalLockResult.
�rr&T��cache_misses)r��
_note_lockr�r��enable_cacherir	r�r�LogicalLockResultr)r<r�s  r=r	�RemoteRepository.lock_reads�������O�O�C� �!�D�O� �D���$�$�1�1�t�1�D��$�$�0��%�%�/�/�1��3�3����� �4�
����!���%�%�d�k�k�2�2r@c���URRUR5nUcSnSU0nUR"SX!40UD6nUSS:XaUupQU$[R
"U5e)Nr@rsRepository.lock_writerr��rr1rOrXr	r3)r<rr�rVrr�oks      r=�_remote_lock_write�#RemoteRepository._remote_lock_writesm�����4�4�T�\�\�B���=��E���&���:�:�6��S�{�S���A�;�%�� �I�B��L��6�6�x�@�@r@c��UR(GdURS5 U(aCURb/XR:wa [R"XR5eXlOURU5UlURb#URRURS9 UbSUlOSUlSUlSUl	URSLnURRUS9 URHnUR5 M O;URS:Xa[R"U5eU=RS-
sl	[UR UR=(d S5$)NrZ�rTFr&rdrc)r�rfr�r	�
TokenMismatchrmrir�r�r�r�rgr�r	�
ReadOnlyErrorrr)r<rr�rer�s     r=r��RemoteRepository.lock_write+s?�������O�O�C� ���#�#�/�� 0� 0�0�$�2�2�5�:J�:J�K�K�#(� �#'�#:�#:�5�#A�� �
�$�$�0��%�%�0�0�t�7G�7G�0�H�� �#'�� �#(�� �!�D�O� �D���0�0�D�8�L��$�$�1�1�|�1�L��3�3����� �4��_�_��
#��&�&�t�,�,�����!��(����d�6F�6F�6N�$�O�Or@c�^�UR(d[UR5eSUlg�NT�r�r��leave_lock_in_placer�r{s r=rw�$RemoteRepository.leave_lock_in_placeL�$�����%�d�&>�&>�?�?���r@c�^�UR(d[UR5eSUlgr��r�r�r�r�r{s r=r��)RemoteRepository.dont_leave_lock_in_placeQ�$�����%�d�&C�&C�D�D� ��r@rc�$�URb UR5(a[S5e[U[5(a
[5eXlUR
(ae[
URR
5[
UR
5:wa/[
URR
5(a[S5eUR
HnURRU5 M  URS:Xa&URRUR5 O*URS:XaURR5 URb-URRUR5 SUlgg)z�Set the _real_repository for this repository.

:param repository: The repository to fallback to for non-hpss
    implemented operations.
Nz_real_repository is already setz5cannot cleanly remove existing _fallback_repositoriesrZrc)rirSr�r�r�r�r��add_fallback_repositoryr�r�r�r	r�r�)r<r�fbs   r=r��%RemoteRepository._set_real_repositoryVsD��� � �,��~�~���$�%F�G�G��j�"2�3�3� �"�"� *���&�&�3��!�!�8�8�,
�
��,�,�
-�,.��4�(�(�?�?�@�@�$�K����-�-�B��!�!�9�9�"�=�.��?�?�c�!�
�!�!�,�,�T�-=�-=�>�
�_�_��
#��!�!�+�+�-��#�#�/��!�!�4�4�T�5M�5M�N�'+�D�$�0r@c���UR(a*UR5 URR5$UR5(d[R
"U5eURb[R"S5eURRUR5nURSXR5nUSS:wa[R"U5eUSVs/sHo3R!S5PM snUlg![R[R4a- UR5 URR5s$f=fs snf)z�Start a write group on the decorated repository.

Smart methods perform operations in a single step so this API
is not really applicable except as a compatibility thunk
for older plugins that don't use e.g. the CommitBuilder
facility.
Nzalready in a write groupsRepository.start_write_grouprr�r&r�)rir�start_write_groupr\r	�NotWriteLockedr�r�rr1rOrXr�r��UnsuspendableWriteGroupr3r�)r<r�rrrs    r=r��"RemoteRepository.start_write_group�s*��� � ������(�(�:�:�<�<��#�#�%�%��'�'��-�-��#�#�/��/�/�"<�=�=����4�4�T�\�\�B��	=��z�z�/��7G�7G��H��A�;�%���6�6�x�@�@�GO�PQ�{�#S�{�e�L�L��$9�{�#S�� ���)�)�6�+I�+I�J�	=������(�(�:�:�<�<�	=��
$Ts�0D�2E)�AE&�%E&c���URRUR5nU(dgSU0nUR"SX!40UD6nUS:Xag[R
"U5e)NrsRepository.unlockr�rk)r<rr�rVrrs     r=�_unlock�RemoteRepository._unlock�s\�����4�4�T�\�\�B������&���:�:�2�D�O�;�O���x����6�6�x�@�@r@c���UR(d[R"U5$U=RS-slURS:�agURR	5 UR
nSUlURbURR5 OURbUR5 US:Xa5URnSUl
UR(dURU5 URHnUR5 M g!US:Xa7URnSUl
UR(dURU5 fff=f)Nr&rrZ)r�r�cant_unlock_not_heldr�r�r�rirr�r�r�r�r�r�)r<�old_mode�	old_tokenr�s    r=r�RemoteRepository.unlock�s*������,�,�T�2�2����A������a���� � �.�.�0��?�?�����	,��$�$�0��%�%�,�,�.��)�)�5��&�&�(��3��!�,�,�	�#'�� ��'�'��L�L��+��/�/�D��K�K�M�0���3��!�,�,�	�#'�� ��'�'��L�L��+�(��s
�<AD � ?Ec�4�URRUR5nURSU5nUS:wa[R"U5eg![R
a- UR
5 URR5s$f=f)NsRepository.break_lockr�)
rr1rOrXr	r�rrirpr3rZs   r=rp�RemoteRepository.break_lock�s������4�4�T�\�\�B��	6��z�z�":�D�A�H��x���6�6�x�@�@� ���(�(�	6������(�(�3�3�5�5�	6�s�A�>B�Bc��SSKnURRUR5nUR	SX1RS55upEUSS:XaBUR5nURUR55 URS5 U$[R"U5e![Ra WR5 gf=f)zwReturn a TemporaryFile containing a repository tarball.

Returns None if the server does not support sending tarballs.
rNsRepository.tarballr�r�)�tempfilerr1rOr]r�r	r��cancel_read_body�NamedTemporaryFile�writer4�seekr3)r<�compressionr�r�rr�protocol�ts       r=�_get_tarball�RemoteRepository._get_tarball�s���
	����4�4�T�\�\�B��	�!%�!:�!:�%�t�-?�-?��-H�"��H��A�;�%���+�+�-�A�
�G�G�H�,�,�.�/�
�F�F�1�I��H��2�2�8�<�<���(�(�	��%�%�'��	�s�#B/�/$C�Cc��UR5 URUSS9nURXS9 UsSSS5 $!,(df   g=f)zvCreate a descendent repository for new development.

Unlike clone, this does not copy the settings of the repository.
Frh)r�N)r	�_create_sprouting_repo�fetch)r<�	to_bzrdirr��	dest_repos    r=�sprout�RemoteRepository.sprout�s@��
�^�^�
��3�3�I�e�3�L�I��O�O�D�O�:���
�
�s	�!<�
A
c�&�[URURRR5(dUR	5nU$URRXS9nU$![Ra UR5nU$f=f�Nrh)	r�r�rr�r�r�r	�UninitializableFormatr�)r<rjr�r�s    r=r��'RemoteRepository._create_sprouting_repo�s����,�.�.����0G�0G�0Q�0Q�R�R�$�6�6�8�I���	
;� �L�L�3�3�L�3�P�	�����/�/�
;�(�8�8�:�	���
;�s�
A(�($B�Bc��UR5 U[R:Xa+[U[	SS9[R5sSSS5 $[UR
U/55SsSSS5 $!,(df   g=f)N)�root_idr)r	rAr!r/r.�list�revision_treesrs  r=�
revision_tree�RemoteRepository.revision_tree
sd��
�^�^�
��m�9�9�9�,��)�D�1�=�3N�3N���
��D�/�/��
�>�?��B�
�
�
�s�6A8�A8�8
Bc�B�URRUR5nURSU5nUSS:wa[R"U5eUS$![R
a- UR
5 URR5s$f=f)Ns-VersionedFileRepository.get_serializer_formatrr�r&)
rr1rOrXr	r�rri�get_serializer_formatr3rZs   r=r��&RemoteRepository.get_serializer_formats������4�4�T�\�\�B��	A��z�z�@�$��H��A�;�%���6�6�x�@�@���{����(�(�	A������(�(�>�>�@�@�	A�s�A�>B�Bc
���UR(a1URR(d[R"S5e[
Rn
U
"UUUUUUUUU	5	nUR5 U$)a0Obtain a CommitBuilder for this repository.

:param branch: Branch to commit to.
:param parents: Revision ids of the parents of the new revision.
:param config: Configuration to use.
:param timestamp: Optional timestamp recorded for commit.
:param timezone: Optional timezone for timestamp.
:param committer: Optional committer to set for commit.
:param revprops: Optional dictionary of revision properties.
:param revision_id: Optional revision id.
:param lossy: Whether to discard data that can not be natively
    represented, when pushing to a foreign VCS
zyCannot commit directly to a stacked branch in pre-2a formats. See https://bugs.launchpad.net/bzr/+bug/375013 for details.)r�r�rUr	r�r*�VersionedFileCommitBuilderr�)r<r�parentsr�	timestamp�timezone�	committer�revpropsr��lossy�commit_builder_klsrs            r=�get_commit_builder�#RemoteRepository.get_commit_builder#sv��2�&�&�t�|�|�/I�/I��/�/�J��
�
+�E�E��#����������

��	
��� ��
r@c�*�URR(d9[R"URR	5UR
5eUR
U5 UR5(aUR5 URRU5 URb\URRVs/sHo"RPM nnURU;aURRU5 gggs snf)z`Add a repository to use for looking up data not held locally.

:param repository: A repository.
N)r�rXr	�UnstackableRepositoryFormatr�r��_check_fallback_repositoryrSr	r�r�rir,r)r<rr��fallback_locationss    r=r�(RemoteRepository.add_fallback_repositoryQs���
�|�|�5�5��4�4����)�)�+�T�Y�Y��
�	
�'�'�
�3��>�>���
� � �"��#�#�*�*�:�6�� � �,�*.�*?�*?�*V�*V�"�*V�$�
�
�*V�
�"��"�"�*<�<��%�%�=�=�j�I�=�	-��"s�Dc�@�[RRX5$)z�Check that this repository can fallback to repository safely.

Raise an error if not.

:param repository: A repository to fallback to.
)r{�InterRepository�_assert_same_model)r<rs  r=r��+RemoteRepository._check_fallback_repositoryos���.�.�A�A�$�S�Sr@c�Z�UR5 URRXU5$rN)rri�
add_inventory)r<r@r/r�s    r=r��RemoteRepository.add_inventoryxs'�������$�$�2�2�5�w�G�Gr@c	�^�UR5 URRUUUUUUS9$)N)�	basis_inv�propagate_caches)rri�add_inventory_by_delta)r<�basis_revision_id�delta�new_revision_idr�r�r�s       r=r��'RemoteRepository.add_inventory_by_delta|s@��	
�����$�$�;�;������-�
<�
�	
r@c�l�[R"U5 U4nURRU/5(dEUc [R
"XR5eUR
XUR5UlO$URRU/5UUlURU5 grN)rA�check_not_reserved_id�inventoriesr�r	�WeaveRevisionNotPresentr��
parent_ids�inventory_sha1�	get_sha1s�
_add_revision)r<r��revr/r4s     r=�add_revision�RemoteRepository.add_revision�s����+�+�K�8��n�����.�.��u�5�5��{��4�4�[�BR�BR�S�S�&*�%7�%7��c�n�n�&��"�"&�!1�!1�!;�!;�S�E�!B�3�!G�C�����3�r@c�r�URbURRU5$URRU5nUR4n[SUR55nUR5RS[X4SUSS9/4/URUR5uUlng)Nc3�&# �UHo4v� M	 g7frNrI)r�parents  r=r�1RemoteRepository._add_revision.<locals>.<genexpr>�s���?��f�	��s�r9T)�chunks_are_lines)rir�r��write_revision_to_linesr�r�r�r�
insert_stream�ChunkedContentFactoryr�r�)r<r�r�r4r�r�s      r=r��RemoteRepository._add_revision�s���� � �,��(�(�6�6�s�;�;�� � �8�8��=����� ���?����?�?��15���1A�1O�1O� �-��$������	
�
�L�L��$�$�
2
�.�� �,r@c��UR5 [URU/55SsSSS5 $!,(df   g=f�Nr)r	r��iter_inventoriesrs  r=�
get_inventory�RemoteRepository.get_inventory�s2��
�^�^�
���-�-�{�m�<�=�a�@��
�
�s	�9�
Ac#�&# �UcSnURRUR5nSRU5nUR	SX2RS54U5upVUSS:wa[R"U5e[R"5nUR5n[R"U5n	U	cgU	up�U
R5URR5:waA[SR!U
R5URR555e[#S[$R&S9n[)U5up�U
S	:wa[S
R!U
55eUH�nUR-UR/S55unnnnnUUR0:wa%[SR!UUR055eUR3UU5nUUR04v� UnM� g![*a gf=f7f)
N�	unorderedr�s'VersionedFileRepository.get_inventoriesr�rr��5Mismatched RemoteRepository and stream src {!r}, {!r})r�r��inventory-deltaszUnexpected stream {!r} receivedr�zinvalid base {!r} != {!r})rr1rOr�rhr�r	r3r)�InventoryDeltaDeserializer�read_streamed_body�
smart_repo�_byte_stream_to_streamr�r�r�rsr.rAr!�next�
StopIteration�parse_text_bytes�get_bytes_asr��create_by_apply_delta)r<r�orderingr�r�r�r��deserializer�byte_stream�decoded�
src_format�stream�prev_inv�substream_kind�	substream�record�	parent_id�new_id�versioned_root�tree_references�invdeltar/s                      r=�_iter_inventories_rpc�&RemoteRepository._iter_inventories_rpc�s������"�H����4�4�T�\�\�B���z�z�,�'��+/�+T�+T�6�
�?�?�7�+�,��,
�(��
�!���%��6�6�~�F�F�&�A�A�C��&�9�9�;���3�3�K�@���?��$��
��"�"�$����(A�(A�(C�C� �G�N�N��+�+�-�t�|�|�/H�/H�/J���
��T�}�7R�7R�S��	�(,�V��%�N��/�/� �1�8�8��H��
� �F��-�-�f�.A�.A�'�.J�K�
K�Y������H�0�0�0�$�/�6�6�y�(�BV�BV�W����0�0��6�B�C��s���&�&��H� ��
�	��	�s+�EH�
H�B)H�
H�H�
H�Hc�X�UR5 URRX5$rN)rri�_iter_inventories)r<rr�s   r=�_iter_inventories_vfs�&RemoteRepository._iter_inventories_vfs�s%�������$�$�6�6�|�N�Nr@c#��# �SU;d[RU;a[S5eURX5H"up4Uc[R
"X5eUv� M$ g7f)a�Get many inventories by revision_ids.

This will buffer some or all of the texts used in constructing the
inventories in memory, but will only parse a single inventory at a
time.

:param revision_ids: The expected revision ids of the inventories.
:param ordering: optional ordering, e.g. 'topological'.  If not
    specified, the order of revision_ids will be preserved (by
    buffering if necessary).
:return: An iterator of inventories.
Nz"cannot get null revision inventory)rAr!�
ValueErrorrr	r)r<rr�r/r@s     r=r��!RemoteRepository.iter_inventories�s[���
�L� �m�&A�&A�\�&Q��A�B�B��0�0��H�J�C��{��+�+�D�8�8��I�I�s�AA c#�Z# �[U5S:Xag[U5nUc0Sn0n[U5nUR5 UR	5nO3SnUS:wa+UR
(a[
SRU55eUR/UR
Vs/sHo�RPM sn-n	U	H�n
UVs/sHo�U;dM
UPM nnU
"X�5H7up�U
cM
URU
R5 US:waU
WU'M2X�4v� M9 U(dMhWW;dMpUR	U5n
X�R4v� WR	5nXu;aM8M� U(a@WbSU4v� W(a/UR	5nWR!U5U4v� U(aM.ggU(aSUR	54v� U(aMggs snfs snf![a SnGM3f=f![Ra" URX5H
up�X�4v� M gf=f7f)NrTFr�zunsupported ordering {!r})r�rr��reverse�popr�rrsrr�remover��
IndexErrorr	r�rr�)r<rr��missing�order_as_requested�invs�order�
next_revidr��iter_inv_fns�iter_invr@�requestr/s              r=r�"RemoteRepository._iter_inventories	s����|���!���l�#����!%���D���&�E��M�M�O�����J�!&���;�&�4�+F�+F� �!<�!C�!C�H�!M�N�N��2�2�3�7;�7R�7R�7
�7R�8�&�&�7R�7
�
��	�(��.:�O�l�U�w�>N�5�l��O�"*�7�"=�J�C��{� ��N�N�3�?�?�3��;�.�&)��U��!�j�(�#>�&�%�$��,�"�h�h�z�2��!�?�?�2�2�"�).����J�	%�,�)�6��%��J�&�&���	�	����h�h�u�o�u�,�,��%���G�K�K�M�)�)��'��M7
��
P��  *�"�*.�J�!�	"��
�(�(�	�"�8�8��P�
���j� �Q��	�s��BH+�G�3H+�9	G2�	G�G�A
G2�#G2�+ G2�G�G2�#G2�'AH+�,$H+�H+�G2�G/�*G2�.G/�/G2�23H(�%H+�'H(�(H+c��UR5 URU/5SsSSS5 $!,(df   g=fr�)r	�
get_revisionsrs  r=�get_revision�RemoteRepository.get_revision7	s-��
�^�^�
��%�%�{�m�4�Q�7��
�
�s�0�
>c�V�UR5 URR5$rN)rri�get_transactionr{s r=r � RemoteRepository.get_transaction;	s#�������$�$�4�4�6�6r@c��UR5 URXR5S9nURX25 UsSSS5 $!,(df   g=fr�)r	r�rW�copy_content_into)r<rjr�r�s    r=r��RemoteRepository.clone?	sJ��
�^�^�
��3�3��^�^�%5�4��I�
�"�"�9�:���
�
�s�0A�
Ac�P�URRUR5nURSU5nUSS;a[SRU55eUSS:H$![R
a- UR
5 URR5s$f=f)z"See Repository.make_working_trees.sRepository.make_working_treesrr�r�rk)rr1rOrXr	r�rrir�rrsrZs   r=r��#RemoteRepository.make_working_treesG	s������4�4�T�\�\�B��	>��z�z�"B�D�I�H��A�;�o�-�$�%B�%I�%I�(�%S�T�T���{�f�$�$���(�(�	>������(�(�;�;�=�=�	>�s�A$�$>B%�$B%c��URbURR5 URR5 URR	5 g)a�Re-read any data needed to synchronise with disk.

This method is intended to be called after another repository instance
(such as one used by a smart server) has inserted data into the
repository. On all repositories this will work outside of write groups.
Some repository formats (pack and newer for breezy native formats)
support refresh_data inside write groups. If called inside a write
group on a repository that does not support refreshing in a write group
IsInWriteGroupError will be raised.
N)rir�r�r�rgr{s r=r��RemoteRepository.refresh_dataS	sF��� � �,��!�!�.�.�0�� � �.�.�0�� � �-�-�/r@c�L�[5nUR5RU5R5HnUR	U5 M URU5nUR
U5nUR
U5n[R"XV[U5U5nU$)z6Convert a set of revision ids to a graph SearchResult.)
rr.r�rD�update�intersection�
differencer+�SearchResultr�)r<�
result_set�result_parentsr��
included_keys�
start_keys�exclude_keysrs        r=�revision_ids_to_search_result�.RemoteRepository.revision_ids_to_search_resultd	s�������~�~�'�6�6�z�B�I�I�K�G��!�!�'�*�L�"�/�/��?�
��*�*�=�9�
�%�0�0��<���'�'��c�*�o�z�
���
r@c��UR5 [RRX5nUR	UUUUS9sSSS5 $!,(df   g=f)z�Return the revision ids that other has that this does not.

These are returned in topological order.

revision_id: only return revision ids included by revision_id.
)�find_ghostsr�if_present_ids�limitN)r	r{r�r��search_missing_revision_ids)r<r�r6rr7r8�
inter_repos       r=r9�,RemoteRepository.search_missing_revision_idsq	sO���^�^�
�(�8�8�<�<�U�I�J��9�9�'�)�-��	:���
�
�s�1A�
Ac�8�UbUb[S5eUR5(a[R"S5eUR	U5(a^Uc[URU5(aEUb,[R"U5(dURU5 [R"S5$[RRX5nUb7[USS5(d%[R"SRU55eUR!UUUUS9$)Nz2fetch_spec and revision_id are mutually exclusive.z%May not fetch while in a write group.r�supports_fetch_specFz!fetch_spec not supported for {!r})r�r6�
fetch_specr�)r�r�r	�InternalBzrErrorrr&rAr�rr{�FetchResultr�r�r�UnsupportedOperationrsr�)r<�sourcer�r6r>r��inters       r=r��RemoteRepository.fetch�	s��
�!�k�&=� �!U�V�V��!�!�#�#��)�)�*Q�R�R�
�"�"�6�*�*��"��(�(��0�0��&�}�/D�/D�[�/Q�/Q��!�!�+�.�"�.�.�q�1�1� �/�/�3�3�F�A���!�'�%�9N�PU�*V�*V��-�-�3�:�:�5�A��
��{�{�#�#�!��	�
�	
r@c�\�UR5 URRXX45 grN)rri�
create_bundle)r<�targetr��fileobjrss     r=rF�RemoteRepository.create_bundle�	s$���������+�+�F�'�Jr@c�X�UR5 URRU5$rN)rri�fileids_altered_by_revision_ids�r<rs  r=rK�0RemoteRepository.fileids_altered_by_revision_ids�	s%�������$�$�D�D�\�R�Rr@c�X�UR5 URRX5$rN)rri�_get_versioned_file_checker)r<r9�revision_versions_caches   r=rO�,RemoteRepository._get_versioned_file_checker�	s*�������$�$�@�@��
�	
r@c#�D# �URRUR5n/n/nUH:upgnURSR	USU/55 URU5 M< URSU4SR	U55up�U	S:wa&U
R
5 [R"U	5eU
R5nSnSn
SU
;aU
[U5-
n
SU
;aMU
RSS5up�URS5nUSS	:XaUSUS
4X%[US5'Un
MkUSS:Xa[US5nO[R"U5e/nUUU"X�U54v� SR	U5n
M�![a gf=f7f)
Nr@�sRepository.iter_files_bytesr�r�c3�Z# �[R"5nURU5v� URS:Xa1[	U5nURU5v� URS:XaM1UR
5v� URUR5 g![
a M;f=f7fr�)�zlib�
decompressobj�
decompress�unused_datar�r��flushr�)�startr��unused�decompressor�datas     r=�decompress_stream�ARemoteRepository._iter_files_bytes_rpc.<locals>.decompress_stream�	s�����-�-�/�L��)�)�%�0�0��*�*�c�1����,�D�#�-�-�d�3�3��*�*�c�1��$�$�&�&��M�M�,�2�2�3��	%����s.�9B+�B�#B+�,.B+�
B(�$B+�'B(�(B+r&rsabsentrrlr�)rr1rOr�r�rhr�r	r3r�r�r�r�r�)r<�
desired_files�absentr�r��identifiersr<r@�
identifierr�r�r�r^r[�header�restrU�idx�
unused_chunkss                   r=�_iter_files_bytes_rpc�&RemoteRepository._iter_files_bytes_rpc�	s�������4�4�T�\�\�B������*7�&�G�J��L�L����7�E�5�"9�:�;����z�*�+8�.2�-V�-V�*�T�G�U�Z�Z��5F�.
�*���X�%��-�-�/��6�6�~�F�F�&�9�9�;��
	4�����v�%���d�;�/�/�F��v�%�
"�<�<��q�1�L�F��<�<��&�D��A�w�)�#�59�!�W�d�1�g�4F��3�t�A�w�<�0�1�����a��E�!��$�q�'�l���:�:�4�@�@��M��C� �!�$�]�C��
��X�X�m�,�F�+��%����s1�CF �F�(F �0B F �
F�F �F�F c#�J# �0nURX5H
up4X44v� M URHZnU(d ORUR5VVs/sHup6USUSU4PM nnnURU5Hup4X#	X44v� M M\ U(a3[	[U55nX'n[R"USUSS9egs snnf![Ra< UR5 URRU5H
up4X44v� M gf=f7f)zSee Repository.iter_file_bytes.rr&)r�r<N)rhr�r��iter_files_bytesr��iterr	�RevisionNotPresentr�rri)	r<r`rarc�bytes_iteratorr�r4�missing_identifier�missing_keys	         r=rk�!RemoteRepository.iter_files_bytes�	sD���	1��F�.2�.H�.H��/�*�
�!�0�0�/�!�7�7����HN����!�HV�_�Z�S��V�S��V�Z�0���!�3;�2K�2K�!�3�.�J��*�$�4�4�	3�
8��&*�$�v�,�%7�"�$�8���/�/� +�A���A������!�� �(�(�	1�����.2�.C�.C�.T�.T��/�*�
�!�0�0�/�	1�s=�D#�AC�C
�'A"C�	D#�
C�A
D �D#�D � D#c�8�URRU5$)z8See breezy.CachingParentsProvider.get_cached_parent_map.)r��get_cached_parent_maprLs  r=rs�&RemoteRepository.get_cached_parent_map
s���'�'�=�=�l�K�Kr@c�@�UR5RU5$)z"See breezy.Graph.get_parent_map().)r+r�rLs  r=r��RemoteRepository.get_parent_map
s���*�*�,�;�;�L�I�Ir@c��URRnURS5(aFURS5nUR	5HupEUS:XdM
[
4X4'M SU[
'U$[
U5nSU;a[S5e[
U;a'UR[
5 [
S0nU(dU$O0nURR5nUc0n[S::a.[R"XpRR5up�n
O2[R"UURRU[S9up�n
SX�U
4nUR!U5nUR"R%UR5n
UH2n['U[(5(aM[SR+U55e S	nU
S
4[-U5-nUR/UUU5nUunnUSS;a&UR=5 [0R>"U5eUSS
:Xa�[@RB"URE55nUS:Xa0$URGS5n0nUH�n[-URG55n[IU5S:�a
USSUUS'M8USRKS5(a%USSSnURRMU5 Mv[
4UUS'M� U$g![0R2a@ [5S5 UR75 UR9S5 UR;U5s$f=f)z0Helper for get_parent_map that performs the RPC.)r&rNrIz!get_parent_map(None) is not validr)�depth�manualzkey {!r} not a bytes stringsRepository.get_parent_mapsinclude-missing:zjServer is too old for fast get_parent_map, reconnecting.  (Upgrade the server to Bazaar 1.2 to avoid this)r�r�r@r�r&smissing:r�)'rOr�r�r�r�r!rr�discardr��get_cached_map�_DEFAULT_SEARCH_DEPTHr+�search_result_from_parent_mapr��%limited_search_result_from_parent_map�_serialise_search_reciperr1r��bytesrsr�rhr	r�r%�
disconnectr�r�r�r3�bz2rWr4r�r��
startswith�note_missing_key)r<�keysrM�rg�node_idr��
found_parents�parents_map�	start_set�	stop_keys�	key_count�reciper�r�r4r�rUrrr�r�r�r�r�r�r�r@s                          r=r��$RemoteRepository._get_parent_map_rpc
s3�����%�%���#�#�F�+�+��)�)�$�/�B�(*�x�x�z�#����#�#0�"2�B�K�(2�!#�B�}���I��4�y���4�<��@�A�A��D� ��L�L��'�*�B�/�M��$�$���M�$�.�.�=�=�?�����K� �A�%�09�0W�0W��5�5�B�B�1�-�Y�9�
�?�?���,�,�9�9��/�	�
.�Y�9��I�)�<���,�,�V�4�����4�4�T�\�\�B���C��c�5�)�)� �!>�!E�!E�c�!J�K�K��,���)�*�U�4�[�8��	2��@�@��t�T�R�H� ,4�(��(��!��G�+��-�-�/��6�6�~�F�F��!���%��N�N�#3�#C�#C�#E�F�E���|��	��K�K��&�E��N����$�*�*�,�'���q�6�A�:�+,�Q�R�5�N�1�Q�4�(���t���{�3�3� !�!��Q�R����0�0�A�A�%�H�1>�/?��q��t�,��"�!�)&��'�(�(�	2�

�C�
�
����
�-�-�f�5��+�+�D�1�1�	2�s�K,�,AM�?Mc��UR5 URRUR5nUR	SX!5up4USS:wa[
R"U5eUR5sSSS5 $![
Ra7 UR5 URRU5ssSSS5 $[
RaUnURH>nURU5s sSnAsSSS5 $![
Ra M<f=f UeSnAff=f!,(df   g=f)Ns&Repository.get_revision_signature_textrr�)r	rr1rOr]r	r3r4r�rri�get_signature_textrr�)r<r�r�r�r�rWr�s       r=r��#RemoteRepository.get_signature_text�
s!��
�^�^�
��?�?�8�8����F�D�
:�37�3L�3L�=�t�4�0��"�!�$��-� �>�>�~�N�N�'�7�7�9�'�
���,�,�
M��!�!�#��,�,�?�?��L�L��
��(�(�
� $� ;� ;�H��'�:�:�;�G�G��
��"�0�0�����!<�
�	��

���
�sj�&D9�B�.D9�?D6�D9�D6�!D1�1D�D1�D6�D9�D*	�&D1�)D*	�*D1�1D6�6D9�9
Ec��UR5 UR5 URRU5sSSS5 $!,(df   g=frN)r	rri�_get_inventory_xmlrs  r=r��#RemoteRepository._get_inventory_xml�
s:��
�^�^�
�
�����(�(�;�;�K�H�	�
�
���+A�
Ac�4�SSKJn UR5 URR	UR
5nUR
SX@R5upVUS:wa[R"U5eUR5nU"5nSUlSUlSUlUR%S5Hin	U	(dMU	R%S5up�U
S:Xa['U5UlM7U
S	:Xa['U5UlMO[)S
R+U
55 Mk UsSSS5 $![R[R4a5 UR5 URRXS9ssSSS5 $f=f!,(df   g=f)Nr)�ReconcileResultsRepository.reconcile)r��thoroughr�r�r8sgarbage_inventoriessinconsistent_parentszunknown reconcile key {!r})�	reconciler�r�rr1rOr]r�r	r��TokenLockingNotSupportedrrir3r4�garbage_inventories�inconsistent_parents�abortedr�r�r#rs)r<r�r�r�r�rrr6r�rr�r4rCs            r=r��RemoteRepository.reconcile�
sb��/�
�_�_�
��?�?�8�8����F�D�
W�$(�$=�$=�+�T�3C�3C�%�!���8�#��:�:�8�D�D��*�*�,�D�$�&�F�)-�F�&�*.�F�'�!�F�N��
�
�5�)���� $�
�
�4� 0�
���0�0�14�X��F�.��3�3�25�h�-�F�/��7�>�>�s�C�D�*��5�
���-�-�v�/N�/N�O�
W��!�!�#��,�,�6�6�U�6�V�V��
�
W��
�
�s0�&F	�D-�CF	�-A
F�:F	�F�F	�	
Fc��URRUR5nURSU5up#US:wa[R"U5e[UR5R55nURH+nUR[UR555 M- [U5$![R
a- UR
5 URR5s$f=f)NsRepository.all_revision_idsr�)rr1rOr]r	r�rri�all_revision_idsr3rr4�
splitlinesr�r*r�)r<r�r�r��revidsr�s      r=r��!RemoteRepository.all_revision_ids�
s������4�4�T�\�\�B��	<�/3�/H�/H�.��0�,�N��X�%��6�6�~�F�F��%�5�5�7�B�B�D�E���3�3�H��M�M�#�h�7�7�9�:�;�4��F�|����(�(�	<������(�(�9�9�;�;�	<�s�C�>D�Dc#�# �URU5nUH,nURU5n[XUR5v� M. g7f)a#Return Tree for a revision on this branch with only some files.

:param revision_ids: a sequence of revision-ids;
  a revision-id may not be None or b'null:'
:param file_ids: if not None, the result is filtered
  so that only those file-ids, their parents and their
  children are included.
N)r��filterr/r�)r<r�file_idsr�r/�filtered_invs      r=�_filtered_revision_trees�)RemoteRepository._filtered_revision_trees�
sD����+�+�L�9���C��:�:�h�/�L�'��L�<T�<T�U�U�	�s�AAc��UR5 URU5n[URU/55SsSSS5 $!,(df   g=fr�)r	rr��get_revision_deltas)r<r�rcs   r=�get_revision_delta�#RemoteRepository.get_revision_delta�
sB��
�^�^�
��!�!�+�.�A���0�0�!��5�6�q�9��
�
�s�/A
�

Ac#��# �UR5 URU5nUHn[XUR5v� M SSS5 g!,(df   g=f7frN)r	r�r-r�)r<rr�r/s    r=r��RemoteRepository.revision_trees�
sE���
�^�^�
��/�/��=�K�"��)�$�S�_�_�E�E�#��
�
�s�A �3A�	A �
A�A c��UR5 UR5 URRU5sSSS5 $!,(df   g=frN)r	rri�get_revision_reconcilers  r=r��'RemoteRepository.get_revision_reconcile�
s8��
�^�^�
������(�(�?�?��L��
�
�r�c��UR5 UR5 URRUUUS9sSSS5 $!,(df   g=f)N)r�
callback_refs�
check_repo)r	rri�check)r<rr�r�s    r=r��RemoteRepository.check�
sF��
�^�^�
������(�(�.�.�)�+�%�/���
�
�r�c�b�[RRX5nURU5$)z�Make a complete copy of the content in self into destination.

This is a destructive operation! Do not use it on existing
repositories.
)r{r�r��copy_content)r<�destinationr��	interrepos    r=r#�"RemoteRepository.copy_content_intos+��$�3�3�7�7��J�	��%�%�k�2�2r@c���SSKn[[S55 URS5nUcgUR	5nURSUSS9n[R"5nURU5 [RRU5nUR5n	U	RXR5 SSS5 SSS5 U$!,(df   N=f!,(df   U$=f)Nrz(Copying repository content as tarball...r�rzr|bz2)rH�mode)
�tarfiler$rr�r�r�r�TemporaryDirectory�
extractallryrGr�r#)
r<r�r�r��tar_filer��tar�tmpdir�
tmp_bzrdir�tmp_repos
          r=�_copy_repository_tarball�)RemoteRepository._copy_repository_tarballs���	�	
�W�?�
@�A��$�$�U�+������1�1�3���L�L��x�g�L�F�#��&�&�(�F��N�N�6�"�$�+�+�0�0��8�J�!�1�1�3�H��&�&�{�@�
)�
G���

)�(��
G�F���s%�C�%AC	�7C�	
C	�C�
C)c�N�UR5 URR$)z�Decorate the real repository for now.

In the long term a full blown network facility is needed to
avoid creating a real repository object locally.
)rrir�r{s r=r��RemoteRepository.inventories&s"��	
�����$�$�0�0�0r@c	��UcSnO3SRUVs/sHoDRS5S-PM sn5nUR5 URR	UR
5nUR
SXPR[U5RS54U5upgUR5 US:wa[R"U5eSSS5 gs snf![Ra5 UR5 URRXS9ssSSS5 $f=f!,(df   g=f)z(Compress the data within the repository.Nr@r�r�sRepository.pack)�hint�clean_obsolete_packsr�)r�r�r�rr1rOrhr��strr	r�rri�packr�r3)r<r�r�r��lr�rrr6s        r=r��RemoteRepository.pack0s#���<��D��8�8��E��1�X�X�g�.��6��E�F�D�
�_�_�
��?�?�8�8����F�D�

�$(�$M�$M�&��+�+�S�1E�-F�-M�-M�g�-V�W��%�!��
�$�$�&��8�#��:�:�8�D�D�$��
��F���,�,�
��!�!�#��,�,�1�1��2����
�
���
�s5�C �
&D1�19C%�*,D1�%=D.�"D1�-D.�.D1�1
D?c�N�UR5 URR$)zaDecorate the real repository for now.

In the long term a full blown network facility is needed.
)rrir9r{s r=r9�RemoteRepository.revisionsGs"��	
�����$�$�.�.�.r@c�T�U(aSnOSnURRUR5nURSX25nUSS:wa[R
"U5eg![Ra. UR5 URRU5 gf=f)Nr�r�s!Repository.set_make_working_treesrr�)
rr1rOrXr	r3r�rri�set_make_working_trees)r<�	new_value�
new_value_strr�rrs     r=r��'RemoteRepository.set_make_working_treesPs����#�M�$�M����4�4�T�\�\�B��		E��z�z�4�d��H���{�e�#��:�:�8�D�D�$��	�(�(�	D������!�!�8�8��C�	D�s�A%�%?B'�&B'c�N�UR5 URR$r�)rri�
signaturesr{s r=r��RemoteRepository.signaturesas"��	
�����$�$�/�/�/r@c���UR5 [RRX5nUR	5nURX$U5 SSS5 g!,(df   g=frN)r��_mod_testament�	Testament�
from_revision�
as_short_text�store_revision_signature)r<r��gpg_strategyr,�	plaintexts     r=�
sign_revision�RemoteRepository.sign_revisionksL��
�_�_�
�&�0�0�>�>�t�Q�I�!�/�/�1�I��)�)�,�;�O��
�
�s�AA�
A*c�N�UR5 URR$r�)rrirr{s r=r�RemoteRepository.textsqs"��	
�����$�$�*�*�*r@c#�# �SRU5nURRUR5nUR	SU4U5upEUSS:wa[
R"U5eUSRS5n[R"U5nUR5n[R"5n	/n
UH�nU
RU	RU55 U	RS:wdM5U
RU	R!55 UR#SRU
55v� U	Rn[R"5n	U	RU5/n
M� U
RU	R!55 SRU
5n
U
S:wa#UR#SRU
55v� gg7f)Nr�sRepository.iter_revisionsrr�r&r�r@)r�rr1rOrhr	r3r��serializer_format_registryr�r�rUrVr�rWrXrY�read_revision_from_string)r<rr�r�r�r��serializer_format�
serializerr�r\�chunksr�r[�texts              r=�_iter_revisions_rpc�$RemoteRepository._iter_revisions_rpc{s�����z�z�,�'�����4�4�T�\�\�B��+/�+T�+T�(�4�'�4�,
�(���!���%��6�6�~�F�F�*�1�-�4�4�W�=��/�3�3�4E�F�
�&�9�9�;���)�)�+���� �E��M�M�,�1�1�%�8�9��'�'�3�.��
�
�l�0�0�2�3� �:�:�3�8�8�F�;K�L�L�%�1�1��#�1�1�3��&�1�1�&�9�:��!�	�
�
�l�(�(�*�+��x�x�����3�;��6�6�s�x�x��7G�H�H��s
�C0G�6CGc#��# �UH3nU(a[U[5(aM![R"X S9e UR	5 [U5nUR
U5H.nURUR5 URU4v� M0 URHAnU(d O9URU5H updUcM
Xd4v� URU5 M" MC UH	nUS4v� M SSS5 g![Ra7 UR5 URRU5Shv�N NSf=f!,(df   g=f7f)N�r�r)r�r�r	�InvalidRevisionIdr	rr�rr�r��iter_revisionsr�rri)r<r�rev_idrr�r�r@s       r=r��RemoteRepository.iter_revisions�s.���"�F���F�E�!:�!:��.�.�6�O�O�#��^�^�
�
N��l�+���3�3�L�A�C��N�N�3�?�?�3��?�?�C�0�0�B�!%� ;� ;�H�"��&.�&=�&=�g�&F�
���?�#(�,�.�#�N�N�5�1�'G�!<�%�E� �$�-�'�%��
���,�,�
N��!�!�#��0�0�?�?��M�M�M�
N���
�sT� E$�&E$�E�A=D�-D�<	E$�AE�E
�E�
E�E�E�
E!�E$c�.�URR$rN)r�rRr{s r=�supports_rich_root�#RemoteRepository.supports_rich_root�s���|�|�*�*�*r@c�.�URR$rN)r�r�r{s r=r��RemoteRepository._serializer�s���|�|�'�'�'r@c��UR5 URU[R5nUR	X45 SSS5 g!,(df   g=frN)r��signr
�
MODE_CLEAR�add_signature_text)r<r�r�r��	signatures     r=r��)RemoteRepository.store_revision_signature�s<��
�_�_�
�$�)�)�)�S�^�^�D�I��#�#�K�;��
�
�s�2A�
Ac�V�UR(a+UR5 URRX5$URR	UR
5nUR
SX0RU4[URVs/sHoDRS5PM sn5-U5upVUR5 UR5 USS:wa[R"U5eUSSVs/sHoDRS5PM snUl	gs snfs snf)NsRepository.add_signature_textr�rr�r&)rirr�rr1rOrhr�r�r�r�r�r�r	r3r�)r<r�rr�rrrr6s       r=r��#RemoteRepository.add_signature_text�s��� � �
�����(�(�;�;�K�S�S����4�4�T�\�\�B�� �E�E�,�
�#�#�[�1���8P�8P�Q�8P�u�\�\�'�*�8P�Q�R�
S��	
���	� � �"������A�;�%���6�6�x�@�@�GO�PQ�PR�|�#T�|�e�L�L��$9�|�#T�� ��R��$Us�D!�>D&c��URRUR5nURSX!5nUSS;a[SRU55eUSS:XagURHnURU5(dM g g![R
a. UR
5 URRU5s$f=f)Ns(Repository.has_signature_for_revision_idrr�r�rkTF)rr1rOrXr	r�rri�has_signature_for_revision_idrrsr�)r<r�r�rrr�s     r=r�.RemoteRepository.has_signature_for_revision_id�s������4�4�T�\�\�B��	T��z�z�;�T��H��A�;�o�-�$�%B�%I�%I�(�%S�T�T��A�;�&� ���3�3�H��5�5�k�B�B��4����(�(�	T������(�(�F�F�{�S�S�	T�s�B�?C�Cc��UR5 URU5(d[RS4sSSS5 $UR	U5n[
RRX5nURU5upVnUR5U:wa[RS4sSSS5 $XV4sSSS5 $!,(df   g=frN)r	rr
�SIGNATURE_NOT_SIGNEDr�r�r�r��verifyr��SIGNATURE_NOT_VALID)r<r�r�rr,�statusr4�signed_plaintexts        r=�verify_revision_signature�*RemoteRepository.verify_revision_signature�s���
�^�^�
��5�5�k�B�B��/�/��5��
��/�/��<�I�&�0�0�>�>�t�Q�I�.:�.A�.A�)�.L�+�V�*��&�&�(�,<�<��.�.��4��
��=��
�
�s�(C�A)C�6C�
Cc�T�UR5 URRXS9$)N)�	_files_pb)rri�item_keys_introduced_by)r<rrs   r=r�(RemoteRepository.item_keys_introduced_by�s/�������$�$�<�<��=�
�	
r@c�X�UR5 URRU5$rN)rri�#_find_inconsistent_revision_parents)r<�revisions_iterators  r=r�4RemoteRepository._find_inconsistent_revision_parents�s*�������$�$�H�H��
�	
r@c�V�UR5 URR5$rN)rri�(_check_for_inconsistent_revision_parentsr{s r=r�9RemoteRepository._check_for_inconsistent_revision_parents�s#�������$�$�M�M�O�Or@c��UR/nUbURSU5 [R"[	X R
55$r�)r��insertr�StackedParentsProviderr r�)r<r��	providerss   r=r+�'RemoteRepository._make_parents_provider�sG���-�-�.�	������Q��&��+�+��)�%@�%@�A�
�	
r@c��SRUS5nSRUS5n[US5RS5nSRX#U45$)zrSerialise a graph search recipe.

:param recipe: A search recipe (start, stop, count).
:return: Serialised bytes.
r>r&rrlr�r�)r�r�r�)r<r�r1r��counts     r=r�)RemoteRepository._serialise_search_recipesT���Y�Y�v�a�y�)�
��I�I�f�Q�i�(�	��F�1�I��%�%�g�.���z�z�:�%�8�9�9r@c�D�UR5nSRU5$)Nr�)�get_network_structr�)r<�
search_result�partss   r=�_serialise_search_result�)RemoteRepository._serialise_search_result
s���0�0�2���z�z�%� � r@c�n�URRUR5nURSU5nUR5 USS:wa[R"U5eg![R
a7 UR
5 URRR5 gf=f)NsPackRepository.autopackrr�)rr1rOrXr	r�rri�_pack_collection�autopackr�r3rZs   r=r*�RemoteRepository.autopacks������4�4�T�\�\�B��	��z�z�"<�d�C�H�
	
�����A�;�%���6�6�x�@�@� ���(�(�	������!�!�2�2�;�;�=��	�s�A)�)AB4�3B4c�<�URRUR5nU=(d SnU=(d SnU=(d SnUb[U5OSnUR	SUUURS5[RRU5RS5URS5URS5U5up�USS:Xa[U	R5/5$[R"U5e![Ra gf=f)Nr`sRepository.revision_archiver�r�rr�)rr1rOr�r]r��osr��basenamer	r�rlr4r3)
r<r�rsr�r8r9r2r�rrr�s
          r=r6�"RemoteRepository._revision_archives������4�4�T�\�\�B����2���z�r����2��*5�*A�c�+�&�t��	�!%�!:�!:�.����
�
�g�&���� � ��&�-�-�g�6����G�$��
�
�g�&��	"��H��A�;�%����1�1�3�4�5�5��2�2�8�<�<��	�(�(�	��	�s�A3D�D�Dc��URRUR5nURS5nU=(d SnU=(d SnUR	SUUUUU5upgUSS:wa[
R"U5e[[[R"UR555$![
Ra gf=f)Nr�r@s!Repository.annotate_file_revisionrr�)
rr1rOr�r]r	r�r3�mapr�r�r�r4)r<r@�	tree_pathr<r=r�rrr6s        r=r>�(RemoteRepository._annotate_file_revision6s������4�4�T�\�\�B���$�$�W�-�	��.�S��+�2�s��
	� $� 9� 9�4����� �
!��H��A�;�%���6�6�x�@�@��5�'�/�/�'�*A�*A�*C�D�E�E��	�(�(�	��	�s�B7�7C�
C)rOr�r�r�r�r�r�rir�r�r�r�r�r�r�r�NNr'r+rNr�)NNNNNF)TNNN)NFNF)NNT)�rArBrCrDrErm�__annotations__rr{�
Repositoryr�r>rrArDr�r�r�r�r�r�r�r�r�r�rrRr�r�r�rrrrrr&rr.r5rErIrLr�rSrWr\r`r	rmr�rwr�r�r�r�rr	�LockNotHeld�
LockBrokenrrpr�r�r�r�r�r�rr�r�r�r�r�r�rrr�rrr r�r�r�r3r9r�rFrKrOrhrkrsr�r�r�r�r�r�r�r�r�r�r�r#r�r�r�r9r�r�r�rr�r�r�r�r�r�rr
rrrr+rr&r*r6r>rHrIr@r=r�r�Hs����$�#���9�9�:�:�AE��0)�#�0)�'�0)�"�/�"<�"<�=�	0)�d�.��.��>��>�C��H�&,�P�/��/��4*�$�
�M�(A�TV�2J�	@�	@��4&�3�+�E��L�
�-�
	4��B@�
%�=�%�%�&�
�
3�&
A�P�B �
!�
/,��/I�/I�/,�bT�6
A���#�#�V�%6�%6�7� �8� �D	A�=�0��C��$������,�\J�<T�H���
�& � 
�*A�.�`O��(5*�n8�7��
%�0�"� ����
�0SX�!
�FK�S�
�1-�f 1�DL�J�y"�v:�,I��>� V� :�
F�M�
�3��.�1��1�E�.�/��/�E�"�0��0�P��+��+�I�4N�.+��(��(�<�
U�&�$!�
�
�P�
�	:�!�
A�DH�=�2Fr@r�c�2�\rSrSrSrSrSrSrSrSr	g)	riKc���URR5 URRR5nUR	XU5nU(dURR5 U$rN)�target_reporrirr�r*)r<r�r��
resume_tokens�sinkrs      r=�_insert_real�RemoteStreamSink._insert_realLsZ�����%�%�'����0�0�:�:�<���#�#�F�
�F������%�%�'��
r@c�@�[U[5(aTURRRUR
RR:XaUR
U5nOURU5nURX0R
R5$rN)
r�r�from_repositoryrOr�r;�!_get_real_stream_for_missing_keys�get_stream_for_missing_keys�insert_stream_without_lockingr�)r<rBr�r�s    r=�insert_missing_keys�$RemoteStreamSink.insert_missing_keysTs~���v�1�2�2��&�&�.�.�6�6����'�'�/�/�0�
�=�=�l�K�F��7�7��E�F��1�1�&�:J�:J�:R�:R�S�Sr@c���URnURRR5 S/nUR(a(URS5 UR=(d S4nOURS5 SnURnURnURRU5n	Sn
UHZup�URU5(aMU(aSn
 O6[R"/U5n
UR"X�S4U-U
5nSn
 O U
(dUR#XU5$SUlSUlWS:aUR)U5n[R"X5n
S	R+UVs/sHo�R-S
5PM sn5nUR"WX�4U-U
5nUSSS;a[R."U5eUR&b+URR15 UR3X�5$USSS
:Xam[4R6"USS5unnUVs/sHo�R9S
5PM nnUUVs1sHnUSR9S
54USS-iM  sn4$URR15 /[;54$![Ra UR!U5 GMf=fs snfs snfs snf)N)sRepository.insert_stream_1.19�r&�)sRepository.insert_stream_locked�r&�r@)sRepository.insert_streamr�rIFTrHr>r�r)r��
missing-basisrLr&)r;r�r�r�r�r�rOr�rr1r�r��_stream_to_byte_stream�call_with_body_streamr	r�r�r>�_last_inv_record�_last_substream�_stop_stream_if_inventory_deltar�r�r3r��_resume_stream_with_vfsr��bdecode_as_tupler�r)r<r�r�r<rGr��	lock_argsr1rMr��
found_verbr�r�r�rrrr�r��entrys                   r=r��RemoteStreamSink.insert_streamas����!�!���"�"�/�/�5�5�7�F�G������"�"�#P�Q��+�+�2�s�4�I��"�"�#I�J��I���������� � �6�6�v�>��
�
�&5�"�D��'�'�(8�9�9���"�
��$�;�;�B�
�K�K�
�!�7�7���%�	�1�;���"�
��#'6�$��$�$�V��G�G� $���#����g�%�
�9�9�&�A�F� �7�7��K���	�	�m�"T�m�U�<�<��#8�m�"T�U�
��/�/�
�4�'�)�3�[�
���A�;�q�>�!:�:��6�6�x�@�@����+�
���)�)�+��/�/��E�E��A�;�q�>�-�-�#*�#;�#;�H�Q�K��N�#K� �F�L�@F�G��u�\�\�'�2��M�G� �EQ�#�EQ�E��q�����)�+�e�A�B�i�7�\�#��
�
���)�)�+��s�u�9���K�,�,�
D��1�1�2B�C�C�
D��"#U��H��#s$�7J*�8K�:K�%K!�*%K�Kc��^^�USSS:Xa?[R"USS5up4UVs/sHoURS5PM nnO/nU4SjmUU4SjnTRU"5X#5$s snf)z{Resume sending a stream via VFS, first resending the record and
substream that couldn't be sent via an insert_stream verb.
rrLr&r�c3�H># �TRShv�N STlgN7frN)rPr{s�r=�resume_substream�BRemoteStreamSink._resume_stream_with_vfs.<locals>.resume_substream�s"�����+�+�+�+�#'�D� �
,�s�"� �
"c3�P># �ST"54v� TRShv�N gN7f)Nr�)�_last_stream)rZr<s��r=�
resume_stream�?RemoteStreamSink._resume_stream_with_vfs.<locals>.resume_stream�s$����%�'7�'9�:�:��(�(�(�(�s�&�$�&)r�rSr�r>)r<rrr�r�r�rr^rZs`      @r=rR�(RemoteStreamSink._resume_stream_with_vfs�s|����A�;�q�>�-�-�#*�#;�#;�H�Q�K��N�#K� �F�9?�@���l�l�7�+��F�@�F��F�	(�
	)�� � ���*�E�E��!As�A4c#�j# �[U5nUHup4US:XaX@lX l gX44v� M  g7f)a+Normally this just lets the original stream pass-through unchanged.

However if any 'inventory-deltas' substream occurs it will stop
streaming, and store the interrupted substream and stream in
self._last_substream and self._last_stream so that the stream can be
resumed by _resume_stream_with_vfs.
r�N)rlrPr])r<r��stream_iterr�r�s     r=rQ�0RemoteStreamSink._stop_stream_if_inventory_delta�s>����6�l��)4�%�N��!3�3�'0�$�$/�!��$�/�/�
*5�s�13)rOr]rPN)
rArBrCrDr>rEr�rRrQrHrIr@r=rrKs���T�D�LF�00r@rc�B�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rg)ri�z!Stream data from a remote server.c���URR(a6URRS:XaUR	URU5$/n[5nUR/nU(a^UR
S5nXS;aMURU5 URUR5 URU5 U(aM^URX5$)N�topologicalr)rAr�rr{�_real_streamrrr�extendr��missing_parents_chain)r<�search�sources�seen�reposr�s      r=�
get_stream�RemoteStreamSource.get_stream�s���� � �7�7����+�+�}�<��$�$�T�%9�%9�6�B�B����u���%�%�&����9�9�Q�<�D��|���H�H�T�N��L�L��4�4�5��N�N�4� �
�e��)�)�&�:�:r@c��URR5 URRnURUR5nURU5$rN)rArrirrrC)r<r�r��real_sources    r=rB�4RemoteStreamSource._get_real_stream_for_missing_keys�sJ�����)�)�+��(�(�9�9�	��+�+�D�N�N�;���6�6�|�D�Dr@c	�F�[UR[5(dURU5$URRnUR
nUR
S5(aURU5$URRRU5nX@RR54nSRUVs/sHnSUSRS5US4-PM! sn5nURRSXW5up�USS:wa[R""U5eU	R%5n
[&R("X�R*5up�UR5URR,R5:waE[/S	R1UR5[2R,R555eU$s snf![R[R 4a URU5s$f=f)
N)rlrr�s%s	%srr�r&s&Repository.get_stream_for_missing_keysr�r�)r�rAr�rBrOr�r�rr1rr�r�r�rhr	r�rzr3r�r�r��_record_counterr�r�rsr�)
r<r�r1rMr�rUr4�search_bytesrrr6r�r�r�s
             r=rC�.RemoteStreamSource.get_stream_for_missing_keys�s����$�.�.�0@�A�A��9�9�,�G�G��%�%�-�-�������#�#�F�+�+��9�9�,�G�G��#�#�.�.�D�D�V�L���n�n�1�1�3�4���z�z�EQ�R�\�c�Y�#�a�&�-�-��0�#�a�&�9�
9�\�R�
��	H��$�$�I�I�=�t��
�H��A�;�%���6�6�x�@�@��0�0�2��'�>�>��-�-�
��
��"�"�$��(<�(<�(D�(D�(Q�(Q�(S�S� �G�N�N��+�+�-�t�|�|�/H�/H�/J���
�
�
��-
S���)�)�6�+D�+D�E�	H��9�9�,�G�G�	H�s�	&G#�7G(�(5H �H c���URUR5n[U[5(a5UR	5 UR
RUR5nUR
U5$)a2Get a stream for search from repo.

This never called RemoteStreamSource.get_stream, and is a helper
for RemoteStreamSource._get_stream to allow getting a stream
reliably whether fallback back because of old servers or trying
to stream from a non-RemoteRepository (which the stacked support
code will do).
)rrr�rrrirn)r<r�rjrBs    r=rg�RemoteStreamSource._real_stream
s]���!�!�$�.�.�1���f�0�1�1������*�*�6�6�t�~�~�F�F�� � ��(�(r@c�b�[U[5(dURX5$URnURnUR
R
U5nURU5nXPRR54nSS/nSn	UH6up�URU5(aMURX�U5nUup�Sn	 O U	(dURX5$W
SS	:wa[R("U
5eWR+5n[,R."UUR05unnUR5UR2R5:waA[5S
R7UR5UR2R555eU$![Ra URU5 GM=[aZn[U[ R"5(a5UR$R&nUS:XaURS5 SnA GM`eSnAff=f)aCore worker to get a stream from repo for search.

This is used by both get_stream and the stacking support logic. It
deliberately gets a stream for repo which does not need to be
self.from_repository. In the event that repo is not Remote, or
cannot do a smart stream, a fallback is made to the generic
repository._get_stream() interface, via self._real_stream.

In the event of stacking, streams from _get_stream will not
contain all the data for search - this is normal (see get_stream).

:param repo: A repository.
:param search: A search.
)sRepository.get_stream_1.19rH)sRepository.get_streamr�FTs	BadSearch�r�Nrr�r�)r�r�rgrOr�rr1r&rr�r�rhr	r�r�r6r+�EverythingResultr:�
error_verbr3r�r�r�rtr�r�rs)r<r�rjr1rMr�rurU�candidate_verbsrUr��versionrrr�r�rr}r�r�r�s                    r=�_get_stream�RemoteStreamSource._get_stream
s�� �$� 0�1�1��$�$�T�2�2������������4�4�V�<���4�4�V�<���n�n�1�1�3�4��4�/�
��
�
�,�M�D��'�'��0�0��
��D�D�����"4<�0��!�
��/-�0��$�$�T�2�2��!���%��6�6�~�F�F�&�9�9�;��'�>�>���-�-�
��
�F��"�"�$����(A�(A�(C�C� �G�N�N��+�+�-�t�|�|�/H�/H�/J���
�
�
��?�,�,�
;��1�1�'�:�:�.�

��f�i�&@�&@�A�A�!"�!:�!:�!E�!E�J�!�\�1�
�9�9�&�A����

�s%�,F"�"%H.�	H.�AH)�(H)�)H.c#�# �URRRUl[	5Ul[	5UlUR5(d�[U5S:�a�URS5nURX15nUH&upVUS:waXV4v� MXPRU54v� M( URUR
UR5n[	5Ul[	5UlUR5(d[U5S:�aM�UR5(d$URUSU5H
upTXT4v� M gg7f)z�Chain multiple streams together to handle stacking.

:param search: The overall search to satisfy with streams.
:param sources: A list of Repository objects to query.
r&rr9N)
rAr�r��from_serialiserr�	seen_revs�referenced_revs�is_emptyr�rr��missing_parents_rev_handler�refine)r<rjrkrBr�ryr�s       r=ri�(RemoteStreamSource.missing_parents_chainb
s��� $�3�3�;�;�G�G�������"�u����/�/�#�#��G��q�(8��[�[��^�F��%�%�f�5�F�#)����;�&��/�)�� @� @�� K�K�K�	$*�
�]�]�4�>�>�4�3G�3G�H�F� �U�D�N�#&�5�D� ��/�/�#�#��G��q�(8���� � � $� 0� 0����V� D����l�"�!E�!�s�DE�":Ec#�# �UH�nURS5nURRU5nURR	UR
S5 URRUR5 Uv� M� g7f)N�fulltext���)	r�r�r�r�rr4r�r*r�)r<r�r:�revision_bytesrs     r=r��.RemoteStreamSource.missing_parents_rev_handler|
sn��� �G�$�1�1�*�=�N��+�+�E�E�n�U�H��N�N���w�{�{�2��/�� � �'�'��(;�(;�<��M�!�s�BB
)r�r�r�N)
rArBrCrDrErnrBrCrgr�rir�rHrIr@r=rr�s,��+�;�$E� �D
)�C�J#�4r@rc�$�\rSrSrSrSrSrSrg)�RemoteBranchLockableFilesi�
zfA 'LockableFiles' implementation that talks to a smart server.

This is not a public interface class.
c��XlX lSUl[R"XRS5S[R5 g)NTr)rrO�_need_find_modesrr>rr
�LockDir)r<r(rOs   r=r>�"RemoteBranchLockableFiles.__init__�
s8�� ���� $�������-�-�d�3�V�W�_�_�	
r@c� �SUlSUlgrN)�	_dir_mode�
_file_moder{s r=�_find_modes�%RemoteBranchLockableFiles._find_modes�
s�������r@)rOr�r�r�rN)rArBrCrDrEr>r�rHrIr@r=r�r��
s���

�r@r�c�^�\rSrSrSU4SjjrSrSrSrSrSSjr	SSjr
SS	jrS
rSr
SrS
r\S5rSrSrSrU=r$)ri�
c�>�[TU]5 [5UlURR	U5 SUlXlgrN)rr>rvr�r�rrq)r<r�r�s  �r=r>�RemoteBranchFormat.__init__�
s;���
����#5�#7�� �� � �2�2�4�8�"���)�r@c�b�[U[5=(a URUR:H$rN)r�r�__dict__r�s  r=r��RemoteBranchFormat.__eq__�
s"���%�!3�4�X����%�.�.�9X�Xr@c���URc0[RRUR5Ulgg![
a%n[R"SURS9UeSnAff=f)Nrrx)rrr�r�rqr�r	rzrws  r=r�RemoteBranchFormat._ensure_real�
sm�����&�
�&,�&D�&D�&H�&H��&�&�'��#�'��
�
��/�/�!�$�*<�*<�����
�ryc�\�UR5 SURR5-$r�r�r{s r=r��)RemoteBranchFormat.get_format_description�
r�r@c��UR$rNrr{s r=r��RemoteBranchFormat.network_name�
s���!�!�!r@c� �URX#S9$)N)r�r�r�)r<rjr�r�s    r=r��RemoteBranchFormat.open�
s���'�'�T�'�U�Ur@c�Z�[U[5(a7UR5 URR	UR
UUUS9nOURR	UUUUS9n[U[5(a-[U[5(d[
XR5XRS9nU$)N�r�r�rr�)r�r�rrr�rHr�r�)r<rjr�r�rrs      r=rl�"RemoteBranchFormat._vfs_initialize�
s����l�L�1�1��%�%�'��(�(�3�3��)�)��&;�%�	4��F��(�(�3�3���&;�%�	4��F��l�L�1�1�*��L�;
�;
�"��:�:�<�f��F��
r@c��UcUR5nUR(aURR5nOJ[RRS5"5nUR
5nXplUR5n[U[5(dURUUUUS9$URRnURS5(aURUUUUS9$URUR5n	US:wa[R"U5eSn
URX�U5nUSS:wa[ R&"U5e[)USS	9n[+US
S5n
USR-S5nUb{[.R0"UR2U5n[.R4"UR2U5nUS
:wa0[7SR9UR2UR2U55eUnOOUS:XaUnO:[UR:R=U5UR>UR5n[AUU
5n[CUUUSUS9nU(aUREU5 S[F4Ul$U$![ R"a& UR%S5 URUUUUS9s$f=f)Nror�r�r`sBzrDir.create_branchrr�r&r�rlrr��.zNrepository.user_url {!r} does not match URL from server response ({!r} + {!r})F)rsr�r�)%r�rr�rr0r�r�r�r�rlrOr�r�r1r�rXr	r�r�r3rrtr�rr�r,�relative_urlr�rsr@r�r�r�r��set_append_revisions_onlyr!�_last_revision_info_cache)r<rjr�rr�r�rprqrMr�r�rrrsr�r��remote_repo_url�url_diffr��repo_bzrdir�
remote_branchs                    r=r��RemoteBranchFormat.initialize�
s����<��4�4�6�D�����.�.�;�;�=�L�'1�&@�&@�&D�&D�Y�&O�&Q�#�6�H�H�J��"2��+�8�8�:�L��,��5�5��'�'���&;�%�	(��
��%�%�-�-���#�#�G�,�,��'�'���&;�%�	(��
��1�1�,�2F�2F�G���2�:��5�5�d�;�;�&��
	�#�)�)�$�l�C�H��A�;�%���6�6�x�@�@�#��!��=��3�H�Q�R�L�A���Q�K�&�&�w�/�	��!�&�m�m�L�,A�,A�9�M�O��,�,�Z�-@�-@�/�R�H��3��$�-�-3�V�"�+�+�\�-B�-B�I�.���%�K��B��*��*� �/�/�5�5�i�@� �(�(� �(�(���
+�;��D�K�$��+�f�U�QU�
�
�!��3�3�4I�J�34�]�2B�
�/����[�(�(�	��-�-�g�6��'�'���&;�%�	(��
�	�s�)J	�	7K�Kc�X�UR5 URRU5$rN)rr�	make_tagsr_s  r=r��RemoteBranchFormat.make_tags.s%�������"�"�,�,�V�4�4r@c�V�UR5 URR5$rN)rr�
supports_tagsr{s r=r�� RemoteBranchFormat.supports_tags2s%��	
�����"�"�0�0�2�2r@c�V�UR5 URR5$rN)rr�supports_stackingr{s r=r��$RemoteBranchFormat.supports_stacking8s#�������"�"�4�4�6�6r@c�V�UR5 URR5$rN)rr�"supports_set_append_revisions_onlyr{s r=r��5RemoteBranchFormat.supports_set_append_revisions_only<s#�������"�"�E�E�G�Gr@c�N�UR5 URR$rN)rr�supports_reference_locationsr{s r=r��/RemoteBranchFormat.supports_reference_locations@s �������"�"�?�?�?r@c��grurIr{s r=�stores_revno�RemoteBranchFormat.stores_revnoEs��r@c��UR5 [UR[R5(aDURR5nURnU[RRLagg)NTF)	rr�r�	bzrbranch�BranchFormatMetadir�
_branch_class�heads_to_fetchr�Branch)r<�branch_class�heads_to_fetch_impls   r=�!_use_default_local_heads_to_fetch�4RemoteBranchFormat._use_default_local_heads_to_fetchHsa��	
�����d�)�)�9�+H�+H�I�I��.�.�<�<�>�L�".�"=�"=��"�f�m�m�&B�&B�B��r@)rr�rqrNr�r()rArBrCrDr>r�rr�r�r�rlr�r�r�r�r�rr�r�r�rHr<r=s@r=rr�
sy���*�Y�	�I�"�V�EI��@OS�T�l5�3�7�H��@��@���r@rc�D^�\rSrSrSrU4SjrSrSrSrSr	Sr
U=r$)	�RemoteBranchStoreiWzzBranch store which attempts to use HPSS calls to retrieve branch store.

Note that this is specific to bzr-based formats.
c�J>�[TU]5 XlSUlSUlg�Nr)rr>r�idr)r<rr�s  �r=r>�RemoteBranchStore.__init__]s"���
�����������r@c�X�[R"URRS5$)Nzbranch.confr+r{s r=r-�RemoteBranchStore.external_urlcs���}�}�T�[�[�1�1�=�A�Ar@c�z�URR5nURRSU5up#[U5(aUSS:wa[R"U5eUR5$![Ra- UR5 URR5s$f=f)N�Branch.get_config_filerr�)r�_remote_pathr]r	r�rrr2r�r3r4r5s    r=r2�RemoteBranchStore._load_contentfs����{�{�'�'�)��	4� $��� @� @�)�4�!��H��x�=�=�X�a�[�E�1��6�6�x�@�@��&�&�(�(���(�(�	4������#�#�1�1�3�3�	4�s�A9�9>B:�9B:c��URR5nURRSX RRURR4U5up4UR5 US:wa[
R"U5eg![
Ra. UR5 URRU5s$f=f)NsBranch.put_config_filer�)rr�rhr��_repo_lock_tokenr	r�rrr9r�r3)r<r:r�rrr6s     r=r9�RemoteBranchStore._save_contentss����{�{�'�'�)��	;� $��� P� P�)��{�{�.�.����0L�0L�M��!��H�	� � �"��x���6�6�x�@�@� ��	�(�(�	;������#�#�1�1�'�:�:�	;�s�A	B�?C�Cc��URR5 URc&[R"UR5UlggrN)rrrr'�BranchStorer{s r=r�RemoteBranchStore._ensure_real�s:����� � �"����#�*�6�6�t�{�{�C�D��$r@)rrr�)rArBrCrDrEr>r-r2r9rrHr<r=s@r=r�r�Ws*����
 �B�)�
A�D�Dr@r�c��^�\rSrSr%Sr\S\S'\\S'\\S'\	S\
R4Sj5rSKS	\
S
\S\SS\S
\\S\\\
R4SjjrSrSrSrSrSrS\
R4Sjr\	"\5rSr\rSrSrU4SjrU4Sjr\	S5rSr Sr!SLSjr"Sr#S r$S!r%S"r&S#r'S$r(S%r)S&r*S'r+SMS(jr,S)r-\."\/R`\/Rb5S*5r2S+r3S,r4S-r5SMS.jr6S/r7S0r8S1r9SNS2jr:S3r;S4r<S5r=S6r>S7r?SOS8jr@SPS9jrAS:rBS;rCS<rDS=rES>rFSQS?jrGS@rHSArISBrJSCrKSRSDjrLSErMSMSFjrNSGrOSHrPSMSIjrQSJrRU=rS$)Sr�i�zzBranch stored on a server accessed by HPSS RPC.

At the moment most operations are mapped down to simple file operations.
zbzrbranch.BzrBranch�_real_branchr�r�returnc��UR$rN)�
_transportr{s r=rD�RemoteBranch.control_transport�s�����r@r��remote_repositoryr�r�r�r�c	��XlXplUbX@lOURUlX lUbpX0lURn	[U	[5(aU	R5 U	Rn	URRU	5 URUlOSUlUR5 URRUlXpl
SUlSUlSUlSUlSUlSUlSUlUcP[+5UlURb3URR,R/5UR,lOXPlU(+UlUR,R0(dZUR5 UR(d[4eURR,R/5UR,lUR,R7U5Ul[:R<R>Sn
U
HnU"U5 M
 SUl U(aURCU5 gg)aCreate a RemoteBranch instance.

:param real_branch: An optional local implementation of the branch
    format, usually accessing the data via the VFS.
:param _client: Private parameter for testing.
:param format: A RemoteBranchFormat object, None to create one
    automatically. If supplied it should have a network_name already
    supplied.
:param setup_stacking: If True make an RPC call to determine the
    stacked (or not) status of the branch. If False assume the branch
    is not stacked.
:param name: Colocated branch name
NrFr�)"rr�rOrr�r�r�rrir��_clear_cached_stater,r��_name�_control_filesr�r�r�r�r��
conf_storerr�r�rq�_real_ignore_fallbacksr�r��tagsrr��hooks�_is_stacked�_setup_stacking)r<r�r�r�rOrsr�r�r�r�r��hooks            r=r>�RemoteBranch.__init__�s���6(���	���"�L�(�0�0�D�L�+���"� +��4?�4J�4J�I��)�%5�6�6��&�&�(�%�6�6�	��O�O�0�0��;�%)�_�_�K�"� $�D��� � �"��O�O�,�,��	��
�"��������� $������ �������>�-�/�D�L�� � �,�-1�->�->�-F�-F�-S�-S�-U����*��!�L�+9�&8��#��|�|�)�)������$�$�$�$�)-�):�):�)B�)B�)O�)O�)Q�D�L�L�&��L�L�*�*�4�0��	��
�
�#�#�F�+���D���J�� ����� � �!4�5�r@c�0�UR5nSUlUc/nO[U5nURURR5 URX!S9 g![R[R[R
4a gf=f)NT�r�)�get_stacked_on_urlr	�
NotStackedr�UnstackableBranchFormatr�r�r�r�rr@�_activate_fallback_location)r<r��fallback_urls   r=r��RemoteBranch._setup_stacking�s���	��2�2�4�L� ����&�"$��"&�':�";���"�"�4�?�?�#A�#A�B��(�(��	)�	
��
����*�*��.�.�
�	�

�	�s�A�3B�Bc��[U5$rN)�RemoteBranchConfigr{s r=r!�RemoteBranch._get_configr#r@c�T�URc[U5UlUR$rN)r�r�r{s r=r%�RemoteBranch._get_config_stores"���?�?�"�/��5�D�O����r@c�~�UR5 URc[eURRU5$rN)rr�r��store_uncommitted)r<�creators  r=r�RemoteBranch.store_uncommitteds7���������$� � �� � �2�2�7�;�;r@c�~�UR5 URc[eURRU5$rN)rr�r��
get_unshelver)r<�trees  r=r�RemoteBranch.get_unshelvers7���������$� � �� � �.�.�t�4�4r@c�t�UR5 URc[eURR$rN)rr�r�r�r{s r=�_get_real_transport� RemoteBranch._get_real_transports2���������$� � �� � �+�+�+r@c�b�SRURRUR5$r�r�r{s r=r��RemoteBranch.__str__r�r@c�6�URGc�[R"5(d[S5eURR5 URRRURURS9UlURURl
URRcbURRn[U[5(aUR5 URnURRU5 URURlUR S:XaURR#5 gUR S:Xa$URR%UR&S9 ggg)zREnsure that there is a _real_branch set.

Used before calls to self._real_branch.
Nz:smart server vfs must be enabled to use vfs implementation)r�r�rcrZrp)r�r2�vfs_enabledr�rrrHr�r�r�r�rrir�r�r�r�r	r�r�)r<r�s  r=r�RemoteBranch._ensure_real"sB��
���$��?�?�$�$�$�P���
�O�O�(�(�*� $��� <� <� H� H�!%�!<�!<�4�:�:�!I�!�D��,0�?�?�D���(����/�/�7� �-�-�8�8�	��i�)9�:�:��*�*�,� )� :� :�I����4�4�Y�?�,0�?�?�D���(����#�%��!�!�+�+�-����C�'��!�!�,�,�4�3C�3C�,�D�(�3%r@c�B�URR"U4SU0UD6 gr�)rrRrls   r=rR�RemoteBranch._translate_errorCs�����(�(��E�T�E�W�Er@c�>�[TU]5 SUlURbURR5 ggrN)rr��_tags_bytesr�r$s �r=r�� RemoteBranch._clear_cached_stateFs9���
��#�%�������(����1�1�3�)r@c�">�[TU]5 g)a�Like _clear_cached_state, but doesn't clear the cache of
self._real_branch.

This is useful when falling back to calling a method of
self._real_branch that changes state.  In that case the underlying
branch changes, so we need to invalidate this RemoteBranch's cache of
it.  However, there's no need to invalidate the _real_branch's cache
too, in fact doing so might harm performance.
N)rr�r$s �r=�)_clear_cached_state_of_remote_branch_only�6RemoteBranch._clear_cached_state_of_remote_branch_onlyLs���	��#�%r@c�~�URc%[URUR5UlUR$rN)r�r�rrOr{s r=�
control_files�RemoteBranch.control_filesXs8�����&�";�������#�D���"�"�"r@c�.�URRSUR55nUSS;a[R"U5eUSS:H$![Ra- UR5 URR5s$f=f)z&See Branch.get_physical_lock_status().sBranch.get_physical_lock_statusrr�rk)	rOrPr�r	r�rr�rLr3�r<rrs  r=rL�%RemoteBranch.get_physical_lock_statusbs���	@��|�|�(�(�2�D�4E�4E�4G��H��A�;�o�-��6�6�x�@�@���{�f�$�$���(�(�	@������$�$�=�=�?�?�	@�s�*A�>B�Bc��URRSUR55nWSS:wa[R"U5eUSRS5$![Ran[X S9 SnANUSnAf[Ra- UR5 URR5s$f=f)aGet the URL this branch is stacked against.

:raises NotStacked: If the branch is not stacked.
:raises UnstackableBranchFormat: If the branch does not support
    stacking.
:raises UnstackableRepositoryFormat: If the repository does not support
    stacking.
sBranch.get_stacked_on_urlr'Nrr�r&r�)rOrPr�r	rQrRr�rr�r�r3r�)r<rrrWs   r=r��RemoteBranch.get_stacked_on_urlos���	:��|�|�(�(�,�d�.?�.?�.A��H��A�;�%���6�6�x�@�@���{�!�!�'�*�*���*�*�	/�
�S�.���(�(�	:������$�$�7�7�9�9�	:�s�*A�C�3	B�AC�Cc���URRR(d?[R"URRURR
5egrN)rr�rXr	r�r,r{s r=�_check_stackable_repo�"RemoteBranch._check_stackable_repo�sG�����&�&�@�@��4�4����'�'����)A�)A��
�Ar@c
��[RR5 URn[	UR
5S:wa$[
SRXR
55e[RRURRR5nUR5nUR
(a$[
SRUR55eUR5RnX0lUR bX0R lURRUS9 UbUR#5 UR%5 UbURR'5 SnUR%5 US-
nM![(R*a Of=fUS:Xa[
S5e[-US-
5HnURR5 M UR/5 [1UR2R555nO$![(R6a
 [15nOf=f[8R:"URUUR=5/USS	9R?5nURRAXS
9 SSS5 O!,(df   O=fSSS5 g!,(df   g=f)zrChange a branch to be unstacked, copying data as needed.

Don't call this directly, use set_stacked_on_url(None).
r&z?can't cope with fallback repositories of {!r} (fallbacks: {!r})z0didn't expect {!r} to have fallback_repositoriesNrprTz5old_repository should have been locked at least once.)�required_idsr7r6)r>)!r�
ui_factory�nested_progress_barrr�r�r�rsr�
ControlDirr�r@r�r�r��repository_tokenr�rwrr�r	r7�ranger	rr��get_reverse_tag_dict�TagsNotSupportedr+�NotInOtherForRevs�
last_revision�executer�)	r<�old_repository�
new_bzrdir�new_repository�
lock_token�old_lock_count�_i�
tags_to_fetchr>s	         r=�_unstack�RemoteBranch._unstack�sm��
�]�]�
.�
.�
0�"�_�_�N��>�8�8�9�Q�>�$�0�06��&�(M�(M�1���$�.�.�3�3�D�O�O�4R�4R�4W�4W�X�J�'�7�7�9�N��4�4�$�F�M�M�������(�2�2�4�E�E�J�,�O�� � �,�/=�!�!�,��O�O�&�&�Z�&�8��%��2�2�4��!�!�#��%����8�8�:��N���"�)�)�+��!�#�����)�)�������"�$�K����N�Q�.�/�����*�*�,�0� �)�)�+�*�$'��	�	�(F�(F�(H�$I�M���.�.�*�$'�E�M�*��&�8�8��O�O�"�"&�"4�"4�"6�!7�#0� $���'�)�
����%�%�n�%�L�,�+�+��C1�
0�
0�sn�E%K�F�K�F3�0K�2F3�3AK�J1�#H,�+J1�,I
�
J1�I
�
AJ1�(	K�1
J?	�;K�
Kc��URR5(d [URUR5eUR	5 UR5 U(d"UR
5 UR5 O$URXRR/S9 URSU5 SSS5 URR!5 U(dSUlgSUlg![R[[R4a SSS5 gf=f!,(df   Nv=f)Nr��stacked_on_locationFT)r�r�r�r,r�r$r�r	r�r�r9r�rr@�_set_config_locationr��save_changesr��r<�urls  r=�set_stacked_on_url�RemoteBranch.set_stacked_on_url�s����|�|�-�-�/�/�)�$�,�,��
�
�F�F�
�_�_�
�
�&�&�(����+�+�-��
�
���0�0��o�o�.L�.L�-M�1��

�%�%�&;�S�A�+�8	
���$�$�&��$�D��#�D���/�%�%�+��6�6���
��
����
�s1�D0�)C9�9AD0�9)D-�"D0�,D-�-D0�0
D>c�V�UR5 URR5$rN)rr��_get_tags_bytesr{s r=�_vfs_get_tags_bytes� RemoteBranch._vfs_get_tags_bytess#������� � �0�0�2�2r@c��UR5 URcUR5UlURsSSS5 $!,(df   g=frN)r	r�_get_tags_bytes_via_hpssr{s r=rD�RemoteBranch._get_tags_bytess>��
�^�^�
����'�#'�#@�#@�#B�� ��#�#��
�
���.A	�	
Ac�<�URRnURS5(aUR5$UR	SUR55nUS$![Ra$ URS5 UR5s$f=f)Nr�sBranch.get_tags_bytesr)	rOr�r�rErXr�r	r�r�)r<rMrrs   r=rH�%RemoteBranch._get_tags_bytes_via_hpsss������%�%���#�#�G�,�,��+�+�-�-�	.��z�z�":�D�<M�<M�<O�P�H���{����(�(�	.��-�-�g�6��+�+�-�-�	.�s� A#�#5B�Bc�X�UR5 URRU5$rN)rr��_set_tags_bytes)r<r�s  r=�_vfs_set_tags_bytes� RemoteBranch._vfs_set_tags_bytes s%������� � �0�0��7�7r@c��UR5(aXlURRnUR	S5(aURU5 gUR
5URUR4nURSX15 g![Ra% URS5 URU5 gf=f)N)r&�sBranch.set_tags_bytes)
rSrrOr�r�rOr�r�r�rcr	r�r�)r<r�rMrUs    r=rN�RemoteBranch._set_tags_bytes$s����>�>���$�����%�%���#�#�G�,�,��$�$�U�+��	,��%�%�'��)9�)9�4�;P�;P�Q�D��&�&�'?��M���(�(�	,��-�-�g�6��$�$�U�+�	,�s�9B�6C�
Cc�P�URR5 UR(dGURS5 SUlSUlUR
bUR
R5 OU=RS-
sl[R"UR5$)zPLock the branch for read operations.

:return: A breezy.lock.LogicalLockResult.
rcr&)	rr	r�rfr�r�rrhrr{s r=r	�RemoteBranch.lock_read2s{��
	
���!�!�#�����O�O�C� �!�D�O� �D��� � �,��!�!�+�+�-������!���%�%�d�k�k�2�2r@c��UcS=p#O@UnURR5RnURR5 SU0nUR"SUR5UU=(d S40UD6nUSS:wa[R"U5eUuprnX#4$![RaCn[R"SURRRS5S5UeSnAff=f)Nr@rsBranch.lock_write�
(remote lock)z.bzr/rr�)rr�r+rrXr�r	�LockContentionr�r�r3)r<r�branch_token�
repo_tokenrVrrrrls        r=rm�RemoteBranch._remote_lock_writeBs���=�(+�+�L�:� �L����3�3�5�F�F�J��O�O�"�"�$���&��	��z�z�$��!�!�#���!�c�	�
��H��A�;�%���6�6�x�@�@�'/�$��*��'�'���$�$�	��'�'�����!5�!5�!;�!;�G�!D�Q�!G���
��		�s�
-B!�!C8�5>C3�3C8c��UR(d�URS5 URU5nUuUlUlUR(d[S5eURRURSS9 URb#URRURS9 UbSUl	OSUl	SUlSUl
O�URS:Xa[R"U5eUb/XR:wa [R"XR5eU=RS-
sl
URRUR5 [URUR=(d S5$)	NrZz%Remote server did not return a token!Tr�rpFr&rc)r�rfrmr�r�rrr�r�r�r�r	rrrqrr)r<r�
remote_tokenss   r=r��RemoteBranch.lock_write^sB������O�O�C� � �3�3�E�:�M�6C�3�D��d�3��#�#�(�)P�Q�Q��O�O�&�&�t�'<�'<��&�M�� � �,��!�!�,�,�4�3C�3C�,�D�� �#'�� �#(�� �!�D�O� �D��
�_�_��
#��&�&�t�,�,�� ��,�,�,� �.�.�u�6F�6F�G�G�����!���O�O�&�&�t�'<�'<�=�$�T�[�[�$�2B�2B�2J�d�K�Kr@c��S[X450nUR"SUR5UU=(d S40UD6nUS:Xag[R"U5e)Nrs
Branch.unlockr@r�)r�rXr�r	r3)r<rYrZrVrrs     r=r��RemoteBranch._unlocksd����\�$>� ?�@���:�:���������#�	
�
�
���x����2�2�8�<�<r@c�L�U=RS-slUR(GdCURbURR5 UR5 URnSUlUR
bfUR(d;US:Xa5UR(a$UR
RR5 UR
R5 US:waURR5 gUR(d[S5eURnURnSUlSUlUR(dURX#5 URR5 g!URR5 f=f)Nr&rZzLocked, but no token!)r�r�r>r�r�r�r�r�rrwrr�r�r�)r<r�rYrZs    r=r�RemoteBranch.unlock�s:��	%�����!���#�#�#��?�?�.��O�O�0�0�2��(�(�*�����"&����$�$�0��+�+�����@U�@U�
�)�)�4�4�H�H�J��%�%�,�,�.��3�;��
�O�O�"�"�$��'�'�(�)@�A�A�#�/�/��!�2�2�
�#'�� �(,��%��'�'��L�L��:��O�O�"�"�$��D�O�O�"�"�$�s�C*F�A$F�F#c��URSUR55nUS:wa[R"U5eg![Ra- UR	5 UR
R
5s$f=f)NsBranch.break_lockr�)rXr�r	r�rr�rpr3rs  r=rp�RemoteBranch.break_lock�sy��	2��z�z�"6��8I�8I�8K�L�H��x���6�6�x�@�@� ���(�(�	2������$�$�/�/�1�1�	2�s� ?�>B�?Bc�^�UR(d[UR5eSUlgrurvr{s r=rw� RemoteBranch.leave_lock_in_place�ryr@c�^�UR(d[UR5eSUlgr�r{r{s r=r��%RemoteBranch.dont_leave_lock_in_place�r}r@c��US:Xa[R$UR5 UR5nUS:a[R
"USUS45eURRX5upEU(aUsSSS5 $USnURRU/5nXg;aXvn[R"X5e!,(df   g=f)Nrr&)
rAr!r	�last_revision_infor	r�rr�r�r)r<r��historyrjrlr�missing_parentrs        r=�
get_rev_id�RemoteBranch.get_rev_id�s����A�:� �.�.�.�
�^�^�
�!%�!8�!8�!:���q�y��-�-�e�a�9K�A�9N�5O�P�P����=�=�e�X�J�B���
�
�$�A�Y�N����7�7��8H�I�J��+�!+�!;���'�'��=�=��
�s�AC	�	AC	�	
Cc��URSUR55nUSS:wa[SRU55e[	US5nUSnX#4$)NsBranch.last_revision_inforr�r�r&r)rXr�rrsr�)r<rrr�r0s    r=�_read_last_revision_info�%RemoteBranch._read_last_revision_info�s_���:�:�:�D�<M�<M�<O�P���A�;�%��$�%B�%I�%I�(�%S�T�T��H�Q�K� �� ���
��%�%r@c�N�UR(a*UR5 URR5$UR	SUR55upUSS:wa[R"U5eUR5RS5nUS/:Xa/$U$)z#See Branch._gen_revision_history().sBranch.revision_historyrr�rSr`)
r�rr��_gen_revision_historyr]r�r	r3r4r�)r<r�r�rs    r=rs�"RemoteBranch._gen_revision_history�s�����������$�$�:�:�<�<�+/�+D�+D�&��(9�(9�(;�,
�(���!���%��6�6�~�F�F�!�1�1�3�9�9�'�B���b�T�>��I��
r@c�L�URRUR5$rN)rr1rOr{s r=r��RemoteBranch._remote_path�s�����4�4�T�\�\�B�Br@c� �UR5upVURU5nUR[U5U5 SU0nUR"SUR5URURU[U5[U540UD6n	UR5 [U	5S:waU	SS:wa[R"U	5eU	SSup�X�4UlURXV5 URbX�4nX�Rlgg)N�other_branchsBranch.set_last_revision_exrlrr�r&)rj�_lefthand_history� _run_pre_change_branch_tip_hooksr�rXr�r�r�r�r�r	r3r��!_run_post_change_branch_tip_hooksr�)
r<r�rx�allow_diverged�allow_overwrite_descendant�	old_revno�	old_revidrkrVrr�	new_revnor��caches
             r=�_set_last_revision_descendant�*RemoteBranch._set_last_revision_descendant�s�� $�6�6�8��	��(�(��5���-�-�c�'�l�K�H�%�|�4���:�:�*���������!�!������*�+�	
��	
��	
� � �"��x�=�A��(�1�+��"6��6�6�x�@�@�%-�a�b�\�"�	�)2�)C��&��.�.�y�D����(��.�E�:?���7�)r@c�h�UR5up#URU5nUR[U5U5 UR	5 URSUR
5URURU5nUS:wa[R"U5eURX#5 g)NsBranch.set_last_revisionr�)rjryrzr�r�rXr�r�r�r	r3r{)r<r�r~rrkrrs      r=�_set_last_revision�RemoteBranch._set_last_revisions���#�6�6�8��	��(�(��5���-�-�c�'�l�K�H�� � �"��:�:�'���������!�!��
���x���6�6�x�@�@��.�.�y�Dr@c��URRnURS5(aUR5$UR	SUR55n[U5S:wa[R"U5eUSnUS:XagURS5$![Ra$ URS5 UR5s$f=f)Nr�sBranch.get_parentr&rr@r�)rOr�r��_vfs_get_parent_locationrXr�r	r�r�r�r3r�)r<rMrr�parent_locations    r=�_get_parent_location�!RemoteBranch._get_parent_location(s������%�%���#�#�G�,�,��0�0�2�2�	3��z�z�"6��8I�8I�8K�L�H��x�=�A���6�6�x�@�@�"�1�+���c�!���%�%�g�.�.���(�(�	3��-�-�g�6��0�0�2�2�	3�s� B � 5C�Cc�V�UR5 URR5$rN)rr�r�r{s r=r��%RemoteBranch._vfs_get_parent_location8s#������� � �5�5�7�7r@c��URRnURS5(aURU5$U=(d Sn[	U[
5(aUR
S5nURSUR5URURU5nUS:wa[R"U5eg![Ra% URS5 URU5s$f=f)N�r&�r`r�sBranch.set_parent_locationrI)rOr�r��_vfs_set_parent_locationr�r�r�rXr�r�r�r	r�r�r3)r<r@rM�call_urlrrs     r=�_set_parent_location�!RemoteBranch._set_parent_location<s������%�%���#�#�G�,�,��0�0��5�5�
	6��y�b�H��(�C�(�(�#�?�?�7�3���z�z�-��!�!�#�� � ��%�%���H��r�>��6�6�x�@�@����(�(�	6��-�-�g�6��0�0��5�5�	6�s�A(C�6C=�<C=c�X�UR5 URRU5$rN)rr�r�r?s  r=r��%RemoteBranch._vfs_set_parent_locationQs%������� � �5�5�c�:�:r@c���UR5 UR5 UR5 URR"U4UUUS.UD6sSSS5 $!,(df   g=f)N)�	overwrite�
stop_revision�_override_hook_target)r�rrr��pull)r<rBr�r��kwargss     r=r��RemoteBranch.pullUs_��
�_�_�
��:�:�<������$�$�)�)���#�+�&*�	�
���
�
�s�AA�
A*c
��UR5 UR5 URRUUUUUUS9sSSS5 $!,(df   g=f)N)r�r�r��_override_hook_source_branch�tag_selector)r	rr��push)r<rGr�r�r�r�s      r=r��RemoteBranch.pushasQ���^�^�
������$�$�)�)��#�+��-1�)�
*���
�
�rJc��UR$rNr[r{s r=�peek_lock_mode�RemoteBranch.peek_lock_modets�����r@c� �URS:�$rQrRr{s r=rS�RemoteBranch.is_lockedwrUr@c	��UR5 URSUR5U5nUSS:Xa1[USSVs/sHn[U5PM sn5sSSS5 $[R"U5e![Ra7 UR5 URRU5ssSSS5 $[aVnURSS:Xa=[R"SURS5upE[R"XE5UeeSnAff=fs snf!,(df   g=f)	zXGiven a revision id, return its dotted revno.

:return: a tuple like (1,) or (400,1,3).
�Branch.revision_id_to_revnoNr&�GhostRevisionsHaveNoRevnos	{([^}]+)}rrr�)r	rXr�r	r�rr��revision_id_to_dotted_revnor6r;r��findall�GhostRevisionsHaveNoRevnor�r�r3)r<r�rrrr@�ghost_revid�xs       r=r��(RemoteBranch.revision_id_to_dotted_revnozs��
�^�^�
�

��:�:�2�D�4E�4E�4G������{�e�#��h�q�r�l�;�l��c�!�f�l�;�<�!�
�$�:�:�8�D�D���,�,�
R��!�!�#��(�(�D�D�[�Q�Q��
�/�
��=�=��#�'C�C�+-�:�:�l�A�M�M�RS�DT�+U�(�U� �:�:�5�N�TU�U���

��<�!�
�sL�D5�!B�D5�	D0
�D5�.D5�?D-�D5�	D-�AD(�(D-�-D5�5
Ec���UR5 URSUR5U5nUSS:Xa1[U5S:Xa[US5sSSS5 $[X5e[R"U5e![Ra7 UR5 URRU5ssSSS5 $f=f!,(df   g=f)zSGiven a revision id on the branch mainline, return its revno.

:return: an integer
r�Nrr�rr&)r	rXr�r	r�rr��revision_id_to_revnor�r�rr3)r<r�rrs   r=r��!RemoteBranch.revision_id_to_revno�s���
�^�^�
�
K��:�:�2�D�4E�4E�4G������{�e�#��x�=�A�%��x��{�+��
�%�T�7�7��:�:�8�D�D���,�,�
K��!�!�#��(�(�=�=�k�J�J��
�

K���
�s3�C�!B�%C�#!C�?C�C�C�C�
C c
�H�UR5 UR5up4URX5 U(a[U[5(d[
R"X S9eURSUR5URUR[U5RS5U5nUS:XaSUR'5 X4UlUR)X45 UR bUR$nX`R lO[
R*"U5eSSS5 g![
RaN UR5 UR5 UR R#X5 X4UlSSS5 gf=f!,(df   g=f)Nr�sBranch.set_last_revision_infor�r�)r�rjrzr�r�r	r�rXr�r�r�r�r�r�rrr��set_last_revision_infor�r�r{r3)r<r�r�r~rrrr�s       r=r��#RemoteBranch.set_last_revision_info�sb��
�_�_�
�#'�#:�#:�#<� �I��1�1�%�E��j��e�&D�&D��.�.�;�T�T�
��:�:�4��%�%�'��$�$��)�)���J�%�%�g�.��
���8�#��(�(�*�16�1C��.��6�6�y�L��$�$�0� �:�:�E�BG�%�%�?���:�:�8�D�D�=�
���,�,�
��!�!�#��>�>�@��!�!�8�8��L�16�1C��.��)�
�
���
�s3�AF�&AD.�6A/F�.AF�F�F�F�
F!c��UR5 URRnURS5(dUR	UUSSS9 SSS5 gUR5 URR5nUR5upgXv4[RS4/nUb-UR"X!5(d[
R"X5eUR "X5n	UR#X�5 SSS5 g![
Ra URS5 N�f=f!,(df   g=f)N)r&r�T)r|r}r)r�rOr�r�r�r	r�r�rrr.rjrAr!�is_ancestor�DivergedBranches�find_distance_to_nullr�)
r<r��last_revrxrMr�
last_revno�
last_revid�known_revision_idsr�s
          r=�generate_revision_history�&RemoteBranch.generate_revision_history�s(��
�_�_�
��\�\�)�)�F��+�+�F�3�3�	>��6�6�#�$�'+�37�	7����
�
�:�:�<��O�O�-�-�/�E�'+�'>�'>�'@�$�Z��(��,�,�a�0�"���#��(�(��?�?� �1�1�$�E�E��/�/��P�E��'�'��;�5�
���0�0�>��5�5�f�=�>���
�s/�-D3�D�B$D3�%D0�-D3�/D0�0D3�3
Ec�(�URSU5 g)N�
push_location)r=)r<r�s  r=�set_push_location�RemoteBranch.set_push_location�s���!�!�/�8�<r@c��URR5(a[RR	U5$UR
RnURS5(aUR5$UR5$![Ra$ URS5 UR5s$f=f)Nrz)
r�r�rr�r�rOr�r��_vfs_heads_to_fetch�_rpc_heads_to_fetchr	r�r�)r<rMs  r=r��RemoteBranch.heads_to_fetch�s����<�<�9�9�;�;�
�=�=�/�/��5�5����%�%���#�#�F�+�+��+�+�-�-�	.��+�+�-�-���(�(�	.��-�-�f�5��+�+�-�-�	.�s�<B�5C�Cc��URSUR55n[U5S:wa[R"U5eUup#[U5[U54$)NsBranch.heads_to_fetchr)rXr�r�r	r3r)r<rr�
must_fetch�if_present_fetchs    r=r�� RemoteBranch._rpc_heads_to_fetch�sV���:�:�6��8I�8I�8K�L���x�=�A���6�6�x�@�@�'/�$�
��:���$4� 5�5�5r@c�V�UR5 URR5$rN)rr�r�r{s r=r�� RemoteBranch._vfs_heads_to_fetch�s#������� � �/�/�1�1r@c��SSKJn UR5 U"XS9nUR5sSSS5 $!,(df   g=f)z7Make sure the data stored in this branch is consistent.r&)�BranchReconciler)r�N)r�r�r�)r<r�r��
reconcilers    r=r��RemoteBranch.reconciles1��/�
�_�_�
�)�$�B�J��'�'�)��
�
�s	�7�
Ac��URR(d![R"URU5eUR5R
US5$)z;Get the tree_path and branch_location for a tree reference.r4)r�r�r	rA�get_reference_info�_get_all_reference_infor�)r<r<s  r=r��RemoteBranch.get_reference_infosD���|�|�8�8��-�-�d�.E�.E�t�L�L��+�+�-�1�1�'�<�H�Hr@c���URR(d![R"URU5eUR5 URR	XU5 g)z4Set the branch location to use for a tree reference.N)r�r�r	rA�set_reference_inforr�)r<r<�branch_locationr2s    r=r��RemoteBranch.set_reference_infosJ���|�|�8�8��-�-�d�.E�.E�t�L�L��������,�,�W�y�Qr@c���URR(d![R"URU5eUR5 URRU5 grN)r�r�r	rAr�rr��_set_all_reference_info)r<�reference_infos  r=r��$RemoteBranch._set_all_reference_infosH���|�|�8�8��-�-�d�.E�.E�t�L�L��������1�1�.�Ar@c�&�URR(d0$URSUR55up[U5(aUSS:wa[R"U5e0n[R"UR55H3upEnURS5U(aURS5OS4X4'M5 U$![R
a- UR
5 URR5s$f=f)NsBranch.get_all_reference_inforr�r�)r�r�r]r�r	r�rr�r�r�r3r�r�r4r�)r<rrr6r�r�u�ps       r=r��$RemoteBranch._get_all_reference_infos����|�|�8�8��I�	?� $� 9� 9�0�$�2C�2C�2E�!��H��x�=�=�X�a�[�E�1��6�6�x�@�@������w�'>�'>�'@�A�G�A�!��h�h�w�'�a����'�):�T�J�C�F�B��
���(�(�	?������$�$�<�<�>�>�	?�s�"C�>D�Dc��URU5SnUcB[RRURR
R
U5US9$[RR[R"[R"UR5U5US9$![Ra gf=f)z�Return the parent branch for a tree-reference.

:param path: The path of the nested tree in the tree
:return: A branch associated with the nested tree
rNr�)r�rr�rerr@r�r	rYr�rr��strip_segment_parametersr,)r<r<r�r�r�s     r=�reference_parent�RemoteBranch.reference_parent/s����1�1�'�:�1�=���"�
��}�}�8�8��O�O�2�2�8�8��>�(;�9����}�}�!�!��M�M��1�1�$�-�-�@�/�
�!4�	"�
�	
���(�(�
��
�s�AB+�+C�C)rOr�r�r�r�r�r�r�r�r�r�r�r�rr�r�rr�rr�)NNNTNN)r�NrN)FFr*)FNFNr4r+)TrArBrCrDrErr5rr�r�_mod_transport�	TransportrDr��boolr�r�r>r�r!r%rrrr�r�r�rrRr�rrrLr�r$r9rArErDrHrOrNr	rmr�r�rr	r7r8rrprwr�rmrprsr�r�r�r�r�r�r�r�r�r�rSr�r�r�r�r�r�r�r�r�r�r�r�r�r�rHr<r=s@r=r�r��s]����
�0�1�1�
�� � �
��>�#;�#;����8<���#�"�HL�S6�#�S6�,�S6��3�4�	S6��S6��s�m�S6�&�d�>�+C�+C�&D�E�S6�j
�*(��
<�5�,�^�%=�%=�,��-�.�J�C��H�E�BF�4�
&��#��#�%�+�4�UM�n#$�J3�$�	�8�,�3� (�8L�B=���#�#�V�%6�%6�7�%�8�%�@A� �
!�
>�&&�
�C��#(�#@�JE�,/� 8�A�*;�
�����
�&�%�E�2E�(E�B<�:=�.� 6�2�*�I�R�B��"
�
r@r�c�(�\rSrSrSrSSjrSrSrg)�RemoteConfigiFaA Config that reads and writes from smart verbs.

It is a low-level object that considers config data to be name/value pairs
that may be associated with a section. Assigning meaning to the these
values is done at higher levels like breezy.config.TreeConfig.
Nc�0�UR5nSnUcUnOXBnUcUnOURX5n[RSHnU"XU5 M U$![a NIf=f![Ra URXU5nN]f=f)z�Return the value associated with a named option.

:param name: The name of the value
:param section: The section the option is in (if any)
:param default: The value to return if the value is not set
:return: The value or default value
Nr�)�_get_configobjr�r�r	r��_vfs_get_optionr'�OldConfigHooks)r<r��sectionro�	configobj�section_objr�r�s        r=�
get_option�RemoteConfig.get_optionNs���	A��+�+�-�I��K���'���"+�"4�K��"���#����6�� �.�.�u�5�D���U�#�6���� ������(�(�	A��(�(���@�E�	A�s8�A,�A�A,�A,�
A)�&A,�(A)�)A,�,&B�Bc� �[US5(a"USSS:wa[R"U5eUSR5R	5n[
R"USS9n[
RSHnU"U5 M
 U$)Nrr�r&r�)�encoding�load)r�r	r3r4r�r'�	ConfigObjr�)r<rrr��confr�s     r=�_response_to_configobj�#RemoteConfig._response_to_configobjjs���x��{������A��%� 7��6�6�x�@�@����+�+�-�8�8�:���$�$�U�W�=���.�.�v�6�D���J�7��r@rIr4)rArBrCrDrEr�r�rHrIr@r=r�r�Fs����8r@r�c�P�\rSrSrSrSrSrS
SjrSrSr	S	r
S
rS
SjrSr
g)r�itzA RemoteConfig for Branches.c��XlgrN��_branchr_s  r=r>�RemoteBranchConfig.__init__w����r@c��URR5nURRRSU5nUR	U5$)Nr�)r�r�rOr\r�rZs   r=r��!RemoteBranchConfig._get_configobjzsF���|�|�(�(�*���<�<�'�'�;�;�%�t�
���*�*�8�4�4r@Nc�T�URRRnURS5(aUR	XU5$[U[5(a:URS5(aUR	XU5$URXU5$URXU5$)��Set the value associated with a named option.

:param value: The value to set
:param name: The name of the value to set
:param section: The section the option is in (if any)
rJ�rr)	r�rOr�r��_vfs_set_optionr��dict�_set_config_option_dict�_set_config_option)r<r�r�r�rMs     r=�
set_option�RemoteBranchConfig.set_option�s������%�%�-�-���#�#�G�,�,��'�'��W�=�=��e�T�"�"��'�'��/�/��+�+�E��A�A��/�/��W�E�E��*�*�5��@�@r@c���[U[[45(a[U5nO![U[5(aO[	U5eUR
R
5nUR
RRSUUR
RUR
RURS5URS5U=(d SRS55nUS:wa[R""U5eg![RaF UR
RRnURS5 UR!XU5s$f=f)NsBranch.set_config_optionr�r`rJrI)r�r�r�r��	TypeErrorr�r�rOrPr�r�r�r	r�r�r�rr3)r<r�r�r�r�rrrMs       r=r
�%RemoteBranchConfig._set_config_option�s���e�d�C�[�)�)���J�E�
��s�
#�
#���E�"�"�	>��<�<�,�,�.�D��|�|�+�+�0�0�+�����(�(����-�-����W�%����G�$���B�&�&�w�/��H��r�>��6�6�x�@�@���	�(�(�	>��\�\�)�)�1�1�F��-�-�g�6��'�'��W�=�=�	>�s�
B#D
�
AE$�#E$c��0nUR5HUup4[U[5(aURS5n[U[5(aURS5nXBU'MW [R"U5$)N�utf8)r�r�r�r�r�)r<�option_dict�	utf8_dictr4r�s     r=�_serialize_option_dict�)RemoteBranchConfig._serialize_option_dict�sj���	�%�+�+�-�J�C��#�s�#�#��j�j��(���%��%�%����V�,��"�c�N�.����y�)�)r@c�B�URR5nURU5nURRR	SUURR
URRUURS5U=(d SRS55nUS:wa[R"U5eg![RaF URRRnURS5 URXU5s$f=f)NsBranch.set_config_option_dictr�r`rrI)r�r�rrOrPr�r�r�r	r�r�r�rr3)r<r�r�r�r��serialised_dictrrrMs        r=r	�*RemoteBranchConfig._set_config_option_dict�s���	>��<�<�,�,�.�D�"�9�9�%�@�O��|�|�+�+�0�0�0�����(�(����-�-�����G�$���B�&�&�w�/��H��r�>��6�6�x�@�@���	�(�(�	>��\�\�)�)�1�1�F��-�-�f�5��'�'��W�=�=�	>�s�B%C�AD�Dc�b�URR5 URR$rN)r�rr�r{s r=�_real_object�RemoteBranchConfig._real_object��"�����!�!�#��|�|�(�(�(r@c�^�UR5R5RXU5$rN�rr!r�r<r�r�r�s    r=r�"RemoteBranchConfig._vfs_set_option�s'��� � �"�.�.�0�;�;�E��Q�Qr@r�rN)rArBrCrDrEr>r�rr
rr	rrrHrIr@r=r�r�ts1��&��5�A�"A�2*�A�()�Rr@r�c�:�\rSrSrSrSrSrSrS
SjrSr	S	r
g)r i�zA RemoteConfig for BzrDirs.c��XlgrN��_bzrdir)r<r(s  r=r>�RemoteBzrDirConfig.__init__�rr@c�T�URRRnSnURS5(a[R
"U5eURR
URR5nURRX#5nURU5$)Nr0r�)	r$rOr�r�r	r�r1r]r�)r<rMr�r�rrs     r=r��!RemoteBzrDirConfig._get_configobj�s������%�%�-�-��(���#�#�G�,�,��+�+�D�1�1��|�|�1�1�$�,�,�2F�2F�G���<�<�4�4�T�@���*�*�8�4�4r@c�^�UR5R5RXU5$rN)rr!r�)r<r�r�ros    r=r��"RemoteBzrDirConfig._vfs_get_option�s'��� � �"�.�.�0�;�;�D�7�S�Sr@Nc�^�UR5R5RXU5$)rrrs    r=r�RemoteBzrDirConfig.set_option�s)��� � �"�.�.�0�;�;�E��Q�Qr@c�b�URR5 URR$rN)r$rrHr{s r=r�RemoteBzrDirConfig._real_object�rr@r#rN)rArBrCrDrEr>r�r�rrrHrIr@r=r r �s ��%��5�T�R�)r@r c�^^�UU4SjnUU4Sjn[TR[5(d[TR5e[RTR5nU"TX#5e![a Of=f[RTR5nU"T5e![an[T5UeSnAff=f)aTranslate an ErrorFromSmartServer into a more useful error.

Possible context keys:
  - branch
  - repository
  - bzrdir
  - token
  - other_branch
  - path

If the error from the server doesn't match a known pattern, then
UnknownErrorFromSmartServer is raised.
c�T>�TU$![an[SUT5 TUeSnAff=f)NzMissing key '%s' in context %r)r�r#)r�rrmrWs  ��r=�find�_translate_error.<locals>.finds7���	��4�=� ���	��3�T�7�C��1���	�s��
'�"�'c�>�TS$![aC TRSRS5s$![an[	ST5 TUeSnAff=ff=f)zIGet the path from the context if present, otherwise use first error
arg.
r�rr�z Missing key 'path' in context %rN)r��
error_argsr�rr#)rrmrWs ��r=�get_path�"_translate_error.<locals>.get_pathsc���	!��6�?�"���	!�
!��~�~�a�(�/�/��8�8���
!��9�7�C��q� ��
!��	!�s(��
A�3�A�
A�A�A�AN)	r�r}r�r�error_translatorsr�r��no_context_error_translatorsr6)rWrmr0r4�
translatorrs``    r=rRrR�s�����!��c�n�n�e�,�,�����'�'�.�&�*�*�3�>�>�:�
���d�-�-���
��
���1�5�5�c�n�n�E�
���o����6�)�#�.�A�5��6�s*�A.�.
A;�:A;�?B&�&
C�0B<�<CsNoSuchRevisionc�@�[U"S5URS5$)Nrr�rr3�rWr0r4s   r=�<lambda>r<*s���t�H�~�s�~�~�a�?P� Qr@snosuchrevisionc�@�[U"S5URS5$)Nrrr:r;s   r=r<r<.s���t�L�/A�3�>�>�RS�CT� Ur@srevno-outofboundsc��[R"URSURSURS45$)Nrr&r)r	r�r3r;s   r=r<r<2s4��� 7� 7����q��C�N�N�1�-�s�~�~�a�/@�A�!r@c���[UR5S:�aURSRS5nOSn[R"U"S5R
RUS9$)Nr&rr�r()r��detail)r�r3r�r	rYr@r�)rWr0r4�extras    r=�_translate_nobranch_errorrB8sU��
�3�>�>��a�����q�!�(�(��1����� � �d�8�n�&C�&C�&H�&H�QV�W�Wr@snobranchsnorepositoryc�:�[R"U"S55$rk)r	r�r;s   r=r<r<Cs��� :� :�4��>� Jr@sUnlockableTransportc�N�[R"U"S5R5$rk)r	�UnlockableTransportr@r;s   r=r<r<Gs��� :� :��X��%�%�!r@s
TokenMismatchc�<�[R"U"S5S5$)Nrz(remote token))r	rqr;s   r=r<r<Ms��� 4� 4�T�'�]�DT� Ur@sDivergedc�H�[R"U"S5U"S55$)Nrrx)r	r�r;s   r=r<r<Qs��� 7� 7��X���^�,�!r@s
NotStackedc�6�[R"U"S5S9$)Nrr')r	r�r;s   r=r<r<Vs��v�/@�/@��X��/Wr@c��U"5n[UR5S:�aURSRS5nOSn[R"X4S9$)Nrr&r�)rA)r�r3r�r	�PermissionDenied)rWr0r4r�rAs     r=�_translate_PermissionDeniedrKZsI���:�D�
�3�>�>��a�����q�!�(�(��1�����"�"�4�5�5r@sPermissionDenieds	ReadErrorc�8�[R"U"55$rN)r	�	ReadErrorr;s   r=r<r<es��f�.>�.>�x�z�.Jr@s
NoSuchFilec�8�[R"U"55$rN)r��
NoSuchFiler;s   r=r<r<hs��~�/H�/H���/Tr@sTokenLockingNotSupportedc�:�[R"U"S55$r�)r	r�r;s   r=r<r<ls��� ?� ?��\�@R� Sr@sUnsuspendableWriteGroupc�6�[R"U"S5S9$)Nrr)r	r�r;s   r=r<r<ps��� >� >���%�!r@sUnresumableWriteGroupc�n�[R"U"S5URSURSS9$)Nrrr&)r�write_groups�reason)r	�UnresumableWriteGroupr3r;s   r=r<r<vs/��� <� <���%��^�^�A�&��~�~�a� �!r@sAlreadyControlDirc�8�[R"U"55$rN)r	�AlreadyControlDirErrorr;s   r=r<r<~s��� =� =�h�j� Ir@r�c�<�[R"UR6$rN)r	r�r3�rWs r=r<r<�s���0�0�#�.�.�Ar@sIncompatibleRepositoriesc���[R"URSRS5URSRS5URSRS55$)Nrr�r&r)r	�IncompatibleRepositoriesr3r�rYs r=r<r<�sT���/�/����q�� � ��)����q�� � ��)����q�� � ��)�r@sLockContentionc�.�[R"S5$)NrW)r	rXrYs r=r<r<�s��6�#8�#8��#Ir@s
LockFailedc��[R"URSRS5URSRS55$�Nrr�r&)r	�
LockFailedr3r�rYs r=r<r<�s<���!�!����q�� � ��)�3�>�>�!�+<�+C�+C�G�+L�r@sTipChangeRejectedc�f�[R"URSRS55$)Nrr)r	�TipChangeRejectedr3r�rYs r=r<r<�s#���(�(�����):�)A�)A�&�)I�Jr@sUnstackableBranchFormatc�<�[R"UR6$rN)rr�r3rYs r=r<r<�s���.�.����?r@sUnstackableRepositoryFormatc�<�[R"UR6$rN)r	r�r3rYs r=r<r<�s���2�2�C�N�N�Cr@s
FileExistsc�f�[R"URSRS55$�Nrr�)r��
FileExistsr3r�rYs r=r<r<�s#���)�)�#�.�.��*;�*B�*B�7�*K�Lr@sDirectoryNotEmptyc�f�[R"URSRS55$re)r	�DirectoryNotEmptyr3r�rYs r=r<r<�s#���(�(�����):�)A�)A�'�)J�Kr@s
UnknownFormatc��[R"URSRS5URSRS55$)Nrr�)r	rzr3r�rYs r=r<r<��<���)�)����q�� � ��)�3�>�>�!�+<�+C�+C�G�+L�r@s
InvalidURLc��[R"URSRS5URSRS55$)Nrr�r&r�)r�
InvalidURLr3r�rYs r=r<r<�s<���#�#����q�� � ��)�3�>�>�!�+<�+C�+C�G�+L�r@c
��URn[R"USRS5[	USRS55[	USRS55[	USRS555$)Nrr�r&r�rrl)r3r	�ShortReadvErrorr�r�)rWrUs  r=�_translate_short_readv_errorro�sm���>�>�D��!�!��Q����w���D��G�N�N�7�#�$��D��G�N�N�7�#�$��D��G�N�N�7�#�$�	�r@sShortReadvErrorc�r�URSRS5nURSRS5n[URSRS55n[URSRS55nURSRS5nURS5(aUSSRS5nO*URS	5(aUSSRS
5nURS:Xa
[XX4U5eURS:Xa
[
XX4U5eg)
Nrr�r&r�rrlr{zu:zs:�base64�UnicodeDecodeError�UnicodeEncodeError)r3r�r�r�r}rrrs)rWr��valrZ�endrTs      r=�_translate_unicode_errorrv�s���~�~�a� �'�'��0�H�

�.�.��
�
"�
"�7�
+�C�����q�!�(�(��1�2�E�

�c�n�n�Q��&�&�w�/�
0�C�
�^�^�A�
�
%�
%�g�
.�F�
�~�~�d����!�"�g�n�n�W�%��	����	�	��!�"�g�n�n�X�&��
�~�~�-�-� ���F�C�C�	���/�	/� ���F�C�C�
0r@sUnicodeEncodeErrorsUnicodeDecodeErrors
ReadOnlyErrorc�.�[R"S5$)Nzreadonly transport)r	�TransportNotPossiblerYs r=r<r<�s��&�"=�"=�>R�"Sr@sMemoryErrorc�.�[R"S5$)NzXremote server out of memory
Retry non-remotely, or contact the server admin for details.)r	r�rYs r=r<r<�s�����	G�r@sRevisionNotPresentc��[R"URSRS5URSRS55$r^)r	rmr3r�rYs r=r<r<�rjr@s
BzrCheckErrorc�b�[R"URSRS5S9$)Nrr�)�msg)r	�
BzrCheckErrorr3r�rYs r=r<r<�s#���$�$�����):�)A�)A�'�)J�Kr@)or�r-r�rU�typingrr�fastbencoder�r`rrrr	r
rrr
rrrrrrfrr'rr{rrArr�r�
decoratorsrrr�i18nr�lockable_filesrrr r!�tracer"r#r$r%r�r(ryr)r*r+r,r�r-�	inventoryr.�
inventorytreer/r�r0r��smartr1r2r��smart.clientr3r|r�r6rKrtrzrv�IniFileStorerrGr�r-�VersionedFileRepositoryFormatrmr6�_RelockDebugMixinr��
StreamSinkr�StreamSourcerr��BranchFormatrr�r�r�r�r�r �Registryr�r6r7rR�registerrBrKrorvrIr@r=�<module>r�s	��"�	�	��%��
�
�
�
��$�,�(�*�*�$�7��*�A�$�@�@�!�#�7�7�)�)� �0�E��+�&���?�&�/�/�?�66�6�@�c��6�6�c�L	57��1�1�57�p~(�;�%�%�z�~(�B7�/�7�t`/�]�H�H�`/�F@F��1�1�:�t�?U�?U�@F�F8C0�}�/�/�C0�Lq��3�3�q�h�
��({��,�,�{�|.D��0�0�.D�b{
�6�=�=�*�d�.D�.D�{
�|+�+�\ZR��ZR�z)��)�@�%�%�e�X�o�6�8��'�0�0����A�C��0�f����Q������U��������X����;�(A�B�����J������������U������������W��
6����.�0K�L�����J������T������S������������������I��
�%�%� �A���%�%�����%�%��I���%�%�����%�%��J���%�%��?���%�%�"�C���%�%��L���%�%��K���%�%�����%�%������%�%�&8�:V�W�
D� �%�%�&;�=U�V��%�%�&;�=U�V��%�%��S���%�%�����%�%�����%�%��K�r@

Youez - 2016 - github.com/yon3zu
LinuXploit