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__/branch.cpython-313.pyc
�

p��g~��� �SrSSKJrJrJrJrJr SSKJr \"\"5S5 SSK	r	SSK
r
SSKJr
 SSKJrJrJrJrJr SS	KJr SS
KJrJrJrJr SSKJr SSKJr SS
KJr SSKJ r  SSK!J"r"J#r#J$r$J%r%J&r& SSK'J(r(J)r) \(aSSK*J+r+J,r, "SS\RZ5r."SS\R^5r0"SS\5r1"SS\5r2"SS\5r3\3"5\1l"SS5r4"SS5r5"S S!5r6"S"S#\5r7\Rp\2"5r9\7"\95r:"S$S%\5r;"S&S'5r<"S(S)\<5r="S*S+\<5r>"S,S-5r?"S.S/\\15r@S0rA"S1S2\@5rB\@R�\B5 g)3�google�)�
TYPE_CHECKING�Optional�TextIO�Union�cast�)�lazy_importzi
from breezy import (
    ui,
    )
from breezy.bzr import (
    fetch,
    remote,
    vf_search,
    )
N��config)�debug�errors�registry�
repository�urlutils)�revision)�ControlComponent�ControlComponentFormat�ControlComponentFormatRegistry�
ControlDir)�Hooks)�InterObject)�LogicalLockResult)�
RevisionID)�is_quiet�mutter�mutter_callsite�note�warning)�	Transport�
get_transport)�TagConflict�
TagUpdatesc��\rSrSrSrSrSrg)�UnstackableBranchFormat�<zzThe branch '%(url)s'(%(format)s) is not a stackable format. You will need to upgrade the branch to permit branch stacking.c�Z�[RRU5 XlX lg�N)r�BzrError�__init__�format�url)�selfr+r,s   �//usr/lib/python3/dist-packages/breezy/branch.pyr*� UnstackableBranchFormat.__init__Bs����� � ��&�����)r+r,N��__name__�
__module__�__qualname__�__firstlineno__�_fmtr*�__static_attributes__�r0r.r%r%<s��	I�	�
r0r%c��\rSrSrSrSrSrg)�BindingUnsupported�Hz+Branch at %(url)s does not support binding.c�p�[RRU5 XlURUlgr()rr)r*�branch�user_urlr,�r-r=s  r.r*�BindingUnsupported.__init__Ks$����� � ��&����?�?��r0)r=r,Nr1r8r0r.r:r:Hs��8�D�#r0r:c�f�\rSrSr%Sr\\S'\\\S'\\S'S\S'\\	\
\4\S'\R\S	'S
\S'\S\4S
j5rS�S\\\SS4SjjrSrSrS�SjrS�S\\
S\\SS4SjjrSr\S�Sj5r\S�S\S\\S\4Sjj5r\S�Sj5rSrSrS\R@4S jr!S�S!jr"S"r#S#r$S�S$jr%S%r&\"\%\&5r'S&r(S�S'jr)S�S(jr*S)r+S*r,S+r-S,r.S�S-jr/S.r0S/r1S0r2S1r3S2r4S�S3jr5S4r6S5r7S6r8S7r9S8r:S9r;S:\SS4S;jr<S�S<jr=S\\4S=jr>S>r?S�S?jr@S�S\\\S\S4S@jjrAS\4SAjrBSB\\
SC\SS4SDjrCS�SC\SE\\SF\SSS4SGjjrDSH\\SS4SIjrESH\\SS4SJjrFSH\SS4SKjrGSLrHSMrIS�SNjrJSOrKS\\4SPjrLSQrMSRrNS\4SSjrOS\	\
\44STjrPSUrQSSV.SWjrRSC\S\
4SXjrSS�SB\
SY\\\S\4SZjjrTSSSS[.S\SS]\S\\S\\\SS^4
S_jjrUSSSS`.SaSS]\S\\Sb\4ScjjrVSdrWS\\4SejrXSfrYSSSg.ShjrZSSi.S\S\\4Sjjjr[S\\4Skjr\S\\4Sljr]Sm\SS4Snjr^S\\4Sojr_Sm\SS4Spjr`S\\4SqjraSm\SS4SrjrbSsrcStrdS�SujreSB\
SS4SvjrfSB\
SS4SwjrgSSSSSx.Sy\SC\\S\\SS4SzjjrhSSSSSSS{.S|jriS}rjSSS~.SjrkS�rlS�rmS�S�jrnSSSSSSS�.S�jroSSSSS�S�.S�jrpS�S�jrqS�rrS�rsS�rtS�ruS�rvS�rwS�rxg)��Branch�Qz�Branch holding a history of revisions.

Attributes:
  hooks: An instance of BranchHooks.
  _master_branch_cache: cached result of get_master_branch, see
    _clear_cached_state.
�
controldir�name�base�BranchFormat�_format�_last_revision_info_cacher�BranchHooks�hooks�returnc�.�URR$r()rD�user_transport�r-s r.rN�Branch.user_transporths�����-�-�-r0N�possible_transportsc��URRU5UlSUlSUl0Ul/UlSUlSUlSUl	URU5 [RSnUHnU"U5 M
 g)N�open)
rH�	make_tags�tags�_revision_history_cache�_revision_id_to_revno_cache�#_partial_revision_id_to_revno_cache�_partial_revision_history_cacherI�_master_branch_cache�_merge_sorted_revisions_cache�
_open_hookrBrK)r-rQrK�hooks    r.r*�Branch.__init__ls|���L�L�*�*�4�0��	�'+��$�+/��(�JL��0�AC��,�)-��&�$(��!�-1��*����+�,����V�$���D���J�r0c��g)z<Called by init to allow simpler extension of the base class.Nr8�r-rQs  r.r\�Branch._open_hookzs�r0c�T�URRH!nURU:XdM[SX5  g UR	X5nURUR5(a![R"URU5eURRU5 g)zAActivate the branch/repository from url as a fallback repository.z)duplicate activation of fallback %r on %rN)	r�_fallback_repositoriesr>r�_get_fallback_repository�has_same_locationr�UnstackableLocationError�add_fallback_repository)r-r,rQ�existing_fallback_repo�repos     r.�_activate_fallback_location�"Branch._activate_fallback_location}s���&*�o�o�&L�&L�"�%�.�.�#�5��B�C�N��
'M��,�,�S�F���!�!�$�/�/�2�2��1�1�$�-�-��E�E����/�/��5r0c�,�[UR5e)z�Break a lock if one is present from another instance.

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

This will probe the repository for its lock as well.
)�NotImplementedError�
break_lockrOs r.rn�Branch.break_lock����"�$�/�/�2�2r0�
stop_index�
stop_revisionc�0�[UR5S:XaUR5/Ul[R"URURUUS9 URS[
R:XaURR5 gg)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.
r)rqrr���N)�lenrY�
last_revisionr�_iter_for_revno�
_mod_revision�
NULL_REVISION�pop)r-rqrrs   r.�_extend_partial_history�Branch._extend_partial_history�s���$�t�3�3�4��9�48�4F�4F�4H�3I�D�0��"�"��O�O��0�0�!�'�		
��/�/��3�}�7R�7R�R��0�0�4�4�6�Sr0c�2�UR5nSU4SU4/$)z:Get the references needed for check().

See breezy.check.
zrevision-existence�lefthand-distance)rv)r-�revids  r.�_get_check_refs�Branch._get_check_refs�s(��
�"�"�$��%�u�-�0C�U�/K�L�Lr0Fc�J�[R"XUS9nURXS9$)z{Open the branch rooted at base.

For instance, if the branch is at URL/.bzr/branch,
Branch.open(URL) -> a Branch instance.
)rQ�_unsupported)�unsupportedrQ)rrS�open_branch)rFr�rQ�controls    r.rS�Branch.open�s4���/�/���
���"�"�$�#�
�	
r0�	transportr�c�N�[R"X5nURXUS9$)z$Open the branch rooted at transport.)rEr�rQ)r�open_from_transportr�)r�rEr�rQr�s     r.r��Branch.open_from_transport�s2���0�0��I���"�"��EX�#�
�	
r0c�V�[R"X5up#URUS9nXC4$)a�Open an existing branch which contains url.

This probes for a branch at url, and searches upwards from there.

Basically we keep looking up until we find the control directory or
run into the root.  If there isn't one, raises NotBranchError.
If there is one and it is either an unrecognised format or an
unsupported format, UnknownFormatError or UnsupportedFormatError are
raised.  If there is one, it is returned, along with the unused portion
of url.
�rQ)r�open_containingr�)r,rQr��relpathr=s     r.r��Branch.open_containing�s4��&�5�5�c�O����$�$�9L�$�M��� � r0c�d�UR5=(a URR5$)z�Should _basic_push merge this branch's tags into the target?

The default implementation returns False if this branch has no tags,
and True the rest of the time.  Subclasses may override this.
)�
supports_tagsrU�get_tag_dictrOs r.�_push_should_merge_tags�Branch._push_should_merge_tags�s%���!�!�#�@��	�	�(>�(>�(@�@r0c�.�[R"U5$)z�Get a breezy.config.BranchConfig for this Branch.

This can then be used to get and set configuration options for the
branch.

Returns: A breezy.config.BranchConfig.
)�_mod_config�BranchConfigrOs r.�
get_config�Branch.get_config�s���'�'��-�-r0c�.�[R"U5$)z�Get a breezy.config.BranchStack for this Branch.

This can then be used to get and set configuration options for the
branch.

Returns: A breezy.config.BranchStack.
)r��BranchStackrOs r.�get_config_stack�Branch.get_config_stack�s���&�&�t�,�,r0c�,�[UR5e)z�Store uncommitted changes from a ShelfCreator.

Args:
  creator: The ShelfCreator containing uncommitted changes, or
    None to delete any stored changes.
:raises: ChangesAlreadyStored if the branch already has changes.
)rm�store_uncommitted)r-�creators  r.r��Branch.store_uncommitteds��"�$�"8�"8�9�9r0c�,�[UR5e)z�Return a shelf.Unshelver for this branch and tree.

Args:
  tree: The tree to use to construct the Unshelver.
