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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��g�����SSKJr SSKJrJr SSKJr \"\"5S5 SSKJrJ	r	J
r
 SSKJr SSKJ
r SS	KJrJrJrJrJr SS
KJr SSKJr SSKJrJr SS
KJr SSKJrJr SSK J!r! \(aSSK"J#r# "SS\\5r$"SS\$5r%"SS\%5r&"SS\&5r'"SS\RP\5r)"SS\)5r*"SS\)5r+"S S!\)5r,"S"S#\)5r-"S$S%5r."S&S'5r/"S(S)5r0g*)+�)�BytesIO)�
TYPE_CHECKING�Union�)�lazy_importz�
from breezy import (
    cache_utf8,
    config as _mod_config,
    lockdir,
    shelf,
    ui,
    )
from breezy.bzr import (
    tag as _mod_tag,
    vf_search,
    )
)�errors�lockable_files�urlutils)�revision)�	transport)�Branch�BranchFormat�BranchWriteLockResult�UnstackableBranchFormat�format_registry)�
ControlDir)�only_raises)�LogicalLockResult�_RelockDebugMixin)�mutter�)�bzrdir�rio)�MetaDirRepository)�RemoteRepositoryc	�^^�\rSrSr%Sr\\S4\S'\R\S'\
S\R4Sj5r
SS	SS
.S\RS\S
\S\R 4SjjrSr\rSr\
"\SS9r\
S5rSrSrSrSrSrS\4SjrS=SjrSr\ "\!RD\!RF5S5r$Sr%Sr&S r'S!r(S"r)S#r*S$r+S%r,S&r-S'r.S(r/S=S)jr0S*r1S+r2S=S,jr3S-r4S.r5S/r6S0r7S1r8U4S2jr9S>S3jr:S=S4jr;S=S5jr<S=S6jr=S7\SS4S8jr>S?S9jr?S:r@S?S;jrAS<rBU=rC$)@�	BzrBranch�=adA branch stored in the actual filesystem.

Note that it's "local" in the context of the filesystem; it doesn't
really matter if it's on an nfs/smb/afs/coda/... share, as long as
it's writable, and can be accessed via the normal filesystem API.

:ivar _transport: Transport for file operations on this branch's
    control files, typically pointing to the .bzr/branch directory.
:ivar repository: Repository for this branch.
:ivar base: The url of the base directory for this branch; the one
    containing the .bzr directory.
:ivar name: Optional colocated branch name as it exists in the control
    directory.
r�
repository�
controldir�returnc��UR$�N)�
_transport��selfs �3/usr/lib/python3/dist-packages/breezy/bzr/branch.py�control_transport�BzrBranch.control_transportPs������NF)�_format�ignore_fallbacks�possible_transports�a_controldir�name�_repository�_control_filesc��XlURRRS5UlUS:wa0URR	S[
R"U55 URRUlX l	XPl
X@lURUlX0l
SUl[R "X5 SUlg)z2Create new branch object at a particular location.z..��branchN)r r�clone�_user_transport�set_segment_parameterr
�escape�base�_baser/r+�
control_filesr$r�
conf_storer
�__init__�_tags_bytes)r&r.r/r0r1r+r,r-s        r'r=�BzrBranch.__init__Ts���'��#���8�8�>�>�t�D����2�:�� � �6�6�x����QU�AV�W��)�)�.�.��
��	���+��(�3�3���%���������2���r*c�b�SRURRUR5$)Nz{}({}))�format�	__class__�__name__�user_urlr%s r'�__str__�BzrBranch.__str__ns!�����t�~�~�6�6��
�
�F�Fr*c��UR$)z7Returns the directory containing the control directory.)r:r%s r'�	_get_base�BzrBranch._get_basess���z�z�r*z$The URL for the root of this branch.)�docc��UR$r#)r6r%s r'�user_transport�BzrBranch.user_transportys���#�#�#r*c�B�[RURS5$)z�Get the concrete config for just the config in this branch.

This is not intended for client use; see Branch.get_config for the
public API.

Added in 1.14.

:return: An object supporting get_option and set_option.
�branch.conf)�_mod_config�TransportConfigr$r%s r'�_get_config�BzrBranch._get_config}s���*�*�4�?�?�M�J�Jr*c�h�URc[RU5UlUR$r#)r<rP�BranchStorer%s r'�_get_config_store�BzrBranch._get_config_store�s(���?�?�"�)�5�5�d�;�D�O����r*c�0�UR5nUbU$U$)z7Return the branch that may contain uncommitted changes.)�get_master_branch�r&�masters  r'�_uncommitted_branch�BzrBranch._uncommitted_branch�s ���'�'�)�����M��Kr*c�R�UR5nUcURRS5 gURRS5(a[R
e[
5nURU5 URS5 URRSU5 g)z�Store uncommitted changes from a ShelfCreator.

:param creator: The ShelfCreator containing uncommitted changes, or
    None to delete any stored changes.
:raises: ChangesAlreadyStored if the branch already has changes.
N�stored-transformr)
r\r$�delete�hasr�ChangesAlreadyStoredr�write_shelf�seek�put_file)r&�creatorr4�	transforms    r'�store_uncommitted�BzrBranch.store_uncommitted�s����)�)�+���?����$�$�%7�8����� � �!3�4�4��-�-�-��I�	����I�&����q�����"�"�#5�y�Ar*c���UR5nURRS5n[
RRX5$![Ra gf=f)z�Return a shelf.Unshelver for this branch and tree.

