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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��gp@��h�SrSSKrSSKrSSKJr SSKJr \"\"5S5 SSKJrJ	r	J
r
Jr SSKJr
 SS	KJrJrJr SS
KJrJr "SS\
R(5r"S
S\
R(5r"SS\	R.5r"SS\5r"SS5r"SS\\	R65r"SS\5r"SS\5r"SS\	R>5r "SS\	R>5r!"SS \	RD5r#"S!S"\	RD5r$\"5\	R6l%g)#a�BzrDir logic. The BzrDir is the basic control directory used by bzr.

At format 7 this was split out into Branch, Repository and Checkout control
directories.

Note: This module has a lot of ``open`` functions/methods that return
references to in-memory objects. As a rule, there are no matching ``close``
methods. To free any associated resources, simply stop referencing the
objects returned.
�N)�cast�)�lazy_importa�
from breezy import (
    branch as _mod_branch,
    lockable_files,
    osutils,
    repository,
    revision as _mod_revision,
    ui,
    urlutils,
    win32utils,
    )
from breezy.bzr import (
    branch as _mod_bzrbranch,
    fetch,
    fullhistory as fullhistorybranch,
    knitpack_repo,
    remote,
    vf_search,
    workingtree_3,
    workingtree_4,
    )
from breezy.i18n import gettext
)�config�
controldir�errors�lockdir��	transport)�mutter�note�warning)�do_catching_redirections�localc��\rSrSrSrSrSrg)�MissingFeature�CzQMissing feature %(feature)s not provided by this version of Breezy or any plugin.c��Xlg�N��feature��selfrs  �3/usr/lib/python3/dist-packages/breezy/bzr/bzrdir.py�__init__�MissingFeature.__init__I�����rN��__name__�
__module__�__qualname__�__firstlineno__�_fmtr�__static_attributes__�rrrrCs��	+�	�
rrc��\rSrSrSrSrSrg)�FeatureAlreadyRegistered�Mz4The feature %(feature)s has already been registered.c��Xlgrrrs  rr�!FeatureAlreadyRegistered.__init__PrrrNrr&rrr(r(Ms��A�D�rr(c�0�\rSrSrSrSrSrS"SjrSrS#Sjr	S	r
S
rS$SjrSr
S
rS%SjrSrSrSrSrSrSrSrSr\S5r\S5rSrS&SjrS'SjrSrSr\ S(S)Sjj5r!Sr"S r#S!r$g)*�BzrDir�Ta�A .bzr control diretory.

BzrDir instances let you create or open any of the things that can be
found within .bzr - checkouts, branches and repositories.

:ivar transport:
    the transport which this bzr dir is rooted at (i.e. file:///.../.bzr/)
:ivar root_transport:
    a transport connected to the directory this bzr was opened from
    (i.e. the parent directory holding the .bzr directory).

Everything in the bzrdir should have the same file permissions.

:cvar hooks: An instance of BzrDirHooks.
c�L�UR5nUR5 g![R[R4a\ UR	5nNH![R
a1 UR
5nNp![Ra gf=ff=ff=f)z�Invoke break_lock on the first object in the bzrdir.

If there is a tree, the tree is opened and break_lock() called.
Otherwise, branch is tried, and finally repository.
N)	�open_workingtreer�NotLocalUrl�
NoWorkingTree�open_branch�NotBranchError�open_repository�NoRepositoryPresent�
break_lock)r�thing_to_unlocks  rr7�BzrDir.break_lockes���		�"�3�3�5�O�	�"�"�$���"�"�F�$8�$8�9�	�
�"&�"2�"2�"4����(�(�
��&*�&:�&:�&<�O���1�1�����
��	�sE�#�$B#�A�B�/B�?B#�B�B�B#�B�B�B#c��URnUR5RRU5 g![R
a gf=f)z@Check that a bzrdir as a whole can be converted to a new format.N)�repository_formatr5�_format�check_conversion_targetrr6)r�
target_format�target_repo_formats   rr=�BzrDir.check_conversion_targetysK��+�<�<��	�� � �"�*�*�B�B�CU�V���)�)�	��	�s�)8�A�ANc
��USLn
URU
5nUR5nUR	5n
U
SnUR
R
U5(aUR
nU(aUR5nOU(aIUR5=(a U(+nUR5nURR!5nOSnSnSnUR#UUUUUUR$R&UUUS9	unnn
nU(amUR(UR(:Xa2U
(d+Ub([*R-U/U5nUR/UUS9 OUR/X�S9 UR15 OUb[3SR5U55eU
R75H!unnUR9UUS:waSOUUUU	S9 M# UR$R;S	5 UbUR5(aUR=5R9UUS9 U$![Ra SnGNf=f![R[R[R4a GN�f=f![a GNf=f!UR15 f=f![R>[R@4a U$f=f)
a?Clone this bzrdir and its contents to transport verbatim.

:param transport: The transport for the location to produce the clone
    at.  If the target directory does not exist, it will be created.
:param revision_id: The tip revision-id to use for any branch or
    working tree.  If not None, then the clone operation may tune
    itself to download less data.
:param force_new_repo: Do not use a shared repository for the target,
                       even if one is available.
:param preserve_stacking: When cloning a stacked branch, stack the
    new branch on top of the other branch's stacked-on branch.
:param create_prefix: Create any missing directories leading up to
    to_transport.
:param use_existing_dir: Use an existing directory if one exists.
:param no_tree: If set to true prevents creation of a working tree.
N�F��use_existing_dir�
create_prefix�force_new_repo�
stacked_on�stack_on_pwd�repo_format_name�make_working_trees�shared_repo��
fetch_spec)�revision_idzresult_repo not None({!r}))rN�repository_policy�name�tag_selector�.)!�cloning_metadir�find_repositoryrr6�get_branches�
repository�has_same_location�get_stacked_on_url�_mod_branch�UnstackableBranchFormat�UnstackableRepositoryFormat�
NotStacked�KeyErrorrJ�	is_sharedr;�network_name�initialize_on_transport_ex�root_transport�base�user_url�	vf_search�PendingAncestryResult�fetch�unlock�AssertionError�format�items�clone�
local_abspathr0r2r1)rrrNrF�preserve_stackingrGrErD�no_treerQ�require_stackingri�
local_repo�local_branches�local_active_branchrJ�want_sharedrI�result_repo�resultrOrMrP�local_branchs                        r�clone_on_transport�BzrDir.clone_on_transport�s���B&�T�1���%�%�&6�7��	��-�-�/�J��*�*�,��	�"0��"4��
#�-�-�?�?�
�K�K�0�;�;�
� ��!4�!G�!G�!I�J�!��!+�!>�!>�!@�!P��[��$�.�.�0�K�%�7�7�D�D�F��!&���K�#��
�-�-��!1�+�-�%�!�0�0�5�5�!1�#5�'�
.�

�	A��V�-�/@��
%� �(�(�F�O�O�;�,�#�/�!*�!@�!@�$�
�z�"�J� �%�%�j�Z�%�H��%�%�j�%�J��"�"�$��&�$�%A�%H�%H��%U�V�V�#1�"6�"6�"8��D�,�����%)�R�Z�T�[�"3��)�
�
�#9�	�
�!�!�/�/��4��"�k�&D�&D�&F�&F��%�%�'�-�-�f�+�-�N��
��q�)�)�	��J�	�� �7�7��6�6��%�%���
����	��	��x�"�"�$��*�$�$�f�&8�&8�9�	���
�	�sT�H#�I:�1I�AJ�AJ �#H=�<H=�3I7�6I7�:
J�J�J� $K�Kc�P�[R"U5nUR5 gr)�_mod_transport�
get_transport�ensure_base)r�url�ts   r�
_make_tail�BzrDir._make_tails���(�(��-��	�
�
�rc��^^�UU4SjnU(d5UcTRU5nUbU$O[TR5UUTS9$[TX#TS9$![Ra N!f=f)aReturn an object representing a policy to use.

This controls whether a new repository is created, and the format of
that repository, or some existing shared repository used instead.

If stack_on is supplied, will not seek a containing shared repo.

:param force_new_repo: If True, require a new repository to be created.
:param stack_on: If supplied, the location to stack on.  If not
    supplied, a default_stack_on location may be used.
:param stack_on_pwd: If stack_on is relative, the location it is
    relative to.
c�>�SnSnUR5nSnUR"5nUbURnSnUR5nURTR:waUR	5(dSnSnOSnU(dgU(a[UUUTS9S4$[TXTS9S4$![
Ra SnNBf=f)NFT�NF�ro)	�
get_config�get_default_stack_onrcr5r^rr6�UseExistingRepository�CreateRepository)�found_bzrdir�stack_onrHr�stoprVrors      ��rrO�=BzrDir.determine_repository_policy.<locals>.repository_policy s�����H��L�!�,�,�.�F��D��2�2�4�H��#�+�4�4����

 �)�9�9�;�
�
!�)�)�T�]�]�:�&�0�0�2�2�"&�J��D��D��"��,��� �%5�	�
���(��(�CS������-�-�-�
"�!�
�
"�s�B,�,C�Cr�)�_find_containingr�r5rr6r�)rrFr�rHrorO�policys`   `  r�determine_repository_policy�"BzrDir.determine_repository_policys����*$	�L����.�.�/@�A���%�!�M�&��0��,�,�.� �$�)9�	�� ��(�;K�
�	
���1�1����s�A�A(�'A(c�J�URU5nUR5S$)z<Create a new repository if needed, returning the repository.r)r��acquire_repository)rrFr�s   r�_find_or_create_repository�!BzrDir._find_or_create_repositoryYs&���1�1�.�A���(�(�*�1�-�-rc��Ub,URUR55 X"R4$UR5nURnURUR55 X#4$![R
aV SnUR
5nURUR55 X#4$![Ra SnX#4$f=ff=f)aFind the source branch and repo for a sprout operation.

This is helper intended for use by _sprout.

:returns: (source_branch, source_repository).  Either or both may be
    None.  If not None, they will be read-locked (and their unlock(s)
    scheduled via the exit_stack param).
N)�
enter_context�	lock_readrVr3rr4r5r6)r�
exit_stack�
source_branch�source_repositorys    r�_find_source_repo�BzrDir._find_source_repo^s����$��$�$�]�%<�%<�%>�?� �":�":�:�:�	@� �,�,�.�M� -� 8� 8��
�$�$�]�%<�%<�%>�?��/�/���$�$�	H� �M�
H�$(�$8�$8�$:�!��(�(�):�)D�)D�)F�G��/�/��
�-�-�
)�$(�!�
�/�/�

)��		H�s/�A/�/C�B9�C�9C�C�C�Cc
�t	�[R"5n[R5n
UbU
R	U/5 X-lUc/nO[
U5UR/-n[R"X5nUR5 URU5n[RRU5nUR%X�5un	nX�lU(aU	bURR(nOSnUR+UUUS9nUR-US9unnUR/UR155 UU
lUU
lU(d[7UR85S:wa[R:R<nO<U(a[R:R>nO[R:R@nUU
l!Ub U
RE5nURUUS9 U	c%URG5nUbURIU5 OU	RKUUUUS9n[MSROU55 U
(a�URQ5(d�[SU[TRV5(a�UbURY5(a�UR[SUS	9R\UR\:XalUR_UUUS
9nUR15 URaS5(d+URcURdRgS55 SSS5 OSnUS:XGaSnUb2UnURk5nUR/URm55 O+UbURk5=nnOU	bU	Rk5=nnUb0UR/URm55 URo5nO/nUHzn[pRsU[pRuU55nURwUUUS9nUc[yS
U5 MNURRKUWR{U5UUUS9 M| UsSSS5 $![R a UR#U5nGN�f=f![Rha GNwf=f!,(df   GN=f!,(df   g=f)a�Create a copy of this controldir prepared for use as a new line of
development.

If url's last component does not exist, it will be created.

Attributes related to the identity of the source branch like
branch nickname will be cleaned, a working tree is created
whether one existed before or not; and a local branch is always
created.

if revision_id is not None, then the clone operation may tune
    itself to download less data.

:param accelerator_tree: A tree which can be used for retrieving file
    contents more quickly than the revision tree, i.e. a workingtree.
    The revision tree will be used for cases where accelerator_tree's
    content is different.
:param hardlink: If true, hard-link files from accelerator_tree,
    where possible.
:param stacked: If true, create a stacked branch referring to the
    location of this control directory.
:param create_tree_if_local: If true, a working-tree will be created
    when working locally.
:return: The created control directory
Nr���possible_transportsrrL)rNrOrVzcreated new branch {!r}rB)rPr�)�accelerator_tree�hardlink�from_branch�down)�branchr�z1Ignoring nested tree %s, parent location unknown.)rF�recurse�stacked)>�
contextlib�	ExitStackrf�FetchSpecFactory�add_revision_ids�source_branch_stop_revision_id�listrarzr{r|rSr�
ControlDir�open_from_transportrr4�initialize_on_transportr�r�rbr�r�r��
lock_write�source_repo�target_repo�len�_fallback_repositories�TargetRepoKinds�STACKED�EMPTY�PREEXISTING�target_repo_kind�make_fetch_spec�
create_branch�generate_revision_history�sproutrri�has_workingtree�
isinstancer�LocalTransportrJr3rP�create_workingtree�is_versioned�set_root_idr0�path2idr2�
basis_treer��iter_references�urlutils�join�escape�reference_parentr�get_reference_revision) rr}rNrFr�r�r�r�r�r��create_tree_if_local�lossy�stack�fetch_spec_factory�target_transport�cloning_formatrur��stacked_branch_urlrOrt�is_new_repor�rM�
result_branch�wt�tree�basis�subtrees�path�target�sublocations                                 rr��
BzrDir.sproutys���N�
!�
!�
#�u�!&�!7�!7�!9���&�"�3�3�[�M�B�DO�A�"�*�&(�#�&*�+>�&?�4�CV�CV�BW�&W�#�-�;�;�C�U���(�(�*�!�1�1�'�:�N�
R�#�.�.�B�B�CS�T��04�/E�/E��0�,�M�,�0=�,��=�4�%)�%8�%8�%=�%=�"�%)�"� &� B� B�� 2�W�!C�!��(9�'K�'K�$7�(L�(�$�K��
���� 6� 6� 8�9�->��*�-8��*��3�{�A�A�B�a�G�#(�#8�#8�#@�#@� ��#(�#8�#8�#>�#>� �#(�#8�#8�#D�#D� �2B��/� �,�/�?�?�A�
��!�!�"3�
�!�K��$�!'� 4� 4� 6�
��*�!�;�;�K�H�� -� 4� 4�� +�&7�*�	!5�!�
�
�,�3�3�M�B�C�%��.�.�0�0��/��1E�1E�F�F� �(�K�,J�,J�,L�,L��&�&��1D�'���$� �%�%�&�
�.�.�%5�%� -�/���
�]�]�_��?�?�2�.�.�!��N�N�4�+@�+@�+H�+H��+L�M�%�_����&� ����>��D� �O�O�-�E��'�'����(9�:�"�.�#0�#;�#;�#=�=�E�D�"�.�#0�#;�#;�#=�=�E�D��#��'�'����(8�9�#�3�3�5�H�!�H�$�D�%�]�]�3�����0E�F�F�"&�"7�"7��,�,?�#8�#�K�
#�*��O�QU��!��*�*�1�1���4�4�T�:�'5� '� '�2��%�&�s$�
#���(�(�
R�'�?�?�@P�Q��
R��H &�3�3�!� �!��	%�_��_$�
#�sh�BR)�Q�<HR)�R�2*Q<�D*R)�%Q9�5R)�8Q9�9R)�<R�R�R�R�
R&	�!R)�)
R7c�T�[RXRR5$)zuFind a non-existing backup file name based on base.

See breezy.osutils.available_backup_name about race conditions.
)�osutils�available_backup_namera�has)rrbs  r�_available_backup_name�BzrDir._available_backup_names!��
�,�,�T�3F�3F�3J�3J�K�Krc	���[RR5 URR	S5nURS5nURR	U5n[RR
[S5[RUS5[RUS54-5 URRSU5 X4sSSS5 $!,(df   g=f)zXBackup this bzr control directory.

:return: Tuple with old path name and new path name
�.bzrz
backup.bzrzmaking backup of %s
  to %s�utf-8N)�ui�
ui_factory�nested_progress_barra�abspathr�r
�gettextr��unescape_for_display�	copy_tree)r�old_path�
backup_dir�new_paths    r�
backup_bzrdir�BzrDir.backup_bzrdir"s���
�]�]�
.�
.�
0��*�*�2�2�6�:�H��4�4�\�B�J��*�*�2�2�:�>�H��M�M����6�7��1�1�(�G�D��1�1�(�G�D���
�
���)�)�&�*�=��'�1�
0�
0�s�B;C$�$
C2c�*�SnSU3nURRSU5 [[S5URR	S5U4-5 g![
R[[
R4a US-
nX!:�aeOf=fM�)z�Permanently disable the bzrdir.

This is done by renaming it to give the user some ability to recover
if there was a problem.

This will have horrible consequences if anyone has anything locked or
in use.
:param limit: number of times to retry
rz
.bzr.retired.r�zrenamed %s to %sN�)	ra�renamer
r�r�r�TransportError�OSError�	PathError)r�limit�i�to_paths    r�
retire_bzrdir�BzrDir.retire_bzrdir5s���
���

�)�!��-���#�#�*�*�6�7�;���.�/��*�*�2�2�6�:�G�D�E�����)�)�7�F�4D�4D�E�
��Q����9���
��s�AA�4B�Bc��UnU"U5up4U(aU$URRS5nURUR:XagUR	U5SnM`![
Ra gf=f)a�Find something in a containing control directory.

This method will scan containing control dirs, until it finds what
it is looking for, decides that it will never find it, or runs out
of containing control directories to check.

It is used to implement find_repository and
determine_repository_policy.

:param evaluate: A function returning (value, stop).  If stop is True,
    the value will be returned.
z..Nr)rarkrcrb�open_containing_from_transportrr4)r�evaluater�rur��next_transports      rr��BzrDir._find_containingPs������#�L�1�L�F���
�)�8�8�>�>�t�D�N��$�$��(;�(;�;��
�#�B�B�>�R�ST�U�����(�(�
��
�s�A$�$A;�:A;c�h^�U4SjnTRU5nUc[R"T5eU$)z�Find the repository that should be used.

This does not require a branch as we use it to find the repo for
new branches as well as to hook existing branches up to their
repository.
c��>�UR5nURTR:XaUS4$UR	5(aUS4$g![Ra gf=f)Nr�T�NT)r5rr6rcr^)r�rVrs  �r�usable_repository�1BzrDir.find_repository.<locals>.usable_repositorytsl���
#�)�9�9�;�
��$�$��
�
�5�!�4�'�'��%�%�'�'�!�4�'�'�!���-�-�
#�"�
#�s�A�A"�!A")r�rr6)rr�
found_repos`  rrT�BzrDir.find_repositoryls8���	"��*�*�+<�=�
����,�,�T�2�2��rc�X�UR(agSUlURRS5nURS-S:XaSUlSUlgURS-S-UlURS-Ulg![Ra SUlSUlgf=f)z�Determine the appropriate modes for files and directories.

They're always set to be consistent with the base directory,
assuming that this transport allows setting modes.
NTrRi�ri�i��)�_mode_check_doner�stat�st_mode�	_dir_mode�
_file_moder�TransportNotPossible)r�sts  r�_find_creation_modes�BzrDir._find_creation_modes�s���� � �� $���	;����$�$�S�)�B��z�z�F�"�e�+�!%���"&���"$�*�*�v�"5��!?���"&�.�.�7�":�����*�*�	#�!�D�N�"�D�O�	#�s�B�"B)�(B)c�\�UR(dUR5 UR$)z2Return Unix mode for newly created files, or None.)r
rr�rs r�_get_file_mode�BzrDir._get_file_mode�s!���$�$��%�%�'����rc�\�UR(dUR5 UR$)z8Return Unix mode for newly created directories, or None.)r
rr
rs r�
_get_dir_mode�BzrDir._get_dir_mode�s!���$�$��%�%�'��~�~�rc�.�[R"U5$)z"Get configuration for this BzrDir.)r�BzrDirConfigrs rr��BzrDir.get_config�s���"�"�4�(�(rc��g)z*By default, no configuration is available.Nr&rs r�_get_config�BzrDir._get_config����rc�V�X lURS5UlXlSUlg)aInitialize a Bzr control dir object.

Only really common logic should reside here, concrete classes should be
made with varying behaviours.

:param _format: the format that is creating this BzrDir instance.
:param _transport: the transport this dir is based at.
r�FN)r<rkrrar
)r�
_transportr<s   rr�BzrDir.__init__�s+����$�)�)�&�1���(�� %��rc��UR$r)rars r�user_transport�BzrDir.user_transport�s���"�"�"rc��UR$rr
rs r�control_transport�BzrDir.control_transport�s���~�~�rc��URR5nURSS9nURnURUlURn[U[R5(a&UR5 URRnXAl
URSS9nURR5UlX4$![
Ra UR5nN�f=f![
Ra SnNtf=f![
R"[
R$4a SUlX4$f=f)zgProduce a metadir suitable for cloning with.

:returns: (destination_bzrdir_format, source_repository)
T)�ignore_fallbacksNF��recommend_upgrade)r<�	__class__r3rV�_branch_formatrr4r5r��remote�RemoteRepositoryFormat�_ensure_real�_real_repositoryr;r6r0�workingtree_formatr2r1)r�
result_formatr�r��repo_formatr�s      r�_cloning_metadir�BzrDir._cloning_metadir�s=��
���.�.�0�
�	:�
;��)�)�4�)�@��$*�$5�$5�!�/5�~�~�
�,�,�3�3�K��+�v�'D�'D�E�E�!�.�.�0�/�@�@�H�H��.9�+�	H��(�(�5�(�A�D�04�|�|�/E�/E�/G�M�,��/�/��-�(�(�
;�$(�$8�$8�$:�!�
;���)�)�	%� $��	%�� �$�$�f�&8�&8�9�	4�/3�M�,��/�/�		4�s;�,C�!D�$C9�6C<�8C9�9C<�<D�D�+E�Ec���UR5up#URc:UcU$URRRnUR5UlU(aUR
5 U$)a�Produce a metadir suitable for cloning or sprouting with.

These operations may produce workingtrees (yes, even though they're
"cloning" something that doesn't have a tree), so a viable workingtree
format must be selected.

:require_stacking: If True, non-stackable formats will be upgraded
    to similar stackable formats.
:returns: a ControlDirFormat with all component formats either set
    appropriately or set to None if that component should not be
    created.
)r7�_workingtree_formatr<�_matchingcontroldirr4r.ro)rrorirV�tree_formats     rrS�BzrDir.cloning_metadir�sj��"�2�2�4����%�%�-��!��
�%�,�,�@�@�S�S�K�(3�(=�(=�(?�F�%���#�#�%��
rc�,�[UR5e)a�Get the transport for use by branch format in this BzrDir.

Note that bzr dirs that do not support format strings will raise
IncompatibleFormat if the branch format they are given has
a format string, and vice versa.

If branch_format is None, the transport is returned with no
checking. If it is not None, then the returned transport is
guaranteed to point to an existing directory ready for use.
)�NotImplementedError�get_branch_transport)r�
branch_formatrPs   rr@�BzrDir.get_branch_transports��"�$�";�";�<�<rc�,�[UR5e)a�Get the transport for use by repository format in this BzrDir.

Note that bzr dirs that do not support format strings will raise
IncompatibleFormat if the repository format they are given has
a format string, and vice versa.

If repository_format is None, the transport is returned with no
checking. If it is not None, then the returned transport is
guaranteed to point to an existing directory ready for use.
)r?�get_repository_transport)rr;s  rrD�BzrDir.get_repository_transports��"�$�"?�"?�@�@rc�,�[UR5e)a�Get the transport for use by workingtree format in this BzrDir.

Note that bzr dirs that do not support format strings will raise
IncompatibleFormat if the workingtree format they are given has a
format string, and vice versa.

If workingtree_format is None, the transport is returned with no
checking. If it is not None, then the returned transport is
guaranteed to point to an existing directory ready for use.
)r?�get_workingtree_transport)rr<s  rrG� BzrDir.get_workingtree_transport(s��"�$�"@�"@�A�Arc	���U[La[SRU55eUc[R	5n[S[RRXUS95$)aCreate a new BzrDir at the url 'base'.

:param format: If supplied, the format of branch to create.  If not
    supplied, the default is used.
:param possible_transports: If supplied, a list of transports that
    can be reused to share a remote connection.
z@BzrDir.create always creates the default format, not one of {!r}r-)rir�)	r-rhri�BzrDirFormat�get_default_formatrrr��create)�clsrbrir�s    rrL�
BzrDir.create5sn���f�� �R�Y�Y����
�
�>�!�4�4�6�F����!�!�(�(��9L�
)�
�
�	
rc�b�SRURRUR5$)Nz<{} at {!r}>)rir.r rcrs r�__repr__�BzrDir.__repr__Ms#���$�$�T�^�^�%<�%<�d�m�m�L�Lrc�J�URR5 URRU5 URRSURR
55 URR5 g!URR5 f=f)z�Update the features required by this bzrdir.

:param updated_flags: Dictionary mapping feature names to necessities
    A necessity can be None to indicate the feature should be removed
�
branch-formatN)�
control_filesr�r<�_update_feature_flagsr�	put_bytes�	as_stringrg)r�
updated_flagss  r�update_feature_flags�BzrDir.update_feature_flagsPss��	
���%�%�'�	(��L�L�.�.�}�=��N�N�$�$�_�d�l�l�6L�6L�6N�O����%�%�'��D���%�%�'�s�AB�B")r
rr<r
rar)NFFNFTFN)FNNF)
NFr�NNFFNTF)i'�Fr)NN)�returnr-)%r r!r"r#�__doc__r7r=rwrr�r�r�r�r�r�r�r�rTrrrr�rr�propertyr%r(r7rSr@rDrG�classmethodrLrPrYr%r&rrr-r-Ts��� %�(	����������F�����L
�\.�
0�<��� �����!��`�DL�(�&�6�8�4;�<��)��&� �#��#�����!0�F�6=�A�B��
��
�.M�(rr-c�^�\rSrSrSrSrSrSrU4SjrSr	SSjr
S S	jrS!S
jrSr
S"SjrS
rSrS SjrSrS SjrS SjrS SjrSrSrSrSrSrSrS#SjrS!SjrS$SjrSrSr U=r!$)%�BzrDirMeta1i^z�A .bzr meta version 1 control object.

This is the first control object where the
individual aspects are really split out: there are separate repository,
workingtree and branch subdirectories and any subset of the three can be
present within a BzrDir.
c�b�US:Xag[RS[RU55$)aObtain the branch path to use.

This uses the API specified branch name first, and then falls back to
the branch name specified in the URL. If neither of those is specified,
it uses the default branch.

:param name: Optional branch name to use
:return: Relative path to branch
rBr��branches)r�r�r�)rrPs  r�_get_branch_path�BzrDirMeta1._get_branch_pathgs(���2�:���}�}�Z�����)>�?�?rc�6�URRS5n/nUH2nUR	URS5R
S55 M4 UR5 U$![Ra /s$f=f!UR5 f=f)z6Read the branch list.

:return: List of branch names.
�branch-list�
r�)r(�getrz�
NoSuchFile�append�rstrip�decode�close)r�f�retrPs    r�_read_branch_list�BzrDirMeta1._read_branch_listus���
	��&�&�*�*�=�9�A���	����
�
�4�;�;�u�-�4�4�W�=�>��
�G�G�I��
���(�(�	��I�	��
�G�G�I�s�A*�8B�*B�B�Bc��URRSSRUVs/sHo"RS5S-PM sn55 gs snf)zQWrite out the branch list.

:param branches: List of utf-8 branch names to write
rgrr�rhN)rrVr��encode)rrcrPs   r�_write_branch_list�BzrDirMeta1._write_branch_list�sB��
	
��� � ��3�8�8�h�$W�h�d�[�[��%9�E�%A�h�$W�X�	
��$Ws�Ac�>�[TU]X5 [RURUR
RUR
R5Ulgr)	�superr�lockable_files�
LockableFilesr(r<�_lock_file_name�_lock_classrT)rr"r<r.s   �rr�BzrDirMeta1.__init__�sF���
����-�+�9�9��"�"��L�L�(�(��L�L�$�$�
��rc��g)z See BzrDir.can_convert_format().Tr&rs r�can_convert_format�BzrDirMeta1.can_convert_format�r rc�|�UcUR5nURR5RUUUUS9$)zSee ControlDir.create_branch.)rPrV�append_revisions_only)�_get_selected_branchr<�get_branch_format�
initialize)rrPrVr�s    rr��BzrDirMeta1.create_branch�sF���<��,�,�.�D��|�|�-�-�/�:�:���!�"7�	;�
�	
rc��UcUR5nURU5nUS:wahURR5 UR	5nURU5 URU5 URR5 URRU5 g![an[R"U5UeSnAff=f!URR5 f=f![RaCn[R"[R!URR"U5US9UeSnAff=f)zSee ControlDir.destroy_branch.NrB)r�r)r�rdrTr�rq�remove�
ValueErrorrr4rurgr�delete_treerzrjr�r�rb)rrPr�rc�es     r�destroy_branch�BzrDirMeta1.destroy_branch�s���<��,�,�.�D��$�$�T�*���2�:����)�)�+�
,��1�1�3��=��O�O�D�)��'�'��1��"�"�)�)�+�	��N�N�&�&�t�,��
"�=� �/�/��5�1�<��=���"�"�)�)�+���(�(�	��'�'��]�]�4�>�>�#6�#6��=�$���
��	�sH�C�B0�(C�C8�0
C�:C�C�C�C5�8E�>E
�
Ec�L�URRRX5$)zSee BzrDir.create_repository.)r<r;r�)r�shareds  r�create_repository�BzrDirMeta1.create_repository�s���|�|�-�-�8�8��F�Frc��URRS5 g![Ran[R
"U5UeSnAff=f)zSee BzrDir.destroy_repository.rVN)rr�rzrjrr6)rr�s  r�destroy_repository�BzrDirMeta1.destroy_repository�sB��	:��N�N�&�&�|�4���(�(�	:��,�,�T�2��9��	:�s��A�A	�	Ac�P�URRRUUUUUS9$)zSee BzrDir.create_workingtree.)r�r�r�)r<r4r�)rrNr�r�r�s     rr��BzrDirMeta1.create_workingtree�s5���|�|�.�.�9�9���#�-��:�
�	
rc���URSS9nURRnUR[R
5nUR
US9 UR5 g)zSee BzrDir.destroy_workingtree.Fr,)�old_treeN)r0r�rV�
revision_tree�
_mod_revision�
NULL_REVISION�revert�destroy_workingtree_metadata)rr�rV�emptys    r�destroy_workingtree�BzrDirMeta1.destroy_workingtree�sV��
�
"�
"�U�
"�
;���Y�Y�)�)�
��(�(��)D�)D�E��	�	�	�5�	�!��)�)�+rc�:�URRS5 g)N�checkout)rr�rs rr��(BzrDirMeta1.destroy_workingtree_metadata�s�����"�"�:�.rc�,�SSKJn URXS9$)zkFind the branch 'format' for this bzrdir.

This might be a synthetic object for e.g. RemoteBranch and SVN.
r���BranchFormatMetadir�rP)r�r��find_format)rrPr�s   r�find_branch_format�BzrDirMeta1.find_branch_format�s��
	0�"�.�.�t�.�?�?rc�x�[RURS[R5nUR$)z9Figure out the mode to use when creating a bzrdir subdir.rB)ryrzr�
TransportLockr
)r�temp_controls  r�_get_mkdir_mode�BzrDirMeta1._get_mkdir_mode�s1��%�3�3��N�N�B�� <� <�
���%�%�%rc�J�SSKJn URXS9nURXS9$)z"See BzrDir.get_branch_reference().r�r�r�)r�r�r��
get_reference)rrPr�ris    r�get_branch_reference� BzrDirMeta1.get_branch_reference�s,��/�$�0�0��0�A���#�#�D�#�4�4rc���[R5nURURR:Xa%X!R:Xa[R
"U5eUR
XUS9$)N)�
target_branchrP)�_mod_bzrbranch�BranchReferenceFormat�control_urlrrP�BranchReferenceLoopr�)rr�rPris    r�set_branch_reference� BzrDirMeta1.set_branch_reference�s]���5�5�7�����
� 8� 8� D� D�D��*�*�*��0�0��?�?�� � ��� �N�Nrc�j�UcUR5nURU5nUcURRU5$UR	5 US:wa�UR5nX%;a�URR5 UR5n[RU5nUS:waXe;a[R"U5eUVs/sHowRUS-5PM nn[!U5(a[R""U5eUR%U5 UR'U5 URR)5 URRU5n	UR+5n
U	R-U
S9 URR/X:S9 URRU5$![
a&n[R"XR5UeSnAff=fs snf!URR)5 f=f![0R2a N�f=f)z"See BzrDir.get_branch_transport().NrB�/��mode)r�rdrrk�get_format_stringr?r�IncompatibleFormatr<rqrTr�r��dirname�ParentBranchExists�
startswith�any�AlreadyBranchErrorrkrurgr�rE�mkdirrz�
FileExists)rrArPr�r�rcr��b�child_branches�branch_transportr�s           rr@� BzrDirMeta1.get_branch_transports����<��,�,�.�D��$�$�T�*��� ��>�>�'�'��-�-�	P��+�+�-��2�:��-�-�/�H��#��"�"�-�-�/�0�#�5�5�7�H�&�.�.�t�4�G��"�}��)<�$�7�7��=�=�HP�%Q��1�l�l�4�#�:�&>��N�%Q��>�*�*�$�7�7��=�=��O�O�D�)��+�+�H�5��&�&�-�-�/��>�>�/�/��5���#�#�%���&�&�D�&�1�	��N�N� � �� �1��~�~�#�#�D�)�)��3#�	P��+�+�M�<�<�H�a�O��	P��&R���&�&�-�-�/���(�(�	��	�sJ�G�
A
G<�G7�1A
G<�H�
G4�!G/�/G4�7G<�<H�H2�1H2c��UcURRS5$UR5 URRSUR5S9 URRS5$![a&n[R
"XR5UeSnAff=f![Ra Ndf=f)z&See BzrDir.get_repository_transport().NrVr��rrkr�r?rr�r<r�r�rzr�)rr;r�s   rrD�$BzrDirMeta1.get_repository_transport)s����$��>�>�'�'��5�5�	T��/�/�1�	��N�N� � ��D�4H�4H�4J� �K��~�~�#�#�L�1�1��
#�	T��+�+�,=�|�|�L�RS�S��	T���(�(�	��	��(�A4�(B'�4
B$�>!B�B$�'B>�=B>c��UcURRS5$UR5 URRSUR5S9 URRS5$![a&n[R
"XR5UeSnAff=f![Ra Ndf=f)z'See BzrDir.get_workingtree_transport().Nr�r�r�)rr4r�s   rrG�%BzrDirMeta1.get_workingtree_transport7s����%��>�>�'�'�
�3�3�	U��0�0�2�	��N�N� � ��$�2F�2F�2H� �I��~�~�#�#�J�/�/��
#�	U��+�+�,>���M�ST�T��	U���(�(�	��	�r�c��/nUR5 URS5 UR	UR55 U$![Ra N7f=f)zSee ControlDir.branch_names.rB)r�rkrr4�extendrq)rrps  r�branch_names�BzrDirMeta1.branch_namesEsY����	��%�%�'�
�J�J�r�N��
�
�4�)�)�+�,��
���$�$�	��	�s�A�A�Ac���0nURSS9US'UR	5HnURUS9X'M U$![R[R4a NPf=f)zSee ControlDir.get_branches.rBr�)r3rr4r6rq)rrprPs   rrU�BzrDirMeta1.get_branchesQsy����	��&�&�B�&�/�C��G��*�*�,�D��(�(�d�(�3�C�I�-��
��
�%�%�v�'A�'A�B�	��	�s�A�$A'�&A'c�h�SSKJn URU5 g![Ra gf=f)z�Tell if this bzrdir contains a working tree.

Note: if you're going to open the working tree, you should just go
ahead and try, and not ask permission first.
r���WorkingTreeFormatMetaDirFT)�workingtreer��find_format_stringrr2)rr�s  rr��BzrDirMeta1.has_workingtree^s9��	:�	�$�7�7��=����#�#�	��	�s��1�1c���[URUR5(a,URR5UR5:wag[UR	5RUR
R5(dgUR5H8n[URUR5R5(aM8 g URSS9n[URURR5(dgg![Ra N�f=f![R[R4a gf=f)z%See BzrDir.needs_format_conversion().TFr,)r�r<r.r�r5r;rr6�
list_branchesr�r0r4r2r1)rrir��my_wts    r�needs_format_conversion�#BzrDirMeta1.needs_format_conversionls6���4�<�<��)9�)9�:�:��|�|�-�-�/�6�3K�3K�3M�M��	���$�$�&�.�.��0H�0H�0R�0R����	��(�(�*�F��f�n�n�f�.F�.F�.H�.R�.R�S�S��+�	��)�)�E�)�B�E��e�m�m�V�-F�-F�-P�-P�Q�Q��R�
���)�)�	��	���$�$�f�&8�&8�9�	���	�s$�=D!� >D;�!D8�7D8�;$E"�!E"c���UcUR5nURUS9nURU5 Uc/nO[U5nUR	UR
5 UR
UUSUUS9$)zSee ControlDir.open_branch.r�T)rP�_foundr+r�)r�r��check_support_statusr�rkra�open)rrP�unsupportedr+r�ris      rr3�BzrDirMeta1.open_branch�s����<��,�,�.�D��(�(�d�(�3���#�#�K�0��&�"$��"&�':�";���"�"�4�#6�#6�7��{�{����-� 3��
�	
rc�r�SSKJn URU5nURU5 UR	USS9$)zSee BzrDir.open_repository.r�)�RepositoryFormatMetaDirT�r�)rVr�r�r�r�)rr�r�ris    rr5�BzrDirMeta1.open_repository�s6��7�(�4�4�T�:���#�#�K�0��{�{�4��{�-�-rc��SSKJn URU5nURXURR
S9 UR
USS9$)zSee BzrDir.open_workingtree.r�r�)�basedirTr�)r�r�r�r�rarbr�)rr�r-r�ris     rr0�BzrDirMeta1.open_workingtree�sN��9�)�5�5�d�;���#�#��D�4G�4G�4L�4L�	$�	
��{�{�4��{�-�-rc�D�[R"URS5$)Nzcontrol.conf)r�TransportConfigrrs rr�BzrDirMeta1._get_config�s���%�%�d�n�n�n�E�Er)rT)NNNrr[)NNNF)NFFN)FT)"r r!r"r#r]rdrqrurrr�r�r�r�r�r�r�r�r�r�r�r@rDrGr�rUr�r�r3r5r0rr%�
__classcell__�r.s@rrara^s�����@��$
�
��	
��.G�:�SX�

�	,�/�@�&�5�O�$*�L2�0�
����@��� �
�2.�.�F�Frrac��\rSrSr%Sr\"5r\\\S'Sr	\
S5r\
S5rSSjr
\
S	5r\
S
5rSr\
S5rS
rSrSrSrg)�	BzrFormati�a&Base class for all formats of things living in metadirs.

This class manages the format string that is stored in the 'format'
or 'branch-format' file.

All classes for (branch-, repository-, workingtree-) formats that
live in meta directories and have their own 'format' file
(i.e. different from .bzr/branch-format) derive from this class,
as well as the relevant base class for their kind
(BranchFormat, WorkingTreeFormat, RepositoryFormat).

Each format is identified by a "format" or "branch-format" file with a
single line containing the base format name and then an optional list of
feature flags.

Feature flags are supported as of bzr 2.5. Setting feature flags on formats
will render them inaccessible to older versions of bzr.

:ivar features: Dictionary mapping feature names to their necessity
�_present_featuresc��0Ulgr��featuresrs rr�BzrFormat.__init__�s	����
rc��SU;a[S5eXR;a[U5eURRU5 g)zGRegister a feature as being present.

:param name: Name of the feature
� z'spaces are not allowed in feature namesN)r�r�r(�add�rMrPs  r�register_feature�BzrFormat.register_feature�sB���4�<��F�G�G��(�(�(�*�4�0�0����!�!�$�'rc�:�URRU5 g)zUnregister a feature.N)r�r�rs  r�unregister_feature�BzrFormat.unregister_feature�s��	���$�$�T�*rNc���URR5HPupEX@R;aMUS:Xa[SU5 M*US:Xa[	U5e[SU5 [	U5e g)Nsoptionalz$ignoring optional missing feature %ssrequiredz,treating unknown necessity as require for %s)r�rjr�rr)r�allow_unsupportedr-r�rP�	necessitys      rr��BzrFormat.check_support_status�sk�� $�}�}�2�2�4�O�D��-�-�-���K�'��=�t�D���k�)�$�T�*�*��E�t�L�$�T�*�*� 5rc�,�[UR5e)z;Return the ASCII format string that identifies this format.)r?r��rMs rr��BzrFormat.get_format_string�s��"�#�"7�"7�8�8rc	��UR5nURU5(d[SRX55eU[	U5SR5nU"5n[
U5H(upVURSS5upxXtRU'M* U$![an	[R"XS-XaS9U	eSn	A	ff=f)Nz#Invalid format header {!r} for {!r}r�r�r)ri�lineno�line�text)r�r�rhrir��
splitlines�	enumerate�splitr�r�ParseFormatErrorr�)
rMr�
format_string�linesrprrrrr�s
          r�from_string�BzrFormat.from_string�s����-�-�/�
����}�-�-� �5�<�<�T�G��
��S��'�)�*�5�5�7���e��%�e�,�L�F�
�'+�z�z�$��':�$��
%.�L�L��!�-��
���
��-�-���z������
�s�5B�
C�'C�Cc���UR5/nUR[URR	55Vs/sHnUSS-US-S-PM sn5 SRU5$s snf)z0Return the string representation of this format.r�r�rrhr)r�r��sortedr�rjr�)rr�items   rrW�BzrFormat.as_stringsy���'�'�)�*��
���#�4�=�=�#6�#6�#8�9�
�9�D��a��4��$�q�'�)�E�1�9�
�	
��x�x�����
s�A5c���USURS5S-nURU5nUR
U5$![a UnN1f=f![an[R
"XBS9UeSnAff=f)Nrhr�)ri�kind)�indexr�rir]r�UnknownFormatErrorr)�klass�registryrr�
first_linerMr�s       r�_find_format�BzrFormat._find_formats���	'�&�'G��)<�)<�U�)C�a�)G�H�J�	Q��,�,�z�*�C����}�-�-��
�	'�&�J�	'���	Q��+�+�:�I�q�P��	Q�s&�<�A�A�
A�
A2�A-�-A2c�"�UR5$)zvA simple byte string uniquely identifying this format for RPC calls.