Returns: an Unshelver or None if no changes are stored.
)rm�
get_unshelver)r-�trees  r.r��Branch.get_unshelvers��"�$�"4�"4�5�5r0c��[R"URU5n[R	XS9nUR
$)z)Get the repository we fallback to at url.r�)r�joinrFrBrSr)r-r,rQ�a_branchs    r.rd�Branch._get_fallback_repositorys2���m�m�D�I�I�s�+���;�;�s�;�L���"�"�"r0c� �UR5nU(d�UR5(dsURU5nU(a:URUR:Xa [R
"UR5eUbUR$UR5$UR5$![R
anUeSnAf[Ra0n[S[U5-5 SnAUR5$SnAff=f)Nz@Could not connect to bound branch, falling back to local nick.
 )r��has_explicit_nickname�get_master_branchr>r�
RecursiveBind�nickr)r�str�get_nickname)r-�localrQr�master�es      r.�	_get_nick�Branch._get_nicks������"���V�9�9�;�;�
��/�/�0C�D���d�m�m�v���>� �.�.�t�}�}�=�=��%�!�;�;�&�&��"�"�$�$�v�"�"�$�$���'�'�
�����?�?�
��5�7:�1�v�>����"�"�$�$��
�s$�A B0�0D
�C�D
�D�D
c�B�UR5RSUSS9 g)N�nicknameT)�warn_masked)r��set_user_option)r-r�s  r.�	_set_nick�Branch._set_nick1s������)�)�*�d��)�Mr0c�,�[UR5er()rm�	is_lockedrOs r.r��Branch.is_locked6s��!�$�.�.�1�1r0c�:�S[R;a[SS5 URR	5nUb,URX!5(d[R"X5eURU/5nX;a[R"X5eUn/n[RnXe;a[[XV5S:�aJU"U5 URU5 XVSnURU/5nXe;a[XV5S:�aMJUR5 U$)N�evil�z&_lefthand_history scales with history.r)r
�debug_flagsrr�	get_graph�is_ancestorr�DivergedBranches�get_parent_map�NoSuchRevisionrx�check_not_reserved_idru�append�reverse)	r-�revision_id�last_rev�other_branch�graph�parents_map�current_rev_id�new_historyr�s	         r.�_lefthand_history�Branch._lefthand_history9s���U�&�&�&��A�G�H����)�)�+�����$�$�X�;�;��-�-�d�A�A��*�*�K�=�9���)��'�'��:�:�$���� -� C� C���+��K�4O�0P�ST�0T�!�.�1����~�.�(�8��;�N��.�.��/?�@�K�	�+��K�4O�0P�ST�0T�
	�����r0c�,�[UR5e)z�Lock the branch for write operations.

  token: A token to permit reacquiring a previously held and
    preserved lock.
Returns: A BranchWriteLockResult.
)rm�
lock_write)r-�tokens  r.r��Branch.lock_writeRs��"�$�/�/�2�2r0c�,�[UR5e)zPLock the branch for read operations.

Returns: A breezy.lock.LogicalLockResult.
)rm�	lock_readrOs r.r��Branch.lock_read[���
"�$�.�.�1�1r0c�,�[UR5er()rm�unlockrOs r.r��
Branch.unlockbs��!�$�+�+�.�.r0c�,�[UR5e)z2Return lock mode for the Branch: 'r', 'w' or None.)rm�peek_lock_moderOs r.r��Branch.peek_lock_modees��!�$�"5�"5�6�6r0c�,�[UR5er()rm�get_physical_lock_statusrOs r.r��Branch.get_physical_lock_statusi���!�$�"?�"?�@�@r0c��UR5 URU5nU(aXRU'UsSSS5 $!,(df   g=f)a�Return the revision_id for a dotted revno.

Args:
  revno: a tuple like (1,) or (1,1,2)
  _cache_reverse: a private parameter enabling storage
   of the reverse mapping in a top level cache. (This should
   only be done in selective circumstances as we want to
   avoid having the mapping cached multiple times.)
Returns: the revision_id
:raises errors.NoSuchRevision: if the revno doesn't exist
N)r��_do_dotted_revno_to_revision_idrX)r-�revno�_cache_reverse�rev_ids    r.�dotted_revno_to_revision_id�"Branch.dotted_revno_to_revision_idls>���^�^�
��9�9�%�@�F��CH�8�8��@��	�
�
�s�(A�
Ac���[U5S:XaURUS5$UR
5nUR5VVs/sHupEX:XdMUPM nnn[U5S:XaUS$SR[[U55n[R"X5e![Ra*n[R"USUR
5UeSnAff=fs snnf)z�Worker function for dotted_revno_to_revision_id.

Subclasses should override this if they wish to
provide a more efficient implementation.
r	rN�.)ru�
get_rev_idr�RevisionNotPresent�GhostRevisionsHaveNoRevnor��get_revision_id_to_revno_map�itemsr��mapr�r�)r-r��exc�revision_id_to_revnor��
this_revno�revision_ids�	revno_strs        r.r��&Branch._do_dotted_revno_to_revision_id~s����u�:��?�
����u�Q�x�0�0�
 $�@�@�B��,@�+E�+E�+G�
�+G�'���"�
�+G�	�
�
�|���!���?�"�����S�%��1�I��'�'��8�8���,�,�
��6�6��!�H�c�o�o�����
��

s#�B)�C*�C*�)C'�=%C"�"C'c�z�UR5 URU5sSSS5 $!,(df   g=f)zXGiven a revision id, return its dotted revno.

Returns: a tuple like (1,) or (400,1,3).
N)r��_do_revision_id_to_dotted_revno)r-r�s  r.�revision_id_to_dotted_revno�"Branch.revision_id_to_dotted_revno�s(��
�^�^�
��7�7��D��
�
�s�,�
:c��URRU5nUbU$UR(a4URRU5nUc[R"X5eURU5nU4$![RaDnUR
5RU5nUc[R"X5UeSnAU$SnAff=f)z)Worker function for revision_id_to_revno.N)rX�getrWrr�r�r�)r-r��resultr�r�s     r.r��&Branch._do_revision_id_to_dotted_revno�s����9�9�=�=�k�J�����M��+�+��5�5�9�9�+�F�F��~��+�+�D�>�>�	H��-�-�k�:�E��8�O���$�$�	H��6�6�8�<�<�[�I�F��~��+�+�D�>�C�G���
��	H�s�'A;�;C�9C�Cc��S[R;a[SS5 UR5 URb
URnO!UR5nUR
U5 UsSSS5 $!,(df   g=f)z�Return the revision_id => dotted revno map.

This will be regenerated on demand, but will be cached.

Returns: A dictionary mapping revision_id => dotted revno.
    This dictionary should not be modified by the caller.
r��z2get_revision_id_to_revno_map scales with ancestry.N)r
r�rr�rW�_gen_revno_map�_cache_revision_id_to_revno)r-�mappings  r.r��#Branch.get_revision_id_to_revno_map�sk���U�&�&�&��A�S�T�
�^�^�
��/�/�;��:�:���-�-�/���0�0��9�
��
�
�s�=A8�8
Bc
�h�UR5VVVVs0sHupp4X_M
 nnnnnU$s snnnnf)a&Create a new mapping from revision ids to dotted revnos.

Dotted revnos are generated based on the current tip in the revision
history.
This is the worker function for get_revision_id_to_revno_map, which
just caches the return value.

Returns: A dictionary mapping revision_id => dotted revno.
)�iter_merge_sorted_revisions)r-r��depthr��end_of_merger�s      r.r�Branch._gen_revno_map�sA��7;�6V�6V�6X� 
�6X�2��u�
�M�6X�	� 
�$�#��	 
s�,
c���UR5 URcBUR5nURR	U/5nURU5UlUR
URUUU5nURU5nUS:XaUsSSS5 $US:Xa[[U55sSSS5 $[SRU55e!,(df   g=f)a�Walk the revisions for a branch in merge sorted order.

Merge sorted order is the output from a merge-aware,
topological sort, i.e. all parents come before their
children going forward; the opposite for reverse.

Args:
  start_revision_id: the revision_id to begin walking from.
    If None, the branch tip is used.
  stop_revision_id: the revision_id to terminate the walk
    after. If None, the rest of history is included.
  stop_rule: if stop_revision_id is not None, the precise rule
    to use for termination:

    * 'exclude' - leave the stop revision out of the result (default)
    * 'include' - the stop revision is the last item in the result
    * 'with-merges' - include the stop revision and all of its
      merged revisions in the result
    * 'with-merges-without-common-ancestry' - filter out revisions
      that are in both ancestries
  direction: either 'reverse' or 'forward':

    * reverse means return the start_revision_id first, i.e.
      start at the most recent revision and go backwards in history
    * forward returns tuples in the opposite order to reverse.
      Note in particular that forward does *not* do any intelligent
      ordering w.r.t. depth as some clients of this API may like.
      (If required, that ought to be done at higher layers.)

Returns: an iterator over (revision_id, depth, revno, end_of_merge)
    tuples where:

    * revision_id: the unique id of the revision
    * depth: How many levels of merging deep this node has been
      found.
    * revno_sequence: This field provides a sequence of
      revision numbers for all revisions. The format is:
      (REVNO, BRANCHNUM, BRANCHREVNO). BRANCHNUM is the number of the
      branch that the revno is on. From left to right the REVNO numbers
      are the sequence numbers within that branch of the revision.
    * end_of_merge: When True the next node (earlier in history) is
      part of a different merge.
Nr��forwardzinvalid direction {!r})r�r[rvr�get_known_graph_ancestry�
merge_sort�_filter_merge_sorted_revisions�_filter_start_non_ancestors�reversed�list�
ValueErrorr+)r-�start_revision_id�stop_revision_id�	stop_rule�	directionrv�known_graph�filtereds        r.r�"Branch.iter_merge_sorted_revisions�s���d�^�^�
��1�1�9� $� 2� 2� 4�
�"�o�o�F�F�
��W��5@�5K�5K�!�6��2��:�:��2�2�!� ��	�H��7�7��A�H��I�%��)�
�*�I�%���X��/�-�
�0!�!9�!@�!@��!K�L�L�1�
�s�BC�!C�C�
C,c#�V# �[U5nUb=UH7nURnXr:waM[R"[U/5U5n O Uc;UH4nURnXvRUR
UR4v� M6 gUS:XaBUH;nURnXs:Xa gXvRUR
UR4v� M= gUS:XaBUH;nURnXvRUR
UR4v� Xs:XdM; g gUS:XanURR5nURX#/5n	UH;nURnXy;aMXvRUR
UR4v� M= gUS:Xa�URRU5n
U
R(aU
RSnO[RnSn/n
UH�nURnX{:Xa gU(aX};dM$XvRUR
UR4v� U(dXs:XdMWURRU5nUR(dM�SnU
RUR5 M� g[S	R!U55e7f)
z4Iterate over an inclusive range of sorted revisions.N�exclude�includez#with-merges-without-common-ancestryzwith-mergesrFTzinvalid stop_rule {!r})�iter�key�	itertools�chain�merge_depthr�r
rr��find_unique_ancestors�get_revision�
parent_idsrxry�extendrr+)r-�merge_sorted_revisionsrrr�rev_iter�noder�r��	ancestors�stop_rev�left_parent�reached_stop_revision_id�revision_id_whitelist�revs               r.r�%Branch._filter_merge_sorted_revisions&se����.�/���(� �������.��
 )���t�T�F�|�X�F�H��!��#� �������/�/����T�=N�=N�O�O�!��)�
#� �������-���/�/����T�=N�=N�O�O�	!�
�)�
#� �������/�/����T�=N�=N�O�O��-��	!�
�?�
?��O�O�-�-�/�E��3�3�!�#5��I�!�������*���/�/����T�=N�=N�O�O�	!�
�-�
'����3�3�4D�E�H��"�"�&�1�1�!�4��+�9�9��(-�$�$&�!� �������(��/�6�3R�!�#3�#3�T�Z�Z��AR�AR�S�S�/�6�3M�"�o�o�:�:�6�B���>�>�>�7;�4�1�8�8����H�!��5�<�<�Y�G�H�H�s�DJ)�C1J)�/J)�?*J)�-<J)c#�# �[U5nUup4pVUv� U(d
UShv�N Sn[5nURR	U/5n	U	RU/5n
U
(aUR
U
5 OgUHsup4pVU(d`X8;aYURR	U/5n	U	RU/5n
URU5 UR
U
5 US:XaSnOMmX4XV4v� Mu g![a gf=fN�7f)NFrT)�next�
StopIteration�setrr�r�update�remove)r-r,�firstr�r&r�r
�clean�	whitelist�pmap�parentss           r.r�"Branch._filter_start_non_ancestorsms���	���N�E�6;�2��e���� ������E�	����-�-�v�h�7���(�(�6�2�&������W�%�
�8@�4�F����&��?�?�9�9�6�(�C�D�"�h�h�v�r�2�G��$�$�V�,��$�$�W�-�"�a�'�!%������<�<�9A��-�	��	��
 �s2�D	�C7�D	�D�CD	�7
D�D	�D�D	c�8�URR5 g)z�Tell this branch object 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)�
control_files�leave_in_placerOs r.�leave_lock_in_place�Branch.leave_lock_in_place�s��	
���)�)�+r0c�8�URR5 g)z�Tell this branch object 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)rB�dont_leave_in_placerOs r.�dont_leave_lock_in_place�Branch.dont_leave_lock_in_place�s��	
���.�.�0r0c��[U5e)zNBind the local branch the other branch.

Args:
  other: The branch to bind to
)r:�r-�others  r.�bind�Branch.bind�s��!��&�&r0c��URR5(dgUR5RS5$)z?Whether it is only possible to append revisions to the history.F�append_revisions_only)rH�"supports_set_append_revisions_onlyr�rrOs r.�get_append_revisions_only� Branch.get_append_revisions_only�s3���|�|�>�>�@�@���$�$�&�*�*�+B�C�Cr0�enabledc���URR5(d [R"UR5eUR5R
SU5 g)NrP)rHrQr�UpgradeRequiredr>r�r8)r-rTs  r.�set_append_revisions_only� Branch.set_append_revisions_only�sD���|�|�>�>�@�@��(�(����7�7�����#�#�$;�W�Er0c��UR5 [RX5RX#US9sSSS5 $!,(df   g=f)aCopy revisions from from_branch into this branch.

Args:
  from_branch: Where to copy from.
  stop_revision: What revision to stop at (None for at the end
                      of the branch.
  limit: Optional rough limit of revisions to fetch
Returns: None
)�limit�lossyN)r��InterBranchr�fetch)r-�from_branchrrrZr[s     r.r]�Branch.fetch�s;���_�_�
��?�?�;�5�;�;��%�<���
�
�s	�#>�
Ac��g)zzReturn the URL of the branch we are bound to.

Older format branches cannot bind, please be sure to use a metadir
branch.
Nr8rOs r.�get_bound_location�Branch.get_bound_location�s��r0c�B�[R"UR5e)z4Return the URL of the branch we used to be bound to.�rrVr>rOs r.�get_old_bound_location�Branch.get_old_bound_location�����$�$�T�]�]�3�3r0c	�n�UcUR5nURRUUUUUUUUU5	$)a�Obtain a CommitBuilder for this branch.

Args:
  parents: Revision ids of the parents of the new revision.
  config: Optional configuration 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�r�get_commit_builder)	r-r?�config_stack�	timestamp�timezone�	committer�revpropsr�r[s	         r.ri�Branch.get_commit_builder�sJ��0���0�0�2�L����1�1����������

�
	
r0c��g)zFReturn the branch we are bound to.

Returns: Either a Branch, or None
Nr8r`s  r.r��Branch.get_master_branch���r0c�,�[UR5e)z�Get the URL this branch is stacked against.

Raises:
  NotStacked: If the branch is not stacked.
  UnstackableBranchFormat: If the branch does not support
    stacking.
)rm�get_stacked_on_urlrOs r.rt�Branch.get_stacked_on_url���"�$�"9�"9�:�:r0r�r�c�,�[UR5e)aNSet the last revision of this branch.

The caller is responsible for checking that the revno is correct
for this revision id.

It may be possible to set the branch last revision to an id not
present in the repository.  However, branches can also be
configured to check constraints on history, in which case this may not
be permitted.
)rm�set_last_revision_info)r-r�r�s   r.rx�Branch.set_last_revision_infos��"�$�"=�"=�>�>r0r�r�c�|�UR5 URR5nUR5upVXe4[R
S4/nUb,UR
X!5(d[R"X5eURX5nURX�5 SSS5 g!,(df   g=f)z%See Branch.generate_revision_history.rN)r�rr��last_revision_inforxryr�rr��find_distance_to_nullrx)	r-r�r�r�r��
last_revno�
last_revid�known_revision_idsr�s	         r.�generate_revision_history� Branch.generate_revision_history%s����_�_�
��O�O�-�-�/�E�'+�'>�'>�'@�$�Z��(��,�,�a�0�"���#��(�(��?�?� �1�1�$�E�E��/�/��P�E��'�'��;��
�
�s�BB-�-
B;r,c�,�[UR5er()rm�_set_parent_location�r-r,s  r.r��Branch._set_parent_location:���!�$�";�";�<�<r0c�d�UbH[U[5(aURS5 [R"URU5nUR5 URU5 SSS5 g![an[R
"US5UeSnAff=f!,(df   g=f)zSee Branch.set_parent.N�asciiz4Urls must be 7-bit ascii, use breezy.urlutils.escape)
�
isinstancer��encode�UnicodeEncodeErrorr�
InvalidURL�relative_urlrFr�r�)r-r,r�s   r.�
set_parent�Branch.set_parent=s����?��#�s�#�#���J�J�w�'�
�'�'��	�	�3�7�C�
�_�_�
��%�%�c�*��
��*��"�-�-��S�������
�
�s#�A7�B!�7
B�B�B�!
B/c�,�[UR5e)z�Set the URL this branch is stacked against.

:raises UnstackableBranchFormat: If the branch does not support
    stacking.
:raises UnstackableRepositoryFormat: If the repository does not support
    stacking.
)rm�set_stacked_on_urlr�s  r.r��Branch.set_stacked_on_urlOrvr0c��Xlg)z�Set the cached revision history to rev_history.

The revision_history method will use this cache to avoid regenerating
the revision history.

This API is semi-public; it only for use by subclasses, all other code
should consider it to be private.
N)rV)r-�rev_historys  r.�_cache_revision_history�Branch._cache_revision_historyYs
��(3�$r0c��Xlg)z�Set the cached revision_id => revno map to revision_id_to_revno.

This API is semi-public; it only for use by subclasses, all other code
should consider it to be private.
N)rW)r-r�s  r.r�"Branch._cache_revision_id_to_revnods��,@�(r0c�f�SUlSUlSUlSUlSUl/Ul0Ulg)aClear any cached data on this branch, e.g. cached revision history.

This means the next call to revision_history will need to call
_gen_revision_history.

This API is semi-public; it is only for use by subclasses, all other
code should consider it to be private.
N)rVrWrIrZr[rYrXrOs r.�_clear_cached_state�Branch._clear_cached_statels<��(,��$�+/��(�)-��&�$(��!�-1��*�/1��,�35��0r0c�,�[UR5e)a�Return sequence of revision hashes on to this branch.

Unlike revision_history, this method always regenerates or rereads the
revision history, i.e. it does not cache the result, so repeated calls
may be expensive.

Concrete subclasses should override this instead of revision_history so
that subclasses do not need to deal with caching logic.

This API is semi-public; it only for use by subclasses, all other code
should consider it to be private.
)rm�_gen_revision_historyrOs r.r��Branch._gen_revision_history}s��"�$�"<�"<�=�=r0c���S[R;a[SS5 URb
URnO!UR	5nURU5 [
U5$)Nr�rz%revision_history scales with history.)r
r�rrVr�r�r)r-�historys  r.�_revision_history�Branch._revision_history�sX���U�&�&�&��A�F�G��'�'�3��2�2�G��0�0�2�G��(�(��1��G�}�r0c�(�UR5S$)zyReturn current revision number for this branch.

That is equivalent to the number of revisions committed to
this branch.
r�r{rOs r.r��Branch.revno�s���&�&�(��+�+r0c�B�[R"UR5e)z,Older format branches cannot bind or unbind.rdrOs r.�unbind�
Branch.unbind�rgr0c�(�UR5S$)z*Return last revision id, or NULL_REVISION.r	r�rOs r.rv�Branch.last_revision�s���&�&�(��+�+r0c��UR5 URcUR5UlURsSSS5 $!,(df   g=f)zTReturn information about the last revision.

Returns: A tuple (revno, revision_id).
N)r�rI�_read_last_revision_inforOs r.r{�Branch.last_revision_info�s@��
�^�^�
��-�-�5�15�1N�1N�1P��.��1�1��
�
�s�.A	�	
Ac�,�[UR5er()rmr�rOs r.r��Branch._read_last_revision_info�r�r0)r[c��URRUR5(dURX5 URX#5 X#4$)aVSet the last revision info, importing from another repo if necessary.

This is used by the bound branch code to upload a revision to
the master branch first before updating the tip of the local branch.
Revisions referenced by source's tags are also transferred.

Args:
  source: Source branch to optionally fetch from
  revno: Revision number of the new tip
  revid: Revision id of the new tip
  lossy: Whether to discard metadata that can not be
    natively represented
Returns: Tuple with the new revision number and revision id
    (should only be different from the arguments when lossy=True)
)rrer]rx)r-�sourcer�rr[s     r.�"import_last_revision_info_and_tags�)Branch.import_last_revision_info_and_tags�sA�� ���0�0��1B�1B�C�C��J�J�v�%��#�#�E�1��~�r0c���[R"U5(agUR5nURU5S-$![an[
R"X5UeSnAff=f)z&Given a revision id, return its revno.rr	N)rx�is_nullr��indexrrr�)r-r�r�r�s    r.r��Branch.revision_id_to_revno�sc��� � ��-�-���(�(�*��	D��=�=��-��1�1���	D��'�'��:��C��	D�s�A�
A(�A#�#A(r�c��UR5 US:Xa[RsSSS5 $UR5up4X:XaUsSSS5 $US::dX:�a[R
"X5eX1-
n[
UR5U::aURU5 URUsSSS5 $!,(df   g=f)z,Find the revision id of the specified revno.rN)	r�rxryr{rr�rurYr{)r-r�r�r}r~�distance_from_lasts      r.r��Branch.get_rev_id�s����^�^�
���z�$�2�2��
�&*�%<�%<�%>�"�J��"�!��
���z�U�/��+�+�D�8�8�!+�!3���4�7�7�8�<N�N��,�,�-?�@��7�7�8J�K��
�
�s�B:�B:�AB:�:
C��	overwriterrrQr�r��
PullResultc�T�[RX5R"SUUUS.UD6$)z|Mirror source into this branch.

This branch is considered to be 'local', having low latency.

Returns: PullResult instance
r�r8)r\r�pull)r-r�r�rrrQ�kwargss      r.r��Branch.pull�s8�����v�,�1�1�
��'� 3�
��	
�	
r0)r�rrr[�targetr[c�P�[RX5R"X#U40UD6$)z^Mirror this branch into target.

This branch is considered to be 'local', having low latency.
)r\r�push)r-r�r�rrr[r�s      r.r��Branch.push�s-�����t�,�1�1��e�
�/5�
�	
r0c�T�URRUR55$)z'Return `Tree` object for last revision.)r�
revision_treervrOs r.�
basis_tree�Branch.basis_tree
s �����,�,�T�-?�-?�-A�B�Br0c�H�UR5nUcU$URS5(a[R"U5n[R"UR
SSU5$![Ra&n[R"XR5UeSnAff=f)z�Return the parent location of the branch.

This is the default location for pull/missing.  The usual
pattern is that the user can override it by specifying a
location.
N�/rt)
�_get_parent_location�
startswithr�local_path_to_urlr�rF�InvalidURLJoinr�InaccessibleParentr>)r-�parentr�s   r.�
get_parent�Branch.get_parents����*�*�,���>��M����S�!�!��/�/��7�F�	L��=�=����3�B���8�8���&�&�	L��+�+�F�M�M�B��K��	L�s�#A'�'B!�;!B�B!c�,�[UR5er()rmr�rOs r.r��Branch._get_parent_location!r�r0)r�
make_relativec��UcUR5nUcSnO(U(a![R"URU5nUR	X5 g�N�)r�rr�rFr8)r-rEr,rr�s     r.�_set_config_location�Branch._set_config_location$sD���>��*�*�,�F��;��C�
��'�'��	�	�3�7�C��
�
�4�r0rc��UcUR5nURU5nUS:XaSn[[[U5$r�)r�rrrr�)r-rEr�locations    r.�_get_config_location�Branch._get_config_location-s@���>��*�*�,�F��:�:�d�#���r�>��H��H�S�M�8�,�,r0c�j�[[[UR5R	S55$)z:Return the preferred format of submissions to this branch.�child_submit_format�rrr�r�rrOs r.�get_child_submit_format�Branch.get_child_submit_format5s(���H�S�M�4�#8�#8�#:�#>�#>�?T�#U�V�Vr0c�j�[[[UR5R	S55$)��Return the submit location of the branch.

This is the default location for bundle.  The usual
pattern is that the user can override it by specifying a
location.
�
submit_branchr�rOs r.�get_submit_branch�Branch.get_submit_branch9s)���H�S�M�4�#8�#8�#:�#>�#>��#O�P�Pr0r�c�D�UR5RSU5 g)r�r�N)r�r8�r-r�s  r.�set_submit_branch�Branch.set_submit_branchBs��	
����#�#�O�X�>r0c�$�URS5$)zMReturn the public location of the branch.

This is used by merge directives.
�
public_branch)r�rOs r.�get_public_branch�Branch.get_public_branchKs��
�(�(��9�9r0c�(�URSU5 g)r�r�N)r�r�s  r.�set_public_branch�Branch.set_public_branchRs��	
�!�!�/�8�<r0c�\�[[UR5RS55$)z3Return None or the location to push this branch to.�
push_location)rr�r�rrOs r.�get_push_location�Branch.get_push_location[s#���C��.�.�0�4�4�_�E�F�Fr0c�,�[UR5e)z(Set a new push location for this branch.)rm�set_push_locationr�s  r.r��Branch.set_push_location_���!�$�"8�"8�9�9r0c��[RSnU(dgUR5upE[XXBU5nUHnU"U5 M
 g)z%Run the post_change_branch_tip hooks.�post_change_branch_tipN�rBrKr{�ChangeBranchTipParams)r-�	old_revno�	old_revidrK�	new_revno�	new_revid�paramsr]s        r.�!_run_post_change_branch_tip_hooks�(Branch._run_post_change_branch_tip_hookscsG�����5�6����#�6�6�8��	�&�t�	�i�X���D���L�r0c��[RSnU(dgUR5upE[XXU5nUHnU"U5 M
 g)z$Run the pre_change_branch_tip hooks.�pre_change_branch_tipNr�)r-rrrKrrrr]s        r.� _run_pre_change_branch_tip_hooks�'Branch._run_pre_change_branch_tip_hooksmsG�����4�5����#�6�6�8��	�&�t�	�i�X���D���L�r0c��g)zzSynchronise this branch with the master branch if any.

Returns: None or the last_revision pivoted out during the update.
Nr8rOs r.r9�
Branch.updatews��
r0c�4�US:waURU5 gg)zaCheck whether a revno corresponds to any revision.
Zero (the NULL revision) is considered valid.
rN)�check_real_revno�r-r�s  r.�check_revno�Branch.check_revno~s��
�A�:��!�!�%�(�r0c�b�US:dXR5:�a[R"U5eg)zfCheck whether a revno corresponds to a real revision.
Zero (the NULL revision) is considered invalid.
r	N)r�r�InvalidRevisionNumberrs  r.r�Branch.check_real_revno�s,��
�1�9��
�
��,��.�.�u�5�5�-r0)r�rE�repository_policy�tag_selector�
to_controldirc��URUS9nUR5 UR5 UbURU5 UR	XbUS9 SSS5 SSS5 U$!,(df   N=f!,(df   U$=f)a(Clone this branch into to_controldir preserving all semantic values.

Most API users will want 'create_clone_on_transport', which creates a
new bzrdir and branch on the fly.

revision_id: if not None, the revision history in the new branch will
             be truncated to end with revision_id.
)rEN�r�r)�
create_branchr�r��configure_branch�copy_content_into)r-rr�rErrrs       r.�clone�Branch.clone�s~��"�,�,�$�,�7��
�^�^�
�v�0�0�2� �,�!�2�2�6�:��"�"��l�
#�
� 3�
��
�
 3�2��
�
��
�s"�A9�%A(�A9�(
A6	�2A9�9
B)r�rrr[rrEc�2�Ub.UR5(aURRSS9 URXGS9nU(a[R
"X5eUR
5 UR5 UbURU5 URX�US9 UR5n	U	cURUR5 OURU	5 SSS5 SSS5 U$!,(df   N=f!,(df   U$=f)z�Create a new line of development from the branch, into to_controldir.

to_controldir controls the branch format.

revision_id: if not None, the revision history in the new branch will
             be truncated to end with revision_id.
NT)�
_skip_repo)rrEr)
�requires_stackingrH�require_stackingrr�LossyPushToSameVCSr�r�rrrar�r>)
r-rr�rrr[rrEr�
master_urls
          r.�sprout�
Branch.sprout�s���$�(�->�-P�-P�-R�-R��!�!�2�2�d�2�C��,�,�
�,�N����+�+�D�9�9�
�^�^�
�v�0�0�2� �,�!�2�2�6�:��"�"��l�
#�
��0�0�2�J��!��!�!�$�-�-�0��!�!�*�-� 3�
��
� 3�2��
�
��
�s%�.D�?A%C6�$D�6
D	�D�
Dc���UR5up4UcX4p%O/URR5nURX$U4/5nUR
XR5 g![R
a SnN*f=f)a�Synchronize last revision and revision history between branches.

This version is most efficient when the destination is also a
BzrBranch6, but works for BzrBranch5, as long as the destination's
repository contains all the lefthand ancestors of the intended
last_revision.  If not, set_last_revision_info will fail.

Args:
  destination: The branch to copy the history into
  revision_id: The revision-id to truncate history at.  May
     be None to copy complete history.
Nr	)r{rr�r|rr�rx)r-�destinationr��source_revno�source_revision_idr�r�s       r.�_synchronize_history�Branch._synchronize_history�s~��,0�+B�+B�+D�(����!-�;��O�O�-�-�/�E�
��3�3��|�"D�!E���	�*�*�5�>���3�3�
���
�s�A�A3�2A3rc�F�[RX5RX#S9$)a)Copy the content of self into destination.

revision_id: if not None, the revision history in the new branch will
             be truncated to end with revision_id.
tag_selector: Optional callback that receives a tag name
    and should return a boolean to indicate whether a tag should be copied
r)r\rr)r-r)r�rs    r.r�Branch.copy_content_into�s)�����t�1�C�C�#�D�
�	
r0c��URR(dg[RX5R	5$r()rH�supports_reference_locationsr\r�update_references)r-r�s  r.r2�Branch.update_references�s*���|�|�8�8�����t�,�>�>�@�@r0c	�*�UR5 [U5nUR5up4USU4nXS:wa>URR	[R
"SR
X5555 UsSSS5 $!,(df   g=f)azCheck consistency of the branch.

In particular this checks that revisions given in the revision-history
do actually match up in the revision graph, and that they're all
present in the repository.

Callers will typically also want to check the repository.

Args:
  refs: Calculated refs for this branch as specified by
    branch._get_check_refs()
Returns: A BranchCheckResult.
r~z+revno does not match len(mainline) {} != {}N)r��BranchCheckResultr{rr��
BzrCheckErrorr+)r-�refsrr}�last_revision_id�actual_revnos      r.�check�Branch.check�s����^�^�
�&�t�,�F�+/�+B�+B�+D�(�J��!4�6F� G�H�L��)��
�
�$�$��(�(�E�L�L�&�����#�
�
�s�A)B�
Bc��URRR5nURUR5 U$)zyReturn the most suitable metadir for a checkout of this branch.
Weaves are used if this branch's repository uses weaves.
)rrD�checkout_metadir�set_branch_formatrH)r-�lightweightr+s   r.�_get_checkout_format�Branch._get_checkout_formats3�����+�+�<�<�>��� � ����.��
r0�r��
stacked_on�
create_prefix�use_existing_dir�no_treerc
��UcUR5nURRUUUUUUUS9nUR5$)a�Create a clone of this branch and its bzrdir.

Args:
  to_transport: The transport to clone onto.
  revision_id: The revision id to use as tip in the new branch.
    If None the tip is obtained from this branch.
  stacked_on: An optional URL to stack the clone on.
  create_prefix: Create any missing directories leading up to
    to_transport.
  use_existing_dir: Use an existing directory if one exists.
rB)rvrD�clone_on_transportr�)	r-�to_transportr�rCrDrErFr�dir_tos	         r.�create_clone_on_transport� Branch.create_clone_on_transport!sW��4���,�,�.�K����3�3��#�!�'�-��%�4�
���!�!�#�#r0T)r�r?�accelerator_tree�hardlink�recurse_nestedc�6�[U5nUR5 URUS9nURU5n	U(aU	RUS9nORU	R5nUR5 U	R!5n
U
R#U5 U
R%XS9 SnU	R'UUUUS9nUR)5nUR+5 UR-5HTnUR/U5nUc[1SU5 M%UR3UR5U5UR7U5US9 MV SSS5 U$![R
a�n
[R"U5n	U	R5 [R
"UR5U
e![Ra Of=fU	RRURRR:XaSnSn
A
GN�Sn
A
ff=f!,(df   U$=f)	a�Create a checkout of a branch.

Args:
  to_location: The url to produce the checkout at
  revision_id: The revision to check out
  lightweight: If True, produce a lightweight checkout, otherwise,
    produce a bound branch (heavyweight checkout)
  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.
  hardlink: If true, hard-link files from accelerator_tree,
    where possible.
  recurse_nested: Whether to recurse into nested trees
Returns: The tree of the created checkout
)r?TN)�
target_branch�rr)r^rMrNzBranch location for %s unknown.)r�r?)r!�ensure_baser@�initialize_on_transportr�AlreadyControlDirErrorrr�r�rF�NotBranchError�control_transportrD�set_branch_reference�determine_repository_policy�acquire_repositoryrrMr��create_workingtreer�r��iter_references�reference_parentr�create_checkout�abspath�get_reference_revision)r-�to_locationr�r?rMrNrO�tr+�checkoutr�r^�policy�checkout_branchr�r��pathr]s                  r.r^�Branch.create_checkoutHs��4
�+�&��	�
�
���*�*�{�*�C��	#��5�5�a�8�H�&�"�7�7�d�7�K�K��9�9�;�F��%�%�'�&�4�4�6�O�� � ��&�
� � �� �A��K��*�*��#�-��	+�
���_�_�&�
�
�
!�
!�
#�"�2�2�4��#'�#8�#8��#>� �#�+��=�t�D�� �0�0��L�L��&� *� A� A�$� G� +�1��5�$����_�,�,�	#�"�5�5�a�8�H�
E��$�$�&��3�3�A�F�F�;��D���(�(�
��
��
�*�*�/�/��?�?�4�4�9�9�:�
#����!	#��H$�
#���sH�E�A)H	�H�H�6F'�!H�'F>�;H�=F>�>=H�H�	
Hc�,�[UR5e)z^Make sure the data stored in this branch is consistent.

Returns: A `ReconcileResult` object.
)rm�	reconcile)r-�thoroughs  r.ri�Branch.reconcile�r�r0c�6�URR5$r()rHr�rOs r.r��Branch.supports_tags�s���|�|�)�)�+�+r0c�V�[RSHnU"X5nUcMUs $ g)z�Try to automatically find the tag name for a revision.

Args:
  revision_id: Revision id of the revision.
Returns: A tag name or None if no tag name could be determined.
�automatic_tag_nameN)rBrK)r-r�r]�rets    r.ro�Branch.automatic_tag_name�s1���L�L�!5�6�D��t�)�C����
�7�r0c��URXU5nUS:XagUS:Xa[R"X5eUS:Xag[SR	U55e)z�Ensure that revision_b is a descendant of revision_a.

This is a helper function for update_revisions.

:raises: DivergedBranches if revision_b has diverged from revision_a.
Returns: True if revision_b is a descendant of revision_a.
�b_descends_from_aT�diverged�a_descends_from_bFzinvalid relation: {!r})�_revision_relationsrr��AssertionErrorr+)r-�
revision_a�
revision_br�r��relations      r.� _check_if_descendant_or_diverged�'Branch._check_if_descendant_or_diverged�s^���+�+�J�E�J���*�*��
��
#��)�)�$�=�=�
�,�
,�� �!9�!@�!@��!J�K�Kr0c��URX/5nXB1:XagXAU1:XagXA1:Xag[SRU55e)zyDetermine the relationship between two revisions.