:param tree: The tree to use to construct the Unshelver.
:return: an Unshelver or None if no changes are stored.
r_N)r\r$�get�_mod_transport�
NoSuchFile�shelf�	Unshelver�from_tree_and_shelf)r&�treer4rgs    r'�
get_unshelver�BzrBranch.get_unshelver�s_���)�)�+��	��)�)�-�-�.@�A�I����2�2�4�C�C���(�(�	��	�s�A�A#�"A#c�6�URR5$r#)r;�	is_lockedr%s r'ru�BzrBranch.is_locked�s���!�!�+�+�-�-r*c�~�UR5(dIURS5 URRU5 URR	5 SnOSn[URURR	US95$![a# U(aURR
5 ef=f)z�Lock the branch for write operations.

:param token: A token to permit reacquiring a previously held and
    preserved lock.
:return: A BranchWriteLockResult.
�wTF��token)	ru�
_note_lockr�_warn_if_deprecated�
lock_writer�unlockr;�
BaseException)r&rz�	took_locks   r'r}�BzrBranch.lock_write�s����~�~����O�O�C� ��O�O�/�/��5��O�O�&�&�(��I��I�	�(����T�/�/�:�:��:�G��
���	�����&�&�(��	�s�",B�-B<c��UR5(dIURS5 URRU5 URR	5 SnOSnUR
R	5 [
UR5$![a# U(aURR5 ef=f)zPLock the branch for read operations.

:return: A breezy.lock.LogicalLockResult.
�rTF)	rur{rr|�	lock_readr;rr~r)r&r�s  r'r��BzrBranch.lock_read�s���
�~�~����O�O�C� ��O�O�/�/��5��O�O�%�%�'��I��I�	����(�(�*�$�T�[�[�1�1���	�����&�&�(��	�s�".B�-B>c���URRS:Xa'URbURR5 URR	5 URR5(d+URR	5 UR5 gg!URR5(d+URR	5 UR5 ff=f)Nr)r;�_lock_countr<�save_changesr~rur�_clear_cached_stater%s r'r~�BzrBranch.unlock�s������)�)�Q�.�4�?�?�3N��O�O�(�(�*�	+����%�%�'��%�%�/�/�1�1����&�&�(��(�(�*�2��4�%�%�/�/�1�1����&�&�(��(�(�*�2�s
�B(�(AC4c�d�URRS:XagURR$)Nr)r;r��
_lock_moder%s r'�peek_lock_mode�BzrBranch.peek_lock_mode�s+�����)�)�Q�.���%�%�0�0�0r*c�6�URR5$r#)r;�get_physical_lock_statusr%s r'r��"BzrBranch.get_physical_lock_status�s���!�!�:�:�<�<r*c��U(a[U[5(d[R"X S9eUR	5 UR5up4UR
5(aURU5 URX5 URX5 UR5 X4UlURX45 SSS5 g!,(df   g=f)N)�revision_idr4)
�
isinstance�bytesr�InvalidRevisionIdr}�last_revision_info�get_append_revisions_only�_check_history_violation� _run_pre_change_branch_tip_hooks�_write_last_revision_infor��_last_revision_info_cache�!_run_post_change_branch_tip_hooks)r&�revnor��	old_revno�	old_revids     r'�set_last_revision_info� BzrBranch.set_last_revision_info�s����*�[�%�"@�"@��*�*�{�P�P�
�_�_�
�#'�#:�#:�#<� �I��-�-�/�/��-�-�k�:��1�1�%�E��*�*�5�>��$�$�&�-2�-?�D�*��2�2�9�H��
�
�s
�BC�
Cc�T�URRUR55$)zSee Branch.basis_tree.)r�
revision_tree�
last_revisionr%s r'�
basis_tree�BzrBranch.basis_trees �����,�,�T�-?�-?�-A�B�Br*c���/SQnUH?nURRU5nURS5RS5s $ g![R
a M[f=f)N)�parent�pullzx-pull�
�utf-8)r$�	get_bytes�strip�decoderlrm)r&�_locs�l�contentss    r'�_get_parent_location�BzrBranch._get_parent_location	se��,���A�
=��?�?�4�4�Q�7�� �~�~�e�,�3�3�G�<�<�
���	"�,�,�
��
�s�A�A#�"A#c�B�[URUR5er#�rr+rDr%s r'�get_stacked_on_url�BzrBranch.get_stacked_on_url���%�d�l�l�D�M�M�B�Br*c�^�UR5RSU[RS9 g)�See Branch.set_push_location.�
push_location)�storeN)�
get_config�set_user_optionrP�STORE_LOCATION_NORECURSE�r&�locations  r'�set_push_location�BzrBranch.set_push_locations)������)�)��X�[�-Q�-Q�	*�	
r*c��UcURRS5 g[U[5(aUR	S5nURRSUS-URR5S9 g)Nr�r�r���mode)r$r`r��str�encode�	put_bytesr �_get_file_mode�r&�urls  r'�_set_parent_location�BzrBranch._set_parent_locationsc���;��O�O�"�"�8�,��#�s�#�#��j�j��)���O�O�%�%��#��+�D�O�O�,J�,J�,L�
&�
r*c�z�UR5 URS5sSSS5 $!,(df   g=f)zIf bound, unbind.N)r}�set_bound_locationr%s r'�unbind�BzrBranch.unbind's&��
�_�_�
��*�*�4�0��
�
���,�
:c��UR5 URUR5 SSS5 g!,(df   g=f)a_Bind this branch to the branch other.

This does not push or pull data between the branches, though it does
check for divergence to raise an error when the branches are not
either the same, or one a prefix of the other. That behaviour may not
be useful, so that check may be removed in future.

:param other: The branch to bind to
:type other: Branch
N)r}r�r9)r&�others  r'�bind�BzrBranch.bind,s,��.�_�_�
��#�#�E�J�J�/��
�
�s	�6�
Ac��URRS5SSRS5$![Ra gf=f)N�bound���r�)r$r�r�rlrmr%s r'�get_bound_location�BzrBranch.get_bound_locationFsF��	��?�?�,�,�W�5�c�r�:�A�A�'�J�J���(�(�	��	�s�,/�A�Ac��UR5 URcURU5UlURsSSS5 $!,(df   g=f)zFReturn the branch we are bound to.

:return: Either a Branch, or None
N)r��_master_branch_cache�_get_master_branch)r&r-s  r'rY�BzrBranch.get_master_branchLsC��
�^�^�
��(�(�0�,0�,C�,C�DW�,X��)��,�,��
�
�s�/A
�

Ac���UR5nU(dg[R"X!S9$![R[R
4an[R"XU5UeSnAff=f)N�r-)r�r
�openr�NotBranchError�ConnectionError�BoundBranchConnectionFailure)r&r-�	bound_loc�excs    r'r��BzrBranch._get_master_branchVsd���+�+�-�	���	U��;�;�y�R�R���%�%�v�'=�'=�>�	U��5�5�d�s�K�QT�T��	U�s�.�$A/�A*�*A/c��UR5 SUlU(aFURRSUR	S5S-UR
R
5S9 O&URRS5 SSS5 gSSS5 g![Ra SSS5 gf=f!,(df   g=f)zYSet the target where this branch is bound to.

:param location: URL to the target branch
Nr�r�r�r�FT)
r}r�r$r�r�r r�r`rlrmr�s  r'r��BzrBranch.set_bound_location_s���
�_�_�
�(,�D�%�����)�)���O�O�G�,�u�4����7�7�9�*��!��O�O�*�*�7�3���
���
��&�0�0�!� ��
�!���
�s0�AB8�'B�B8�B5�*B8�4B5�5B8�8
Cc�d�UR5 URU5nUbqUR5nURUSS9 URR5R
X0R55(a
SSS5 gUsSSS5 $SSS5 g!,(df   g=f)z�Synchronise this branch with the master branch if any.

:return: None or the last_revision that was pivoted out during the
         update.
NT)�	overwrite)r}rYr�r�r�	get_graph�is_ancestor)r&r-r[�old_tips    r'�update�BzrBranch.updatess����_�_�
��+�+�,?�@�F��!��,�,�.���	�	�&�D�	�1��?�?�,�,�.�:�:��/�/�1��� ��
���
���
�
�s�A2B!�B!�B!�!
B/c���URRS5nURS5RSS5up#[RU5n[
U5nX#4$)N�
last-revisionr�� r)r$r��rstrip�split�
cache_utf8�get_cached_utf8�int)r&�revision_stringr�r�s    r'�_read_last_revision_info�"BzrBranch._read_last_revision_info�sX���/�/�3�3�O�D��,�3�3�E�:�@�@��q�I��� �0�0��=���E�
���!�!r*c�t�SX4-nURRSX0RR5S9 g)z�Simply write out the revision id, with no checks.