Metadir branch formats use their format string.
)rWrs rr_�BzrFormat.network_name#s��
�~�~��rc�r�URURL=(a URUR:H$r)r.r��r�others  r�__eq__�BzrFormat.__eq__*s'���~�~����0�T�T�]�]�e�n�n�5T�Trc��UR5H&up#UcURU	MX0RU'M( g![a M8f=f)zVUpdate the feature flags in this format.

:param updated_flags: Updated feature flags
N)rjr�r])rrXrPrs    rrU�BzrFormat._update_feature_flags-sR��
 -�2�2�4�O�D�� ���
�
�d�+�'0�
�
�d�#� 5�� ����s�
<�
A
�	A
r��TN)r r!r"r#r]�setr��str�__annotations__rr_rrr�r�rrWr$r_r+rUr%r&rrr�r��s����*#&�%��s�3�x�'���	(��	(��+��+�
BF�
+��9��9�����$	��	.��	.� �U�0rr�c��\rSrSrSrSrSrSSjrSrSSjr	S	r
S
rSrSSjr
\S
5r\S5rSrg)rJi<ayControlDirFormat base class for .bzr/ directories.

Formats are placed in a dict by their format string for reference
during bzrdir opening. These should be subclasses of BzrDirFormat
for consistency.

Once a format is deprecated, just deprecate the initialize and open
methods on the format class. Do not deprecate the object, as the
object will be created every system load.
zbranch-lockc�$�UR5 [U[5(dURU5$SSKJn U"5nUR
U5 URU5$![Ra URU5s$f=f)z=Initialize a new bzrdir in the base directory of a Transport.r���RemoteBzrDirFormat)
�get_smart_mediumr��BzrDirMetaFormat1�_initialize_on_transport_vfsr0r6�_supply_sub_formats_tor�r�
NoSmartMedium)rrr6�
remote_formats    rr��$BzrDirFormat.initialize_on_transportMs���	D�
�&�&�(��d�$5�6�6��8�8��C�C�2�.�0�M��'�'�
�6� �8�8��C�C���#�#�	@��4�4�Y�?�?�	@�s�A'�'%B�BNc�`�U
(d[UR5 SSKJn U"5nUR5UlURU5 UR
UUUUUUUUU	S9	$Sn
Sn[X�U5nUSLnURU5nU(a�[R R#U5UR$lUR+UUUUS9nUR-X�5unnU(d-UR.(aSnUR$R15 UR35 OSnSnUUUU4$![Ra N�f=f![Ra U(deN�[Ra U(deUR5 GN&f=f![(a N�f=f)	a!Create this format on transport.

The directory to initialize will be created.

:param force_new_repo: Do not use a shared repository for the target,
                       even if one is available.
:param create_prefix: Create any missing directories leading up to
    to_transport.
:param use_existing_dir: Use an existing directory if one exists.
:param stacked_on: A url to stack any created branch on, None to follow
    any target stacking policy.
:param stack_on_pwd: If stack_on is relative, the location it is
    relative to.
:param repo_format_name: If non-None, a repository will be
    made-or-found. Should none be found, or if force_new_repo is True
    the repo_format_name is used to select the format of repository to
    create.
:param make_working_trees: Control the setting of make_working_trees
    for a new shared repository when one is made. None to use whatever
    default the format has.
:param shared_repo: Control whether made repositories are shared or
    not.
:param vfs_only: If True do not attempt to use a smart server
:return: repo, controldir, require_stacking, repository_policy. repo is
    None if none was created or found, bzrdir is always valid.
    require_stacking is the result of examining the stacked_on
    parameter and any stacking policy found for the target.
r�r5rCc�(�URS5 U$)NrR)r�r
s r�make_directory�?BzrDirFormat.initialize_on_transport_ex.<locals>.make_directory�s���O�O�C� ��rc�d�[U5 URURUR5$r)r
�_redirected_to�sourcer�)rr��redirection_notices   r�
redirected�;BzrDirFormat.initialize_on_transport_ex.<locals>.redirected�s&���#�$��+�+�A�H�H�a�h�h�?�?rNr�T)r7r0r6r_�
_network_namer:r`rr;rrzr�rjrEr�rV�network_format_registryrir<r;�AttributeErrorr�r��_require_stackingror�)rrrDrErFrGrHrIrJrK�vfs_onlyr6�remote_dir_formatr@rFrorurOrtr�s                    rr`�'BzrDirFormat.initialize_on_transport_exas���R�
��*�*�,�7�%7�$8�!�26�2C�2C�2E�!�/��+�+�,=�>�(�C�C��%5�"/�#1�)�!-�%5�'9� +�D�
�
�	�	@�	&�0��J�W�I�&�T�1��
�-�-�i�8���
��6�6�:�:�;K�L����0�!'� B� B����!1�	!C�!��(9�'K�'K�"�(�$�K��$�(9�(K�(K�#'� ����/�/�1��"�"�$��K� $���F�$4�6G�G�G��U�'�'�
��
��D�(�(�	�#��$��(�(�	&� ���#�#�%�	&��""�
��
�s;�D6�*E�.F �6E
�E
�F�.+F�F� 
F-�,F-c�X�[RUS[R5nURR	SUR
S9 [RS:XaC[U[R5(a$[ R#UR%S55 UR&nAUR)S5nSSUR+54/n[RXPR,UR.5nUR15 UR35 UHup�UR5X�US9 M UR75 UR9USS	9$![Ra&n[R"UR5UeSnAff=f!UR75 f=f)
zvInitialize a new bzrdir using VFS calls.

:param transport: The transport to create the .bzr directory in.
:return: A
rBr�r�N�win32)�READMEs�This is a Bazaar control directory.
Do not change any files in this directory.
See http://bazaar.canonical.com/ for more information about Bazaar.
rSTr�)ryrzr�r"r�r
rzr�r�AlreadyControlDirErrorrb�sys�platformr�rr��
win32utils�set_file_attr_hidden�_abspathrrkrWr{r|�create_lockr�rVrgr�)
rrr�r��	file_mode�bzrdir_transport�
utf8_filesrT�filename�contents
          rr9�)BzrDirFormat._initialize_on_transport_vfs�s���&�3�3��r�>�7�7�
��	G��#�#�)�)��"�+�+�	
*�
��<�<�7�"�z�)�U�=Q�=Q�'R�'R��+�+�I�,>�,>�v�,F�G� �+�+�	��$�?�?�6�2��
��d�n�n�.�/�
�
�'�4�4��2�2�D�4D�4D�
�
�	�!�!�#�� � �"�	#�%/�!�� �*�*�8�9�*�M�&0�
� � �"��y�y��4�y�0�0��7�(�(�	G��/�/�	���?�Q�F��	G��4
� � �"�s#�$E�F�F�.!F�F�F)c��U(dv[RRU5n[X0R5(d[SR
XU55eURU5 URU5$URU5$)zrReturn an instance of this format for the dir transport points at.

_found is a private parameter, do not use it.
z7{} was asked to open {}, but it seems to need format {})	r�ControlDirFormatr�r�r.rhrir:�_open)rrr��found_formats    rr��BzrDirFormat.open	s|��
�%�6�6�B�B�9�M�L��l�N�N�;�;�$�M�T�T������
�'�'��5��%�%�i�0�0��z�z�)�$�$rc�,�[UR5e)z�Template method helper for opening BzrDirectories.

This performs the actual open and any additional logic or parameter
passing.
)r?ra�rrs  rra�BzrDirFormat._opens��"�$�*�*�-�-rc�8�[UR5Ulg)�ZGive other_format the same values for sub formats as this has.

This method is expected to be used when parameterising a
RemoteBzrDirFormat instance with the parameters from a
BzrDirMetaFormat1 instance.

:param other_format: other_format is a format which should be
    compatible with whatever sub formats are supported by self.
:return: None.
N)�dictr�)r�other_formats  rr:�#BzrDirFormat._supply_sub_formats_to#s��!%�T�]�]� 3��rc��grr&res  r�supports_transport�BzrDirFormat.supports_transport0r rc�p�[RRUUUUS9 [RUUUUS9 g)N)rr-r�)rr`r�r�)rrr-r�s    rr��!BzrDirFormat.check_support_status4sJ��	�#�#�8�8��/�/��		9�	
�	�&�&��/�/��		'�	
rc�<�US:H=(d URS5$)a:True if filename is the name of a path which is reserved for bzrdir's.

:param filename: A filename within the root transport of this bzrdir.

This is true IF and ONLY IF the filename is part of the namespace
reserved for bzr control dirs. Currently this is the '.bzr' directory
in the root of the root_transport.
r�z.bzr/)r�)r!r\s  r�is_control_filename� BzrDirFormat.is_control_filenameDs�� �6�!�A�X�%8�%8��%A�Arc�J�[RRS5"5$)z"Return the current default format.�bzr)r�format_registryri)r!s rrK�BzrDirFormat.get_default_formatVs���)�)�-�-�e�4�6�6rr&)	FFFNNNNFFr[r/)r r!r"r#r]r{r�r`r9r�rar:rmr�r_rrrKr%r&rrrJrJ<s���	�$�O�
D�.���������wH�r-1�^%�$.�4��
BF�
� �B��B�"�7��7rrJc��^�\rSrSrSr\RrSrSr	Sr
SrSrSr
S	rSS
jrSSjr\S5rS
rSrSrSr\"\\5rU4SjrSrSrSr\"\\5rSrU=r$)r8i\z�Bzr meta control format 1.

