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/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��gy�����SrSSKrSSKrSSKrSSKJr SSKrSSKJ	r
 SSKJrJrJ
r
JrJrJr SSKJ	r SSKJrJr SSKJ	r SSKJr SSKJr SS	KJr SS
KJr SSKJrJ r  SSK!J"r" SS
K#J$r$ SSK%J&r&J'r' Sr("SS\RR5r*"SS\RV5r,"SS\RZ5r."SS\RZ5r/"SS\RV5r0"SS\RV5r1"SS\RV5r2"SS\RV5r3"S S!\RR5r4"S"S#\RV5r5"S$S%\RV5r6"S&S'\RV5r7"S(S)\RV5r8"S*S+\RV5r9"S,S-\RV5r:"S.S/\RV5r;"S0S1\RV5r<"S2S3\RV5r="S4S5\*5r>"S6S7\*5r?"S8S9\*5r@"S:S;\*5rA"S<S=\RV5rB"S>S?\RV5rC"S@SA\RV5rD"SBSC\RV5rE"SDSE\RV5rF"SFSG\RV5rG"SHSI\G5rH"SJSK\G5rI"SLSM\G5rJ"SNSO\G5rK"SPSQ\G5rL"SRSS5rM"STSU\L\M5rN"SVSW\L\M5rO"SXSY\L\M5rP"SZS[\RV5rQ"S\S]\RV5rR"S^S_\G5rS"S`Sa\RV5rT"SbSc\RV5rU"SdSe\G5rV"SfSg\G5rW"ShSi\G5rX"SjSk\RV5rY"SlSm\RV5rZ"SnSo\RV5r["SpSq\RV5r\"SrSs\RV5r]"StSu\RV5r^"SvSw\RV5r_"SxSy\RV5r`"SzS{\RV5ra"S|S}\a5rb"S~S\RV5rc"S�S�\RR5rd"S�S�\RV5re"S�S�\RV5rf"S�S�\RV5rg"S�S�\RV5rh"S�S�\RV5ri"S�S�\RV5rj"S�S�\RV5rk"S�S�\k5rl"S�S�\k5rm"S�S�\RV5rn"S�S�\RR5ro"S�S�\RR5rp"S�S�\RV5rq"S�S�\RV5rr"S�S�\RV5rs"S�S�\RV5rt"S�S�\RR5ru"S�S�\RV5rv"S�S�\RZ5rw"S�S�\RV5rx"S�S�\RV5ry"S�S�\RR5rz"S�S�\a5r{"S�S�\RR5r|"S�S�\RR5r}"S�S�\G5r~g)�aaTests for the smart wire/domain protocol.

This module contains tests for the domain-level smart requests and responses,
such as the 'Branch.lock_write' request. Many of these use specific disk
formats to exercise calls that only make sense for formats with specific
properties.

Tests for low-level protocol encoding are found in test_smart_transport.
�N)�BytesIO)�branch)�
controldir�errors�gpg�tests�	transport�urlutils)�inventory_delta�
versionedfile)�bzrdir)�packrepository)�
repository)�request)�server�vfs)�	Testament)�test_server)�chroot�memoryc�B�SS[R04SS[R04SS[R04/n[R
"US5upE[R
"US5upg[R"XsU5 [R"XcSSU5 U$)	z0Multiply tests version and protocol consistency.�find_repository�_request_class�find_repositoryV2�find_repositoryV3�$TestSmartServerRequestFindRepository�_v2�N)�	smart_dir�"SmartServerRequestFindRepositoryV1�"SmartServerRequestFindRepositoryV2�"SmartServerRequestFindRepositoryV3r�split_suite_by_re�multiply_tests)�loader�standard_tests�pattern�	scenarios�to_adapt�result�v2_only�v1_and_2s        �=/usr/lib/python3/dist-packages/breezy/bzr/tests/test_smart.py�
load_testsr.1s���

�
�y�K�K�L�	
�

 �
�y�K�K�L�	
�

 �
�y�K�K�L�	
�
�I��.�.��>���H��/�/��%�@��G�	����f�5�
����A�B�-��8��M�c�2^�\rSrSrU4SjrSSjrSrU=r$)�TestCaseWithChrootedTransport�Mc�Z>�[RUl[TU]5 SUlg�N)r�MemoryServer�vfs_transport_factory�super�setUp�_chroot_server��self�	__class__s �r-r8�#TestCaseWithChrootedTransport.setUpNs"���%+�%8�%8��"�
��
��"��r/c�N�URcU[RRU5n[R
"U5UlUR
UR5 [R"URR55nUbURU5nU$r4)r9r�TestCaseWithTransport�
get_transportr�ChrootServer�start_serverr	�get_transport_from_url�get_url�clone)r;�relpath�backing_transport�ts    r-r@�+TestCaseWithChrootedTransport.get_transportSs������&� %� ;� ;� I� I�$� O��"(�"5�"5�6G�"H�D�����d�1�1�2��,�,�T�-@�-@�-H�-H�-J�K�������� �A��r/)r9r6r4)�__name__�
__module__�__qualname__�__firstlineno__r8r@�__static_attributes__�
__classcell__�r<s@r-r1r1Ms���#�
�r/r1c�4^�\rSrSrU4SjrSrSrSrU=r$)�TestCaseWithSmartMedium�^c�\>�[TU]5 URUSUR5 g)N�transport_server)r7r8�overrideAttr�make_transport_serverr:s �r-r8�TestCaseWithSmartMedium.setUp_s'���
��
��
	