Use set_last_revision_info to perform this safely.

Does not update the revision_history cache.
s%d %s
r�r�N)r$r�r r�)r&r�r��
out_strings    r'r��#BzrBranch._write_last_revision_info�s:�� �5�"6�6�
����!�!��Z�o�o�.L�.L�.N�	"�	
r*c��UR5 URRU5 URR	SURR55 SSS5 g!,(df   g=f)z�Update the feature flags for this branch.

:param updated_flags: Dictionary mapping feature names to necessities
    A necessity can be None to indicate the feature should be removed
rAN)r}r+�_update_feature_flagsr(r��	as_string)r&�
updated_flagss  r'�update_feature_flags�BzrBranch.update_feature_flags�sO���_�_�
��L�L�.�.�}�=��"�"�,�,�X�t�|�|�7M�7M�7O�P��
�
�s�AA*�*
A8c���UR5 URc URRS5UlURsSSS5 $!,(df   g=f)a�Get the bytes of a serialised tags dict.

Note that not all branches support tags, nor do all use the same tags
logic: this method is specific to BasicTags. Other tag implementations
may use the same method name and behave differently, safely, because
of the double-dispatch via
format.make_tags->tags_instance->get_tags_dict.

:return: The bytes of the tags file.
:seealso: Branch._set_tags_bytes.
N�tags)r�r>r$r�r%s r'�_get_tags_bytes�BzrBranch._get_tags_bytes�sF���^�^�
����'�#'�?�?�#<�#<�V�#D�� ��#�#��
�
�s�9A�
A"c��UR5 XlURRSU5sSSS5 $!,(df   g=f)zFMirror method for _get_tags_bytes.