This is the first format with split out working tree, branch and repository
disk storage.

It has:

- Format 3 working trees [optional]
- Format 5 branches [optional]
- Format 7 repositories [optional]
FTc�X�[RU5 SUlSUlSUlgr)rJrr:r/�_repository_formatrs rr�BzrDirMetaFormat1.__init__os(�����d�#�#'�� �"���"&��rc���URURLagURUR:wagURUR:wagURUR:w+$r�)r.r;r4r�r)s  rr+�BzrDirMetaFormat1.__eq__usV���?�?�$�.�.�0���"�"�d�&<�&<�<���#�#�t�'>�'>�>���>�>�T�]�]�2�2rc��X:X+$rr&r)s  r�__ne__�BzrDirMetaFormat1.__ne__~s��� � rc�j�URcSSKJn UR5UlUR$�Nr��rv)r/r�rv�get_default)r�branch_format_registrys  rr��#BzrDirMetaFormat1.get_branch_format�s.�����&�I�"8�"D�"D�"F�D���"�"�"rc��Xlgr)r/�rris  r�set_branch_format�#BzrDirMetaFormat1.set_branch_format�s��$�rc�^^^�SnSn/SQmUUU4SjnU(d�URR(d�U"5upxn	UcLU	(aDURR(a[R	5nO>[R5nO)URRnUR(dSnUb)X@l[[S5UR55 UR5R5(d~U"5upxn	UcU	(a
SSK
Jn
 U
"5nO#URnUR5(dSnUb5URU5 [[S5UR55 ggg)z�We have a request to stack, try to ensure the formats support it.

:param stack_on: If supplied, it is the URL to a branch that we want to
    stack on. Check to see if that format supports stacking before
    forcing an upgrade.
N�NFNc�\>�TS(aT$Tc	/SQTSS&T$[RTTS9nUR5nUSS/TSS&T$![Ra /SQTSS&Ts$[Ra /SQTSS&Ts$f=f![Ra /SQTSS&Ts$f=f)Nr�)NTTr�)NTFTF)r-r�rr4�	JailBreakr3)�
target_dirr�r�r�r�s  ���r�get_target_branch�=BzrDirMetaFormat1.require_stacking.<locals>.get_target_branch�s�����a�y��
���.��q�	��
�
�#�[�[��2E�)��
�
� *� 6� 6� 8�
�
'��e�4�F�1�I��M���(�(�
�/��q�	��
��#�#�
�.��q�	��
�
���(�(�
�/��q�	��
�
�s(�A
�B�
B�)B�B�B+�*B+zFSource repository format does not support stacking, using format:
  %sr�)�BzrBranchFormat7zBSource branch format does not support stacking, using format:
  %s)r;�supports_external_lookups�rich_root_data�
knitpack_repo�!RepositoryFormatKnitPack5RichRoot�RepositoryFormatKnitPack5rVr<r
r��get_format_descriptionr��supports_stackingr�r�r�)rr�r��
_skip_repo�new_repo_format�new_branch_formatr�r��_�
do_upgrader�r�s ``        @rro�"BzrDirMetaFormat1.require_stacking�sl����� ��%��	�:�$�"8�"8�"R�"R�+<�+>�(�M�j��$���-�-�<�<�)�K�K�M�(�+8�*Q�*Q�*S���
#0�":�":�"B�"B��&�@�@�'+�O��*�)8�&���/��$�:�:�<���%�%�'�9�9�;�;�,=�+>�(�M�j��$��8�(8�(:�%��$1�$9�$9�!�(�:�:�<�<�(,�%� �,��&�&�'8�9���/��&�<�<�>��-�<rc�x�Uc[R5n[U[5(a [U[5(a[U5$[U[5(a [U[5(a[U5$[XR5(d[UR5e[U5$)z!See BzrDirFormat.get_converter().)
rJrKr�r8�BzrDirMetaFormat1Colo�ConvertMetaToColor.r?�
get_converter�ConvertMetaToMetar�s  rr��BzrDirMetaFormat1.get_converter�s����>�!�4�4�6�F��d�-�.�.�:��)�4
�4
�%�V�,�,��d�1�2�2�z��%�8
�8
�%�V�,�,��$� 0� 0�1�1�%�d�&8�&8�9�9� ��(�(rc��g)�%See BzrDirFormat.get_format_string().s#Bazaar-NG meta directory, format 1
r&rs rr��#BzrDirMetaFormat1.get_format_strings��7rc��g)�*See BzrDirFormat.get_format_description().zMeta directory format 1r&rs rr��(BzrDirMetaFormat1.get_format_descriptions��(rc�N�[5nURU5 [X5$�zSee BzrDirFormat._open.)r8r:ra�rrris   rra�BzrDirMetaFormat1._opens%��
#�$���#�#�F�+��9�-�-rc�h�UR(aUR$SSKJn UR5$)zCircular import protection.r�r�)rzrVrvr�)rrvs  r�__return_repository_format�,BzrDirMetaFormat1.__return_repository_formats)���"�"��*�*�*�/��*�*�,�,rc��Xlg)z9Allow changing the repository format for metadir formats.N)rz)r�values  r�_set_repository_format�(BzrDirMetaFormat1._set_repository_format s��"'�rc��>�[TU]U5 [USS5bURUlURbURUlUR
bURUlgg)rhrzN)rxr:�getattrr;r/r:r4)rrjr.s  �rr:�(BzrDirMetaFormat1._supply_sub_formats_to&si���	��&�|�4��4�-�t�4�@�-1�-C�-C�L�*����*�*.�*=�*=�L�'��#�#�/�.2�.E�.E�L�+�0rc�j�URcSSKJn UR5UlUR$r�)r:r�rvr�)r�wt_format_registrys  r�__get_workingtree_format�*BzrDirMetaFormat1.__get_workingtree_format9s.���#�#�+�J�'9�'E�'E�'G�D�$��'�'�'rc��Xlgr)r:)r�	wt_formats  r�__set_workingtree_format�*BzrDirMetaFormat1.__set_workingtree_format@s��#,� rc�L�SRURR5$)Nz<{!r}>)rir.r rs rrP�BzrDirMetaFormat1.__repr__Cs�����t�~�~�6�6�7�7r)r/rzr:r;�NNFr) r r!r"r#r]r	�LockDirr|�fixed_components�colocated_branchesrr+rr�r�ror�r_r�r�ra�,_BzrDirMetaFormat1__return_repository_formatr�r^r;r:�*_BzrDirMetaFormat1__get_workingtree_format�*_BzrDirMetaFormat1__set_workingtree_formatrPr4r%r�r�s@rr8r8\s����
��/�/�K�����'�3�!�#�%�CH�h�T)�"�7��7�)�.�-�(�!�!;�=S�T��F�&(�-�8�"�":�<T�U�rr8c�8�\rSrSrSrSr\S5rSrSr	Sr
g)	r�iIz7BzrDirMeta1 format with support for colocated branches.Tc��g)r�s:Bazaar meta directory, format 1 (with colocated branches)
r&rs rr��'BzrDirMetaFormat1Colo.get_format_stringNs��Nrc��g)r�z;Meta directory format 1 with support for colocated branchesr&rs rr��,BzrDirMetaFormat1Colo.get_format_descriptionSs��Lrc�N�[5nURU5 [X5$r�)r�r:rar�s   rra�BzrDirMetaFormat1Colo._openWs%��
'�(���#�#�F�+��9�-�-rr&N)r r!r"r#r]r�r_r�r�rar%r&rrr�r�Is*��A����N��N�M�.rr�c�$�\rSrSrSrSrSrSrg)r�iaz$Converts the components of metadirs.c��Xlg)zhCreate a metadir to metadir converter.