���$� 2�D�4N�4N�Or/c�P�[R"SUR5-5$)N�-)r�SmartTCPServer_for_testing�id�r;s r-rW�-TestCaseWithSmartMedium.make_transport_servergs���5�5�c�D�G�G�I�o�F�Fr/c�>�UR5R5$)z#Get a smart medium to use in tests.)r@�get_smart_mediumr]s r-r`�(TestCaseWithSmartMedium.get_smart_mediumjs���!�!�#�4�4�6�6r/�)	rJrKrLrMr8rWr`rNrOrPs@r-rRrR^s���P�G�7�7r/rRc��\rSrSrSrSrg)�TestByteStreamToStream�oc���S[R"SSSS5/4S[R"SSSS5/4/n[RR	S5"5R
n[R"X5n/n[R"U5up!UH!upVURU[U545 M# URSU5 URSUS	S5 g)
N�text)sk1�foo)sk2�bar�	pack-0.92r�r)r�FulltextContentFactoryr�format_registry�get�repository_format�
smart_repo�_stream_to_byte_stream�_byte_stream_to_stream�append�list�assertLength)r;�stream�fmt�bytes�streams�kind�	substreams       r-�1test_repeated_substreams_same_kind_are_one_stream�HTestByteStreamToStream.test_repeated_substreams_same_kind_are_one_streamps�����5�5�h��d�F�S�T�
�
��5�5�h��d�F�S�T�
�	
���(�(�,�,�[�9�;�M�M���1�1�&�>����!�7�7��>���%�O�D��N�N�D�$�y�/�2�3� &����!�W�%����!�W�Q�Z��]�+r/rbN)rJrKrLrMr|rNrbr/r-rdrdos��,r/rdc� �\rSrSrSrSrSrg)�TestSmartServerResponse�c�&�UR[R"S5[R"S55 UR[R"SS5[R"SS55 UR[R"S5[R"S55 UR[R"SS5[R"S55 URS[R"S55 g)N��ok�body)snotok)�assertEqual�	smart_req�SmartServerResponse�assertNotEqualr]s r-�
test__eq__�"TestSmartServerResponse.test__eq__�s�������)�)�(�3��)�)�(�3�	
�	
����)�)�(�G�<��)�)�(�G�<�	
�	
����)�)�(�3��)�)�+�6�	
�	
����)�)�(�G�<��)�)�(�3�	
�	
���D�)�"?�"?��"I�Jr/c���UR[[R"SS55S5 UR[[R"SS55S5 g)z(SmartServerResponses can be stringified.)sargsr�)z<<SuccessfulSmartServerResponse args=(b'args',) body=b'body'>z:<SuccessfulSmartServerResponse args=('args',) body='body'>)z8<FailedSmartServerResponse args=(b'args',) body=b'body'>z6<FailedSmartServerResponse args=('args',) body='body'>N)�assertIn�strr��SuccessfulSmartServerResponse�FailedSmartServerResponser]s r-�test__str__�#TestSmartServerResponse.test__str__�sP���
�
��	�7�7�
�G�L�M�
�	
�	
�
�
��	�3�3�J��H�I�
�	
r/rbN)rJrKrLrMr�r�rNrbr/r-rr�s
��K�&
r/rc�&�\rSrSrSrSrSrSrg)�TestSmartServerRequest�c	�p�UR5n[R"US5nURSUR	S55 UR[RURS5 UR[RURS5 UR[RURS5 URSUR	S55 S	nURS[R"U5-UR	SURS
5-55 g)N�foo/�./�foo/sfoo/..�/sbar/z./bazsfoo/baz�é�utf-8)r@r��SmartServerRequestr��translate_client_path�assertRaisesr
�InvalidURLJoinr�PathNotChild�escape�encode)r;r	r�e_acutes    r-�test_translate_client_path�1TestSmartServerRequest.test_translate_client_path�s����&�&�(�	��.�.�y�&�A������w�<�<�W�E�F�����#�#�W�%B�%B�I�	
�	
���&�-�-�w�/L�/L�d�S����&�-�-�w�/L�/L�g�V�����'�"?�"?�
�"K�L�7������8�?�?�7�+�+��)�)�'�G�N�N�7�4K�*K�L�	
r/c��UR5n[R"US5nSn[R"SU-5nURS[R"U5-UR
URS555 g)z8VfsRequests receive escaped paths rather than raw UTF-8.r�r�r��asciiN)r@r�
VfsRequestr
r�r�r�r�)r;r	rr��escapeds     r-�test_translate_client_path_vfs�5TestSmartServerRequest.test_translate_client_path_vfs�sn���&�&�(�	��.�.��F�3��7���/�/�&�7�"2�3������8�?�?�7�+�+��)�)�'�.�.��*A�B�	
r/c��UR5n[R"US5nURURURS5R5 g)Nr�r�)r@r�r�r��base�transport_from_client_path)r;r	rs   r-�test_transport_from_client_path�6TestSmartServerRequest.test_transport_from_client_path�sJ���&�&�(�	��.�.�y�&�A������N�N�G�>�>�w�G�L�L�	
r/rbN)rJrKrLrMr�r�r�rNrbr/r-r�r��s��
� 	
�
r/r�c�$�\rSrSrSrSrSrSrg)�*TestSmartServerBzrDirRequestCloningMetaDir��z!Tests for BzrDir.cloning_metadir.c��UR5nURS5nUR5n[RnU"U5n[
R"UR5URR5SUR5R5445nURXeRSS55 g)�2When there is a bzrdir present, the call succeeds.�.�branchr/�FalseN)r@�make_controldir�cloning_metadirr�&SmartServerBzrDirRequestCloningMetaDirr�r��network_namero�get_branch_formatr��execute�r;�backing�dir�local_result�
request_classr�expecteds       r-�test_cloning_metadir�?TestSmartServerBzrDirRequestCloningMetaDir.test_cloning_metadir�s����$�$�&���"�"�3�'���*�*�,��!�H�H�
���(���:�:��)�)�+��.�.�;�;�=��L�:�:�<�I�I�K�L�
�
��	
����?�?�3��#A�Br/c���UR5nURS5nURS5nUR5 [R
"5R
X2S9 [R
"5RU5 URSS5 [RnU"U5n[R"S5nURXeRSS55 g)	z:The request fails when bzrdir contains a branch reference.�
referencedr�)�
target_branch�moved)sBranchReferencer/r�N)r@�make_branchr�r��_mod_bzrbranch�BranchReferenceFormat�
initialize�
get_reference�renamerr�r�r�r�r�)r;r��referenced_branchr�r�rr�s       r-�test_cloning_metadir_reference�ITestSmartServerBzrDirRequestCloningMetaDir.test_cloning_metadir_reference�s����$�$�&�� �,�,�\�:���"�"�3�'�������,�,�.�9�9��	:�	
�	�,�,�.�<�<�S�A�	���|�W�-�!�H�H�
���(���6�6�7L�M������?�?�3��#A�Br/rbN)rJrKrLrM�__doc__r�r�rNrbr/r-r�r��s��+�C� Cr/r�c��\rSrSrSrSrSrg)�+TestSmartServerBzrDirRequestCheckoutMetaDir�z"Tests for BzrDir.checkout_metadir.c���UR5n[R"U5nURSSS9 UR	S5nUR[R"S5U5 g)Nr��2a��formatr/)s#Bazaar-NG meta directory, format 1
s6Bazaar repository format 2a (needs bzr 1.16 or later)
s'Bazaar Branch Format 7 (needs bzr 1.6)
)r@r�'SmartServerBzrDirRequestCheckoutMetaDirr�r�r�r�r��r;r�r�responses    r-�test_checkout_metadir�ATestSmartServerBzrDirRequestCheckoutMetaDir.test_checkout_metadir�sg���$�$�&���C�C�G�L������T��*��?�?�3�'������)�)��
�
�		
r/rbN)rJrKrLrMr�r�rNrbr/r-r�r��s
��,�
r/r�c�*�\rSrSrSrSrSrSrSrg)�)TestSmartServerBzrDirRequestDestroyBranchiz Tests for BzrDir.destroy_branch.c���UR5nURS5 [RnU"U5n[R
"S5nUR
XCRSS55 g)z"The default branch can be removed.r�r�r/N)r@r�r�%SmartServerBzrDirRequestDestroyBranchr�r�r�r��r;r�r�rr�s     r-�test_destroy_branch_default�ETestSmartServerBzrDirRequestDestroyBranch.test_destroy_branch_defaults\���$�$�&�������!�G�G�
���(���:�:�8�D������?�?�3��#=�>r/c��UR5nURSSS9RnURSS9 [R
nU"U5n[R"S5nURXTRSS55 g	)
zA named branch can be removed.r��development-color��
branchname)�namer�r/�
branchnameN)
r@�make_repositoryr�
create_branchrr�r�r�r�r�)r;r�r�r�rr�s      r-�test_destroy_branch_named�CTestSmartServerBzrDirRequestDestroyBranch.test_destroy_branch_nameds{���$�$�&���"�"�3�/A�"�B�M�M�����|��,�!�G�G�
���(���:�:�8�D������?�?�3�
�#F�Gr/c���UR5nURSSS9 [RnU"U5n[R
"SS5nUR
XCRSS55 g)z.An error is raised if the branch didn't exist.r�r�r���nobranchNr/r�)r@r�rr�r�r�r�r�r�s     r-�test_destroy_branch_missing�ETestSmartServerBzrDirRequestDestroyBranch.test_destroy_branch_missing"sd���$�$�&�����S�);��<�!�G�G�
���(���6�6�~�t�L������?�?�3�
�#F�Gr/rbN)	rJrKrLrMr�r�r�r�rNrbr/r-r�r�s��*�?�H�Hr/r�c�$�\rSrSrSrSrSrSrg)�*TestSmartServerBzrDirRequestHasWorkingTreei,z!Tests for BzrDir.has_workingtree.c���UR5nURS5 [RnU"U5n[R
"S5nUR
XCRS55 g)zA working tree is present.r���yesr/N)r@�make_branch_and_treer�&SmartServerBzrDirRequestHasWorkingTreer�r�r�r�r�s     r-�test_has_workingtree_yes�CTestSmartServerBzrDirRequestHasWorkingTree.test_has_workingtree_yes/sZ���$�$�&���!�!�#�&�!�H�H�
���(���:�:�9�E������?�?�3�#7�8r/c���UR5nURS5 [RnU"U5n[R
"S5nUR
XCRS55 g)zA working tree is missing.r���nor/N)r@r�rr�r�r�r�r�r�s     r-�test_has_workingtree_no�BTestSmartServerBzrDirRequestHasWorkingTree.test_has_workingtree_no8sZ���$�$�&�����S�!�!�H�H�
���(���:�:�8�D������?�?�3�#7�8r/rbN)rJrKrLrMr�r�rrNrbr/r-r�r�,s��+�9�9r/r�c�$�\rSrSrSrSrSrSrg)�-TestSmartServerBzrDirRequestDestroyRepositoryiBz$Tests for BzrDir.destroy_repository.c���UR5nURS5 [RnU"U5n[R
"S5nUR
XCRS55 g)zThe repository can be removed.r�r�r/N)r@r�r�)SmartServerBzrDirRequestDestroyRepositoryr�r�r�r�r�s     r-�test_destroy_repository_default�MTestSmartServerBzrDirRequestDestroyRepository.test_destroy_repository_defaultEsZ���$�$�&�����S�!�!�K�K�
���(���:�:�8�D������?�?�3�#7�8r/c���UR5nURS5 [RnU"U5n[R
"SS5nUR
XCRS55 g)z2An error is raised if the repository didn't exist.r��snorepositoryNr/)r@r�rrr�r�r�r�r�s     r-�test_destroy_repository_missing�MTestSmartServerBzrDirRequestDestroyRepository.test_destroy_repository_missingNs]���$�$�&�����S�!�!�K�K�
���(���6�6�7I�4�P������?�?�3�#7�8r/rbN)rJrKrLrMr�rrrNrbr/r-rrBs��.�9�9r/rc��\rSrSrSrSrSrg)�&TestSmartServerRequestCreateRepositoryiXz#Tests for BzrDir.create_repository.c�p�UR5nURS5 [RnU"U5n[R
R
S5"5nURnUR5n[R"SSSSU45nURXsRSUS55 g)r�r�rjr�rr/�TrueN)
r@r�r�"SmartServerRequestCreateRepositoryrrmrnror�r�r�r�r�)r;r�r�r�reference_bzrdir_format�reference_formatr�r�s        r-�test_makes_repository�<TestSmartServerRequestCreateRepository.test_makes_repository[s����$�$�&�����S�!�!�D�D�
���(��",�"<�"<�"@�"@��"M�"O��2�D�D��'�4�4�6���:�:�
�E�5�%��6�
��	
����?�?�3��g�#N�Or/rbN)rJrKrLrMr�rrNrbr/r-rrXs��-�Pr/rc�@�\rSrSrSrSrSrSSjrSrSr	S	r
S
rg)rijz!Tests for BzrDir.find_repository.c���UR5nURU5nURS5 UR[R
"S5UR
S55 g)z:If no repository is found, ('norepository', ) is returned.r�rr/N)r@rr�r�r�r�r��r;r�rs   r-�test_no_repository�7TestSmartServerRequestFindRepository.test_no_repositorymsV���$�$�&���%�%�g�.�����S�!�����)�)�*<�=�w���s�?S�	
r/c�2�UR5nURU5nUR5nURX2R	S55 URS5 UR[R"S5UR	S55 g)Nr/�subdirr�subdir)r@r�_make_repository_and_resultr�r�r�r�r��r;r�rr*s    r-�test_nonshared_repository�>TestSmartServerRequestFindRepository.test_nonshared_repositoryvs~���$�$�&���%�%�g�.���1�1�3���������!5�6����X�&�����)�)�*<�=��O�O�I�&�	
r/Nc	��URSXS9nUR5(aSnOSnURR(aSnOSnURR(aSnOSn[
RUR:Xa2[R"SSXEXcRR545$[
RUR:Xa[R"SSXEU45$[R"SSXE45$)ziConvenience function to setup a repository.

:result: The SmartServerResponse to expect when opening it.
r�)�sharedr�r�rr�r/)r��supports_rich_root�_format�supports_tree_reference�supports_external_lookupsrr"rr�r�r�r!)r;r$r��repo�	rich_root�subtrees�externals       r-r�@TestSmartServerRequestFindRepository._make_repository_and_result�s���
�#�#�C��#�F���"�"�$�$��I��I��<�<�/�/��H��H��<�<�1�1��H��H��7�7�4�;N�;N�N��:�:���Y�(�L�L�<U�<U�<W�X��
��
9�
9�T�=P�=P�
P��:�:���Y�(�;��
��:�:���Y�1��
r/c�@�UR5nURU5nURSS9nURX2R	S55 URS5 [R"URSSS-URSS	-5nURXBR	S
55 URS5 [R"URSSS-URSS	-5nURXRR	S
55 g	)z8For a shared repository, we get 'ok', 'relpath-to-repo'.T�r$r/rrr)s..rkNrz
subdir/deeper)s../..s
subdir/deeper)	r@rrr�r�r�r�r��args)r;r�rr*�result2�result3s      r-�test_shared_repository�;TestSmartServerRequestFindRepository.test_shared_repository�s����$�$�&���%�%�g�.���1�1��1�>���������!5�6����X�&��/�/��K�K��!��x�'�&�+�+�a�b�/�9�
��	
����/�/�)�"<�=����_�-��/�/��K�K��!��{�*�V�[�[���_�<�
��	
����/�/�2B�"C�Dr/c� �UR5nURU5nURSS9nURSURS5 URSURS5 URX2RS55 g)zATest for the format attributes for rich root and subtree support.�development-subtreer�r�rk�r/N�r@rrr�r0r�r s    r-�#test_rich_root_and_subtree_encoding�HTestSmartServerRequestFindRepository.test_rich_root_and_subtree_encoding�s{���$�$�&���%�%�g�.���1�1�9N�1�O���������Q��0��������Q��0��������!5�6r/c���UR5nURU5nURSS9nURSURS5 URX2RS55 g)z1Test for the supports_external_lookups attribute.r6r�r��r/Nr8r s    r-�$test_supports_external_lookups_no_v2�ITestSmartServerRequestFindRepository.test_supports_external_lookups_no_v2�sc���$�$�&���%�%�g�.���1�1�9N�1�O���������Q��0��������!5�6r/rb)FN)rJrKrLrMr�rr!rr3r9r=rNrbr/r-rrjs%��+�
�
��BE�"7�7r/rc�$�\rSrSrSrSrSrSrg)�)TestSmartServerBzrDirRequestGetConfigFilei�z!Tests for BzrDir.get_config_file.c�z�UR5nURS5nUR5RS5 UR	5R5R
5n[RnU"U5n[R"SU5nURXeRS55 g)Nr��/rbr/)
r@r��
get_config�set_default_stack_on�_get_config�_get_config_file�readr�"SmartServerBzrDirRequestConfigFiler�r�r�r�r�s       r-�test_present�6TestSmartServerBzrDirRequestGetConfigFile.test_present�s����$�$�&���"�"�3�'������-�-�c�2����(�9�9�;�@�@�B��!�D�D�
���(���:�:�2�|�L������?�?�3�#7�8r/c���UR5nURS5 [RnU"U5n[R
"SS5nUR
XCRS55 g)Nr�rbr/)r@r�rrHr�r�r�r�r�s     r-�test_missing�6TestSmartServerBzrDirRequestGetConfigFile.test_missing�s\���$�$�&�����S�!�!�D�D�
���(���:�:�2�s�C������?�?�3�#7�8r/rbN)rJrKrLrMr�rIrLrNrbr/r-r@r@�s��+�9�9r/r@c�*�\rSrSrSrSrSrSrSrg)�'TestSmartServerBzrDirRequestGetBranchesi�zTests for BzrDir.get_branches.c�H�UR5nURS5n[RnU"U5n[R"SSUR
R
5405n[R"SU5nURXdRS55 g)Nr�r/r��ssuccess)r@r�r�#SmartServerBzrDirRequestGetBranches�bencoder&r�r�r�r�r�)r;r�rr�rr�r�s       r-�test_simple�3TestSmartServerBzrDirRequestGetBranches.test_simple�s����$�$�&���!�!�#�&��!�E�E�
���(�����
�9�f�n�n�9�9�;�<�=�
���:�:�=�,�W������?�?�3�#7�8r/c�X�UR5nURS5nURS5nURU5 [R
nU"U5n[R"SS05n[R"SU5nURXuRS55 g)N�foo�barr/)�refs../bar/rQrh)r@r�r��set_branch_referencerrRrSr�r�r�r�)r;r�r��br�rr�r�s        r-�test_ref�0TestSmartServerBzrDirRequestGetBranches.test_ref�s����$�$�&���"�"�5�)�����U�#��� � ��#�!�E�E�
���(������-A�'B�C���:�:�=�,�W������?�?�6�#:�;r/c��UR5nURS5 [RnU"U5n[R"05n[
R"SU5nURXSRS55 g)Nr�rQr/)	r@r�rrRrSr�r�r�r�)r;r�r�rr�r�s      r-�
test_empty�2TestSmartServerBzrDirRequestGetBranches.test_empty�sj���$�$�&�����S�!�!�E�E�
���(�����r�*���:�:�=�,�W������?�?�3�#7�8r/rbN)	rJrKrLrMr�rTr\r_rNrbr/r-rOrO�s��(�	9�	<�9r/rOc�&�\rSrSrSrSrSrSrg)�&TestSmartServerRequestInitializeBzrDiric���UR5n[R"U5nUR[R
"S5UR
S55 [RRU5nUR[RUR5 UR[RUR5 UR[R UR"5 g)�3Initializing an empty dir should succeed and do it.r�r/N)r@r�"SmartServerRequestInitializeBzrDirr�r�r�r�r�
ControlDir�open_from_transportr�r�
NoWorkingTree�open_workingtree�NotBranchError�open_branch�NoRepositoryPresent�open_repository)r;r�r�made_dirs    r-�test_empty_dir�5TestSmartServerRequestInitializeBzrDir.test_empty_dirs����$�$�&���>�>�w�G������6�6�x�@�'�/�/�RU�BV�W��(�(�<�<�W�E��	
���&�.�.��0I�0I�J����&�/�/��1E�1E�F����&�4�4�h�6N�6N�Or/c��UR5n[R"U5nUR[R
URS5 g)�AInitializing a missing directory should fail like the bzrdir api.rN)r@rrer�r	�
NoSuchFiler�rs   r-�test_missing_dir�7TestSmartServerRequestInitializeBzrDir.test_missing_dirs<���$�$�&���>�>�w�G�����)�.�.�����Kr/c���UR5n[R"U5nURS5 UR	[
RURS5 g)z>Initializing an extant bzrdir should fail like the bzrdir api.rrN)r@rrer�r�r�AlreadyControlDirErrorr�rs   r-�test_initialized_dir�;TestSmartServerRequestInitializeBzrDir.test_initialized_dirsJ���$�$�&���>�>�w�G�����X�&����&�7�7����)�Tr/rbN)rJrKrLrMrortrxrNrbr/r-rbrbs��
P�L�Ur/rbc�*�\rSrSrSrSrSrSrSrg)�(TestSmartServerRequestBzrDirInitializeExiz�Basic tests for BzrDir.initialize_ex_1.16 in the smart server.

The main unit tests in test_bzrdir exercise the API comprehensively.
c�n�UR5nURS5RR5n[R
"U5nUR
[R"SSSSSSUSSSS45URUSSSSSSSSS5
5 [RRU5nUR[RUR 5 UR[R"UR$5 UR[R&UR(5 g)rd�	referencer/r�rN)r@r�r&r�r�$SmartServerRequestBzrDirInitializeExr�r�r�r�rrfrgr�rrhrirjrkrlrm)r;r�r�rrns     r-ro�7TestSmartServerRequestBzrDirInitializeEx.test_empty_dir$s���$�$�&���#�#�K�0�8�8�E�E�G���@�@��I������)�)��c�3��S�#�t�X�s�C��M�
�
�O�O��c�7�H�h��S�#�s�H�
�		
��(�(�<�<�W�E��	
���&�.�.��0I�0I�J����&�/�/��1E�1E�F����&�4�4�h�6N�6N�Or/c�
�UR5nURS5RR5n[R
"U5nUR
[RURUSSSSSSSSS5 g)rrr}s
subdir/dirr�r/N)
r@r�r&r�rr~r�r	rsr��r;r�r�rs    r-rt�9TestSmartServerRequestBzrDirInitializeEx.test_missing_dir8s{���$�$�&���#�#�K�0�8�8�E�E�G���@�@��I������ � ��O�O�����������
	
r/c�,�UR5nURS5RR5n[R
"U5nURS5 UR
[RURUSSSSSSSSS5 g)zAInitializing an extant directory should fail like the bzrdir api.r}rrr�r/N)
r@r�r&r�rr~r�r	�
FileExistsr�r�s    r-rx�=TestSmartServerRequestBzrDirInitializeEx.test_initialized_dirLs����$�$�&���#�#�K�0�8�8�E�E�G���@�@��I�����X�&����� � ��O�O�����������
	
r/rbN)	rJrKrLrMr�rortrxrNrbr/r-r{r{s���
P�(
�(
r/r{c�&�\rSrSrSrSrSrSrg)� TestSmartServerRequestOpenBzrDiribc��UR5n[R"U5nUR[R
"S5UR
S55 g�Nrsdoes-not-exist�r@r�SmartServerRequestOpenBzrDirr�r�r�r�rs   r-�test_no_directory�2TestSmartServerRequestOpenBzrDir.test_no_directorycsH���$�$�&���8�8��A������)�)�(�3�W�_�_�EV�5W�	
r/c���UR5nURS5 [R"U5nUR	[
R"S5URS55 g�N�emptyrsempty)r@�mkdirrr�r�r�r�r�rs   r-�test_empty_directory�5TestSmartServerRequestOpenBzrDir.test_empty_directoryjsS���$�$�&���
�
�g���8�8��A������)�)�(�3�W�_�_�X�5N�	
r/c��UR5n[R"USS9nUR[R
"S5UR
S55 g�N�root)�root_client_pathrsnot-rootr�rs   r-�test_outside_root_client_path�>TestSmartServerRequestOpenBzrDir.test_outside_root_client_pathrsN���$�$�&���8�8��f�
��	
����)�)�(�3�W�_�_�[�5Q�	
r/rbN)rJrKrLrMr�r�r�rNrbr/r-r�r�bs��
�
�
r/r�c�,�\rSrSrSrSrSrSrSrg)�$TestSmartServerRequestOpenBzrDir_2_1i|c��UR5n[R"U5nUR[R
"S5UR
S55 gr��r@r� SmartServerRequestOpenBzrDir_2_1r�r�r�r�rs   r-r��6TestSmartServerRequestOpenBzrDir_2_1.test_no_directory}sH���$�$�&���<�<�W�E������)�)�(�3�W�_�_�EV�5W�	
r/c���UR5nURS5 [R"U5nUR	[
R"S5URS55 gr�)r@r�rr�r�r�r�r�rs   r-r��9TestSmartServerRequestOpenBzrDir_2_1.test_empty_directory�sS���$�$�&���
�
�g���<�<�W�E������)�)�(�3�W�_�_�X�5N�	
r/c���UR5n[R"U5nURS5 UR	[
R"S5URS55 g)Nr�)r�rr/)r@rr�r�r�r�r�r�rs   r-� test_present_without_workingtree�ETestSmartServerRequestOpenBzrDir_2_1.test_present_without_workingtree�sU���$�$�&���<�<�W�E�����S�!�����)�)�/�:�G�O�O�C�<P�	
r/c��UR5n[R"USS9nUR[R
"S5UR
S55 gr�r�rs   r-r��BTestSmartServerRequestOpenBzrDir_2_1.test_outside_root_client_path�sN���$�$�&���<�<��f�
��	
����)�)�(�3�W�_�_�[�5Q�	
r/rbN)	rJrKrLrMr�r�r�r�rNrbr/r-r�r�|s��
�
�
�
r/r�c��\rSrSrSrSrg)�)TestSmartServerRequestOpenBzrDir_2_1_diski�c�f�[RUlUR5n[R
"U5nUR
S5nUR5 UR5 UR5 UR[R"S5URS55 g)Nr�)r�r�r/)r�LocalURLServerr6r@rr�r��create_repositoryr��create_workingtreer�r�r�r�)r;r�r�bds    r-�test_present_with_workingtree�GTestSmartServerRequestOpenBzrDir_2_1_disk.test_present_with_workingtree�s���%0�%?�%?��"��$�$�&���<�<�W�E��
�
!�
!�#�
&��
����
����
��������)�)�*:�;�W�_�_�S�=Q�	
r/�r6N)rJrKrLrMr�rNrbr/r-r�r�����

r/r�c�,�\rSrSrSrSrSrSrSrg)� TestSmartServerRequestOpenBranchi�c���UR5n[R"U5nURS5 UR	[
R"S5URS55 g�z4When there is no branch, ('nobranch', ) is returned.r�r�r/N)r@r�SmartServerRequestOpenBranchr�r�r�r�r�rs   r-�test_no_branch�/TestSmartServerRequestOpenBranch.test_no_branch��U���$�$�&���8�8��A�����S�!�����)�)�.�9�7�?�?�3�;O�	
r/c���UR5n[R"U5nURS5 UR	[
R"S5URS55 g)�)When there is a branch, 'ok' is returned.r�)r�r/r/N)r@rr�r�r�r�r�r�rs   r-�test_branch�,TestSmartServerRequestOpenBranch.test_branch�sU���$�$�&���8�8��A�����������)�)�,�7�����9M�	
r/c���[RUlUR5n[R
"U5nUR
S5nURSSS9n[R"5RUR5RS5nURUS5 UR[R "SU45UR#S55 g	)
�@When there is a branch reference, the reference URL is returned.rr}T��lightweightr��reference/.bzr/branch/locationr��	referenceN)rr�r6r@rr�r��create_checkoutr�r�r�rr��assertFileEqualr�r�r�r��r;r�rr�checkout�
reference_urls      r-�test_branch_reference�6TestSmartServerRequestOpenBranch.test_branch_reference�s���%0�%?�%?��"��$�$�&���8�8��A���!�!�(�+���)�)�+�4�)�H���0�0�2�
�]�8�.�.�
/�
�V�G�_�	�
	
���]�,L�M�����)�)�5�-�*@�A��O�O�L�)�	
r/c���UR5n[R"U5nURS5 UR	[
R"S5URS55 g��<When there is a repository, the error should return details.r�r�r/N)r@rr�r�r�r�r�r�rs   r-�+test_notification_on_branch_from_repository�LTestSmartServerRequestOpenBranch.test_notification_on_branch_from_repository�r�r/r�N)	rJrKrLrMr�r�r�r�rNrbr/r-r�r��s��
�
�
�$
r/r�c�2�\rSrSrSrSrSrSrSrSr	g)	�"TestSmartServerRequestOpenBranchV2i�c���UR5nURS5 [R"U5nUR	[
R"S5URS55 gr�)r@r�r�SmartServerRequestOpenBranchV2r�r�r�r�rs   r-r��1TestSmartServerRequestOpenBranchV2.test_no_branch��U���$�$�&�����S�!��:�:�7�C������)�)�.�9�7�?�?�3�;O�	
r/c��UR5nURS5RR5n[R
"U5nUR
[R"SU45URS55 g�r�r�r�r/N)
r@r�r&r�rr�r�r�r�r��r;r�r�rs    r-r��.TestSmartServerRequestOpenBranchV2.test_branch��l���$�$�&���#�#�C�(�0�0�=�=�?���:�:�7�C������3�3�Y��4I�J��O�O�C� �	
r/c���[RUlUR5n[R
"U5nUR
S5nURSSS9n[R"5RUR5RS5nURUS5 UR[R "SU45UR#S55 g	�
r�rr}Tr�r�r�rYr�N)rr�r6r@rr�r�r�r�r�r�rr�r�r�r�r�r�r�s      r-r��8TestSmartServerRequestOpenBranchV2.test_branch_reference����%0�%?�%?��"��$�$�&���:�:�7�C���!�!�(�+���)�)�+�4�)�H���0�0�2�
�]�8�.�.�
/�
�V�G�_�	�
	
���]�,L�M�����3�3�V�]�4K�L��O�O�L�)�	
r/c�n�URS5nURS5nURUR5 /n[RR
R
SURS5 UR5n[R"U5nUR5 URS5nUR5 URR5nUR!["R$"SU45U5 UR'SU5 g!UR5 f=f�z=Opening a stacked branch does not open the stacked-on branch.�trunk�feature�openNsfeaturer�r)r��set_stacked_on_urlr��_mod_branch�Branch�hooks�install_named_hookrsr@rr��
setup_jailr��
teardown_jailr&r�r�r�r�ru�r;r�r��opened_branchesr�rr��expected_formats        r-�test_stacked_branch�6TestSmartServerRequestOpenBranchV2.test_stacked_branch���� � ��)���"�"�9�-���"�"�5�:�:�.������ � �3�3��O�*�*�D�	
��$�$�&���:�:�7�C������	$����z�2�H��!�!�#�!�/�/�6�6�8������3�3�Y��4P�Q��	
�	
���!�_�-��

�!�!�#���,D"�"D4c���UR5n[R"U5nURS5 UR	[
R"S5URS55 gr�)r@rr�r�r�r�r�r�rs   r-r��NTestSmartServerRequestOpenBranchV2.test_notification_on_branch_from_repositorysU���$�$�&���:�:�7�C�����S�!�����)�)�.�9�7�?�?�3�;O�	
r/r�N�
rJrKrLrMr�r�r�r�r�rNrbr/r-r�r��s��
�
�
�$.�.
r/r�c�2�\rSrSrSrSrSrSrSrSr	g)	�"TestSmartServerRequestOpenBranchV3i"c���UR5nURS5 [R"U5nUR	[
R"S5URS55 gr�)r@r�r�SmartServerRequestOpenBranchV3r�r�r�r�rs   r-r��1TestSmartServerRequestOpenBranchV3.test_no_branch#r�r/c��UR5nURS5RR5n[R
"U5nUR
[R"SU45URS55 gr�)
r@r�r&r�rr�r�r�r�r�r�s    r-r��.TestSmartServerRequestOpenBranchV3.test_branch,r�r/c���[RUlUR5n[R
"U5nUR
S5nURSSS9n[R"5RUR5RS5nURUS5 UR[R "SU45UR#S55 g	r�)rr�r6r@rr�r�r�r�r�r�rr�r�r�r�r�r�r�s      r-r��8TestSmartServerRequestOpenBranchV3.test_branch_reference6r�r/c�n�URS5nURS5nURUR5 /n[RR
R
SURS5 UR5n[R"U5nUR5 URS5nUR5 URR5nUR!["R$"SU45U5 UR'SU5 g!UR5 f=fr�)r�r�r�r�r�r�r�rsr@rr�r�r�r�r&r�r�r�r�rur�s        r-r��6TestSmartServerRequestOpenBranchV3.test_stacked_branchHr�r�c���UR5n[R"U5nURS5 UR	[
R"S5URS55 g)r�r�)r�slocation is a repositoryr/N)r@rr�r�r�r�r�r�rs   r-r��NTestSmartServerRequestOpenBranchV3.test_notification_on_branch_from_repository_sW���$�$�&���:�:�7�C�����S�!�����)�)�*T�U��O�O�C� �	
r/r�Nr�rbr/r-r�r�"s��
�
�
�$.�.
r/r�c� �\rSrSrSrSrSrg)�%TestSmartServerRequestRevisionHistoryijc���UR5n[R"U5nURS5 UR	[
R"SS5URS55 g)z'For an empty branch, the body is empty.r�r�r/N)r@�smart_branch�!SmartServerRequestRevisionHistoryr�r�r�r�r�rs   r-r_�0TestSmartServerRequestRevisionHistory.test_emptyksW���$�$�&���@�@��I�����������)�)�(�C�8�'�/�/�#�:N�	
r/c	��UR5n[R"U5nURS5nUR	5 URS5 UR
S5nUR
SSR5S9nUR5 UR[R"SSRXE/55URS	55 g
)z*For a non-empty branch, the body is empty.r���
1st commit�
2nd commit���rev_idr��r/N)r@rr�make_branch_and_memory_tree�
lock_write�add�commitr��unlockr�r�r��joinr�)r;r�r�tree�r1�r2s      r-�test_not_empty�4TestSmartServerRequestRevisionHistory.test_not_emptyts����$�$�&���@�@��I���/�/��4�����������
�[�[��
&��
�[�[��f�m�m�o�[�
>�����
�����)�)�(�W�\�\�2�(�5K�M��O�O�C� �	
r/rbN)rJrKrLrMr_rrNrbr/r-rrj���
�

r/rc� �\rSrSrSrSrSrg)�TestSmartServerBranchRequesti�c���UR5n[R"U5nURS5 UR	[
RURS5 g)z?When there is a bzrdir and no branch, NotBranchError is raised.r�r/N)r@r�SmartServerBranchRequestr�r�rrjr�rs   r-r��+TestSmartServerBranchRequest.test_no_branch�sJ���$�$�&���7�7��@�����S�!����&�/�/����#�Fr/c���UR5n[R"U5nURS5nUR	SSS9 UR[RURS5 g)z;When there is a branch reference, NotBranchError is raised.rr}Tr�scheckoutN)	r@rrr�r�r�rrjr��r;r�rrs    r-r��2TestSmartServerBranchRequest.test_branch_reference�s_���$�$�&���7�7��@���!�!�(�+�����{���=����&�/�/����+�Nr/rbN)rJrKrLrMr�r�rNrbr/r-rr�s��G�Or/rc�&�\rSrSrSrSrSrSrg)�,TestSmartServerBranchRequestLastRevisionInfoi�c���UR5n[R"U5nURS5 UR	[
R"S5URS55 g)�9For an empty branch, the result is ('ok', '0', b'null:').r�)r��0�null:r/N)r@r�(SmartServerBranchRequestLastRevisionInfor�r�r�r�r�rs   r-r_�7TestSmartServerBranchRequestLastRevisionInfo.test_empty�sW���$�$�&���G�G��P�����������)�)�*A�B�G�O�O�TW�DX�	
r/c���UR5n[R"U5nURS5nSnUR	USU5 UR[RURU5 g)r'r�c�0�[R"SS5e)Nsrevid1srevid2�r�GhostRevisionsHaveNoRevnorbr/r-�last_revision_info�STestSmartServerBranchRequestLastRevisionInfo.test_ghost.<locals>.last_revision_info�s���2�2�9�i�H�Hr/r0N)	r@rr*r�rVr�rr/�do_with_branch)r;r�rrr0s     r-�
test_ghost�7TestSmartServerBranchRequestLastRevisionInfo.test_ghost�sm���$�$�&���G�G��P���!�!�#�&��	I�	
���&�"6�8J�K�����,�,�g�.D�.D�f�	
r/c��UR5n[R"U5nURS5nUR	5 URS5 SR
5nURS5 URSUS9 UR5 UR[R"SSU45URS	55 g
)z?For a non-empty branch, the result is ('ok', 'revno', 'revid').r�r	rr
rr
r��2r/N)
r@rr*rrrr�rrr�r�r�r��r;r�rr�rev_id_utf8s     r-r�;TestSmartServerBranchRequestLastRevisionInfo.test_not_empty�s����$�$�&���G�G��P���/�/��4������������m�m�o�����L�!����L���5����
�����)�)�5�$��*D�E��O�O�C� �	
r/rbN)rJrKrLrMr_r3rrNrbr/r-r%r%�s��
�
�
r/r%c�,�\rSrSrSrSrSrSrSrg)�-TestSmartServerBranchRequestRevisionIdToRevnoi�c���UR5n[R"U5nURS5 UR	[
R"S5URSS55 g)Nr�)r�r(r/r))r@r�)SmartServerBranchRequestRevisionIdToRevnor�r�r�r�r�rs   r-�	test_null�7TestSmartServerBranchRequestRevisionIdToRevno.test_null�sW���$�$�&���H�H��Q�����������)�)�-�8�'�/�/�#�x�:X�	
r/c�
�UR5n[R"U5nURS5nSnUR	USU5 UR[R"S5URUS55 g)Nr�c�0�[R"US5e)N�ghost-revidr.)�revids r-�revision_id_to_dotted_revno�fTestSmartServerBranchRequestRevisionIdToRevno.test_ghost_revision.<locals>.revision_id_to_dotted_revno�s���2�2�5�.�I�Ir/rD)sGhostRevisionsHaveNoRevno�revidrBrF)	r@rr=r�rVr�r�r�r2)r;r�rrrDs     r-�test_ghost_revision�ATestSmartServerBranchRequestRevisionIdToRevno.test_ghost_revision�s����$�$�&���H�H��Q���!�!�#�&��	J�	
����1�3N�	
�	
����/�/�H�
�
�"�"�6�8�4�		
r/c�b�UR5n[R"U5nURS5nUR	5 URS5 UR
S5nUR5 UR[R"S5URSU55 g)Nr�r	r
)r��1r/)r@rr=rrrrrr�r�r�r�)r;r�rrrs     r-rT�9TestSmartServerBranchRequestRevisionIdToRevno.test_simple�s����$�$�&���H�H��Q���/�/��4�����������
�[�[��
&�����
�����)�)�-�8�'�/�/�#�r�:R�	
r/c���UR5n[R"U5nURS5 UR	[
R"S5URSS55 g)Nr�)�NoSuchRevision�
idontexistr/rN)r@rr=r�r�r�r�r�rs   r-�test_not_found�<TestSmartServerBranchRequestRevisionIdToRevno.test_not_found�sY���$�$�&���H�H��Q�����������/�/�0R�S��O�O�C��/�	
r/rbN)	rJrKrLrMr>rGrTrOrNrbr/r-r;r;�s��
�
�$

�
r/r;c� �\rSrSrSrSrSrg)�)TestSmartServerBranchRequestGetConfigFilei�c���UR5n[R"U5nURS5 SnUR	[
R"SU5URS55 g)z#With no file, we get empty content.r�r/r�N)r@r�SmartServerBranchGetConfigFiler�r�r�r�r�)r;r�r�contents    r-�test_default�6TestSmartServerBranchRequestGetConfigFile.test_default�s\���$�$�&���=�=�g�F�������������)�)�(�G�<�g�o�o�c�>R�	
r/c��UR5n[R"U5nURS5nURRSS5 UR
[R"SS5URS55 g)Nr��branch.conf�foo bar bazr�r/)
r@rrTr��
_transport�	put_bytesr�r�r�r�r"s    r-�test_with_content�;TestSmartServerBranchRequestGetConfigFile.test_with_content�sr���$�$�&���=�=�g�F���!�!�#�&�����#�#�M�>�B�����)�)�(�N�C��O�O�C� �	
r/rbN)rJrKrLrMrVr]rNrbr/r-rRrR�s��	
�
r/rRc��\rSrSrSrSrg)�TestLockedBranchi	c��UR5RnURR5RnURR	5 X#4$r4)r�tokenr�repository_tokenr)r;r�branch_token�
repo_tokens    r-�get_lock_tokens� TestLockedBranch.get_lock_tokens
sK���(�(�*�0�0���&�&�1�1�3�D�D�
���� � �"��'�'r/rbN)rJrKrLrMrfrNrbr/r-r`r`	s��(r/r`c��\rSrSrSrSrg)�)TestSmartServerBranchRequestPutConfigFileic��UR5n[R"U5nURS5nUR	U5upEURSUR
SXE55 UR[R"S5URS55 URURRS5S5 UR5 g)Nr�r/r�rZrY)r@r�SmartServerBranchPutConfigFiler�rf�assertIsr�r�r�r��do_body�control_transport�	get_bytesr)r;r�rrrdres      r-r]�;TestSmartServerBranchRequestPutConfigFile.test_with_contents����$�$�&���=�=�g�F���!�!�#�&��#'�#7�#7��#?� ���
�
�d�G�O�O�C��J�K�����)�)�(�3�W�_�_�^�5T�	
�	
����$�$�.�.�}�=�~�	
�	�
�
�r/rbN)rJrKrLrMr]rNrbr/r-riris��r/ric� �\rSrSrSrSrSrg)�+TestSmartServerBranchRequestSetConfigOptioni!c��URS5n[R"URR5nURU5up4UR
5nURSX4SSS5nUR[R"S5U5 URSURS55 UR5 g)Nr�r/rirhrbrXrW�
r�r�'SmartServerBranchRequestSetConfigOptionr�root_transportrfrEr�r�r�r��
get_optionr�r;rrrdre�configr*s       r-�test_value_name�;TestSmartServerBranchRequestSetConfigOption.test_value_name"s����!�!�#�&���F�F����,�,�
��$(�#7�#7��#?� ���#�#�%������l���PS�T������@�@��D�f�M������ 1� 1�%� 8�9��
�
�r/c��URS5n[R"URR5nURU5up4UR
5nURSX4SSS5nUR[R"S5U5 URSURSS	55 UR5 g)
Nr�r/rirh�gamrbrXrW�gamrtrxs       r-�test_value_name_section�CTestSmartServerBranchRequestSetConfigOption.test_value_name_section/s����!�!�#�&���F�F����,�,�
��$(�#7�#7��#?� ���#�#�%������l���PV�W������@�@��D�f�M������ 1� 1�%�� ?�@��
�
�r/rbN)rJrKrLrMrzrrNrbr/r-rrrr!s���r/rrc�&�\rSrSrSrSrSrSrg)�/TestSmartServerBranchRequestSetConfigOptionDicti=c�P�[RU5 SUlSSS.Ulg)Nsd5:ascii1:a11:unicode ⌚3:‽e�au‽)r�uunicode ⌚)r`r8�encoded_value_dict�
value_dictr]s r-r8�5TestSmartServerBranchRequestSetConfigOptionDict.setUp>s(�����t�$�#W���$'�>O�P��r/c��URS5n[R"URR5nURU5up4UR
5nURSX4URSS5nUR[R"S5U5 URURURS55 UR5 g)Nr�r/rhrbrW�r�r�+SmartServerBranchRequestSetConfigOptionDictrrvrfrEr�r�r�r�r�r�rwrrxs       r-rz�?TestSmartServerBranchRequestSetConfigOptionDict.test_value_nameEs����!�!�#�&���J�J����,�,�
��$(�#7�#7��#?� ���#�#�%�������4�+B�+B�F�C�
��	
����@�@��D�f�M�������&�*;�*;�E�*B�C��
�
�r/c���URS5n[R"URR5nURU5up4UR
5nURSX4URSS5nUR[R"S5U5 URURURSS55 UR5 g)Nr�r/rhr}rbrWr~r�rxs       r-r�GTestSmartServerBranchRequestSetConfigOptionDict.test_value_name_sectionTs����!�!�#�&���J�J����,�,�
��$(�#7�#7��#?� ���#�#�%�������4�+B�+B�F�F�
��	
����@�@��D�f�M�������&�*;�*;�E�5�*I�J��
�
�r/)r�r�N)rJrKrLrMr8rzrrNrbr/r-r�r�=s��Q�
�
r/r�c� �\rSrSrSrSrSrg)�(TestSmartServerBranchRequestSetTagsBytesidc���URS5nUR5nURU5up4[R"UR55nUR
SX45nURSU5 URU5nURSU5 UR5nUR[R"S5U5 UR5 g)Nr��baserb)
r��_get_tags_bytesrfr�SmartServerBranchSetTagsBytesr@r�r��do_chunk�do_endr�r�r)r;�base_branch�	tag_bytesrdrerr�s       r-�test_set_bytes�7TestSmartServerBranchRequestSetTagsBytes.test_set_byteshs����&�&�v�.���/�/�1�	�#'�#7�#7��#D� ���<�<�T�=O�=O�=Q�R���?�?�7�L�E������x�(��#�#�I�.������x�(��>�>�#������@�@��D�h�O����r/c�j�URS5nUR5 UR5n[R"UR55nUR
[RURSSS5 URU5 UR5 UR5 g)Nr�r�swrong token)
r�rr�rr�r@r�r�
TokenMismatchr�r�r�r)r;r�r�rs    r-�test_lock_failed�9TestSmartServerBranchRequestSetTagsBytes.test_lock_failedvs����&�&�v�.����� ��/�/�1�	��<�<�T�=O�=O�=Q�R������ � ��O�O����	
�	����#��������r/rbN)rJrKrLrMr�r�rNrbr/r-r�r�ds���r/r�c�D^�\rSrSrSrU4SjrSrSrSrSr	Sr
U=r$)	�SetLastRevisionTestBasei�z:Base test case for verbs that implement set_last_revision.c�>�[TU]5 UR5nURU5UlURS5Ulg)Nr�)r7r8r@r�rrr)r;rGr<s  �r-r8�SetLastRevisionTestBase.setUp�s@���
��
�� �.�.�0���)�)�*;�<����4�4�S�9��	r/c�L�URURR5$r4)rfrrr]s r-�lock_branch�#SetLastRevisionTestBase.lock_branch�s���#�#�D�I�I�$4�$4�5�5r/c�L�URRR5 gr4)rrrr]s r-�
unlock_branch�%SetLastRevisionTestBase.unlock_branch�s���	�	�����!r/c�n�UR5up4URXX45nUR5 U$r4)r��_set_last_revisionr�)r;�revision_id�revnordrer�s      r-�set_last_revision�)SetLastRevisionTestBase.set_last_revision�s6��#'�#3�#3�#5� ���*�*�;�|�X�������r/c�r�URX5nUR[R"S5U5 g)Nr��r�r�r�r��r;r�r�r�s    r-�assertRequestSucceeds�-SetLastRevisionTestBase.assertRequestSucceeds�s-���)�)�+�=������@�@��J�H�Ur/)rr)rJrKrLrMr�r8r�r�r�r�rNrOrPs@r-r�r��s&���D�:�6�"��V�Vr/r�c�<�\rSrSrSrSrSrSrSrSr	Sr
S	rg
)�TestSetLastRevisionVerbMixini�z;Mixin test case for verbs that implement set_last_revision.c�(�URSS5 g)z;An empty branch can have its last revision set to b'null:'.r)rN)r�r]s r-�test_set_null_to_null�2TestSetLastRevisionVerbMixin.test_set_null_to_null�s���"�"�8�Q�/r/c�x�SnUR[R"SU45URUS55 g)zCIf the revision_id is not present, the verb returns NoSuchRevision.snon-existent revisionrMrN)r�r�r�r�)r;r�s  r-�test_NoSuchRevision�0TestSetLastRevisionVerbMixin.test_NoSuchRevision�s9��.������/�/�1B�K�0P�Q��"�"�;��2�	
r/c�*�URR5 URRS5 SR5nURR	SUS9 URR	SSS9 URR5 g)Nr	rr
r
r�rev-2)rrrr�rr�r;r8s  r-�make_tree_with_two_commits�7TestSetLastRevisionVerbMixin.make_tree_with_two_commits�sk���	�	�����	�	�
�
�b���m�m�o���	�	����k��:��	�	����h��7��	�	���r/c��UR5 SR5nURRR	SS5 URSURRR
55 URUS5 URSU4URRR
55 g)zKA branch's tip can be set to a revision that is present in its
repository.
rrr))rr)rN)r�r�rr�set_last_revision_infor�r0r�r�s  r-�)test_branch_last_revision_info_is_updated�FTestSetLastRevisionVerbMixin.test_branch_last_revision_info_is_updated�s���	
�'�'�)��m�m�o���	�	���/�/��8�<������	�	�(8�(8�(K�(K�(M�N�	
�"�"�;��2����!�[�)�4�9�9�+;�+;�+N�+N�+P�Qr/c�<�UR5 SR5nURSURRR55 UR
US5 URSU4URRR55 g)zPA branch's tip can be set to a revision that is an ancestor of the
current tip.
r�rkr�rN)r�r�r�rrr0r�r�s  r-�%test_branch_last_revision_info_rewind�BTestSetLastRevisionVerbMixin.test_branch_last_revision_info_rewind�sv��	
�'�'�)��m�m�o�������	�	�(8�(8�(K�(K�(M�N��"�"�;��2����!�[�)�4�9�9�+;�+;�+N�+N�+P�Qr/c�^�SmU4Sjn[RRRSUS5 UR	[
R"STRS545URSS55 g)	z^If a pre_change_branch_tip hook raises TipChangeRejected, the verb
returns TipChangeRejected.
urejection message‽c�0>�[R"T5er4)r�TipChangeRejected)�params�rejection_messages �r-�hook_that_rejects�NTestSetLastRevisionVerbMixin.test_TipChangeRejected.<locals>.hook_that_rejects�s����*�*�+<�=�=r/�pre_change_branch_tipNsTipChangeRejectedr�r)r)	r�r�r�r�r�r�r�r�r�)r;r�r�s  @r-�test_TipChangeRejected�3TestSetLastRevisionVerbMixin.test_TipChangeRejected�sx���?��	>�	��� � �3�3�#�%6��	
�	
����/�/�%�'8�'?�'?��'H�I�
�
�"�"�8�Q�/�		
r/rbN)rJrKrLrMr�r�r�r�r�r�r�rNrbr/r-r�r��s%��E�0�
��
R�R�
r/r�c�6�\rSrSrSr\RrSrSr	g)�+TestSmartServerBranchRequestSetLastRevisioni�z(Tests for Branch.set_last_revision verb.c�<�URRSX4U5$�Nr/�rr��r;r�r�rdres     r-r��>TestSmartServerBranchRequestSetLastRevision._set_last_revision�s���|�|�#�#�C��;�O�Or/rbN)
rJrKrLrMr�r�'SmartServerBranchRequestSetLastRevisionr�r�rNrbr/r-r�r��s��3� �H�H�M�Pr/r�c�<�\rSrSrSr\RrSrSr	Sr
g)�/TestSmartServerBranchRequestSetLastRevisionInfoi�z-Tests for Branch.set_last_revision_info verb.c�<�URRSX4X!5$r�r�r�s     r-r��BTestSmartServerBranchRequestSetLastRevisionInfo._set_last_revision�s���|�|�#�#�C��5�V�Vr/c�,�[R"5e)zcBranch.set_last_revision_info does not have to return
NoSuchRevision if the revision_id is absent.
)r�TestNotApplicabler]s r-r��CTestSmartServerBranchRequestSetLastRevisionInfo.test_NoSuchRevision�s���%�%�'�'r/rbN)rJrKrLrMr�r�+SmartServerBranchRequestSetLastRevisionInfor�r�r�rNrbr/r-r�r��s��8� �L�L�M�W�(r/r�c�T�\rSrSrSr\RrSrSr	Sr
SrSrSr
S	rg
)�-TestSmartServerBranchRequestSetLastRevisionExiz+Tests for Branch.set_last_revision_ex verb.c�@�URRSX4USS5$)Nr/rr�r�s     r-r��@TestSmartServerBranchRequestSetLastRevisionEx._set_last_revisions!���|�|�#�#�C��;�PQ�ST�U�Ur/c�v�URX5nUR[R"SX!45U5 g)Nr�r�r�s    r-r��CTestSmartServerBranchRequestSetLastRevisionEx.assertRequestSucceedss6���)�)�+�=������3�3�U�E�4O�P��	
r/c���UR5 SR5nURSURRR55 UR
5up#URRSX#USS5nUR[R"S5U5 URSURRR55 URRSX#USS5nUR[R"SSU45U5 UR5 URSU4URRR55 g)	z�A branch's tip can be set to a revision that is an ancestor of the
current tip, but only if allow_overwrite_descendant is passed.
rr�r/r)r�rkr�rr�N)r�r�r�rrr0r�rr�r�r�r�)r;r8rdrer�s     r-r��STestSmartServerBranchRequestSetLastRevisionEx.test_branch_last_revision_info_rewinds4��	
�'�'�)��m�m�o�������	�	�(8�(8�(K�(K�(M�N�$(�#3�#3�#5� ���<�<�'�'���;��1�
��	
����3�3�4H�I�8�	
�	
�����	�	�(8�(8�(K�(K�(M�N��<�<�'�'���;��1�
��	
����3�3�U�A�{�4K�L�h�	
�	
�������!�[�)�4�9�9�+;�+;�+N�+N�+P�Qr/c��URR5 URRS5 URRS5 URRR5upURRSSS9 URRR
X5 URRU/5 URRSSS9 URR5 g)z�Make a branch with divergent history in its repo.

The branch's tip will be 'child-2', and the repo will also contain
'child-1', which diverges from a common base revision.
r	r
r�child-1r
�child-2N)	rrrrrr0r��set_parent_idsr)r;�revno_1�revid_1s   r-�"make_branch_with_divergent_history�PTestSmartServerBranchRequestSetLastRevisionEx.make_branch_with_divergent_history2s���	
�	�	�����	�	�
�
�b���	�	����&��9�9�+�+�>�>�@����	�	����j��9��	�	���/�/��A��	�	� � �'��+�	
�	�	����j��9��	�	���r/c��UR5 UR[R"S5UR	SS55 URSUR
RR55 g)z\If allow_diverged is not passed, then setting a divergent history
returns a Diverged error.
)sDivergedr�rkr�N)r�r�r�r�r�rr�
last_revisionr]s r-�test_not_allow_diverged�ETestSmartServerBranchRequestSetLastRevisionEx.test_not_allow_divergedEsa��	
�/�/�1�����/�/��?��"�"�:�q�1�	
�
	
����T�Y�Y�%5�%5�%C�%C�%E�Fr/c�Z�UR5 UR5upURRSXSSS5nUR	[
R"S5U5 UR5 UR	SURRR55 g)zHIf allow_diverged is passed, then setting a divergent history
succeeds.
r/r�rr)r�rkr�N)r�r�rr�r�r�r�r�rrr�)r;rdrer�s    r-�test_allow_diverged�ATestSmartServerBranchRequestSetLastRevisionEx.test_allow_divergedQs���	
�/�/�1�#'�#3�#3�#5� ���<�<�'�'��\�z�ST�VW�X������3�3�4J�K�X�	
�	
��������T�Y�Y�%5�%5�%C�%C�%E�Fr/rbN)rJrKrLrMr�r�)SmartServerBranchRequestSetLastRevisionExr�r�r�r�r�r�r�rNrbr/r-r�r�s4��6� �J�J�M�V�
�R�:�&
G�Gr/r�c� �\rSrSrSrSrSrg)�TestSmartServerBranchBreakLocki`c��URS5n[R"UR55nUR	5 UR[R"SS5URS55 g�Nr�r�r�)	r�r�SmartServerBranchBreakLockr@rr�r�r�r�)r;r�rs   r-�test_lock_to_break�1TestSmartServerBranchBreakLock.test_lock_to_breakasa���&�&�v�.���9�9�$�:L�:L�:N�O����� �����3�3�H�d�C��O�O�G�$�	
r/c���URS5 [R"UR55nUR	[
R"SS5URS55 gr�)r�rr�r@r�r�r�r�)r;rs  r-�test_nothing_to_break�4TestSmartServerBranchBreakLock.test_nothing_to_breakjsS������ ��9�9�$�:L�:L�:N�O������3�3�H�d�C��O�O�G�$�	
r/rbN�rJrKrLrMr�rrNrbr/r-r�r�`s��
�
r/r�c� �\rSrSrSrSrSrg)�%TestSmartServerBranchRequestGetParentisc���URS5 [R"UR55nUR	S5nUR[R"S5U5 g�Nr�r�)r/)r�r�SmartServerBranchGetParentr@r�r�r�r��r;rr�s   r-�test_get_parent_none�:TestSmartServerBranchRequestGetParent.test_get_parent_nonetsR������ ��9�9�$�:L�:L�:N�O���?�?�7�+������@�@��H�(�Sr/c��URS5nURURS55 [R"UR55nUR
S5nUR[R"S5U5 g)Nr�rWr�)s../foo)
r��
set_parentrDrr	r@r�r�r�r�)r;r�rr�s    r-�test_get_parent_something�?TestSmartServerBranchRequestGetParent.test_get_parent_somethingzsn���&�&�v�.�����t�|�|�E�2�3��9�9�$�:L�:L�:N�O���?�?�7�+������3�3�L�A�8�	
r/rbN)rJrKrLrMrrrNrbr/r-rrss
��T�
r/rc� �\rSrSrSrSrSrg)�%TestSmartServerBranchRequestSetParenti�c�&�URSSS9nUR5 URS5 UR5 [R
"UR
55nURU5up4URSX4S5nUR5 UR[R"S5U5 URR5nURSUR55 g!UR5 f=f)Nr��1.9r�rWr�r/rb)r�r�_set_parent_locationrr�)SmartServerBranchRequestSetParentLocationr@rfr�r�r�r�rrk�
get_parent)r;rrrdrer�s      r-�test_set_parent_none�:TestSmartServerBranchRequestSetParent.test_set_parent_none�s����!�!�&��!�7�������#�#�E�*��
�
���H�H���� �
��$(�#7�#7��#?� ��	����w��#�N�H��M�M�O�����@�@��D�h�O��"�"�.�.�0������v�0�0�2�3��	
�M�M�O�s�:C>�>Dc���URSSS9n[R"UR55nUR	U5up4URSX4S5nUR
5 UR[R"S5U5 [RRUR5nURSUR55 g!UR
5 f=f)Nr�rr�r�shttp://bar/rbzhttp://bar/)r�rrr@rfr�rr�r�r�r�r�r�r�r)r;rrrdrer��	refresheds       r-�test_set_parent_something�?TestSmartServerBranchRequestSetParent.test_set_parent_something�s����!�!�&��!�7���H�H���� �
��$(�#7�#7��#?� ��	������>��H�
�M�M�O�����@�@��D�h�O��&�&�+�+�F�K�K�8�	�����	�(<�(<�(>�?��
�M�M�O�s�	C�C.rbN)rJrKrLrMrrrNrbr/r-rr�s
��4�$@r/rc��\rSrSrSrSrg)�(TestSmartServerBranchRequestGetTagsBytesi�c���URS5 [R"UR55nUR	S5nUR[R"S5U5 gr)r�r�SmartServerBranchGetTagsBytesr@r�r�r�r�r
s   r-�test_get_bytes�7TestSmartServerBranchRequestGetTagsBytes.test_get_bytes�sR������ ��<�<�T�=O�=O�=Q�R���?�?�7�+������@�@��H�(�Sr/rbN)rJrKrLrMr"rNrbr/r-rr�s��Tr/rc��\rSrSrSrSrg)�+TestSmartServerBranchRequestGetStackedOnURLi�c��URSSS9 URSSS9nURS5 [R"UR	55nURS5nUR
[R"S5U5 g)Nr�z1.6r��stackedz../base�stacked)r�s../base)	r�r�r�'SmartServerBranchRequestGetStackedOnURLr@r�r�r�r�)r;�stacked_branchrr�s    r-�test_get_stacked_on_url�CTestSmartServerBranchRequestGetStackedOnURL.test_get_stacked_on_url�s���������.��)�)�)�E�)�B���)�)�)�4��F�F���� �
���?�?�:�.������6�6�7J�K�X�Vr/rbN)rJrKrLrMr+rNrbr/r-r%r%�s��	Wr/r%c�8�\rSrSrSrSrSrSrSrSr	Sr
g	)
�%TestSmartServerBranchRequestLockWritei�c��UR5n[R"U5nURSSS9nURnURS5nURRR5RnURRR5RnUR[R"SXg45U5 URR5nUR[ R"UR$5 [R&"U5nURSXg5ng�Nr��knitr�r/r�)r@r�!SmartServerBranchRequestLockWriter�rr��
control_files�_lock�peek�noncer�r�r�rrkr�r�LockContentionr�SmartServerBranchRequestUnlock)	r;r�rrrr��branch_nonce�repository_nonce�
new_branchs	         r-�"test_lock_write_on_unlocked_branch�HTestSmartServerBranchRequestLockWrite.test_lock_write_on_unlocked_branch�s���$�$�&���@�@��I���!�!�#�f�!�5���&�&�
��?�?�3�'���+�+�1�1�6�6�8�>�>��%�3�3�9�9�>�>�@�F�F������)�)�5�,�*Q�R��	
� �*�*�6�6�8�
����&�/�/��1F�1F�G��=�=�g�F���?�?�3��G�r/c��UR5n[R"U5nURS5nUR	5R
nUR
5 UR5 URS5nUR[R"S5U5 UR	U5 UR5 UR5 g)Nr�r/�sLockContention)
r@rr2r�rrb�leave_lock_in_placerr�r�r�r��dont_leave_lock_in_place)r;r�rrrdr�s      r-� test_lock_write_on_locked_branch�FTestSmartServerBranchRequestLockWrite.test_lock_write_on_locked_branch�s����$�$�&���@�@��I���!�!�#�&���(�(�*�0�0���"�"�$��
�
���?�?�3�'������6�6�7K�L�h�W����,�'��'�'�)��
�
�r/c�~�UR5n[R"U5nURSSS9nUR	U5upEUR5 URR5 UR5 URSXE5nUR[R"SXE45U5 URRU5 URR5 URR5 URU5 UR5 UR5 gr0�r@rr2r�rfr@rrr�r�r�r�rrA�r;r�rrrdrer�s       r-�,test_lock_write_with_tokens_on_locked_branch�RTestSmartServerBranchRequestLockWrite.test_lock_write_with_tokens_on_locked_branch�s����$�$�&���@�@��I���!�!�#�f�!�5��#'�#7�#7��#?� ���"�"�$����-�-�/��
�
���?�?�3��A������)�)�5�,�*K�L�h�	
�	���$�$�Z�0����2�2�4���� � �"����,�'��'�'�)��
�
�r/c��UR5n[R"U5nURSSS9nUR	U5upEUR5 URR5 UR5 URSUS-U5nUR[R"S5U5 URRU5 URR5 URR5 URU5 UR5 UR5 g)Nr�r1r�r/sxxx�s
TokenMismatchrErFs       r-�7test_lock_write_with_mismatched_tokens_on_locked_branch�]TestSmartServerBranchRequestLockWrite.test_lock_write_with_mismatched_tokens_on_locked_branch�s����$�$�&���@�@��I���!�!�#�f�!�5��#'�#7�#7��#?� ���"�"�$����-�-�/��
�
���?�?�3��v�(=�z�J������6�6�7J�K�X�V����$�$�Z�0����2�2�4���� � �"����,�'��'�'�)��
�
�r/c���UR5n[R"U5nURSSS9nURnUR5RnUR5 UR5 URS5nUR[R"S5U5 URU5 UR5 UR5 g�Nr�r1r�r/r?)r@rr2r�rrrcr@rr�r�r�r�rA)r;r�rrr)rer�s       r-�test_lock_write_on_locked_repo�DTestSmartServerBranchRequestLockWrite.test_lock_write_on_locked_repo	s����$�$�&���@�@��I���!�!�#�f�!�5��� � ���_�_�&�7�7�
�� � �"����
��?�?�3�'������6�6�7K�L�h�W����
�#��%�%�'����
r/c���UR5n[R"U5nURS5 UR	5RS5n[R"URUR	5R5nURURS55nURupgnURUR55 URSU5 g)Nr�rBr��
LockFailed)�get_readonly_transportrr2r�r@rEr
�relative_urlr�r�r�r0�assertFalse�
is_successfulr�)	r;r�rr��pathr��
error_name�lock_str�why_strs	         r-�%test_lock_write_on_readonly_transport�KTestSmartServerBranchRequestLockWrite.test_lock_write_on_readonly_transports����-�-�/���@�@��I��������!�!�#�)�)�#�.���$�$�T�Y�Y��0B�0B�0D�0I�0I�J���?�?�4�;�;�w�#7�8��(0�
�
�%�
�g�����/�/�1�2�����
�3r/rbN)rJrKrLrMr<rBrGrKrOr[rNrbr/r-r.r.�s!��H�(��(�$
�	4r/r.c� �\rSrSrSrSrSrg)�1TestSmartServerBranchRequestGetPhysicalLockStatusi$c�f�UR5n[R"U5nURS5nUR	U5upEURSUR
55 URS5nUR[R"S5U5 UR5 g)Nr�Tr/r�)r@r�-SmartServerBranchRequestGetPhysicalLockStatusr�rfr��get_physical_lock_statusr�r�r�rrFs       r-�	test_true�;TestSmartServerBranchRequestGetPhysicalLockStatus.test_true%s����$�$�&���L�L�W�U���!�!�#�&��#'�#7�#7��#?� ������v�>�>�@�A��?�?�3�'������6�6�y�A�8�L��
�
�r/c� �UR5n[R"U5nURS5nUR	SUR55 UR
S5nUR	[R"S5U5 g)Nr�Fr/r)	r@rr`r�r�rar�r�r��r;r�rrr�s     r-�
test_false�<TestSmartServerBranchRequestGetPhysicalLockStatus.test_false/sr���$�$�&���L�L�W�U���!�!�#�&������� ?� ?� A�B��?�?�3�'������6�6�x�@�(�Kr/rbN)rJrKrLrMrbrfrNrbr/r-r^r^$s
���Lr/r^c�&�\rSrSrSrSrSrSrg)�"TestSmartServerBranchRequestUnlocki8c���UR5n[R"U5nURSSS9nUR	U5upEUR5 URR5 UR5 URSXE5nUR[R"S5U5 URR5nUR5 UR5 g�Nr�r1r�r/r�)r@rr8r�rfr@rrr�r�r�r�rrkr)r;r�rrrdrer�r;s        r-�%test_unlock_on_locked_branch_and_repo�HTestSmartServerBranchRequestUnlock.test_unlock_on_locked_branch_and_repo9s����$�$�&���=�=�g�F���!�!�#�f�!�5��#'�#7�#7��#?� ��	�"�"�$����-�-�/��
�
���?�?�3��A������6�6�x�@�(�K��&�&�2�2�4�
��������r/c���UR5n[R"U5nURSSS9 UR	SSS5nUR[R"S5U5 g)Nr�r1r�r/�branch tokens
repo tokenrJ)r@rr8r�r�r�r�r�r�s    r-�,test_unlock_on_unlocked_branch_unlocked_repo�OTestSmartServerBranchRequestUnlock.test_unlock_on_unlocked_branch_unlocked_repoLsa���$�$�&���=�=�g�F������V��,��?�?�3���G������6�6�7J�K�X�Vr/c�0�UR5n[R"U5nURSSS9nURR5RnURR5 URR5 URSSU5nUR[R"S5U5 URRU5 URR5 URR5 g)Nr�r1r�r/rorJ)r@rr8r�rrrcr@rr�r�r�r�rA)r;r�rrrer�s      r-�*test_unlock_on_unlocked_branch_locked_repo�MTestSmartServerBranchRequestUnlock.test_unlock_on_unlocked_branch_locked_repoSs����$�$�&���=�=�g�F���!�!�#�f�!�5���&�&�1�1�3�D�D�
����-�-�/���� � �"��?�?�3���D������6�6�7J�K�X�V����$�$�Z�0����2�2�4���� � �"r/rbN)rJrKrLrMrlrprsrNrbr/r-riri8s���&W�#r/ric��\rSrSrSrSrg)� TestSmartServerRepositoryRequestiec���UR5n[R"U5nURSSS9 UR	S5 UR[RURS5 g)z=Raise NoRepositoryPresent when there is a bzrdir and no repo.r�Tr/rrN)	r@rp�SmartServerRepositoryRequestr�r�r�rrlr�rs   r-r�3TestSmartServerRepositoryRequest.test_no_repositoryfs_���$�$�&���9�9�'�B�����S���.����X�&����&�4�4�g�o�o�y�Qr/rbN)rJrKrLrMrrNrbr/r-rvrves��
Rr/rvc��\rSrSrSrSrg)�)TestSmartServerRepositoryAddSignatureTextisc�J�UR5n[R"U5nURS5nUR	5nURUR5 URS5 URSSS9 URRR5 URRR5nURSUR"SUS/UVs/sHofRS5PM snQ765 UR!S5nUR#UR%55 URUR&S	S
5 UR&SSVs/sHofR)S5PM nnURRR+U5 URRR-5 UR
5 URSURRR/S55 gs snfs snf)Nr�r	�Message�rev1r
r/r�s
somesignaturerr�r)r@rp�%SmartServerRepositoryAddSignatureTextrr�
addCleanuprrrrr�start_write_group�suspend_write_groupr�r�r�rm�
assertTruerVr0�decode�resume_write_group�commit_write_group�get_signature_text)r;r�rr�write_token�write_group_tokensrbr�s        r-�
test_add_text�7TestSmartServerRepositoryAddSignatureText.test_add_textts����$�$�&���B�B�7�K���/�/��4���o�o�'��������$���������I�g��.������0�0�2�!�[�[�3�3�G�G�I�������O�O����
�6H�H�5G�E�,�,�w�'�5G�H�	
�	
��?�?�#3�4������.�.�0�1�������q�)�5�1�AI���q�r�AR�S�AR��l�l�7�3�AR��S������1�1�2D�E������1�1�3����
�����d�k�k�4�4�G�G��P�	
��I��Ts�,H�0H rbN)rJrKrLrMr�rNrbr/r-r{r{ss��
r/r{c� �\rSrSrSrSrSrg)�'TestSmartServerRepositoryAllRevisionIdsi�c���UR5n[R"U5nURS5 UR	[
R"SS5URS55 g)�9An empty body should be returned for an empty repository.r�r�r/N)r@rp�#SmartServerRepositoryAllRevisionIdsr�r�r�r�r�rs   r-r_�2TestSmartServerRepositoryAllRevisionIds.test_empty�sX���$�$�&���@�@��I�����S�!�����3�3�H�c�B�G�O�O�TW�DX�	
r/c��UR5n[R"U5nURS5nUR	5 URS5 UR
SSS9 UR
SSS9 UR5 URURS5[R"SS	5[R"SS
5/5 g)r�r�r	s	origineel�message�rr�snog-een-revisier/r�sorigineel
nog-een-revisiesnog-een-revisie
origineelN)r@rpr�rrrrrr�r�r�r��r;r�rrs    r-�test_some_revisions�;TestSmartServerRepositoryAllRevisionIds.test_some_revisions�s����$�$�&���@�@��I���/�/��4��������������<���;����-�y��A����
��
�
��O�O�C� ��7�7��;���7�7��;��	
�
	
r/rbN)rJrKrLrMr_r�rNrbr/r-r�r��s��
�
r/r�c� �\rSrSrSrSrSrg)�"TestSmartServerRepositoryBreakLocki�c�&�UR5n[R"U5nURS5nURR
R
5 UR[R"SS5URS55 g�Nr�r�r/)r@rp�SmartServerRepositoryBreakLockrrrrr�r�r�r�r�s    r-r��5TestSmartServerRepositoryBreakLock.test_lock_to_break�sp���$�$�&���;�;�G�D���/�/��4�������)�)�+�����3�3�H�d�C��O�O�C� �	
r/c���UR5n[R"U5nURS5 UR	[
R"SS5URS55 gr�)r@rpr�rr�r�r�r�rs   r-r�8TestSmartServerRepositoryBreakLock.test_nothing_to_break�sX���$�$�&���;�;�G�D���(�(��-�����3�3�H�d�C��O�O�C� �	
r/rbNrrbr/r-r�r��s��
�
r/r�c� �\rSrSrSrSrSrg)�%TestSmartServerRepositoryGetParentMapi�c�J�UR5n[R"U5nURS5 UR	SURSS55 UR	[R"S[R"S55URS55 g)Nr�r/�
missing-idr��

0
�r@rp�!SmartServerRepositoryGetParentMaprr�r�r�r��bz2�compressrmrs   r-�test_trivial_bzipped�:TestSmartServerRepositoryGetParentMap.test_trivial_bzipped�s|���$�$�&���>�>�w�G���(�(��-�����w���s�M�B�C�����3�3�H�c�l�l�3�>O�P��O�O�J�'�	
r/c�L�UR5n[R"U5nURS5 UR	SURSSS55 UR	[R"S[R"S55URS55 g)Nr�r/r�sinclude-missing:r�smissing:missing-idr�r�rs   r-�test_trivial_include_missing�BTestSmartServerRepositoryGetParentMap.test_trivial_include_missing�s����$�$�&���>�>�w�G���(�(��-�����w���s�M�CV�W�X�����3�3��#�,�,�'<�=�
�
�O�O�J�'�		
r/rbN)rJrKrLrMr�r�rNrbr/r-r�r�����
�
r/r�c�&�\rSrSrSrSrSrSrg)�)TestSmartServerRepositoryGetRevisionGraphi�c�l�UR5n[R"U5nURS5nUR	5 URS5 UR
S5nUR
SSR5S9nUR5 [SRXT/5U/5nURSS5nS	R[URRS	555UlUR[R "S
S	RU55U5 g)Nr�r	r
rrr
� r/�
r�)r@rp�%SmartServerRepositoryGetRevisionGraphrrrrr�r�sortedrr��body�splitr�r�r�)r;r�rrrr�linesr�s        r-�test_none_argument�<TestSmartServerRepositoryGetRevisionGraph.test_none_argument�s����$�$�&���B�B�7�K���/�/��4�����������
�[�[��
&��
�[�[��f�m�m�o�[�
>�����
���	�	�2�(�+�R�0�1���?�?�3��,���
�
�6�(�-�-�*=�*=�e�*D�#E�F��
�����)�)�(�E�J�J�u�4E�F��	
r/c��UR5n[R"U5nURS5nUR	5 URS5 SR
5nURSUS9 URSSR
5S9 UR5 UR[R"SU5URS	U55 g)
Nr�r	�Ér
r
rrr�r/)
r@rpr�rrrr�rrr�r�r�r�r7s     r-�test_specific_revision_argument�ITestSmartServerRepositoryGetRevisionGraph.test_specific_revision_argument�s����$�$�&���B�B�7�K���/�/��4������������m�m�o�����L���5����L������9����
�����)�)�(�K�@��O�O�C��-�	
r/c�d�UR5n[R"U5nURS5nUR	5 URS5 UR
S5 UR5 UR[R"SS5URSS55 g)Nr�r	r
)�nosuchrevision�missingrevisionr/r�)r@rpr�rrrrrr�r�r�r�r�s    r-�test_no_such_revision�?TestSmartServerRepositoryGetRevisionGraph.test_no_such_revision
s����$�$�&���B�B�7�K���/�/��4��������������L�!����
�	
����)�)���
�
�O�O�C�!3�4�		
r/rbN)rJrKrLrMr�r�r�rNrbr/r-r�r��s��
�(
� 
r/r�c�&�\rSrSrSrSrSrSrg)�)TestSmartServerRepositoryGetRevIdForRevnoi c	���UR5n[R"U5nURS5nUR	5 URS5 SR
5nSR
5nURSUS9 URSUS9 UR5 UR[R"SU45URS	S
SU455 g)Nr�r	rr�r
r
rr�r/rrk)
r@rp�%SmartServerRepositoryGetRevIdForRevnorrrr�rrr�r�r�r�)r;r�rr�rev1_id_utf8�rev2_id_utf8s      r-�test_revno_found�:TestSmartServerRepositoryGetRevIdForRevno.test_revno_found!s����$�$�&���B�B�7�K���/�/��4������������}�}����}�}������L���6����L���6����
�����)�)�5�,�*?�@��O�O�C��Q��$5�6�	
r/c���UR5n[R"U5nURS5 UR	[
R"S5URSSS55 g)Nr�)r��ghostr/r)rkr�)r@rpr�r�r�r�r�r�rs   r-�test_known_revid_missing�BTestSmartServerRepositoryGetRevIdForRevno.test_known_revid_missing2s[���$�$�&���B�B�7�K�����S�!�����/�/�0M�N��O�O�C��M�2�	
r/c	��UR5n[R"U5nURSSS9nUR	5 URS/S/S9 UR
SS9 UR
S	S9nUR5 URS
SS9nURRUR5 URU/5 UR
SS9nURRURS5URS5S
9 UR[R"SSU45UR!SSSU455 g)N�parentrr�r	s	TREE_ROOT��idszfirst commit)r�z
second commit�localzlocal commitr')�
stacked_onshistory-incompleterkr(rr7)r@rpr�rrrrrr�pullr��create_clone_on_transportrDr�r�r�r�)r;r�rr�rr��r3s       r-�test_history_incomplete�ATestSmartServerRepositoryGetRevIdForRevno.test_history_incomplete;s1���$�$�&���B�B�7�K���1�1�(�5�1�I�������
�
�B�4�l�^�
�,��
�
�n�
�-�
�]�]�?�]�
3���
�
���0�0���0�G��
�����&�-�-�(�
���b�T�"�
�\�\�.�\�
1��
���.�.����y�)�d�l�l�8�6L�	/�	
�	
����)�)�+@�!�R�*H�I��O�O�J��A�r�7�3�	
r/rbN)rJrKrLrMr�r�r�rNrbr/r-r�r� s��
�"
�
r/r�c� �\rSrSrSrSrSrg)�&TestSmartServerRepositoryIterRevisionsiQc	���UR5n[R"U5nURSSS9nUR	5 URS5 UR
SSS9 UR
SS	S9 UR5 URSURS
55 URS5nURUR55 URURS5 URUR R#5R5 UR R$R&R)S
S/SS5Vs/sH(n[*R,"UR/S55PM* nnS
R1UR25nURUS
R1USUS/5S
R1USUS/54;5 gs snf)Nr�r�r�r	r
r~r
r�rev2r/�	rev1
rev2�r�s10)r~)r��	unorderedT�fulltextrr)r@rp�"SmartServerRepositoryIterRevisionsrrrrrrlr�rmr�rVr�r0r�r�	lock_readr�	revisions�get_record_stream�zlibr��get_bytes_asr�body_stream)r;r�rrr��record�entries�contentss        r-�
test_basic�1TestSmartServerRepositoryIterRevisions.test_basicRs����$�$�&���?�?��H���/�/��D�/�A��������������L���1����L���1����
��
�
�d�G�O�O�C�0�1��?�?�=�1������.�.�0�1��������7�������-�-�/�6�6�7��+�+�0�0�:�:�L�L��Z�(�+�t��
���
�M�M�&�-�-�j�9�:��	�
��8�8�H�0�0�1���������'�!�*�g�a�j�1�2�C�H�H�g�a�j�'�RS�*�=U�4V�W�
X�	
��
s�/G.c��UR5n[R"U5nURSSS9 UR	SURS55 UR
S5nURUR55 URURS5 SRUR5nURUS5 g)Nr�r�r�r/r�r�)
r@rpr�rrlr�rmr�rVr�r0rr�)r;r�rr�r�s     r-rL�3TestSmartServerRepositoryIterRevisions.test_missingps����$�$�&���?�?��H���(�(��T�(�:��
�
�d�G�O�O�C�0�1��?�?�=�1������.�.�0�1��������7��8�8�H�0�0�1������3�'r/rbN)rJrKrLrMr�rLrNrbr/r-r�r�Qs��
�<(r/r�c��\rSrSrSrSrg)�GetStreamTestBaseic��URS5nUR5 URS5 URS5nURSSR	5S9nUR5 URRnXBU4$)Nr�r	r
rrr
)rrrrr�rrr)r;rrrr)s     r-�make_two_commit_repo�&GetStreamTestBase.make_two_commit_repo�so���/�/��4�����������
�[�[��
&��
�[�[��f�m�m�o�[�
>�����
��{�{�%�%����|�r/rbN)rJrKrLrMr�rNrbr/r-r�r�s��r/r�c�&�\rSrSrSrSrSrSrg)�"TestSmartServerRepositoryGetStreami�c��UR5n[R"U5nUR5up4nSU/nSR	U5nURSURR55 URU5nURSUR5 SR	UR5n	URU	S5 g)�7The search argument may be a 'ancestry-of' some heads'.sancestry-ofr�r/r��Bazaar pack format 1N�
r@rp�SmartServerRepositoryGetStreamr�rr�r&r�rmr�r0r��assertStartsWith�
r;r�rr)rr�
fetch_specr�r��stream_bytess
          r-�test_ancestry_of�3TestSmartServerRepositoryGetStream.test_ancestry_of�s����$�$�&���;�;�G�D���0�0�2���"�$�b�)�
��
�
�:�&������T�\�\�6�6�8�9��?�?�5�)������8�=�=�1��x�x�� 4� 4�5�����l�,C�Dr/c��UR5n[R"U5nUR5up4nSUS-U-SS/nSR	U5nURSURR55 URU5nURSUR5 SR	UR5n	URU	S5 g	)
z<The search argument may be a 'search' of some explicit keys.ssearchr�r)r6r�r/r�r�Nr�r�s
          r-�test_search�.TestSmartServerRepositoryGetStream.test_search�s����$�$�&���;�;�G�D���0�0�2���"���d��R���4�@�
��
�
�:�&������T�\�\�6�6�8�9��?�?�5�)������8�=�=�1��x�x�� 4� 4�5�����l�,C�Dr/c��UR5n[R"U5nUR5up4nSnUR	SUR
R
55 URU5nURSUR5 SRUR5nURUS5 g)z*A search of 'everything' returns a stream.s
everythingr/r�r�N)
r@rp�#SmartServerRepositoryGetStream_1_19r�r�r&r�rmr�r0rr�r�)	r;r�rr)rr�serialised_fetch_specr�rs	         r-�test_search_everything�9TestSmartServerRepositoryGetStream.test_search_everything�s����$�$�&���@�@��I���0�0�2���"� -������T�\�\�6�6�8�9��?�?�#8�9������8�=�=�1��x�x�� 4� 4�5�����l�,C�Dr/rbN)rJrKrLrMrrr	rNrbr/r-r�r��s��E�E�
Er/r�c� �\rSrSrSrSrSrg)�!TestSmartServerRequestHasRevisioni�c���UR5n[R"U5nURS5 UR	[
R"S5URSS55 g)z-For a missing revision, ('no', ) is returned.r�rr/rFN)r@rp�SmartServerRequestHasRevisionr�r�r�r�r�rs   r-�test_missing_revision�7TestSmartServerRequestHasRevision.test_missing_revision�sW���$�$�&���:�:�7�C�����S�!�����)�)�(�3�W�_�_�S�(�5S�	
r/c���UR5n[R"U5nURS5nUR	5 URS5 SR
5nURSUS9 UR5 URURRRU55 UR[R"S5UR!SU55 g)	z.For a present revision, ('yes', ) is returned.r�r	�Èabc�a commitr
r�r/N)r@rprrrrr�rrr�rr�has_revisionr�r�r�r�r7s     r-�test_present_revision�7TestSmartServerRequestHasRevision.test_present_revision�s����$�$�&���:�:�7�C���/�/��4������������&�&�(�����J�{��3����
�������.�.�;�;�K�H�I�����)�)�)�4�g�o�o�c�;�6W�	
r/rbN)rJrKrLrMrrrNrbr/r-rr�rr/rc� �\rSrSrSrSrSrg)�'TestSmartServerRepositoryIterFilesBytesi�c��UR5n[R"U5nURS5nUR	UR5R5 URS/5 URS/S/S9 URSSS9 URSURS	55 URS
5nURUR55 URUR S5 URS	R#UR$5S[&R("S
5-5 g)Nr���file�somecontentsr�	thefileidr��somerev�add filer�r/sthefileidsomerev
r�sok0
r)r@rp�#SmartServerRepositoryIterFilesBytesr�r�rr�build_tree_contentsrrrlr�rmr�rVr�r0rr�r�r��r;r�rrHr�s     r-�test_single�3TestSmartServerRepositoryIterFilesBytes.test_single�s����$�$�&���@�@��I���%�%�c�*���������-�-�.�� � �";�!<�=�	���v�h�\�N��+�	���
�J��7��
�
�d�G�O�O�C�0�1��?�?�#:�;������.�.�0�1��������1�����H�H�X�)�)�*��4�=�=��9�9�	
r/c���UR5n[R"U5nURS5nUR	UR5R5 URSURS55 URS5nURUR55 URURS5 URSRUR5S5 g)Nr�r/sthefileidrevision
r�sabsentthefileidrevision0
)r@rpr r�r�rrrlr�rmr�rVr�r0rr�r"s     r-rL�4TestSmartServerRepositoryIterFilesBytes.test_missing�s����$�$�&���@�@��I���%�%�c�*���������-�-�.��
�
�d�G�O�O�C�0�1��?�?�#;�<������.�.�0�1��������1�����H�H�X�)�)�*�,U�	
r/rbN)rJrKrLrMr#rLrNrbr/r-rr�s��
�"
r/rc�&�\rSrSrSrSrSrSrg)�/TestSmartServerRequestHasSignatureForRevisionIdi�c���UR5n[R"U5nURS5 UR	[
R"SS5URSS55 g)z3For a missing revision, NoSuchRevision is returned.r�)r�rFNr/rF)r@rp�+SmartServerRequestHasSignatureForRevisionIdr�r�r�r�r�rs   r-r�ETestSmartServerRequestHasSignatureForRevisionId.test_missing_revision�s[���$�$�&���H�H��Q�����S�!�����/�/�0M�t�T��O�O�C��*�	
r/c���UR5n[R"U5nURS5nUR	5 URS5 UR
SSS9 UR5 URURRRS55 UR[R"S5URSS55 g)	z.For a missing signature, ('no', ) is returned.r�r	r�Ar
rr/N)r@rpr*rrrrrr�rrrr�r�r�r�r�s    r-�test_missing_signature�FTestSmartServerRequestHasSignatureForRevisionId.test_missing_signature�s����$�$�&���H�H��Q���/�/��4��������������J�t��,����
�������.�.�;�;�D�A�B�����)�)�(�3�W�_�_�S�$�5O�	
r/c���UR5n[R"U5n[R"S5nURS5nUR
5 URS5 URSSS9 URRR5 URRRSU5 URRR5 UR5 URURRR!S55 UR#[$R&"S5UR)SS55 g)	z/For a present signature, ('yes', ) is returned.Nr�r	rr-r
r�r/)r@rpr*r�LoopbackGPGStrategyrrrrrrr��
sign_revisionr�rr�rr�r�r�r�)r;r�r�strategyrs     r-�test_present_signature�FTestSmartServerRequestHasSignatureForRevisionId.test_present_signatures����$�$�&���H�H��Q���*�*�4�0���/�/��4��������������J�t��,������0�0�2������,�,�T�8�<������1�1�3����
�������.�.�;�;�D�A�B�����)�)�)�4�g�o�o�c�4�6P�	
r/rbN)rJrKrLrMrr.r4rNrbr/r-r(r(�s��
�
�
r/r(c�,�\rSrSrSrSrSrSrSrg)�$TestSmartServerRepositoryGatherStatsic��UR5n[R"U5nURS5nUR	5 SnUR[R"SU5URSSS55 g)z>With an empty revid, we get only size an number and revisions.r�s
revisions: 0
r�r/rN)	r@rp� SmartServerRepositoryGatherStatsr��gather_statsr�r�r�r�)r;r�rr�
expected_bodys     r-�test_empty_revid�5TestSmartServerRepositoryGatherStats.test_empty_revidso���$�$�&���=�=�g�F���)�)�#�.�
����!�)�
�����)�)�(�M�B��O�O�C��e�,�	
r/c��UR5nSR5n[R"U5nUR	S5nUR5 UR
S5 URSSSS9 URSSS	US
9 UR5 URRR5 SnUR[R"SU5URS
US55 g)zFor a revid we get more infos.rr�r	r�3333$�@�)�	timestamp�timezone������#Ar)rArBrs?firstrev: 123456.200 3600
latestrev: 654321.400 0
revisions: 2
r�r/rN�r@r�rpr9rrrrrrrr:r�r�r�r��r;r�r8rrr;s      r-�test_revid_with_committers�?TestSmartServerRepositoryGatherStats.test_revid_with_committers(s����$�$�&���&�&�(���=�=�g�F���/�/��4��������������J�(�T��B����J�(�Q�{��S����
������+�+�-�Q�	�	
����)�)�(�M�B��O�O�C��e�4�	
r/c��UR5nSR5n[R"U5nUR	S5nUR5 UR
S5 URSSSSS9 URSS	S
SUS9 UR5 URRR5 S
nUR[R"SU5URSUS55 g)z=For a revid and requesting committers we get the whole thing.rr�r	rr?r@rW)rArB�	committerrCrrX)rArBrIrsMcommitters: 2
firstrev: 123456.200 3600
latestrev: 654321.400 0
revisions: 2
r�r/r�NrDrEs      r-�)test_not_empty_repository_with_committers�NTestSmartServerRepositoryGatherStats.test_not_empty_repository_with_committers>s����$�$�&���&�&�(���=�=�g�F���/�/��4��������������J�(�T�U��S���������	�	
�	
���
������+�+�-�
�	�	
����)�)�(�M�B��O�O�C��f�5�	
r/c���UR5n[R"U5nURS5 UR	[
R"SS5URSSS55 g)z7An unknown revision id causes a 'nosuchrevision' error.r�)r��miaNr/rMr�)r@rpr9r�r�r�r�r�rs   r-�test_unknown_revid�7TestSmartServerRepositoryGatherStats.test_unknown_revid]s]���$�$�&���=�=�g�F�����S�!�����/�/�0K�T�R��O�O�C���0�	
r/rbN)	rJrKrLrMr<rFrJrNrNrbr/r-r7r7s��

�
�,
�>
r/r7c� �\rSrSrSrSrSrg)�!TestSmartServerRepositoryIsSharedihc���UR5n[R"U5nURSSS9 UR	[
R"S5URS55 g)z/For a shared repository, ('yes', ) is returned.r�Tr/r�r/N�r@rp�SmartServerRepositoryIsSharedr�r�r�r�r�rs   r-�test_is_shared�0TestSmartServerRepositoryIsShared.test_is_sharedis^���$�$�&���:�:�7�C�����S���.�����)�)�)�4��O�O��
�	
r/c���UR5n[R"U5nURSSS9 UR	[
R"S5URS55 g)z.For a shared repository, ('no', ) is returned.r�Fr/rr/NrSrs   r-�test_is_not_shared�4TestSmartServerRepositoryIsShared.test_is_not_sharedus^���$�$�&���:�:�7�C�����S���/�����)�)�(�3��O�O��
�	
r/rbN)rJrKrLrMrUrXrNrbr/r-rQrQhs��

�

r/rQc��\rSrSrSrSrg)�1TestSmartServerRepositoryGetRevisionSignatureTexti�c�j�UR5n[R"U5nURS5nUR	SS9 UR5Rn[R"S5nURUR5R5 UR5 URSU5 UR5 S[R "US5R#5-S-nUR%[&R("SU5UR+SS55 g)Nr�r-r
s&-----BEGIN PSEUDO-SIGNED CONTENT-----
s$-----END PSEUDO-SIGNED CONTENT-----
r�r/)r@rp�-SmartServerRepositoryGetRevisionSignatureText�make_branch_builder�build_commit�
get_branchrrr1r�rrr�r2r�r�
from_revision�
as_short_textr�r�r�r�)r;r�r�bbr)r3r;s       r-�test_get_signature�DTestSmartServerRepositoryGetRevisionSignatureText.test_get_signature�s����$�$�&���J�J�7�S��
�
%�
%�c�
*��
���t��$��}�}��)�)���*�*�4�0��������)�0�0�1���� ����4��*����!�6��%�%�d�D�1�?�?�A�
B�6�
7�	�
	