:seealso: Branch._get_tags_bytes.
r	N)r}r>r$r�)r&r�s  r'�_set_tags_bytes�BzrBranch._set_tags_bytes�s4��
�_�_�
�$���?�?�,�,�V�U�;��
�
�s	�"=�
Ac�0>�[TU]5 SUlgr#)�superr�r>�r&rBs �r'r��BzrBranch._clear_cached_state�s���
��#�%���r*c��SSKJn UR5 U"XS9nUR5sSSS5 $!,(df   g=f)z7Make sure the data stored in this branch is consistent.r)�BranchReconciler)�thoroughN)�	reconcilerr})r&rr�
reconcilers    r'r�BzrBranch.reconcile�s1��/�
�_�_�
�)�$�B�J��'�'�)��
�
�s	�7�
Ac�D�[R"URU5e)z4Set the branch location to use for a tree reference.)r�UnsupportedOperation�set_reference_info)r&�file_id�branch_location�paths    r'r�BzrBranch.set_reference_info�����)�)�$�*A�*A�4�H�Hr*c�D�[R"URU5e)z;Get the tree_path and branch_location for a tree reference.)rr�get_reference_info)r&rrs   r'r"�BzrBranch.get_reference_info�r r*c��URU5SnUc9[R"UR
RRU5US9$[R"[R"[R"UR5U5US9$![Ra SnN�f=f![Ra gf=f)z�Return the parent branch for a tree-reference.

:param path: The path of the nested tree in the tree
:return: A branch associated with the nested tree
rNr�)r"rrr
�open_from_transportr �root_transportr5r�r�r
�join�strip_segment_parametersrD)r&rrr-rs     r'�reference_parent�BzrBranch.reference_parent�s���	#�"�5�5�g�>�q�A�O��"�
��1�1��O�O�2�2�8�8��>�(;����{�{��M�M��1�1�$�-�-�@�/�
�!4�	
�	
���*�*�	#�"�O�	#���(�(�
��
�s"�B�7B6�B3�2B3�6C
�C
r�c�"�URR5(d [URUR5eUR	5 UR5 U(d"UR
5 UR5 O$URXRR/S9 URSU5 SSS5 g![R[[R4a SSS5 gf=f!,(df   g=f)z�Set the URL this branch is stacked against.

:raises UnstackableBranchFormat: If the branch does not support
    stacking.
:raises UnstackableRepositoryFormat: If the repository does not support
    stacking.
Nr��stacked_on_location)r+�supports_stackingrrDr}�_check_stackable_repor�r�
NotStacked�UnstackableRepositoryFormat�_unstack�_activate_fallback_locationr r&�_set_config_locationr�s  r'�set_stacked_on_url�BzrBranch.set_stacked_on_url�s����|�|�-�-�/�/�)�$�,�,��
�
�F�F�
�_�_�
�
�&�&�(����+�+�-��
�
���0�0��o�o�.L�.L�-M�1��

�%�%�&;�S�A�+�
���%�%�+��6�6���
��
����
�s1�D�)C	�9AD�	)C=�2D�<C=�=D�
Dc���URRR(d?[R"URRURR
5egr#)rr+�supports_external_lookupsrr0rDr%s r'r.�BzrBranch._check_stackable_repo
sG�����&�&�@�@��4�4����'�'����)A�)A��
�Ar*c
�j�[RR5 URn[	UR
5S:wa$[
SRXR
55e[R"URRR5nUR5nUR
(a$[
SRUR55eUR5RnX0lURRUS9 UbUR!5 UR#5 UbURR%5 SnUR#5 US-
nM![&R(a Of=fUS:Xa[
S5e[+US-
5HnURR5 M UR-5 [/UR0R355nO$![&R4a
 [/5nOf=f[6R9URUUR;5/USS	9R=5nURR?XS
9 SSS5 O!,(df   O=fSSS5 g!,(df   g=f)zrChange a branch to be unstacked, copying data as needed.

Don't call this directly, use set_stacked_on_url(None).
rz?can't cope with fallback repositories of {!r} (fallbacks: {!r})z0didn't expect {!r} to have fallback_repositoriesryNrTz5old_repository should have been locked at least once.)�required_ids�if_present_ids�find_ghosts)�
fetch_spec) �ui�
ui_factory�nested_progress_barr�len�_fallback_repositories�AssertionErrorrArr�r r&r9�find_repositoryr}�repository_token�leave_lock_in_placer~�dont_leave_lock_in_placer�LockNotHeld�ranger��setr	�get_reverse_tag_dict�TagsNotSupported�	vf_search�NotInOtherForRevsr��execute�fetch)	r&�old_repository�
new_bzrdir�new_repository�
lock_token�old_lock_count�_i�
tags_to_fetchr=s	         r'r1�BzrBranch._unstacksP��
�]�]�
.�
.�
0�"�_�_�N��>�8�8�9�Q�>�$�0�06��&�(M�(M�1���$������)G�)G�)L�)L�M�J�'�7�7�9�N��4�4�$�F�M�M�������(�2�2�4�E�E�J�,�O��O�O�&�&�Z�&�8��%��2�2�4��!�!�#��%����8�8�:��N���"�)�)�+��!�#�����)�)�������"�$�K����N�Q�.�/�����*�*�,�0� �)�)�+�*�$'��	�	�(F�(F�(H�$I�M���.�.�*�$'�E�M�*��&�8�8��O�O�"�"&�"4�"4�"6�!7�#0� $�9���'�)�
����%�%�n�%�L�,�+�+��{1�
0�
0�sn�D?J$�E6�/J$�6F
�
J$�F
�
AJ$� J
�"#H�J
�H'�$J
�&H'�'AJ
�	J$�

J	�J$�$
J2c��URR5 URR5 UR5nUbUR5 gg)z�Break a lock if one is present from another instance.

Uses the ui factory to ask for confirmation if the lock may be from
an active process.

This will probe the repository for its lock as well.
N)r;�
break_lockrrYrZs  r'rZ�BzrBranch.break_lockcsK��	
���%�%�'����"�"�$��'�'�)��������r*)r:r+r�r�r>r$r6r<r;r r/rr#)T)r!N)DrC�
__module__�__qualname__�__firstlineno__�__doc__rr�__annotations__r�BzrDir�propertyrl�	Transportr(r�r	�
LockableFilesr=rE�__repr__rHr9rLrRrVr\rhrr�boolrur}r�rrrH�
LockBrokenr~r�r�r�r�r�r�r�r�r�r�r�rYr�r�r�r�r�rr
r
r�rrr"r)r4r.r1rZ�__static_attributes__�
__classcell__�rBs@r'rr=s����
��'�);�;�<�<��
�
��
��>�#;�#;������ � ��m�m� ��	 �
'� �'�4�4�
 �4G��H���I�#I�J�D�
�$��$�
K��
�B�$D�.�4�.��.�(��#�#�V�%6�%6�7�	+�8�	+�1�=�I�C�	�C�
��1�
0�4�-�U��(�$"�

�Q�$�"<� �*�I�I�
�2B�c�B�d�B�B�QM�f � r*rc�^�\rSrSrSrSSjrU4SjrU4SjrSrSr	Sr
S	rS
rSr
SSjrS
rSrSrSrSrSrSrSSjrSrSrU=r$)�
BzrBranch8irz.A branch that stores tree-reference locations.c��UR(agUcURR/nUR5n[R
SHGnU"X5nUbM[R
R
U5n[SRU55e URX!S9 g![R[R[4a gf=f)N�transform_fallback_locationz?'transform_fallback_location' hook {} returned None, not a URL.r�)�_ignore_fallbacksr r&r�r
�hooks�
get_hook_namerCrAr2rr0r/r)r&r-r��hook�	hook_names     r'�
_open_hook�BzrBranch8._open_hookus����!�!���&�#'�?�?�#A�#A�"B��	��)�)�+�C����%B�C���4�o���;� &��� :� :�4� @�I�(�+�+1�6�)�+<���	D�
�,�,��
-�
��
�.�.����#�
�	�

�	�s�B,�,)C�Cc�p>�URSS5Ul[TU]"U0UD6 SUlSUlg)Nr,F)rkrorr=r��_reference_info)r&�args�kwargsrBs   �r'r=�BzrBranch8.__init__�s9���!'���,>��!F���
���$�)�&�)�)-��&�#��r*c�>>�[TU]5 SUlSUlgr#)rr�r�rwrs �r'r��BzrBranch8._clear_cached_state�s���
��#�%�)-��&�#��r*c��UR5n[R"U5(agURR	5nURU5H
nXB:XdM
 g [R"UR5er#)	r��
_mod_revision�is_nullrr��iter_lefthand_ancestryr�AppendRevisionsOnlyViolationrD)r&r�r��graph�lh_ancestors     r'r��#BzrBranch8._check_history_violation�sl���*�*�,�
�� � ��/�/�����)�)�+�� �7�7��D�K��+��E��1�1�$�-�-�@�@r*c��UR5upURUS-
S9 [[UR55$)z1Generate the revision history from last revision.r��
stop_index)r��_extend_partial_history�list�reversed�_partial_revision_history_cache)r&�
last_revnor�s   r'�_gen_revision_history� BzrBranch8._gen_revision_history�s>��$(�$;�$;�$=�!�
��$�$�
�Q��$�?��H�T�A�A�B�C�Cr*c�z�UR5 URSUSS9 SSS5 g!,(df   g=f)�Set the parent branch.�parent_locationT)�
make_relativeN)r}r3r�s  r'r��BzrBranch8._set_parent_location�s.��
�_�_�
��%�%�&7��D�%�Q��
�
�s�,�
:c�z�UR5 URS5sSSS5 $!,(df   g=f)r�r�N)r��_get_config_locationr%s r'r��BzrBranch8._get_parent_location�s'��
�^�^�
��,�,�->�?��
�
�r�c��[5n[R"U5nUR5HBunupV[R"XES9nUbURSU5 UR
U5 MD UR5 URRSUR55 XlSSS5 g!,(df   g=f)ztReplace all reference info stored in a branch.

:param info_dict: A dict of {file_id: (branch_location, tree_path)}
)rrN�	tree_path�
references)rr�	RioWriter�items�Stanza�add�write_stanzar}r$r��getvaluerw)r&�	info_dict�s�writerrrr��stanzas        r'�_set_all_reference_info�"BzrBranch8._set_all_reference_info�s���

�I�����q�!��5>�_�_�5F�1�G�1�o��Z�Z��Q�F��$��
�
�;�	�2�����'�	6G�
�_�_�
��O�O�%�%�l�A�J�J�L�A�#,� ��
�
�s�1C�
Cc	���UR5 URbURsSSS5 $URRS5n[R
"U5nUVs0sH(nUSR
S5USSU;aUSOS4_M* nnSSS5 WUlUsSSS5 $s snf!,(df   N%=f![Ra 0nN@f=f!,(df   g=f)znReturn all the reference info stored in a branch.

:return: A dict of {tree_path: (branch_location, file_id)}
Nr�rr�rr�)	r�rwr$rkr�read_stanzasr�rlrm)r&�rio_file�stanzasr�r�s     r'�_get_all_reference_info�"BzrBranch8._get_all_reference_info�s���
�^�^�
��#�#�/��+�+��
�
��_�_�(�(��6�(�!�.�.�x�8�G�")�!�
")�A�	�)��+�+�G�4��/�0�.9�Q�.>�A�k�N�D�7��")��!�7�$-�D� ��!�
��!�7�6��"�,�,�
��	�
���
�sd�C(�C�B;�+/B6�B;�C�$C(�6B;�;
C		�C�C(�	C�C%�"C(�$C%�%C(�(
C6c�Z�UR5nX#4XA'UcXA	URU5 g)aSet the branch location to use for a tree reference.

:param branch_location: The location of the branch to retrieve tree
    references from.
:param file_id: The file-id of the tree reference.
:param tree_path: The path of the tree reference in the tree.
N)r�r�)r&rrr�r�s     r'r�BzrBranch8.set_reference_info�s7���0�0�2�	�-�9�	���"��"��$�$�Y�/r*c�B�UR5RUS5$)znGet the tree_path and branch_location for a tree reference.

:return: a tuple of (branch_location, tree_path)
�NN)r�rk)r&rs  r'r"�BzrBranch8.get_reference_info�s ��
�+�+�-�1�1�'�<�H�Hr*c�(�URSU5 g)r�r�N)r3r�s  r'r��BzrBranch8.set_push_location�s���!�!�/�8�<r*c���SUlUR5nUc*URS5(dgURSS5 gUR	SXS9 URSS5 g)	r�Nr�F�FalseT�bound_location��config�True)r��get_config_stackrkrJr3)r&r��confs   r'r��BzrBranch8.set_bound_location�sf��$(��!��$�$�&�����8�8�G�$�$������'�*���%�%�&6��%�N��H�H�W�f�%�r*c�n�UR5nURS5U:wagURSUS9$)zaReturn the bound location in the config file.