:param target_format: The final metadir format that is desired.
N�r>�rr>s  rr�ConvertMetaToMeta.__init__d�
��
+�rc�
�Xl[RR5UlSUlSUlURS5 URR5nURRn[URUR5(dwSSKJn [RR![#S55 UR$(d['S5eU"URR5nUR)X25 URR/5GH�nURRnURR15Rn	X�:wdMEU[2R4:XaHU	[6R8[6R:[6R<4;a[6R?5n
O�U[6R8:Xa9U	[6R:[6R<4;a[6RA5n
O]U[6R::Xa(U	[6R<La[6RC5n
O![*RD"SX�R5eU
R)U5 URRG5nURRnX�:waGMOGM� URRIS	S
9n[U[JRL5(au[U[NRP5(dV[URRR[NRT5(a#[NRW5R)U5 [U[NRP5(au[U[NRX5(dV[URRR[NRZ5(a#[NR]5R)U5 [U[NRP5(au[U[NR^5(dV[URRR[NR`5(a#[NRc5R)U5 SSS5 U$![*R,a GN�f=f![*Rd[*Rf4a NKf=f!,(df   U$=f)�See Converter.convert().rr�zchecking repository formatr)�
CopyConverterzstarting repository conversionz;Repository in metadir does not support overriding transportzNo converterFr,N)4rr�r�r��pb�count�total�stepr5r>r;r�r<r.rVr�r
r��supports_overriding_transportrh�convertrr6r�r��fullhistorybranch�BzrBranchFormat5r��BzrBranchFormat6r��BzrBranchFormat8�
Converter5to6�
Converter6to7�
Converter7to8�BadConversionTargetr3r0�
workingtree_3�WorkingTree3�
workingtree_4�DirStateWorkingTreer4�DirStateWorkingTreeFormat�
Converter3to4�WorkingTree5�WorkingTreeFormat5�
Converter4to5�WorkingTree6�WorkingTreeFormat6�Converter4or5to6r2r1)r�
to_convertr��repo�repo_fmtr��	converterr��old�new�branch_converterr�s            rr��ConvertMetaToMeta.convertks���$��
�]�]�
.�
.�
0�D�G��D�J��D�J��I�I�2�3�
0����6�6�8�� �-�-�?�?��!�$�,�,��0B�0B�C�C�:��M�M�&�&�w�/O�'P�Q�#�A�A�,�3���!.�d�.@�.@�.R�.R� S�I��%�%�d�/��/�/�7�7�9���n�n�.�.���(�(�:�:�<�F�F���j��/�@�@�@�S�&�7�7�&�7�7�&�7�7�M�F�
,:�+G�+G�+I�(��� ?� ?�?�C�&�7�7�&�7�7�L�E�,:�+G�+G�+I�(��~�>�>�>��>�#B�#B�B�+9�+G�+G�+I�(�$�8�8�*�C�����%�,�,�V�4�!�_�_�8�8�:�F� �.�.�2�2�C�/�j�j�
:�<!
C����7�7�%�7�P���t�]�%?�%?�@�@�&�t�]�-N�-N�O�O�"��*�*�=�=�%�?�?���
"�/�/�1�9�9�$�?��t�]�%F�%F�G�G�&�t�]�-G�-G�H�H�"��*�*�=�=�%�8�8���
"�/�/�1�9�9�$�?��t�]�%F�%F�G�G�&�t�]�-G�-G�H�H�"��*�*�=�=�%�8�8���
"�2�2�4�<�<�T�B�i1�j���_�-�-�
��
��^�(�(�&�*<�*<�=�
��
��k1�
0�j��sb�%S/�R*�%D
S/�6ES/�S/�S�$F<S/�*S�>S/�S�S/�$S,�)S/�+S,�,S/�/
S>)rr�r�r>r�N�r r!r"r#r]rr�r%r&rrr�r�as��.�+�Xrr�c�$�\rSrSrSrSrSrSrg)r�i�zAdd colocated branch support.c��Xlg)z�Create a converter.that upgrades a metadir to the colo format.

:param target_format: The final metadir format that is desired.
Nr�r�s  rr�ConvertMetaToColo.__init__�r�rc��URRSURR55 [RUR5$)r�rS)rrVr>rWr-r�ra)rr�r�s   rr��ConvertMetaToColo.convert�s>�����&�&���8J�8J�8T�8T�8V�W��)�)�*�*C�*C�D�Drr�Nr�r&rrr�r��s��'�+�Err�c�>^�\rSrSrSrSU4SjjrSSjrSrU=r$)r�i�z&A policy of creating a new repository.c�2>�[TU]X#U5 Xlg)z�Constructor.

:param controldir: The controldir to create the repository on.
:param stack_on: A location to stack on
:param stack_on_pwd: If stack_on is relative, the location it is
    relative to.
N)rxr�_controldir)rrr�rHror.s     �rr�CreateRepository.__init__�����	����1A�B�%�rc���Uc/nO[U5nURURR5 UR	5nU(a`URR
nUR
XCS9 UR(d*[[S5URUR5 URRUS9nURXcS9 UbURU5 US4$)z�Implementation of RepositoryAcquisitionPolicy.acquire_repository.

Creates the desired repository in the controldir we already have.
)r�r�z&Using default stacking branch %s at %s)r�r�T)r�rkrra�_get_full_stack_onr<rorKr
r��	_stack_on�
_stack_on_pwdr��
_add_fallback�set_make_working_trees)rrJr�r�r�rirVs       rr��#CreateRepository.acquire_repository�s����&�"$��"&�':�";���"�"�4�#3�#3�#B�#B�C��*�*�,����%�%�-�-�F��#�#�!�
$�
��)�)���D�E��N�N��&�&��
�%�%�7�7�v�7�F�
����:��O��)��-�-�.@�A��4��r)rr�r��	r r!r"r#r]rr�r%r�r�s@rr�r��s#���0�NS�&�JN� � rr�c�>^�\rSrSrSrSU4SjjrSSjrSrU=r$)r�iz+A policy of reusing an existing repository.c�2>�[TU]X#U5 Xlg)z�Constructor.

:param repository: The repository to use.
:param stack_on: A location to stack on
:param stack_on_pwd: If stack_on is relative, the location it is
    relative to.
N)rxr�_repository)rrVr�rHror.s     �rr�UseExistingRepository.__init__	rrc���Uc/nO[U5nURURRR5 URURUS9 URS4$)zjImplementation of RepositoryAcquisitionPolicy.acquire_repository.

Returns an existing repository to use.
r�F)r�rkrrrr)rrJr�r�s    rr��(UseExistingRepository.acquire_repositorysg���&�"$��"&�':�";���"�"�4�#3�#3�#>�#>�#H�#H�I����4�+�+�AT��U�����&�&r)rr�r�rr�s@rr�r�s#���5�NS�&�JN�
'�
'rr�)&r]r�rS�typingrr�globalsrBrrrr	rrz�tracerr
rrr�BzrErrorrr(r�r-rar�r`rJr8r��	Converterr�r��RepositoryAcquisitionPolicyr�r��_default_formatr&rr�<module>rs)��"	��
��%���I���63�2�*�)�)�7��V�_�_���v����G(�Z�
"�
"�G(�TXF�&�XF�v
@0�@0�F]7�9�j�9�9�]7�@	jV��jV�Z.�-�.�0b�
�,�,�b�J
E�
�,�,�
E� - �z�=�=�- �`'�J�B�B�'�@/@�.A�
���+r

Youez - 2016 - github.com/yon3zu
LinuXploit