����)�)�(�M�B��O�O�C��&�	
r/rbN)rJrKrLrMrdrNrbr/r-r[r[�s��
r/r[c� �\rSrSrSrSrSrg)�)TestSmartServerRepositoryMakeWorkingTreesi�c��UR5n[R"U5nURS5nUR	S5 UR[R"S5URS55 g)z;For a repository with working trees, ('yes', ) is returned.r�Tr�r/N�	r@rp�%SmartServerRepositoryMakeWorkingTreesr��set_make_working_treesr�r�r�r��r;r�r�rs    r-�test_make_working_trees�ATestSmartServerRepositoryMakeWorkingTrees.test_make_working_trees�si���$�$�&���B�B�7�K��� � ��%��	� � ��&�����)�)�)�4��O�O��
�	
r/c��UR5n[R"U5nURS5nUR	S5 UR[R"S5URS55 g)z:For a repository with working trees, ('no', ) is returned.r�Frr/Nrirls    r-rX�<TestSmartServerRepositoryMakeWorkingTrees.test_is_not_shared�si���$�$�&���B�B�7�K��� � ��%��	� � ��'�����)�)�(�3��O�O��
�	
r/rbN)rJrKrLrMrnrXrNrbr/r-rgrg�r�r/rgc�&�\rSrSrSrSrSrSrg)�"TestSmartServerRepositoryLockWritei�c��UR5n[R"U5nURSSS9nUR	S5nUR
RR5RnUR[R"SU45U5 URR5nUR[R UR"5 [R$"U5nUR	SU5ngr0)r@rp�SmartServerRepositoryLockWriter�r�r3r4r5r6r�r�r�rrmr�rr7r�SmartServerRepositoryUnlock)r;r�rrr�r6�new_repos       r-� test_lock_write_on_unlocked_repo�CTestSmartServerRepositoryLockWrite.test_lock_write_on_unlocked_repo�s����$�$�&���;�;�G�D���)�)�#�f�)�=�
��?�?�3�'���(�(�.�.�3�3�5�;�;������6�6��u�~�F��Q��(�(�8�8�:�����&�/�/��1D�1D�E��8�8��A���?�?�3��.�r/c��UR5n[R"U5nURSSS9nUR	5R
nUR
5 UR5 URS5nUR[R"S5U5 UR	U5 UR5 UR5 grN)
r@rprur�rrcr@rr�r�r�r�rA)r;r�rrrer�s      r-rO�ATestSmartServerRepositoryLockWrite.test_lock_write_on_locked_repo�s����$�$�&���;�;�G�D���)�)�#�f�)�=�
��*�*�,�=�=�
��&�&�(������?�?�3�'������6�6�7K�L�h�W����j�)��+�+�-����r/c��UR5n[R"U5nURSSS9 UR	S5nURUR
55 URSURS5 g)Nr�r1r�r/rRr)	rSrprur�r�rUrVr�r0r�s    r-r[�HTestSmartServerRepositoryLockWrite.test_lock_write_on_readonly_transport�sq���-�-�/���;�;�G�D�����S���0��?�?�3�'������/�/�1�2������
�
�a�(8�9r/rbN)rJrKrLrMrxrOr[rNrbr/r-rsrs�s��
/��:r/rsc��\rSrSrSrSrg)�TestInsertStreamBasei�c�f�[R"/UR5nSRU5$r�)rprqr&r)r;r)�byte_streams   r-�make_empty_byte_stream�+TestInsertStreamBase.make_empty_byte_stream�s'�� �7�7��D�L�L�I���x�x��$�$r/rbN)rJrKrLrMr�rNrbr/r-rr�s��%r/rc��\rSrSrSrSrg)�%TestSmartServerRepositoryInsertStreami�c��UR5n[R"U5nURS5nUR	SS5nURSU5 UR
URU55nURSU5 UR5nUR[R"S5U5 g)Nr�r/r�)r@rp�!SmartServerRepositoryInsertStreamr�r�r�r�r�r�r�r�)r;r�rrr�s     r-�test_insert_stream_empty�>TestSmartServerRepositoryInsertStream.test_insert_stream_empty�s����$�$�&���>�>�w�G���)�)�#�.�
��?�?�3��,������x�(��#�#�D�$?�$?�
�$K�L������x�(��>�>�#������6�6�x�@�(�Kr/rbN)rJrKrLrMr�rNrbr/r-r�r��s��	Lr/r�c� �\rSrSrSrSrSrg)�+TestSmartServerRepositoryInsertStreamLockedi�c���UR5n[R"U5nURSSS9nUR	5R
nUR
SSU5nURSU5 URURU55nURSU5 UR5nUR[R"S5U5 UR5 grk)r@rp�'SmartServerRepositoryInsertStreamLockedr�rrcr�r�r�r�r�r�r�r)r;r�rr�
lock_tokenr�s      r-r��DTestSmartServerRepositoryInsertStreamLocked.test_insert_stream_empty�s����$�$�&���D�D�W�M���)�)�#�f�)�=�
��*�*�,�=�=�
��?�?�3��Z�8������x�(��#�#�D�$?�$?�
�$K�L������x�(��>�>�#������6�6�x�@�(�K����r/c��UR5n[R"U5nURSSS9nUR	5 UR[RURSSS5 SSS5 g!,(df   g=f)Nr�r1r�r/swrong-token)	r@rpr�r�rr�rr�r�)r;r�rrs    r-�(test_insert_stream_with_wrong_lock_token�TTestSmartServerRepositoryInsertStreamLocked.test_insert_stream_with_wrong_lock_token�sp���$�$�&���D�D�W�M���)�)�#�f�)�=�
�
�
"�
"�
$�����$�$�g�o�o�s�C��
�%�
$�
$�s�.A>�>
BrbN)rJrKrLrMr�r�rNrbr/r-r�r��s���r/r�c� �\rSrSrSrSrSrg)�TestSmartServerRepositoryUnlocki		c���UR5n[R"U5nURSSS9nUR	5R
nUR
5 UR5 URSU5nUR[R"S5U5 URR5nUR	5 UR5 grk)r@rprvr�rrcr@rr�r�r�r�rrm)r;r�rrrbr�rws       r-�test_unlock_on_locked_repo�:TestSmartServerRepositoryUnlock.test_unlock_on_locked_repo
	s����$�$�&���8�8��A���)�)�#�f�)�=�
��%�%�'�8�8���&�&�(������?�?�3��.������6�6�x�@�(�K��(�(�8�8�:���������r/c���UR5n[R"U5nURSSS9 UR	SS5nUR[R"S5U5 g)Nr�r1r�r/s
some tokenrJ)r@rprvr�r�r�r�r�r�s    r-�test_unlock_on_unlocked_repo�<TestSmartServerRepositoryUnlock.test_unlock_on_unlocked_repo	s_���$�$�&���8�8��A�����S���0��?�?�3�
�6������6�6�7J�K�X�Vr/rbN)rJrKrLrMr�r�rNrbr/r-r�r�		s
��
�Wr/r�c� �\rSrSrSrSrSrg)�.TestSmartServerRepositoryGetPhysicalLockStatusi!	c�h�UR5nURS5nURUR5R5 UR5(aSnOSn[RnU"U5nUR[R"U45URS55 g)Nr�r�rr/)r@r�r�rrrarp�*SmartServerRepositoryGetPhysicalLockStatusr�r�r�r�)r;r�r)r�r�rs      r-�test_with_write_lock�CTestSmartServerRepositoryGetPhysicalLockStatus.test_with_write_lock"	s����$�$�&���#�#�C�(��������)�0�0�1��(�(�*�*��H��H�"�M�M�
���(������3�3�X�K�@��O�O��
�	
r/c� �UR5nURS5nURSUR55 [R
nU"U5nUR[R"S5URS55 g)Nr�Frr/)	r@r�r�rarpr�r�r�r��r;r�r)r�rs     r-�test_without_write_lock�FTestSmartServerRepositoryGetPhysicalLockStatus.test_without_write_lock5	sy���$�$�&���#�#�C�(������� =� =� ?�@�"�M�M�
���(������3�3�H�=��O�O��
�	
r/rbN)rJrKrLrMr�r�rNrbr/r-r�r�!	s��
�&
r/r�c��\rSrSrSrSrg)�"TestSmartServerRepositoryReconcileiC	c�N�UR5nURS5nUR5RnUR	UR
5 [RnU"U5nUR[R"SS5URSU55 g)Nr�r�s/garbage_inventories: 0
inconsistent_parents: 0
r/)r@r�rrcr�rrp�SmartServerRepositoryReconciler�r�r�r�)r;r�r)rbr�rs      r-�test_reconcile�1TestSmartServerRepositoryReconcile.test_reconcileD	s����$�$�&���#�#�C�(�����!�2�2��������$�"�A�A�
���(������3�3��N�
�
�O�O�C��'�		
r/rbN)rJrKrLrMr�rNrbr/r-r�r�C	s��
r/r�c� �\rSrSrSrSrSrg)�TestSmartServerIsReadonlyiS	c��UR5n[R"U5nUR5nUR	[R
"S5U5 g)Nr)r@r��SmartServerIsReadonlyr�r�r�r�s    r-�test_is_readonly_no�-TestSmartServerIsReadonly.test_is_readonly_noT	sG���$�$�&���1�1�'�:���?�?�$������6�6�x�@�(�Kr/c��UR5n[R"U5nUR5nUR	[R
"S5U5 g)Nr�)rSr�r�r�r�r�r�s    r-�test_is_readonly_yes�.TestSmartServerIsReadonly.test_is_readonly_yesZ	sG���-�-�/���1�1�'�:���?�?�$������6�6�y�A�8�Lr/rbN)rJrKrLrMr�r�rNrbr/r-r�r�S	s��L�Mr/r�c� �\rSrSrSrSrSrg)�,TestSmartServerRepositorySetMakeWorkingTreesia	c�t�UR5nURSSS9nURS5 [RnU"U5nUR[R"S5URSS55 URR5nURUR55 g)Nr�Tr/r�r/r�)
r@r�rkrp�(SmartServerRepositorySetMakeWorkingTreesr�r�r�r�rrmrU�make_working_treesr�s     r-�test_set_false�;TestSmartServerRepositorySetMakeWorkingTrees.test_set_falseb	s����$�$�&���#�#�C��#�5���#�#�D�)�"�K�K�
���(������3�3�H�=��O�O�C��*�	
����.�.�0������0�0�2�3r/c�t�UR5nURSSS9nURS5 [RnU"U5nUR[R"S5URSS55 URR5nURUR55 g)Nr�Tr/Fr�r/r)
r@r�rkrpr�r�r�r�r�rrmr�r�r�s     r-�
test_set_true�:TestSmartServerRepositorySetMakeWorkingTrees.test_set_trueo	s����$�$�&���#�#�C��#�5���#�#�E�*�"�K�K�
���(������3�3�H�=��O�O�C��)�	
����.�.�0������/�/�1�2r/rbN)rJrKrLrMr�r�rNrbr/r-r�r�a	s��4�3r/r�c��\rSrSrSrSrg)�,TestSmartServerRepositoryGetSerializerFormati}	c���UR5nURSSS9 [RnU"U5nUR	[
R"S5URS55 g)Nr�r�r�r�r/)r@r�rp�(SmartServerRepositoryGetSerializerFormatr�r�r�r�)r;r�r�rs    r-�test_get_serializer_format�GTestSmartServerRepositoryGetSerializerFormat.test_get_serializer_format~	s`���$�$�&�����S���.�"�K�K�
���(������3�3�N�C��O�O�C� �	
r/rbN)rJrKrLrMr�rNrbr/r-r�r�}	s��
r/r�c�8�\rSrSrSrSrSrSrSrSr	Sr
g	)
�#TestSmartServerRepositoryWriteGroupi�	c�P�UR5nURS5nUR5RnUR	UR
5 [RnU"U5nUR[R"S/45URSU55 g)Nr�r�r/)r@r�rrcr�rrp�$SmartServerRepositoryStartWriteGroupr�r�r�r��r;r�r)r�r�rs      r-�test_start_write_group�:TestSmartServerRepositoryWriteGroup.test_start_write_group�	s����$�$�&���#�#�C�(���_�_�&�7�7�
�������$�"�G�G�
���(������3�3�U�B�K�@��O�O�C��,�	
r/c�J�UR5nURSSS9nUR5RnUR	UR
5 [RnU"U5nUR[R"S5URSU55 g)Nr�r1r�)sUnsuspendableWriteGroupr/)r@r�rrcr�rrpr�r�r�r�r�r�s      r-�$test_start_write_group_unsuspendable�HTestSmartServerRepositoryWriteGroup.test_start_write_group_unsuspendable�	s����$�$�&���#�#�C��#�7���_�_�&�7�7�
�������$�"�G�G�
���(������/�/�0M�N��O�O�C��,�	
r/c��UR5nURS5nUR5RnUR	UR
5 UR
5 UR5n[RnU"U5nUR[R"S5URSX455 gr�)r@r�rrcr�rr�r�rp�%SmartServerRepositoryCommitWriteGroupr�r�r�r��r;r�r)r��tokensr�rs       r-�test_commit_write_group�;TestSmartServerRepositoryWriteGroup.test_commit_write_group�	s����$�$�&���#�#�C�(���_�_�&�7�7�
�������$���� ��)�)�+��"�H�H�
���(������3�3�H�=��O�O�C��4�	
r/c��UR5nURS5nUR5RnUR	5 UR5nUR
UR5 [RnU"U5nUR[R"S5URSX455 gr�)r@r�rrcr�r�r�rrp�$SmartServerRepositoryAbortWriteGroupr�r�r�r�r�s       r-�test_abort_write_group�:TestSmartServerRepositoryWriteGroup.test_abort_write_group�	����$�$�&���#�#�C�(���_�_�&�7�7�
���� ��)�)�+��������$�"�G�G�
���(������3�3�H�=��O�O�C��4�	
r/c��UR5nURS5nUR5RnUR	5 UR5nUR
UR5 [RnU"U5nUR[R"S5URSX455 gr�)r@r�rrcr�r�r�rrp�$SmartServerRepositoryCheckWriteGroupr�r�r�r�r�s       r-�test_check_write_group�:TestSmartServerRepositoryWriteGroup.test_check_write_group�	r�r/c�X�UR5nURS5nUR5RnUR	UR
5 [RnU"U5nUR[R"SS/S45URSUS/55 g)Nr�sUnresumableWriteGroupsrandomsMalformed write group tokenr/)r@r�rrcr�rrpr�r�r�r�r�r�s      r-�test_check_write_group_invalid�BTestSmartServerRepositoryWriteGroup.test_check_write_group_invalid�	s����$�$�&���#�#�C�(���_�_�&�7�7�
�������$�"�G�G�
���(������/�/�)�I�;�8V�W�
�
�O�O�C��i�[�9�		
r/rbN)rJrKrLrMr�r�r�r�r�r�rNrbr/r-r�r��	s ��

�

�
�
�
�
r/r�c�0�\rSrSrSSjrSrSrSrSrg)	�%TestSmartServerPackRepositoryAutopacki�	c�X�URSSS9nURRnSURl[S5H#nUR
SRU55 M% URS[URR555 UR?U$)Nr�rjr�c��U$r4rb)�counts r-�<lambda>�UTestSmartServerPackRepositoryAutopack.make_repo_needing_autopacking.<locals>.<lambda>�	s��er/�
�	commit {})r�rr�_pack_collection�_max_pack_count�rangerr�r��len�names)r;rWrr)�xs     r-�make_repo_needing_autopacking�CTestSmartServerPackRepositoryAutopack.make_repo_needing_autopacking�	s����(�(��[�(�A���{�{�%�%��0C����-��r��A��K�K��*�*�1�-�.������S��!6�!6�!<�!<�!>�?�@��!�!�1��r/c���UR5nUR5 URUR5 UR	5n[
R"U5nURS5nUR[R"S5U5 URR5 URS[URR555 g)Nr/r�r)r�rr�rr@�smart_packrepo�!SmartServerPackRepositoryAutopackr�r�r�r�r��reload_pack_namesr�r�)r;r)r�rr�s     r-�test_autopack_needed�:TestSmartServerPackRepositoryAutopack.test_autopack_needed�	s����1�1�3������������$��$�$�&�� �B�B�7�K���?�?�3�'������6�6�x�@�(�K����/�/�1�����C�� 5� 5� ;� ;� =�>�?r/c�^�URSSS9nURRnUR5 UR	UR
5 [
S5H#nURSRU55 M% UR5n[R"U5nURS5nUR[R"S5U5 UR R#5 URS[%UR R'555 g)Nr�rjr��	r�r/r�)r�rrrr�rr�rr�r@r�r�r�r�r�r�r�r�r�r�)r;rr)r�r�rr�s       r-�test_autopack_not_needed�>TestSmartServerPackRepositoryAutopack.test_autopack_not_needed�	s����(�(��[�(�A���{�{�%�%������������$��q��A��K�K��*�*�1�-�.���$�$�&�� �B�B�7�K���?�?�3�'������6�6�x�@�(�K����/�/�1�����C�� 5� 5� ;� ;� =�>�?r/c���URSSS9 UR5n[R"U5nUR	S5nUR[R"S5U5 g)z1A request to autopack a non-pack repo is a no-op.r�r1r�r/r�N)r�r@r�r�r�r�r�r�r�s    r-�test_autopack_on_nonpack_format�ETestSmartServerPackRepositoryAutopack.test_autopack_on_nonpack_format
s\�����S���0��$�$�&�� �B�B�7�K���?�?�3�'������6�6�x�@�(�Kr/rbN)r�)	rJrKrLrMr�r�r�r�rNrbr/r-r�r��	s��
�	@�@�Lr/r�c��\rSrSrSrSrg)�TestSmartServerVfsGeti

c�.�Sn[R"U5nUR5n[R"U5nURUS5 UR
[R"SS5URURS555 g)z0VFS requests expect unicode paths to be escaped.ufoo‽scontentsr�r�N)r
r�r@r�
GetRequest�put_bytes_non_atomicr�r�r�r�r�)r;�filename�filename_escapedr�rs     r-�test_unicode_path�'TestSmartServerVfsGet.test_unicode_path
sy��'��#�?�?�8�4���$�$�&���.�.��)���$�$�%5�{�C�����)�)�(�K�@��O�O�,�3�3�G�<�=�	
r/rbN)rJrKrLrMrrNrbr/r-r�r�

r�r/r�c�*�\rSrSrSrSrSrSrSrg)�TestHandlersi
z.Tests for the request.request_handlers object.c���[RR5H#n[RRU5 M% g![a n[	SRX55UeSnAff=f)z-All registered request_handlers can be found.zfailed to get {}: {}N)r��request_handlers�keysrn�AttributeErrorr�)r;�key�es   r-�test_all_registrations_exist�)TestHandlers.test_all_registrations_exist
se���-�-�2�2�4�C�
S��*�*�.�.�s�3�5��"�
S�$�%;�%B�%B�3�%J�K�QR�R��
S�s�A�
A1�A,�,A1c�b�UR[RRU5U5 gr4)r�r�r
rn)r;�verb�handlers   r-�assertHandlerEqual�TestHandlers.assertHandlerEqual%
s#������3�3�7�7��=�w�Gr/c���URS[R5 URS[R5 URS[R5 URS[R
5 URS[R5 URS[R5 URS[R5 URS[R5 URS	[R5 URS
[R5 URS[R5 URS[R5 URS
[R5 URS[R5 URS[R 5 URS[R"5 URS[$R&5 URS[$R(5 URS[$R*5 URS[$R,5 URS[$R.5 URS[$R05 URS[$R25 URS[$R45 URS[$R65 URS[$R85 URS[$R:5 URS[$R<5 URS[>R@5 URS[BRD5 URS[BRF5 URS [BRH5 URS![BRJ5 URS"[BRL5 URS#[BRN5 URS$[BRP5 URS%[BRR5 URS&[BRT5 URS'[BRV5 URS([BRX5 URS)[BRZ5 URS*[BR\5 URS+[BR^5 URS,[BR`5 URS-[BRb5 URS.[BRd5 URS/[BRf5 URS0[BRh5 URS1[BRj5 URS2[BRl5 URS3[BRn5 URS4[BRp5 URS5[BRr5 URS6[BRt5 URS7[BRv5 URS8[BRx5 URS9[BRz5 URS:[BR|5 URS;[~R�5 g<)=z=Test that known methods are registered to the correct object.sBranch.break_locksBranch.get_config_filesBranch.put_config_filesBranch.get_parentsBranch.get_physical_lock_statussBranch.get_tags_bytessBranch.lock_writesBranch.last_revision_infosBranch.revision_historysBranch.revision_id_to_revnosBranch.set_config_optionsBranch.set_last_revisionsBranch.set_last_revision_infosBranch.set_last_revision_exsBranch.set_parent_locations
Branch.unlocksBzrDir.destroy_branchsBzrDir.find_repositorysBzrDir.find_repositoryV2sBzrDirFormat.initializesBzrDirFormat.initialize_ex_1.16sBzrDir.checkout_metadirsBzrDir.cloning_metadirsBzrDir.get_branchessBzrDir.get_config_filesBzrDir.open_branchsBzrDir.open_branchV2sBzrDir.open_branchV3sPackRepository.autopacksRepository.add_signature_textsRepository.all_revision_idssRepository.break_locksRepository.gather_statssRepository.get_parent_maps#Repository.get_physical_lock_statussRepository.get_rev_id_for_revnosRepository.get_revision_graphs&Repository.get_revision_signature_textsRepository.get_streamsRepository.get_stream_1.19sRepository.iter_revisionssRepository.has_revisionsRepository.insert_streamsRepository.insert_stream_lockedsRepository.is_sharedsRepository.iter_files_bytessRepository.lock_writesRepository.make_working_treessRepository.packsRepository.reconcilesRepository.tarballsRepository.unlocksRepository.start_write_groupsRepository.check_write_groupsRepository.commit_write_groupsRepository.abort_write_groups-VersionedFileRepository.get_serializer_formats'VersionedFileRepository.get_inventoriessTransport.is_readonlyN)Arrr�rTrkr	r`r!r2r*rr=rur�r�r�rr8rr�r r!rer~r�r�rRrHr�r�r�r�r�rprr�r�r9r�r�r�r�r]r�rr�rr�r�rTr rurj�SmartServerRepositoryPackr��SmartServerRepositoryTarballrvr�r�r�r�r��#SmartServerRepositoryGetInventoriesr�r�r]s r-�test_registered_methods�$TestHandlers.test_registered_methods(
sS����� �,�"I�"I�	
�	
���%�|�'R�'R�	
�	
���%�|�'R�'R�	
�	
��� �,�"I�"I�	
�	
���.��F�F�	
�	
���$�l�&P�&P�	
�	
��� �,�"P�"P�	
�	
���(��A�A�	
�	
���&��(V�(V�	
�	
���*��B�B�	
�	
���'��@�@�	
�	
���'��@�@�	
�	
���,��D�D�	
�	
���*��B�B�	
�	
���)��B�B�	
�	
����l�I�I�	
�	
���$�i�&U�&U�	
�	
���%�y�'S�'S�	
�	
���'��)U�)U�	
�	
���&�	�(T�(T�	
�	
���.��:�:�	
�	
���&��=�=�	
�	
���%�y�'W�'W�	
�	
���"�I�$Q�$Q�	
�	
���%�y�'S�'S�	
�	
���!�9�#I�#I�	
�	
���#�Y�%M�%M�	
�	
���#�Y�%M�%M�	
�	
���&��(X�(X�	
�	
���,��<�<�	
�	
���*��:�:�	
�	
���$�j�&O�&O�	
�	
���&�
�(S�(S�	
�	
���(�*�*V�*V�	
�	
���2��A�A�	
�	
���.��<�<�	
�	
���,��<�<�	
�	
���5��D�D�	
�	
���$�j�&O�&O�	
�	
���)��:�:�	
�	
���(�*�*W�*W�	
�	
���&�
�(P�(P�	
�	
���'��)U�)U�	
�	
���.��>�>�	
�	
���#�Z�%M�%M�	
�	
���*��:�:�	
�	
���$�j�&O�&O�	
�	
���,��<�<�	
�	
����
� D� D�	
�	
���#�Z�%N�%N�	
�	
���!�:�#J�#J�	
�	
��� �*�"H�"H�	
�	
���+��;�;�	
�	
���+��;�;�	
�	
���,��<�<�	
�	
���+��;�;�	
�	
���<��?�?�	
�	
���6��:�:�	
�	
���$�i�&E�&E�	
r/rbN)	rJrKrLrMr�rrrrNrbr/r-rr
s��8�S�H�L
r/rc�>^�\rSrSrSrU4SjrSrSrSrSr	U=r
$)�SmartTCPServerHookTestsi�
zTests for SmartTCPServer hooks.c�t>�[TU]5 [R"UR	55Ulgr4)r7r8r�SmartTCPServerr@r:s �r-r8�SmartTCPServerHookTests.setUp�
s'���
��
���+�+�D�,>�,>�,@�A��r/c��^^�/m[RRRSU4SjS5 /m[RRRSU4SjS5 SURlURR5 UR
TUR5R/S4/5 UR
TUR5R/UR4/5 g)z1Test the server started hooks get fired properly.�server_startedc�(>�TRX45$r4�rs��backing_urls�url�
started_callss  �r-r��GSmartTCPServerHookTests.test_run_server_started_hooks.<locals>.<lambda>����m�&:�&:�L�;N�&Or/N�server_started_exc�(>�TRX45$r4r$)r&r'�started_ex_callss  �r-r�r)	s���&6�&=�&=�|�>Q�&Rr/�zexample.com�*�bzr://example.com:42/)	rrr�r��	_sockname�run_server_started_hooksr�r@r�)r;r(r-s @@r-�test_run_server_started_hooks�5SmartTCPServerHookTests.test_run_server_started_hooks�
s�����
����#�#�6�6��O��	
�
�����#�#�6�6��R��	
�
!4��������,�,�.�����d�0�0�2�7�7�8�:Q�R�S�	
�	
���)�d�.@�.@�.B�.G�.G�-H�$�+�+�,V�+W�Xr/c�^�SURl/m[RRR	SU4SjS5 URR5 UR
TUR5R/S4/5 g)z)Test that socknames can contain 4-tuples.)z::r/rrr"c�(>�TRX45$r4r$r%s  �r-r��LSmartTCPServerHookTests.test_run_server_started_hooks_ipv6.<locals>.<lambda>r*r/Nzbzr://:::42/)	rr1rr�r�r2r�r@r�)r;r(s @r-�"test_run_server_started_hooks_ipv6�:SmartTCPServerHookTests.test_run_server_started_hooks_ipv6ss��� 0������
����#�#�6�6��O��	
�
	
���,�,�.�����4�+=�+=�+?�+D�+D�*E�~�)V�(W�Xr/c�^�SURl/m[RRR	SU4SjS5 URR5 UR
TUR5R/S4/5 g)zTest the server stopped hooks.r.�server_stoppedc�(>�TRX45$r4r$)r&r'�
stopped_callss  �r-r��GSmartTCPServerHookTests.test_run_server_stopped_hooks.<locals>.<lambda>%r*r/Nr0)	rr1rr�r��run_server_stopped_hooksr�r@r�)r;r=s @r-�test_run_server_stopped_hooks�5SmartTCPServerHookTests.test_run_server_stopped_hookssw��� 3������
����#�#�6�6��O��	
�
	
���,�,�.�����d�0�0�2�7�7�8�:Q�R�S�	
r/)r)rJrKrLrMr�r8r3r8r@rNrOrPs@r-rr�
s"���)�B�Y�*
Y�
�
r/rc��\rSrSrSrSrg)�TestSmartServerRepositoryPacki.c�~�UR5n[R"U5nURS5nURR
R
5RnURSURSUS55 UR[R"S5URS55 g)Nr�r/Fr�)r@rprrrrrrcrlr�r�r�r�rm)r;r�rrres     r-�	test_pack�'TestSmartServerRepositoryPack.test_pack/s����$�$�&���6�6�w�?���/�/��4���[�[�+�+�6�6�8�I�I�
��
�
�d�G�O�O�C��U�C�D�����3�3��
�
�O�O�C� �		
r/rbN)rJrKrLrMrErNrbr/r-rCrC.s��

r/rCc�&�\rSrSrSrSrSrSrg)�'TestSmartServerRepositoryGetInventoriesi?c��URU5RnURU5RnURU5n[R"SS5nSRUR
X#U55$)NTr/)�
revision_tree�root_inventory�_make_deltar�InventoryDeltaSerializerr�delta_to_lines)r;r�
base_revidrC�base_inv�inv�	inv_delta�
serializers        r-�_get_serialized_inventory_delta�GTestSmartServerRepositoryGetInventories._get_serialized_inventory_delta@sj���+�+�J�7�F�F���&�&�u�-�<�<���O�O�H�-�	�$�=�=�d�D�I�
��x�x�
�1�1�*�Y�O�P�Pr/c��UR5n[R"U5nURSSS9nUR	UR5R5 URS/5 URS/S/S9 URSS	S
9 URSURSS55 URS
5nURUR55 URUR S5 S["R$"SSSUR'UR(R*SS55/4/n[,R.R1S5"5R2nURSR5UR65SR5[R8"XV555 g)Nr�r�r�rrrr�rrr�r/�	unorderedssomerev
r�zinventory-deltasr))r@rprr�r�rrr!rrrlr�rmr�rVr�r0rrlrTrrrrmrnrorr�rq)r;r�rrHr�rvrws       r-r#�3TestSmartServerRepositoryGetInventories.test_singleGsw���$�$�&���@�@��I���%�%�c�$�%�7���������-�-�.�� � �";�!<�=�	���v�h�\�N��+�	���
�J��7��
�
�d�G�O�O�C��>�?��?�?�<�0������.�.�0�1��������1�#�!�8�8�"����<�<��H�H�/�/��:��	�	�
�
���(�(�,�,�T�2�4�F�F������H�H�X�)�)�*��H�H�Z�6�6�v�C�D�	
r/c�\�UR5n[R"U5nURSSS9nUR	UR5R5 URS/5 URS/S/S9 URSS	S
9 URSURSS55 URS5nURUR55 URUR S
5 URSR#UR$5S5 g)Nr�r�r�rrrr�rrr�r/rWr�sfBazaar pack format 1 (introduced in 0.18)
B54

Bazaar repository format 2a (needs bzr 1.16 or later)
E)r@rprr�r�rrr!rrrlr�rmr�rVr�r0rr�r"s     r-r_�2TestSmartServerRepositoryGetInventories.test_emptyhs����$�$�&���@�@��I���%�%�c�$�%�7���������-�-�.�� � �";�!<�=�	���v�h�\�N��+�	���
�J��7��
�
�d�G�O�O�C��>�?��?�?�3�'������.�.�0�1��������1�����H�H�X�)�)�*�y�	
r/rbN)rJrKrLrMrTr#r_rNrbr/r-rHrH?s��Q�
�B
r/rHc� �\rSrSrSrSrSrg)�0TestSmartServerRepositoryGetStreamForMissingKeysizc��UR5n[R"U5nUR5up4nUR	SUR
R
55 SU-nURU5nURSUR5 SRUR5nURUS5 g)r�r/sinventories	r�r�N)
r@rp�,SmartServerRepositoryGetStreamForMissingKeysr�r�r&r�rmr�r0rr�r�)	r;r�rr)rrr�r�rs	         r-rL�=TestSmartServerRepositoryGetStreamForMissingKeys.test_missing{s����$�$�&���I�I�'�R���0�0�2���"�����T�\�\�6�6�8�9� �2�%���?�?�5�)������8�=�=�1��x�x�� 4� 4�5�����l�,C�Dr/c���UR5n[R"U5nUR5up4nUR	SS5 [
R"S5 g)z1The format may not be known by the remote server.r/�yada yada yada)s
UnknownFormats
repositoryraN)r@rpr^r�r�r�r�)r;r�rr)rrs      r-�test_unknown_format�DTestSmartServerRepositoryGetStreamForMissingKeys.test_unknown_format�sR���$�$�&���I�I�'�R���0�0�2���"�����.�/��+�+�@�	
r/rbN)rJrKrLrMrLrbrNrbr/r-r\r\zs
��
E�
r/r\c��\rSrSrSrSrg)�(TestSmartServerRepositoryRevisionArchivei�c��UR5n[R"U5nURS5nUR	UR5R5 URS/5 URS/S/S9 URSSS9 URS	SS
SS5nURUR55 URURS
5 [S	R!UR"55n[$R&"SUS9nURS/UR)55 SSS5 g!,(df   g=f)Nr�rrrr�rrr�r/starsfoo.tarrhr�rm)�mode�fileobjzfoo/file)r@rp�$SmartServerRepositoryRevisionArchiver�r�rrr!rrr�r�rVr�r0rrr��tarfiler��getnames)r;r�rrHr�r[�tfs       r-�test_get�1TestSmartServerRepositoryRevisionArchive.test_get�s
���$�$�&���A�A�'�J���%�%�c�*���������-�-�.�� � �";�!<�=�	���v�h�\�N��+�	���
�J��7��?�?�3�
�F�J��O������.�.�0�1��������1��C�H�H�X�1�1�2�3��
�\�\�s�A�
.�"����j�\�2�;�;�=�9�/�
.�
.�s�"E	�	
ErbN�rJrKrLrMrmrNrbr/r-rere�s��
:r/rec��\rSrSrSrSrg)�-TestSmartServerRepositoryAnnotateFileRevisioni�c�4�UR5n[R"U5nURS5nUR	UR5R5 URS/5 URS/S/S9 URSSS9 URS	SS
5nURUR55 URURS5 URSS/SS
//[R "UR"55 g)Nr�)rssomecontents
morecontents
rrr�rrr�r/sfiler�s
somecontents
s
morecontents
)r@rp�)SmartServerRepositoryAnnotateFileRevisionr�r�rrr!rrr�r�rVr�r0rS�bdecoder�r"s     r-rm�6TestSmartServerRepositoryAnnotateFileRevision.test_get�s����$�$�&���F�F�w�O���%�%�c�*���������-�-�.�� � �"K�!L�M�	���v�h�\�N��+�	���
�J��7��?�?�3�
�G�<������.�.�0�1��������1�����+�
,�z�;L�.M�N��O�O�H�M�M�*�	
r/rbNrorbr/r-rqrq�s��
r/rqc��\rSrSrSrSrg)�/TestSmartServerBranchRequestGetAllReferenceInfoi�c��UR5n[R"U5nURS5nUR	SS5 URS5nUR
UR55 URURS5 UR/SQ/[R"UR55 g)Nr�z	some/pathzhttp://www.example.com/r/r�)s	some/pathshttp://www.example.com/r/)
r@r�+SmartServerBranchRequestGetAllReferenceInfor��set_reference_infor�r�rVr�r0rSrtr�res     r-�
test_get_some�=TestSmartServerBranchRequestGetAllReferenceInfo.test_get_some�s����$�$�&���J�J�7�S���!�!�#�&���!�!�+�/H�I��?�?�3�'������.�.�0�1��������1����
<�=��O�O�H�M�M�*�	
r/rbN)rJrKrLrMr{rNrbr/r-rwrw�s��
r/rw)r�r�rjr��ior�fastbencoderS�breezyrr�rrrrr	r
�
breezy.bzrr�rr�breezy.bzr.smartrr
rrr�rrprr�rr�breezy.bzr.testamentr�breezy.testsr�breezy.transportrrr.r?r1�TestCaseWithMemoryTransportrR�TestCaserdrr�r�r�r�r�rrrr@rOrbr{r�r�r�r�r�r�rrr%r;rRr`rirrr�r�r�r�r�r�r�r�rrrr%r.r^rirvr{r�r�r�r�r�r�r�r�rrr(r7rQr[rgrsrr�r�r�r�r�r�r�r�r�r�r�rrrCrHr\rerqrwrbr/r-�<module>r�s��"������(�F�F�/�5�3�0�=�5�1�(�*�$�+��8�E�$?�$?��"7�e�?�?�7�",�U�^�^�,�2#
�e�n�n�#
�L!
�U�>�>�!
�H#C��1R�1R�#C�L
�%�2S�2S�
�(H��0Q�0Q�H�@9��1L�1L�9�,9�E�4U�4U�9�,P�U�-N�-N�P�$]7�5�+L�+L�]7�@9��0Q�0Q�9�, 9�e�.O�.O� 9�FU�U�-N�-N�U�6A
�u�/P�/P�A
�H
�u�'H�'H�
�4
�5�+L�+L�
�D
�0M�
�,
�'D�,
�^D
�)F�D
�NE
�)F�E
�P
�E�,M�,M�
�4O�5�#D�#D�O�"&
�5�3T�3T�&
�R.
�E�4U�4U�.
�b
��0Q�0Q�
�4(�u�8�8�(�
�0@�
� �2B��8$�6F�$�N#�/?�#�LV�.�V�4A
�A
�HP��9�P�(��9�(�"YG��9�YG�x
�U�%F�%F�
�&
�E�,M�,M�
�"!@�,<�!@�HT�u�/P�/P�T�
W�%�2S�2S�
W�a4�,<�a4�HL�8H�L�(*#�)9�*#�ZR�u�'H�'H�R�
��0Q�0Q�
�@
�e�.O�.O�
�B
��)J�)J�
�*
�E�,M�,M�
�88
��0Q�0Q�8
�v.
��0Q�0Q�.
�b+(�U�-N�-N�+(�\	��9�9�	�%E�):�%E�P
��(I�(I�
�4
�e�.I�.I�
�@+
�	�%�%�+
�\J
�5�+L�+L�J
�Z
��(I�(I�
�4
�	�%�%�
�2
��0Q�0Q�
�8$:��)J�)J�$:�N%�5�<�<�%�
L�,@�
L��2F��0W�e�&G�&G�W�0
�U�5P�5P�
�D

��)D�)D�

� M�� A� A�M�3�5�3T�3T�3�8	
�5�3T�3T�	
�O
�%�*K�*K�O
�d,L�E�,G�,G�,L�^
�E�=�=�
�\
�5�>�>�\
�~4
�e�?�?�4
�n
�E�$E�$E�
�"8
�e�.I�.I�8
�v
�7H�
�0:�u�/J�/J�:�"
�E�4O�4O�
�$
�6F�
r/

Youez - 2016 - github.com/yon3zu
LinuXploit