Returns: One of: 'a_descends_from_b', 'b_descends_from_a', 'diverged'
rsrtruzinvalid heads: {!r})�headsrwr+)r-rxryr�r~s     r.rv�Branch._revision_relations�sP��
���Z�4�5���L� �&�
�:�.�
.��
�l�
"�&� �!6�!=�!=�e�!D�E�Er0c�~�UR51n[5nUR5RS5(a$[URR55nUR[R5 UR[R5 X4$![Ra NWf=f)aLReturn the heads that must and that should be fetched to copy this
branch into another repo.

Returns: a 2-tuple of (must_fetch, if_present_fetch).  must_fetch is a
    set of heads that must be fetched.  if_present_fetch is a set of
    heads that must be fetched if present, but no error is necessary if
    they are not present.
zbranch.fetch_tags)rvr8r�rrU�get_reverse_tag_dictr�TagsNotSupported�discardrxry)r-�
must_fetch�if_present_fetchs   r.�heads_to_fetch�Branch.heads_to_fetch�s����(�(�*�+�
��5��� � �"�&�&�':�;�;�
�#&�t�y�y�'E�'E�'G�#H� �	���=�6�6�7�� � ��!<�!<�=��+�+��	�*�*�
��
�s�#B%�%B<�;B<c�D�SSKJn URRU5$)zRCreate a memory tree for this branch.

Returns: An in-memory MutableTree instance
r	)�
memorytree)r�r��
MemoryTree�create_on_branch)r-r�s  r.�create_memorytree�Branch.create_memorytree�s��
	!��$�$�5�5�d�;�;r0)rIrZr[rYrXrVrWrUr(�rLN�NN)FN�NFN)F)NNr r��NNF)NNNNNNF)T)yr2r3r4r5�__doc__r�__annotations__rr��tuple�intrr�
Repository�propertyr rNrr*r\rjrnr{r��staticmethodrS�boolr�r�r�r�r��Stackr�r�r�rdr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrDrHrMrRrWr]rarerir�rtrxr�r�r�r�r�rr�r�r�r�r�rvr{r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr
r9rrrr&r,rr2r:r@rKr^rir�ror{rvr�r�r7r8r0r.rBrBQs�����
�3�-��

�I�
��'��c�:�o�(>�?�?��%�%�%���
�.�	�.��.��H�T�)�_�,E��QU��K�6�3�%)�.2�7��S�M�7� �
�+�7�
�	7�:M��
��
��#�"� �	

��

��s�m�

��

��

��!��!� A�.�-�+�"3�"3�-�:�6�#�%�,N��I�y�)�D�2��23�2�/�7�A��$9�2E��*�,$�$����JM�XEI�N-=�^,�1�'�D�F��F�$�F�

��H�S�M��4��������%
�P@D��#+�D��O�#<��	�(�	��;�C�;�
?��c�]�
?�1;�
?�	
�
?�$*.�+/�	<��<��:�&�<��x�(�	<�

�<�*=���
�=�$�=�+�h�s�m�+��+�$;�c�;�d�;�	3�@�6�"
>��4�
�#3��,�4�,�z�,�2�E�#�z�/�$:�2�A�QV��*D�
�D�s�D�AE�L��L�#+�D��,<�#=�L�	�L�* �.2�9=�

��
��	
�
 �
�+�
�&�d�9�o�6�

�
�
�4 �.2��

��
��	
�
 �
�+�
��

�"C�L�H�S�M�L�&=�9=�E��9=�-��-��#��-�W��#��W�Q�8�C�=�Q�?�#�?�$�?�:�8�C�=�:�=�#�=�$�=�G�8�C�=�G�:�#�:�$�:����)��)��)�6�c�6�d�6�-1�"����!���j�)�	�
�s�m��
��<�����
�"�H?�6=A�t�

�A�
�B�������%$�V�����N�`2�,��L�(F� ,�,<r0rBc��\rSrSrSrSrSrSSjr\S5r	Sr
S	rSS
jrSr
SrS
rSSjrSrSrSrSrSrSrSrSrSrSrg)rGi�afAn encapsulation of the initialization and open routines for a format.

Formats provide three things:
 * An initialization routine,
 * a format description
 * an open routine.

Formats are placed in an dict by their format string for reference
during branch opening. It's not required that these be instances, they
can be classes themselves with class methods - it simply depends on
whether state is needed for a given format or not.

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 time regardless.
c�2�URURL$r(��	__class__rKs  r.�__eq__�BranchFormat.__eq__s���~�~����0�0r0c��X:X+$r(r8rKs  r.�__ne__�BranchFormat.__ne__s���"�"r0Nc��g)ahGet the target reference of the branch in controldir.

format probing must have been completed before calling
this method - it is assumed that the format of the branch
in controldir is correct.

Args:
  controldir: The controldir to get the branch data from.
  name: Name of the colocated branch to fetch
Returns: None if the branch is not a reference branch.
Nr8)r-rDrEs   r.�
get_reference�BranchFormat.get_references��r0c�,�[UR5e)awSet the target reference of the branch in controldir.

format probing must have been completed before calling
this method - it is assumed that the format of the branch
in controldir is correct.

Args:
  controldir: The controldir to set the branch reference for.
  name: Name of colocated branch to set, None for default
  to_branch: branch that the checkout is to reference
)rm�
set_reference)r-rDrE�	to_branchs    r.r��BranchFormat.set_references��"�$�"4�"4�5�5r0c�,�[UR5e)z4Return the short format description for this format.)rm�get_format_descriptionrOs r.r��#BranchFormat.get_format_description(s��!�$�"=�"=�>�>r0c�t�[RSnU(dg[XX#5nUHnU"U5 M
 g)N�post_branch_init)rBrK�BranchInitHookParams)r-rDrEr=rKrr]s       r.�_run_post_branch_init_hooks�(BranchFormat._run_post_branch_init_hooks,s4�����/�0����%�d��E���D���L�r0c�,�[UR5e)zeCreate a branch of this format in controldir.

Args:
  name: Name of the colocated branch to create.
)rm�
initialize)r-rDrErrPs     r.r��BranchFormat.initialize4rpr0c��g)z�Is this format supported?

Supported formats can be initialized and opened.
Unsupported formats may not support initialization or committing or
some other features depending on the reason for not being supported.
Tr8rOs r.�is_supported�BranchFormat.is_supported>rrr0c��SSKJn U"U5$)atCreate a tags object for branch.

This method is on BranchFormat, because BranchFormats are reflected
over the wire via network_name(), whereas full Branch instances require
multiple VFS method calls to operate at all.

The default implementation returns a disabled-tags instance.

Note that it is normal for branch to be a RemoteBranch when using tags
on a RemoteBranch.
r	)�DisabledTags)�tagr�)r-r=r�s   r.rT�BranchFormat.make_tagsGs��	&��F�#�#r0c�,�[UR5e)a(A simple byte string uniquely identifying this format for RPC calls.

MetaDir branch 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.
)rm�network_namerOs r.r��BranchFormat.network_nameWs��"�$�"3�"3�4�4r0c�,�[UR5e)auReturn the branch object for controldir.

Args:
  controldir: A ControlDir that contains a branch.
  name: Name of colocated branch to open
  _found: a private parameter, do not use it. It is used to
    indicate if format probing has already be done.
  ignore_fallbacks: when set, no fallback branches will be opened
    (if there are any).  Default is to open fallbacks.
)rmrS)r-rDrE�_found�ignore_fallbacks�found_repositoryrQs       r.rS�BranchFormat.openas��&"�$�)�)�,�,r0c��g)z7True if this format supports set_append_revisions_only.Fr8rOs r.rQ�/BranchFormat.supports_set_append_revisions_onlyv���r0c��g)z0True if this format records a stacked-on branch.Fr8rOs r.�supports_stacking�BranchFormat.supports_stackingzr�r0c��g)z4True if this format supports leaving locks in place.Fr8rOs r.�supports_leaving_lock�"BranchFormat.supports_leaving_lock~r�r0c�>�UR5R5$r()r��rstriprOs r.�__str__�BranchFormat.__str__�s���*�*�,�3�3�5�5r0c��g)z7True if this format supports tags stored in the branch.Fr8rOs r.r��BranchFormat.supports_tags�r�r0c��g)z8Whether the tag container for this branch versions tags.Fr8rOs r.�tags_are_versioned�BranchFormat.tags_are_versioned�r�r0c��g)z+True if tags can reference ghost revisions.Tr8rOs r.� supports_tags_referencing_ghosts�-BranchFormat.supports_tags_referencing_ghosts����r0c��g)z9True if uncommitted changes can be stored in this branch.Tr8rOs r.�supports_store_uncommitted�'BranchFormat.supports_store_uncommitted�r�r0c��g)z2True if this branch format store revision numbers.Tr8rOs r.�stores_revno�BranchFormat.stores_revno�r�r0r8r()NNN)NFFNN)r2r3r4r5r�r�r�r��classmethodr�r�r�r�r�rTr�rSrQr�r�r�r�r�r�r�r�r7r8r0r.rGrG�s����"1�#���6��6�?��MQ�3��$� 5����� �-�*���6�����r0rGc��\rSrSrSrSrSrg)rJi�z�A dictionary mapping hook name to a list of callables for branch hooks.

e.g. ['post_push'] Is the list of items to be called when the
push function is invoked.
c��[R"USS5 URSSS5 URSSS5 URS	S
S5 URSSS
5 URSSS5 URSSS5 URSSS5 URSSS5 URSSS5 URSSS5 URSSS5 URS S!S5 g")#zjCreate the default hooks.

These are all empty initially, because by default nothing should get
notified.
z
breezy.branchzBranch.hooksrSzLCalled with the Branch object that has been opened after a branch is opened.)r	��	post_pushz�Called after a push operation completes. post_push is called with a breezy.branch.BranchPushResult object and only runs in the bzr client.)r��	post_pullz�Called after a pull operation completes. post_pull is called with a breezy.branch.PullResult object and only runs in the bzr client.�
pre_commita�Called after a commit is calculated but before it is completed. pre_commit is called with (local, master, old_revno, old_revid, future_revno, future_revid, tree_delta, future_tree). old_revid is NULL_REVISION for the first commit to a branch, tree_delta is a TreeDelta object describing changes from the basis revision. hooks MUST NOT modify this delta.  future_tree is an in-memory tree obtained from CommitBuilder.revision_tree() and hooks MUST NOT modify this tree.)r�[�post_commitz�Called in the bzr client after a commit has completed. post_commit is called with (local, master, old_revno, old_revid, new_revno, new_revid). old_revid is NULL_REVISION for the first commit to a branch.�
post_uncommitaCalled in the bzr client after an uncommit completes. post_uncommit is called with (local, master, old_revno, old_revid, new_revno, new_revid) where local is the local branch or None, master is the target branch, and an empty branch receives new_revno of 0, new_revid of None.r	z�Called in bzr client and server before a change to the tip of a branch is made. pre_change_branch_tip is called with a breezy.branch.ChangeBranchTipParams. Note that push, pull, commit, uncommit will all trigger this hook.)r	�r�z�Called in bzr client and server after a change to the tip of a branch is made. post_change_branch_tip is called with a breezy.branch.ChangeBranchTipParams. Note that push, pull, commit, uncommit will all trigger this hook.)r	r��transform_fallback_locationaqCalled when a stacked branch is activating its fallback locations. transform_fallback_location is called with (branch, url), and should return a new url. Returning the same url allows it to be used as-is, returning a different one can be used to cause the branch to stack on a closer copy of that fallback_location. Note that the branch cannot have history accessing methods called on it during this hook because the fallback locations have not been activated. When there are multiple hooks installed for transform_fallback_location, all are called with the url returned from the previous hook.The order is however undefined.)r	�	roz�Called to determine an automatic tag name for a revision. automatic_tag_name is called with (branch, revision_id) and should return a tag name or None if no tag name could be determined. The first non-None tag name returned will be used.)�r�r�z�Called after new branch initialization completes. post_branch_init is called with a breezy.branch.BranchInitHookParams. Note that init, branch and checkout (both heavyweight and lightweight) will all trigger this hook.�post_switchzeCalled after a checkout switches branch. post_switch is called with a breezy.branch.SwitchHookParams.N)rr*�add_hookrOs r.r*�BranchHooks.__init__�sU��	���t�_�n�=��
�
��
 ��		
�	
�
�
��
�
�	
�	
�
�
��
�
�	
�	
�
�
��
�
�	
�	
�
�
��
"�
�
	
�	
�
�
��
:�

�	
�	
�
�
�#�
;�
�
	
�	
�
�
�$�
;�
�
	
�	
�
�
�)�

.�
�	
�	
�
�
� �
M�
�
	
�	
�
�
��
7�

�	
�	
�
�
��
.�
�	
r0r8N)r2r3r4r5r�r*r7r8r0r.rJrJ�s
���o
r0rJc�*�\rSrSrSrSrSrSrSrg)ria�Object holding parameters passed to `*_change_branch_tip` hooks.

There are 5 fields that hooks may wish to access:

Attributes:
  branch: the branch being changed
  old_revno: revision number before the change
  new_revno: revision number after the change
  old_revid: revision id before the change
  new_revid: revision id after the change

The revid fields are strings. The revno fields are integers.
c�@�XlX lX0lX@lXPlg)aCreate a group of ChangeBranchTip parameters.

Args:
  branch: The branch being changed.
  old_revno: Revision number before the change.
  new_revno: Revision number after the change.
  old_revid: Tip revision id before the change.
  new_revid: Tip revision id after the change.
N)r=rrrr)r-r=rrrrs      r.r*�ChangeBranchTipParams.__init__&s����"��"��"��"�r0c�4�URUR:H$r(��__dict__rKs  r.r��ChangeBranchTipParams.__eq__6����}�}����.�.r0c��SRURRURURUR
URUR5$)Nz$<{} of {} from ({}, {}) to ({}, {})>)r+r�r2r=rrrrrOs r.�__repr__�ChangeBranchTipParams.__repr__9sE��5�<�<��N�N�#�#��K�K��N�N��N�N��N�N��N�N�

�	
r0)r=rrrrN�	r2r3r4r5r�r*r�r�r7r8r0r.rrs���#� /�
r0rc�*�\rSrSrSrSrSrSrSrg)r�iDa�Object holding parameters passed to `*_branch_init` hooks.

There are 4 fields that hooks may wish to access:

Attributes:
  format: the branch format
  bzrdir: the ControlDir where the branch will be/has been initialized
  name: name of colocated branch, if any (or None)
  branch: the branch created

Note that for lightweight checkouts, the bzrdir and format fields refer to
the checkout, hence they are different from the corresponding fields in
branch, which refer to the original branch.
c�4�XlX lX0lX@lg)a�Create a group of BranchInitHook parameters.

Args:
  format: the branch format
  controldir: the ControlDir where the branch will be/has been
    initialized
  name: name of colocated branch, if any (or None)
  branch: the branch created

Note that for lightweight checkouts, the bzrdir and format fields refer
to the checkout, hence they are different from the corresponding fields
in branch, which refer to the original branch.
N)r+rDrEr=)r-r+rDrEr=s     r.r*�BranchInitHookParams.__init__Ts����$���	��r0c�4�URUR:H$r(r�rKs  r.r��BranchInitHookParams.__eq__gr�r0c�b�SRURRUR5$)Nz
<{} of {}>)r+r�r2r=rOs r.r��BranchInitHookParams.__repr__js#���"�"�4�>�>�#:�#:�D�K�K�H�Hr0)r=rDr+rENr�r8r0r.r�r�Ds��
��&/�Ir0r�c�*�\rSrSrSrSrSrSrSrg)�SwitchHookParamsinaPObject holding parameters passed to `*_switch` hooks.

There are 4 fields that hooks may wish to access:

Attributes:
  control_dir: ControlDir of the checkout to change
  to_branch: branch that the checkout is to reference
  force: skip the check for local commits in a heavy checkout
  revision_id: revision ID to switch to (or None)
c�4�XlX lX0lX@lg)a
Create a group of SwitchHook parameters.

Args:
  control_dir: ControlDir of the checkout to change
  to_branch: branch that the checkout is to reference
  force: skip the check for local commits in a heavy checkout
  revision_id: revision ID to switch to (or None)
N)�control_dirr��forcer�)r-r	r�r
r�s     r.r*�SwitchHookParams.__init__zs��'��"���
�&�r0c�4�URUR:H$r(r�rKs  r.r��SwitchHookParams.__eq__�r�r0c��SRURRURURUR
5$)Nz<{} for {} to ({}, {})>)r+r�r2r	r�r�rOs r.r��SwitchHookParams.__repr__�s8��(�/�/��N�N�#�#�T�%5�%5�t�~�~�t�GW�GW�
�	
r0)r	r
r�r�Nr�r8r0r.rrns��	�'�/�
r0rc�B^�\rSrSrSrSU4SjjrSrSrSrSr	U=r
$)	�BranchFormatRegistryi�zBranch format registry.c�@>�[TU]U5 SUlSUlgr()�superr*�_default_format�_default_format_key)r-�other_registryr�s  �r.r*�BranchFormatRegistry.__init__�s ���
����(�#���#'�� r0c��URb-URc URUR5UlUR$)z"Return the current default format.)rrrrOs r.�get_default� BranchFormatRegistry.get_default�s<���#�#�/�D�4H�4H�4P�#'�8�8�D�,D�,D�#E�D� ��#�#�#r0c��XlSUlg)zSet the default format.N�rr)r-r+s  r.�set_default� BranchFormatRegistry.set_default�s��%��#'�� r0c��XlSUlg)z,Set the default format by its format string.N)rr)r-�
format_strings  r.�set_default_key�$BranchFormatRegistry.set_default_key�s��#0� �#��r0rr()r2r3r4r5r�r*rrr!r7�
__classcell__r�s@r.rr�s���!�(�
$�(�
$�$r0rc��\rSrSrSrSrSrg)�BranchWriteLockResulti�z�The result of write locking a branch.

Attributes:
  token: The token obtained from the underlying branch lock, or
    None.
  unlock: A callable which will unlock the lock.
c�N�SRURUR5$)Nz!BranchWriteLockResult({!r}, {!r}))r+r�r�rOs r.r��BranchWriteLockResult.__repr__�s��2�9�9�$�+�+�t�z�z�R�Rr0r8N)r2r3r4r5r�r�r7r8r0r.r%r%�s
���Sr0r%c��\rSrSrSrSrg)�_Resulti�c��[USS5(dgURS5 URH&up#nURSRU55 M( g)N�
tag_conflictszConflicting tags:
z    {}
)�getattr�writer+r+)r-�to_filerE�_value1�_value2s     r.�_show_tag_conficts�_Result._show_tag_conficts�sM���t�_�d�3�3���
�
�+�,�&*�&8�&8�"�D�7��M�M�*�+�+�D�1�2�'9r0r8N)r2r3r4r5r1r7r8r0r.r)r)�s��3r0r)c��\rSrSr%Sr\\\4\S'\\\4\S'\	\S'\	\S'\
\S'\
\S'\\
\S	'\
\S
'\S\S'S
\S'S\
SS4SjrSrg)r�i�a]Result of a Branch.pull operation.

Attributes:
  old_revno: Revision number before pull.
  new_revno: Revision number after pull.
  old_revid: Tip revision id before pull.
  new_revid: Tip revision id after pull.
  source_branch: Source (local) branch object. (read locked)
  master_branch: Master branch of the target, or the target if no
    Master
  local_branch: target branch if there is a Master, else None
  target_branch: Target/destination branch object. (write locked)
  tag_conflicts: A list of tag conflicts, see BasicTags.merge_to
  tag_updates: A dict with new tags, see BasicTags.merge_to
rrrr�
source_branch�
master_branch�local_branchrQr"r+r#�tag_updatesr.rLNc���[USS5n[USS5n[5(d�URUR:waUR	SUR
S35 U(aUR	[
U5S35 URUR:Xa1U(d*U(dUR	S5 OUR	S5 URU5 g)Nr+r7zNow on revision z.
z tag(s) updated.
zNo revisions or tags to pull.
zNo revisions to pull.
)r,rrrr-rrur1)r-r.r+r7s    r.�report�PullResult.report�s�����o�t�<�
��d�M�4�8���z�z��~�~����/��
�
� 0����0@��D�E���
�
��[�!1� 2�2D�E�F��~�~����/��$��M�M�"C�D��M�M�";�<�����(r0r8)r2r3r4r5r�rr�r�r�rrBrrrr9r7r8r0r.r�r��st��� �S�(�]�#�#��S�(�]�#�#����������6�"�"����
�&�&���
)�f�
)��
)r0r�c��\rSrSr%Sr\\S'\\S'\\S'\\S'\\S'\\S'\\S	'\	\\S
'S\
SS
4SjrSrg
)�BranchPushResulti�a%Result of a Branch.push operation.

Attributes:
  old_revno: Revision number (eg 10) of the target before push.
  new_revno: Revision number (eg 12) of the target after push.
  old_revid: Tip revision id (eg joe@foo.com-1234234-aoeua34) of target
    before the push.
  new_revid: Tip revision id (eg joe@foo.com-5676566-boa234a) of target
    after the push.
  source_branch: Source branch object that the push was from. This is
    read locked, and generally is a local (and thus low latency) branch.
  master_branch: If target is a bound branch, the master branch of
    target, or target itself. Always write locked.
  target_branch: The direct Branch where data is being sent (write
    locked).
  local_branch: If the target is a bound branch this will be the
    target, otherwise it will be None.
rrrrr4r5rQr6r.rLNc	�Z�SSKJnJn [USS5n[USS5n[	5(d�UR
UR:waUURb[U"S5UR5 O+[U"S5URRS55 U(a([U"SS	[U55[U5-5 UR
UR:Xa1U(d*U(d[U"S
55 O[U"S55 URU5 g)Nr)�gettext�ngettextr+r7zPushed up to revision %d.zPushed up to revision id %s.zutf-8z%d tag updated.z%d tags updated.z!No new revisions or tags to push.zNo new revisions to push.)�breezy.i18nr>r?r,rrrrr�decoderur1)r-r.r>r?r+r7s      r.r9�BranchPushResult.reports���1� ��o�t�<�
��d�M�4�8���z�z��~�~����/��>�>�-���!<�=�t�~�~�N��� >�?����-�-�g�6�����.�0B�C��DT�U��+�&�'���~�~����/��$���!D�E�F���!<�=�>�����(r0r8)
r2r3r4r5r�r�r�rrBrrr9r7r8r0r.r<r<�sO���&�N��N������������6�"�"�)�f�)��)r0r<c�0�\rSrSrSrSrS\SS4SjrSrg)	r5i7z<Results of checking branch consistency.

See `Branch.check`
c��Xl/Ulgr(�r=rr?s  r.r*�BranchCheckResult.__init__=s������r0�verboserLNc���SSKJn [U"S5RURR
URR55 URHn[U"S5U5 M g)z{Report the check results via trace.note.

Args:
  verbose: Requests more detailed display of what was checked,
    if any.
r)r>zchecked branch {0} format {1}zfound error:%sN)r@r>rr+r=r>rHr)r-rGr>�errors    r.�report_results� BranchCheckResult.report_resultsAs\��	(���3�4�;�;����$�$�d�k�k�&9�&9�
�	
�
�[�[�E���)�*�E�2�!r0rE)	r2r3r4r5r�r*r�rJr7r8r0r.r5r57s���
�3�d�3�t�3r0r5c�&^�\rSrSrSr/r\S5rSS\S\	\
S\	\\S\S\
4
S	jjrSS\S\	\
S
\S\	\4SjjrSS
jrSS\	\
S\	\S
\S\R(4SjjrSSjr\S\S\SS4U4Sjj5rSrU=r$)r\iSz�This class represents operations taking place between two branches.

Its instances have methods like pull() and push() and contain
references to the source and target repositories these operations
can be carried out on.
c�,�[UR5e)z�Return an iterable of format tuples for testing.

Returns: An iterable of (from_format, to_format) to use when testing
    this InterBranch class. Each InterBranch class should define this
    method itself.
)rm�_get_branch_formats_to_test��klasss r.rN�'InterBranch._get_branch_formats_to_test^s��"�%�"C�"C�D�Dr0r�rrrQr�rLc�,�[UR5e)z�Mirror source into target branch.

The target branch is considered to be 'local', having low latency.

Returns: PullResult instance
)rmr�)r-r�rrrQr�rs      r.r��InterBranch.pullhs��"�$�)�)�,�,r0r[�_override_hook_source_branchc�,�[UR5e)zuMirror the source branch into the target branch.

The source branch is considered to be 'local', having low latency.
)rmr�)r-r�rrr[rTrs      r.r��InterBranch.pushxs��"�$�)�)�,�,r0c�,�[UR5e)z�Copy the content of source into target.

Args:
  revision_id:
    if not None, the revision history in the new branch will
    be truncated to end with revision_id.
  tag_selector: Optional callback that can decide
    to copy or not copy tags.
)rmr)r-r�rs   r.r�InterBranch.copy_content_into�s��"�$�"8�"8�9�9r0rZc�,�[UR5e)z�Fetch revisions.

Args:
  stop_revision: Last revision to fetch
  limit: Optional rough limit of revisions to fetch
Returns: FetchResult object
)rmr])r-rrrZr[s    r.r]�InterBranch.fetch�s��"�$�*�*�-�-r0c�,�[UR5e)z3Import reference information from source to target.)rmr2rOs r.r2�InterBranch.update_references�r�r0r�r�c�>>�[[[TU]
X55$r()rr\rr)r-r�r�r�s   �r.r�InterBranch.get�s����K����V�!<�=�=r0r8)FNNFN�FNFNNr�r�r�)r2r3r4r5r��_optimisersr�rNr�rrrr r�r�rBr�rr�r�FetchResultr]r2rr7r#r�s@r.r\r\Ss8�����K�4��E��E� �.2�9=���
-��-� �
�+�-�&�d�9�o�6�	-�
�-�
�-�$ �.2��9=��
-��-� �
�+�-��	-�
'/�v�&6�-�
:�/3�#��	
.��
�+�
.���}�
.��	
.�

�	�	�
.�:��>�&�>�&�>�]�>��>r0r\c�J�[U[5(a
U(aSS/$/$U$)Nr�rU)r�r�)r�s r.�_fix_overwrite_typerc�s(���)�T�"�"���v�&�&��I��r0c��\rSrSrSr\S5r\S5r\S5rSSjr	SSjr
SS	jrSS
jrSSjr
SSjrSS
jrSrSrg)�GenericInterBranchi�z=InterBranch implementation that uses public Branch functions.c��g)NTr8)rPr�r�s   r.�
is_compatible� GenericInterBranch.is_compatible�s��r0c�T�[R5[R54/$r()�format_registryrrOs r.rN�.GenericInterBranch._get_branch_formats_to_test�s"�� �,�,�.��0K�0K�0M�N�O�Or0c�|�[U[R5(aUR5 UR$U$r()r��remote�RemoteBranchFormat�_ensure_real�_custom_format)rPr+s  r.�
unwrap_format� GenericInterBranch.unwrap_format�s2���f�f�7�7�8�8����!��(�(�(��
r0Nc	���URR5 URR5 URR	URU5 UR5 URR
5nU(aURRU5 URR5(a8URRRURRUS9 SSS5 SSS5 g![Ran[S[U55 SnAN�SnAff=f!,(df   NM=f!,(df   g=f)z�Copy the content of source into target.

revision_id: if not None, the revision history in the new branch will
             be truncated to end with revision_id.
z%parent was not accessible to copy: %sN��selector)r�r�r�r�r,r2r�r�rr�rr�r�rU�merge_to)r-r�rr�r�s     r.r�$GenericInterBranch.copy_content_into�s����[�[�
"�
"�
$�d�k�k�&<�&<�&>��K�K�,�,�T�[�[�+�F��"�"�$�
3����/�/�1����K�K�*�*�6�2��{�{�2�2�4�4���� � �)�)�$�+�+�*:�*:�\�)�R�'?�
$�
$��
�,�,�
H��>��A��G�G��
H��'?�&>��
$�
$�sM�E�7E�.D�A9E�E�E�&E�;E�E�E�
E	�E�
E'c���URRURR:XaS/4$URR5 URR	5 [
R
5nURUlXlURRUl
URRUl[
RRUlX$lUR!5nURRRURRX5S9sSSS5 sSSS5 $!,(df   O=fSSS5 g!,(df   g=f)Nr)r[�
fetch_spec)r�rFr�r�r�r]�FetchSpecFactoryr4�source_branch_stop_revision_idr�source_repo�target_repo�TargetRepoKinds�PREEXISTING�target_repo_kindrZ�make_fetch_spec)r-rrrZr[�fetch_spec_factoryrys      r.r]�GenericInterBranch.fetch�s���;�;���t�{�{�/�/�/��r�7�N�
�[�[�
"�
"�
$�d�k�k�&<�&<�&>�!&�!7�!7�!9��/3�{�{��,�@M�=�-1�[�[�-C�-C��*�-1�[�[�-C�-C��*�27�2G�2G�2S�2S��/�',�$�+�;�;�=�J��;�;�)�)�/�/����&�&�e�0��'?�&>�
$�
$�&>�&>��
$�
$�
$�s%�
E#�(CE	�6	E#�	
E	�E#�#
E1c��URR5 URR5 URR	5upESnUc1Un[
R"U5(aSSS5 SSS5 gUnURR5nURUS9 U(ddUc$URRR5nURRXX0R5(aSSS5 SSS5 gUcYUc$URRR5nURR	5up�URUXT4X�4/5nURRXa5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)NrR)r�r�r�r�r{rxr�rvr]rr�r{r|rx)
r-rrr�r��other_revno�other_last_revision�
stop_revnor�r��this_last_revisions
          r.�_update_revisions�$GenericInterBranch._update_revisions�sl��
�[�[�
"�
"�
$�d�k�k�&<�&<�&>�/3�{�{�/M�/M�/O�,�K��J��$� 3�
� �(�(��7�7��'?�
$�
$�)�
��{�{�0�0�2�H�

�J�J�]�J�3���=� �K�K�2�2�<�<�>�E��;�;�?�?�!�U�K�K���
�7'?�
$�
$�8�!��=� �K�K�2�2�<�<�>�E�15���1O�1O�1Q�.�
�"�8�8�!�,�:�+�8���
�
�K�K�.�.�z�I�O'?�
$�
$�&>�&>��
$�
$�s=�F6�AF%�6F6�BF%�F6�A7F%�F6�%
F3	�/F6�6
Gc�8�[R"5nURURR	55 URR5n	U(aU	(d[R"5eSn
SnU	(aA[R"U	5nURRRU5n
U
S:HnU(dHU	(aAU(d:URRU5n
URU
R	55 U
(aU
R!URUUSUS9 UR#UUU
UUU(+US9sSSS5 $![R[R4a SnN�f=f!,(df   g=f)z�Pull from source into self, updating my master if any.

Args:
  run_hooks: Private parameter - if false, this branch
    is being called because it's the master of the primary branch,
    so it should not run its hooks.
NFr�)r�rr�	run_hooksr)�_hook_masterr��_override_hook_target�merge_tags_to_masterr)�
contextlib�	ExitStack�
enter_contextr�r�rar�LocalRequiresBoundBranchr�
normalize_urlr�rNr��PathNotChildr�r�r��_pull)r-r�rrrQr�r�r�r�
exit_stack�bound_locationr5�source_is_master�
normalizedr�s              r.r��GenericInterBranch.pull	s_��"�
!�
!�
#�z��$�$�T�[�[�%;�%;�%=�>�!�[�[�;�;�=�N��^��5�5�7�7� �M�$���&�3�3�N�C�
�-�"�k�k�8�8�@�@��L�G�'.�"�}�$��^�4D� $��� =� =�>Q� R�
��(�(��)A�)A�)C�D���"�"��K�K�'�"/�#�!-�#���:�:���*�#�&;�)9�%9�)���;$�
#���+�+�X�-@�-@�A�-�',�$�-��$�
#�s1�BF�*E�	BF�&F�F�F�F�
Fc	�^^
�U(a+[R"URUR5eUU
4SjnURR	5 URR5 URR
5nU(a�URRU:wa�URR5nUR5 [RURU5n	U	RXUS9 URXUS9m
UT
lURT
l
U"5 SSS5 O1SnURXUS9m
URT
lST
l
U"5 T
sSSS5 sSSS5 $!,(df   N"=f!,(df   O=fSSS5 g!,(df   g=f)a-See InterBranch.push.

This is the basic concrete implementation of push()

Args:
  _override_hook_source_branch: If specified, run the hooks
    passing this Branch as the source, rather than self.  This is for
    use of RemoteBranch, where push is delegated to the underlying
    vfs-based Branch.
c�f>�T(aTTl[RSHnU"T5 M
 g)Nr�)r4rBrK)r]rTrs ��r.�
_run_hooks�+GenericInterBranch.push.<locals>._run_hooksb	s(���+�'C��$����[�1���V��2r0)rN)rr$r�r�r�r�rarFr�r\r�_basic_pushr5r6)r-r�rrr[rTrr�r�r5�master_interrs    `     @r.r��GenericInterBranch.pushK	sd���$��+�+�D�K�K����E�E�	��[�[�
"�
"�
$�d�k�k�&<�&<�&>�!�[�[�;�;�=�N��$�+�+�"2�"2�n�"D�
!%��� =� =� ?�
�"�-�-�/�#.�?�?�4�;�;�
�#N�L� �,�,�!�|�-��"�-�-�!�|�.��F�,9�F�(�*.�+�+�F�'��L�0�/� !%�
��)�)��<�*���(,�{�{��$�&*��#����G'?�&>�
$�
$�0�/��'?�&>��
$�
$�
$�s>�F0�1A&F�A F�7;F�2	F0�
F�F�
F$	� F0�0
F>c��[5nURUlURUlURR5uUlUl[U5nURU:waMURRRURR5nURUSU;US9 URR5(aIURRRURRSU;US9uUlUlUR#5 URR5uUlUlU$)zBasic implementation of push without bound branches or hooks.

Must be called with source read locked and target write locked.
r��r�r�rUrt)r<r�r4r�rQr{rrrcrr�r�r�rUrvr7r+r2rr)r-r�rrrrr�s      r.r��GenericInterBranch._basic_push�	s$��
"�#��#�{�{���#�{�{���-1�[�[�-K�-K�-M�*���&�*�'�	�2�	����}�,��K�K�*�*�4�4�T�[�[�5K�5K�L�E��"�"��)�y�*@��
#�
��;�;�.�.�0�0�7;�{�{�7G�7G�7P�7P���� � �&�I�"5��8Q�8�4�F��� 4�	
��� �-1�[�[�-K�-K�-M�*���&�*��
r0c
���U(a[R"5e[5n
URU
lUcUR
U
lOXjlURR5 UR
RRURR5nUR
R5uU
lU
l[U5nURUSU;US9 URRR!UR
RSU;U(+U	S9uU
lU
lUR'5 UR
R5uU
lU
lU(aXJlU
RU
lOU
RU
lSU
lU(a"[0R2SHnU"U
5 M
 U
sSSS5 $!,(df   g=f)a�See Branch.pull.

This function is the core worker, used by GenericInterBranch.pull to
avoid duplication when pulling source->master and source->local.

Args:
  _hook_master: Private parameter - set the branch to
    be supplied as the master to pull hooks.
  run_hooks: Private parameter - if false, this branch
    is being called because it's the master of the primary branch,
    so it should not run its hooks.
    is being called because it's the master of the primary branch,
    so it should not run its hooks.
  _override_hook_target: Private parameter - set the branch to be
    supplied as the target_branch to pull hooks.
  local: Only update the local branch, and not the bound branch.
Nr�r�rU)�
ignore_masterrur�)rr�r�r�r4r�rQr�rr�r{rrrcr�rUrvr7r+r2rrr5r6rBrK)
r-r�rrrQr�r�r�r�r�rrr�r]s
             r.r��GenericInterBranch._pull�	s���<��1�1�3�3����#�{�{��� �(�#'�;�;�F� �#8� �
�[�[�
"�
"�
$��K�K�*�*�4�4�T�[�[�5K�5K�L�E�26���1O�1O�1Q�.�F��f�.�+�I�6�I��"�"��)�y�*@��
#�
�8<�{�{�7G�7G�7P�7P���� � ��)�#�"6�6�%�	8Q�8�4�F��� 4�
�"�"�$�15���1O�1O�1Q�.�F��f�.��'3�$�&,�&:�&:��#�'-�';�';��$�&*��#��"�L�L��5�D���L�6��A%�
$�
$�s
�-E'G�
G,c�V�[URRSS5(dgURR5n[	U5S:XagURR
nURR
nURR5nUR5H3unupg[R"XbU5nURXVU45 M5 URRU5 g![Ra [R"X&5nN_f=f)Nr1Fr)r,r�rH�_get_all_reference_inforurFr�r�r�
rebase_url�InvalidRebaseURLsr��
setdefault�_set_all_reference_info)r-�reference_dict�old_base�new_base�target_reference_dict�	tree_path�branch_location�file_ids        r.r2�$GenericInterBranch.update_references�	s����t�{�{�*�*�,J�E�R�R�����<�<�>���~��!�#���;�;�#�#���;�;�#�#�� $��� C� C� E��5C�5I�5I�5K�1�I�1��
K�"*�"5�"5�#�x�#��
"�,�,�Y�'�8R�S�6L�	
���+�+�,A�B��	�-�-�
K�"*�-�-��"J��
K�s�1C;�;*D(�'D(r8r�r�r�)FNNTNFNr_r()	FNNNTNFTN)r2r3r4r5r�r�rgrNrqrr]r�r�r�r�r�r2r7r8r0r.rere�s���G������P��P�����S�&� (J�X�� ��"���6�t���%)��
@�D�6�� ���"��!��F�PCr0re)D�
__docformat__�typingrrrrrr
�globalsr�r$r�rr�r
rrrrrrxrDrrrrrKr�interr�lockrr�tracerrrrrr�r r!r�r"r#r)r%�UnsupportedOperationr:rBrGrJrr�rr�FormatRegistry�network_format_registryrjr%r)r�r<r5r\rcre�register_optimiserr8r0r.�<module>r�s���"�
�?�?�$���I�	����#�;�;�'�����#� �C�C�/��,�	�f�o�o�	�#��4�4�#�_<�
�_<�D-d�)�d�Nv
�%�v
�t�}���*
�*
�Z'I�'I�T 
� 
�F$�9�$�2#�1�1�,�?�A���'�'>�?��
S�-�
S�"3�3�))��))�X9)�w�9)�x3�3�8T>�+�f�%�T>�n�MC��MC�`
���1�2r0

Youez - 2016 - github.com/yon3zu
LinuXploit