Return None if the bound parameter does not match
r�Nr�r�)r�rkr�)r&r�r�s   r'�_get_bound_location�BzrBranch8._get_bound_locations=��
�$�$�&���8�8�G���%���(�(�)9�$�(�G�Gr*c�$�URS5$)zSee Branch.get_bound_location.T�r�r%s r'r��BzrBranch8.get_bound_location
s���'�'��-�-r*c�$�URS5$)z"See Branch.get_old_bound_location.Fr�r%s r'�get_old_bound_location�!BzrBranch8.get_old_bound_locations���'�'��.�.r*c��[RU5nURSUS9nUc[R"U5eU$)Nr,r�)rP�BranchOnlyStackr�rr/)r&r��stacked_urls   r'r��BzrBranch8.get_stacked_on_urlsG���*�*�4�0���/�/�0E�d�/�S�����#�#�D�)�)��r*c���US:Xa[R$UR5 UR5up4US::dX:�a[R
"USU45eUbX!S-
sSSS5 $X1-
n[
UR5U::aURUS9 [
UR5U:�aURUsSSS5 $[R"X5e!,(df   g=f)z,Find the revision id of the specified revno.rNrr�)
r~�
NULL_REVISIONr�r�r�RevnoOutOfBoundsrAr�r��NoSuchRevision)r&r��historyr��last_revision_id�indexs      r'�
get_rev_id�BzrBranch8.get_rev_id"s����A�:� �.�.�.�
�^�^�
�+/�+B�+B�+D�(�J���z�U�/��-�-�e�a��_�E�E��"��q�y�)�
�
��&�E��4�7�7�8�E�A��,�,��,�>��4�7�7�8�5�@��;�;�E�B��
��+�+�D�8�8��
�s�AC$�1AC$�C$�$
C2c�v�[R"U5(agUR5 URR	U5nUR5U-
sSSS5 $![
a�nUR
US9 O=![Ra&n[R"XR5UeSnAff=f[UR5S-
nUS:a[R"X5UeURUU:wa[R"X5UeSnAN�SnAff=f!,(df   g=f)z&Given a revision id, return its revno.r)�
stop_revisionNr)r~rr�r�r��
ValueErrorr�r�RevisionNotPresent�GhostRevisionsHaveNoRevnor�rAr�r�)r&r�r��er�s     r'�revision_id_to_revno�BzrBranch8.revision_id_to_revno7s��� � ��-�-��
�^�^�
�

J��<�<�B�B�;�O���:�:�<�%�'��
���
J���0�0�{�0�K���0�0�� �:�:�#�_�_��������D�@�@�A�A�E���1�9� �/�/��B��I��7�7��>�+�M� �/�/��B��I�N��
J���
�sS�D*�A&�
D*�&
D'�1B�D"�B;�!B6�6B;�;A"D"�D*�"D'�'D*�*
D8)ror�r�rwr#)rCr\r]r^r_rtr=r�r�r�r�r�r�r�rr"r�r�r�r�r�r�r�r�rhrirjs@r'rlrlrsp���8��4$�$�
A�D�R�
@�
-� �.0�I�=�
�H�.�/��9�*(�(r*rlc�0^�\rSrSrSrSU4SjjrSrU=r$)�
BzrBranch7iMz0A branch with support for a fallback repository.c�>�[TU]XU5 [R5n[	SU5 UR
R
SU5 g)NzUpgrading branch to format %rrA)rr�BzrBranchFormat8�get_format_stringrr$r�)r&rrr��
format_stringrBs     �r'r�BzrBranch7.set_reference_infoPs?���
��"�7�Y�G�(�:�:�<�
��.�
�>����!�!�(�M�:r*�r#)rCr\r]r^r_rrhrirjs@r'r�r�Ms���:�;�;r*r�c��\rSrSrSrSrSrg)�
BzrBranch6iWz�See BzrBranchFormat6 for the capabilities of this branch.

This subclass of BzrBranch7 disables the new features BzrBranch7 added,
i.e. stacking.
c�B�[URUR5er#r�r%s r'r��BzrBranch6.get_stacked_on_url^r�r*r�N)rCr\r]r^r_r�rhr�r*r'r�r�Ws
���Cr*r�c��\rSrSrSrSr\SSj5rSrSSjr	SSjr
SS	jr\S
5r
SrSrSS
jrSrg)�BranchFormatMetadiribz<Base class for branch formats that live in meta directories.c�n�[R"U5 [RRU5 gr#)rr=r�	BzrFormatr%s r'r=�BranchFormatMetadir.__init__es$�����d�#����!�!�$�'r*Nc�P�URSUS9nURS5nUR[SU5$![Ran[R"X!S9UeSnAff=f![Ra%n[R"URUS9UeSnAff=f)z6Return the format for the branch object in controldir.N�r/�rr rAr4)	�get_branch_transportrlrmrr�r�r9�_find_formatr)�klassr r/rr�r�s      r'�find_format�BranchFormatMetadir.find_formatis���	S�"�7�7��4�7�H�I�	�%�/�/��9�M�
�!�!�/�8�]�K�K���(�(�	S��'�'�T�I�s�R��	S���(�(�	��'�'��^�^�
���
��	�s,�;�A,�A)�A$�$A)�,B%� B � B%c�,�[UR5e)z(What class to instantiate on open calls.)�NotImplementedError�
_branch_classr%s r'r��!BranchFormatMetadir._branch_classxs��!�$�"4�"4�5�5r*c��U(agg)Nsappend_revisions_only = True
r*r�)r&�append_revisions_onlys  r'�_get_initial_config�'BranchFormatMetadir._get_initial_config|s
�� �4�r*c��UcUR5n[SXR5 URXS9n[R
"US[R5nUR5 UR5 USUR54/-
nUH#upxURXxUR5S9 M% UR5 URXSUS9n	URXU	5 U	$!UR5 f=f)a%Initialize a branch in a control dir, with specified files.

:param a_controldir: The bzrdir to initialize the branch in
:param utf8_files: The files to create as a list of
    (filename, content) tuples
:param name: Name of colocated branch to create, if any
:return: a branch in this format
zcreating branch %r in %sr��lockrAr�T)�_found�found_repository)�_get_selected_branchrrDr�r	rd�lockdir�LockDir�create_lockr}rr�r�r~r��_run_post_branch_init_hooks)
r&r.�
utf8_filesr/r�branch_transportr;�filename�contentr4s
          r'�_initialize_helper�&BranchFormatMetadir._initialize_helper�s���<��4�4�6�D��)�4�1F�1F�G�'�<�<�T�<�M��&�4�4��f�g�o�o�
�
�	�!�!�#�� � �"�	#��H�d�n�n�&6�7�8�8�J�%/�!�� �*�*��L�,G�,G�,I�+��&0�

� � �"����<�d�Z��X���(�(��V�D��
��
� � �"�s�?C4�4Dc
��UcUR5nU(dG[RXS9nURUR:wa[	SRXp55eUR
SUS9n[R"US[R5n	UcUR5nUR5"UU	UUUUUS9$![Ra%n
[R "UR"US9U
eSn
A
ff=f)zSee BranchFormat.open().Nr�� wrong format {!r} found for {!r}r�)r+r1r/r.r0r,r-r�)r�r�r�rBrCrAr�r	rdrrrDr�rlrmrr�r9)r&r.r/r�r,r�r-rArr;r�s           r'r��BranchFormatMetadir.open�s
���<��4�4�6�D��(�4�4�\�4�M�F����4�>�>�1�$�6�=�=�f�K���!�5�5�d��5�F�	�	�*�8�8��6�7�?�?��M� �'�#/�#?�#?�#A� ��%�%�'��,��)�,�!1�$7��
���(�(�	��'�'��^�^����
��	�s�3AC�C?� C:�:C?c�R�[R"5nURU5 U$r#)r�BzrDirMetaFormat1�set_branch_format)r&�rets  r'�_matchingcontroldir�'BranchFormatMetadir._matchingcontroldir�s#���&�&�(�����d�#��
r*c��g�NTr�r%s r'�
supports_tags�!BranchFormatMetadir.supports_tags����r*c��grr�r%s r'�supports_leaving_lock�)BranchFormatMetadir.supports_leaving_lock�rr*c�r�[R"UUUUS9 [RRUUUUS9 g)N)�allow_unsupported�recommend_upgrade�basedir)r�check_support_statusrr�)r&rrrs    r'r�(BranchFormatMetadir.check_support_status�sE��	�)�)��/�/��		
�	���-�-��/�/��		.�	
r*r�r#r�)NFFNN)TN)rCr\r]r^r_r=�classmethodr�r�r�rr�rbrrrrrhr�r*r'r�r�bsq��F�(��L��L�6���B���� �%�N����
��BF�
r*r�c�P�\rSrSrSrSr\S5rSrSSjr	Sr
S	rS
rSr
g)
�BzrBranchFormat6i�aBranch format with last-revision and tags.

Unlike previous formats, this has no explicit revision history. Instead,
this just stores the last-revision, and the left-hand history leading
up to there is the history.

This format was introduced in bzr 0.15
and became the default in 0.91.
c��[$r#)r�r%s r'r��BzrBranchFormat6._branch_class�����r*c��g)�%See BranchFormat.get_format_string().s"Bazaar Branch Format 6 (bzr 0.15)
r���clss r'r��"BzrBranchFormat6.get_format_string�s��6r*c��g)�*See BranchFormat.get_format_description().zBranch format 6r�r%s r'�get_format_description�'BzrBranchFormat6.get_format_description���� r*Nc�R�SSURU54S/nURXX#5$��/Create a branch of this format in a_controldir.�r�s0 null:
rO�r	r*�r�r�r&r.r/rr�rs      r'�
initialize�BzrBranchFormat6.initialize��:��

,�
�D�4�4�5J�K�L��
�
�
�&�&�|��R�Rr*c�,�[RU5$�z+See breezy.branch.BranchFormat.make_tags().��_mod_tag�	BasicTags�r&r4s  r'�	make_tags�BzrBranchFormat6.make_tags����!�!�&�)�)r*c��grr�r%s r'�"supports_set_append_revisions_only�3BzrBranchFormat6.supports_set_append_revisions_onlyrr*Tr��NNN)rCr\r]r^r_r�r!r�r.r8rArE�supports_reference_locationsrhr�r*r'r#r#�sD�����6��6�!�
OS�	S�*��$(� r*r#c�V�\rSrSrSrSr\S5rSrS
Sjr	Sr
S	rS
rSr
Srg)r�iz@Metadir format supporting storing locations of subtree branches.c��[$r#)rlr%s r'r��BzrBranchFormat8._branch_classr&r*c��g)r(s(Bazaar Branch Format 8 (needs bzr 1.15)
r�r)s r'r��"BzrBranchFormat8.get_format_strings��<r*c��g)r-zBranch format 8r�r%s r'r.�'BzrBranchFormat8.get_format_descriptionr0r*Nc�T�SSURU54SS/nURXX#5$)r3r4rOr5)r�r*r6r7s      r'r8�BzrBranchFormat8.initialize!s=��

,�
�D�4�4�5J�K�L���	
�
��&�&�|��R�Rr*c�,�[RU5$r<r=r@s  r'rA�BzrBranchFormat8.make_tags-rCr*c��grr�r%s r'rE�3BzrBranchFormat8.supports_set_append_revisions_only1rr*c��grr�r%s r'r-�"BzrBranchFormat8.supports_stacking4rr*Tr�rG)rCr\r]r^r_r�r!r�r.r8rArEr-rHrhr�r*r'r�r�sG��J���<��<�!�
OS�
S�*���$(� r*r�c�V�\rSrSrSrS
SjrSr\S5rSr	Sr
S	rS
rSr
Srg)�BzrBranchFormat7i:z�Branch format with last-revision, tags, and a stacked location pointer.

The stacked location pointer is passed down to the repository and requires
a repository format with supports_external_lookups = True.

This format was introduced in bzr 1.6.
Nc�R�SSURU54S/nURXX#5$r2r6r7s      r'r8�BzrBranchFormat7.initializeCr:r*c��[$r#)r�r%s r'r��BzrBranchFormat7._branch_classNr&r*c��g)r(s'Bazaar Branch Format 7 (needs bzr 1.6)
r�r)s r'r��"BzrBranchFormat7.get_format_stringQs��;r*c��g)r-zBranch format 7r�r%s r'r.�'BzrBranchFormat7.get_format_descriptionVr0r*c��grr�r%s r'rE�3BzrBranchFormat7.supports_set_append_revisions_onlyZrr*c��grr�r%s r'r-�"BzrBranchFormat7.supports_stacking]rr*c�,�[RU5$r<r=r@s  r'rA�BzrBranchFormat7.make_tags`rCr*Tr�rG)rCr\r]r^r_r8r�r!r�r.rEr-rArHrhr�r*r'rYrY:sI���OS�	S���;��;�!���*�$(� r*rYc�r�\rSrSrSr\S5rSrS
SjrSr	Sr
SS	jrS
rSSjr
Srg)�BranchReferenceFormatiiz�Bzr branch reference format.

Branch references are used in implementing checkouts, they
act as an alias to the real branch which is at some other url.

This format has:
 - A location file
 - a format string
c��g)r(s$Bazaar-NG Branch Reference Format 1
r�r)s r'r��'BranchReferenceFormat.get_format_stringts��8r*c��g)r-zCheckout reference format 1r�r%s r'r.�,BranchReferenceFormat.get_format_descriptionys��,r*Nc���URSUS9n[R"UR5n[R"XCRS5R
S55$)z!See BranchFormat.get_reference().Nr�r�r�)r�r
r(rDr'r�r�)r&r.r/rr�s     r'�
get_reference�#BranchReferenceFormat.get_reference}sR�� �5�5�d��5�F�	��/�/��0E�0E�F���}�}�S�"5�"5�j�"A�"H�"H��"Q�R�Rr*c�^�URnURSURS55 g)Nr�r�)rDr�r�)r&r.r�	to_branch�to_urls     r'�_write_reference�&BranchReferenceFormat._write_reference�s(���#�#��	���J��
�
�g�(>�?r*c�H�URSUS9nURXU5 g)z!See BranchFormat.set_reference().Nr�)r�rt)r&r.r/rrrs     r'�
set_reference�#BranchReferenceFormat.set_reference�s'�� �5�5�d��5�F�	����l�y�Ar*c���Uc[R"U5e[SUR5 URR
(a [R"XR5eUcUR5nURXS9nURXU5 URSUR55 URUUSURR/S9nURXU5 U$)r3zcreating branch reference in %sr�rAT)r�r-)r�UninitializableFormatrrDr+�fixed_components�IncompatibleFormatr�r�rtr�rr�r r&r)r&r.r/�
target_branchrr�rr4s        r'r8� BranchReferenceFormat.initialize�s���� ��.�.�t�4�4��0�,�2G�2G�H����0�0��+�+�D�2F�2F�G�G��<��4�4�6�D�'�<�<�T�<�M�����l�m�L��"�"�8�T�^�^�-=�>�������!.�!9�!9�!H�!H� I�	�
��	
�(�(��V�D��
r*c�$^^�SUU4SjjnU$)z2Create a clone() routine for a branch dynamically.c�&>�TRUTUS9$)zSee Branch.clone().)r}r/)r8)�	to_bzrdirr��repository_policyr/�tag_selector�a_branchr&s     ��r'r5�CBranchReferenceFormat._make_reference_clone_function.<locals>.clone�s����?�?�9�H�4�?�P�Pr*�NNNNr�)r&r�r5s`` r'�_make_reference_clone_function�4BranchReferenceFormat._make_reference_clone_function�s$���
�"���	Q�	Q��r*c�b�UcUR5nU(dG[RXS9nURUR:wa[	SRX�55eUcUR
X5n[R"XES9n	U	RXeS9n
URU
5U
lU
$)a}Return the branch that the branch reference in a_controldir points at.

:param a_controldir: A BzrDir that contains a branch.
:param name: Name of colocated branch to open, if any
:param _found: a private parameter, do not use it. It is used to
    indicate if format probing has already be done.
:param ignore_fallbacks: when set, no fallback branches will be opened
    (if there are any).  Default is to open fallbacks.
:param location: The location of the referenced branch.  If
    unspecified, this will be determined from the branch reference in
    a_controldir.
:param possible_transports: An optional reusable transports list.
r�rr�)r,r-)r�r�r�rBrCrArorr��open_branchr�r5)r&r.r/r�r�r-r,r�rA�real_bzrdir�results           r'r��BranchReferenceFormat.open�s���.�<��4�4�6�D��(�4�4�\�4�M�F����4�>�>�1�$�6�=�=�f�K������)�)�,�=�H� �o�o�h�X���(�(�-�)�
���:�:�6�B����
r*r�r#r�)NFNNFN)rCr\r]r^r_r!r�r.rortrwr8r�r�rhr�r*r'ririisc����8��8�-�S�@�B����"�
�<�*��� ���.r*ric��\rSrSrSrSrSrg)�
Converter5to6i�z4Perform an in-place upgrade of format 5 to format 6.c�P�[5nURURSS9nUR"UR	56 UR5 UR
UR55 URUR55 URUR55 SSS5 URR05 URRSUR!5URR#5S9 URR%S5 UR5 UR
S5 URS5 SSS5 g!,(df   N�=f![&R(a NAf=f!,(df   g=f)NT)r�rAr�zrevision-history)r#r�r r�r�r}�
set_parent�
get_parentr�r�r��get_push_locationr	�
_set_tag_dictr$r�rr�r`rlrm)r&r4rA�
new_branchs    r'�convert�Converter5to6.convert�sX��!�#���[�[��!2�!2�4�[�@�
�	�,�,�f�.G�.G�.I�J�
�
"�
"�
$��!�!�&�"3�"3�"5�6��)�)�&�*C�*C�*E�F��(�(��)A�)A�)C�D�%�	���%�%�b�)�	���'�'��f�&�&�(�z�/D�/D�/S�/S�/U�	(�	
�
	���$�$�%7�8�
�
�
�
 �
��!�!�$�'�
�%�%�d�+�!�
 �%�
$��$"�,�,�
��
��!�
 �s=�AE,�?F�E=�F�,
E:�=F�F�F�F�
F%r�N�rCr\r]r^r_r�rhr�r*r'r�r��s
��>�,r*r�c��\rSrSrSrSrSrg)�
Converter6to7iz4Perform an in-place upgrade of format 6 to format 7.c��[5nURSS5 URRSUR	55 g)Nr,r3rA)rYr3r$r�r�r&r4rAs   r'r��Converter6to7.converts:��!�#���#�#�$9�2�>����#�#�H�f�.>�.>�.@�Ar*r�Nr�r�r*r'r�r����>�Br*r�c��\rSrSrSrSrSrg)�
Converter7to8iz4Perform an in-place upgrade of format 7 to format 8.c��[5nURRSS5 URRSUR55 g)Nr�r*rA)r�r$r�rr�s   r'r��Converter7to8.convert!s?��!�#�����#�#�L�#�6����#�#�H�f�.>�.>�.@�Ar*r�Nr�r�r*r'r�r�r�r*r�N)1�ior�typingrrr�globalsr3rr	r
rr~rrlr4r
rrrrr r�
decoratorsrr�rr�tracerrrrr�remoterrrlr�r�r�r�r#r�rYrir�r�r�r�r*r'�<module>r�s��$�'�%���I���"0�/�(�*���$�$�7���)��(�r ��)�r �jX(��X(�v;��;�C��C�A
�&�*�*�L�A
�H)(�*�)(�X%(�*�%(�P,(�*�,(�^G�/�G�T,�,�BB�B�B�Br*

Youez - 2016 - github.com/yon3zu
LinuXploit