403Webshell
Server IP : 74.208.236.16  /  Your IP : 216.73.217.15
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u102440577 ( 7172810)
PHP Version : 8.4.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/mercurial/__pycache__/copies.cpython-313.pyc
�

6�h����f�SSKJr SSKrSSKrSSKJr SSKJr SSKJ	r
JrJrJ
r
 SSKJr SSKJrJr \R("S	S
S9rSrS
rSrS+SjrS+SjrSrSrSrSrSrSr Sr!Sr"Sr#Sr$Sr%Sr&Sr'Sr(S,Sjr)Sr*Sr+S+S jr,S!r-S"r.S#r/"S$S%5r0S&r1S'r2S(r3S)r4S*r5g)-�)�annotationsN�)�_)�nullrev)�match�pathutil�policy�util)�
stringutil)�flagutil�sidedata�copy_tracingT)�pyo3c�~�[UR55H up4X4:XaX#	MX@;aX#	MX1;dMX#	M" g)z)filters out invalid copies after chainingN)�list�items)�src�dst�t�k�vs     �2/usr/lib/python3/dist-packages/mercurial/copies.py�_filterr"s8��,�Q�W�W�Y�����6���
�\���
�\��� �c�~�UR5nUR5Hup4URXD5X#'M U$)z.chain two sets of copies 'prefix' and 'suffix')�copyr�get)�prefix�suffix�result�key�values     r�_chainr#Cs4��
�[�[�]�F��l�l�n�
���j�j��.���%��Mrc��UR5HlnUR5nURUS5UR5:XaUs $U(dMDURUS5UR5:XdMjUs $ g)z�return file context that is the ancestor of fctx present in ancestor
manifest am

Note: we used to try and stop after a given limit, however checking if that
limit is reached turned out to be very expensive. we are better off
disabling that feature.N)�	ancestors�pathr�filenode)�fctx�am�basemf�fr&s     r�
_tracefiler,Ks`���^�^�
���v�v�x��
�6�6�$�������-��K��6�f�j�j��t�,��
�
��<��K�rc���URnUR5R5n[U5H=nUR	U5R
(aU(dM,U"U5(aM;X4	M? U$�N)�dirstate�copiesrr�	get_entry�tracked)�repor�ds�crs     r�_dirstatecopiesr6[sV��	
���B�
�	�	�����A�
�!�W���|�|�A��&�&�5�5��q������
�Hrc�`�UR5nUR5nURX2S9$)z�Computes which files are in b but not a.
This is its own function so extensions can easily wrap this call to see what
files _forwardcopies is about to process.
�r)�manifest�
filesnotin)�a�br�ma�mbs     r�_computeforwardmissingr?ds+��

����B�	
����B�
�=�=��=�)�)rc�h�URS:XagURRSS5nSnX;$)z9Checks if we should use changeset-centric copy algorithms�changeset-sidedataT�experimentalscopies.read-from)schangeset-onlys
compatibility)�filecopiesmode�ui�config)r3�readfrom�changesetsources   r�usechangesetcentricalgorHns7�����3�3���w�w�~�~�o�/B�C�H�;�O��&�&rc���URn[U5(a[XU5$URR=(a URRSS5nURRnU(aU"SX4-5 UR5nUcSOUR5n0n	Un
UR5U:Xa`UR5R5[:Xa:[R"UR55n[R"X;5n
URRSS5(a6[!UR#U55nU(aU"S[%U5-5 O%['XU
S9nU(aU"S[%U5-5 URR(R+UR5/S	S
9n
[-U5H�nU(aU"SU-5 XnX�lU(a[0R2"5n[5X�U5nU(aU(aU"SU-5 UX�'U(dMmU"S
[0R2"5W-
-5 M� U	$)z@Like _forwardcopies(), but b.rev() cannot be None (working copy)�devel�debug.copiess3debug.copies:    looking into rename from %s to %s
Nscopy-tracing.trace-all-filess+debug.copies:      searching all files: %d
r8s/debug.copies:      missing files to search: %d
T��	inclusives&debug.copies:        tracing file: %s
s%debug.copies:          rename of: %s
s(debug.copies:          time: %f seconds
)�_reporH�_changesetforwardcopiesrD�	debugflag�
configbool�debugr9�p1�p2�revr�matchmod�exact�files�intersectmatchersr�walk�lenr?�	changelogr%�sorted�_ancestrycontextr
�timerr,)r;r<�baserr3rR�dbgr)r*�cm�forwardmissingmatch�filesmatcher�missing�ancestrycontextr+r(�start�opaths                  r�_committedforwardcopiesriws���
�7�7�D��t�$�$�&�q�U�3�3��G�G���O�$�'�'�"4�"4�X��"O�E�
�'�'�-�-�C���C�q�f�L�M�	
����B��\�T�t�}�}��F�

�B� ���t�t�v��{�q�t�t�v�z�z�|�w�.��~�~�a�g�g�i�0��&�8�8��M���w�w���(�$C�D�D��q�v�v�e�}�%����?�#�g�,�N�O��(��5H�I����C��g�,��
�
�g�g�'�'�1�1�1�5�5�7�)�t�1�L�O�
�G�_����:�Q�>�?��t�� /����J�J�L�E��4�V�,�����=��E�F��B�E��5��<��:�:�<�%�'�)�
��$�Irc��^^^^�URnURmURm[RmUR
m[bUUUU4SjnU$UUUU4SjnU$)z�returns a function that returns the following data given a <rev>"

* p1: revision number of first parent
* p2: revision number of first parent
* changes: a ChangingFiles object
c�>�T"U5upT"U5T-(a0T"U5RR[R5nOSnXU4$r.)�	_sidedatar�sidedatamod�SD_FILES)rUrSrT�raw�
HASCOPIESINFO�changelogrevision�flags�parentss    ����r�revinfo� _revinfo_getter.<locals>.revinfo�sJ����S�\�F�B��S�z�M�)�'��,�6�6�:�:�;�;O�;O�P�����C�=� rc�j>�T"U5upT"U5T-(aT"U5RnOSnXU4$r.)�changes)rUrSrTrwrprqrrrss    ����rrtru�s:����S�\�F�B��S�z�M�)�+�C�0�8�8�����G�$�$r)r\�
parentrevsrrr�REVIDX_HASCOPIESINFOrq�rustmod)r3r�clrtrprqrrrss    @@@@r�_revinfo_getterr|�s_���
���B��m�m�G��H�H�E��1�1�M��,�,����	!�	!�$�N�	%�	%��Nrc�^^�0mUU4SjnU$)z&return a cached version of is_ancestorc�h>�X:�agX:XagX4nTRU5nUc
T"X5=nTU'U$)NFT)r)�anc�descr!�ret�cache�is_ancestors    ��r�_is_ancestor�(cached_is_ancestor.<locals>._is_ancestor�sD����:��
�[���k���i�i��n���;�*�3�5�5�C�%��*��
r�)r�r�r�s` @r�cached_is_ancestorr��s����E�	��rc
���UR5[UR54;a0$UR5R5nURnUR
nURn[[4nURUR5/SS9nURUR5/UR5/S9n	[5n
SnURRSS5nU	H^n
U"U
5nX�:XaSnMUunnU[:waX�;aU
RU5 U[:wdMEUU;dMMU
RU5 M` U
(d0$U(a][U
5n
[U
5nUR5/nURUUU
SS9n[U5nU	V
s/sHo�U;dM
U
PM n	n
UR S:Xa�U
V
s0sHo�S	_M nn
U	HAn
UR#U
5H)nU[:XaMS	UU
'UU;dMUU==S
-
ss'M+ MC [%X25nURR'5 [)U	UUR5UUUU5sSSS5 $U
V
s0sHo�/_M nn
U	HHn
UR#U
5H0nU[:XaM/UU
'UU;dMUUR+U
5 M2 MJ U	R-5nUUR5:XdeU	R/U
5 U	R15 [3U5n[5U	UUR5UX%5$s sn
fs sn
f!,(df   g=fs sn
f)NTrL)�common�headsFrJscopy-tracing.multi-thread)�includepathrArr)rUrr3�
unfilteredr\�
isancestorrev�_uncheckedparentrevsr%�findmissingrevs�setrDrQ�addr�min�reachablerootsrCrxr|�reading�_combine_changeset_copies�append�pop�extend�sort�_revinfo_getter_extra�_combine_changeset_copies_extra)r;r<rr3r{�
isancestorrs�graph_rootsr%�revs�roots�has_graph_roots�multi_thread�r�psrSrT�m�h�
roots_to_head�children_count�prt�children�xs                         rrOrO�s���u�u�w�7�A�E�E�G�$�$��	��6�6�8��� �D�	
���B��!�!�J��%�%�G��G�$�K����a�e�e�g�Y�$��7�I�
���a�e�e�g�Y�q�u�u�w�i��@�D��E�E��O��7�7�%�%�h�0L�M�L���
�Q�Z��
��"�O��F�B���W�}����	�	�"�
��W�}��y���	�	�"�
����	���U�����J��
�U�U�W�I���)�)�!�Q��4�)�H�
��M�*�
��6�4�a�
�#5��4��6����3�3�).�.��1�Q�$���.��A��]�]�1�%����<��$%��q�!���&�"�1�%��*�%�&��"�$�.��
�^�^�
#�
#�
%�,������������&�
%�$)�)�5�a�r�E�5��)��A��]�]�1�%����<�� ������=��Q�K�&�&�q�)�&��
�H�H�J���A�E�E�G�|��|����E���	�	��'��-��.��(�A�E�E�G�W�e�
�	
��a7��/�&�
%��*s$�*	M�7M�M
�
M�:M �
Mc	��UR5n[b"[R[U5XX65nGO�[	U5n0n	UGH�n
U"U
5up�n
SnSU4SU44GHpunnU[
:XaMUR
U5nUcM)US-nUUU'U(aU	R
US5nOU	RUS5nUc0=nnOU(aUR5nOUnU
b�0nUS:Xa
U
RnOUS:XaU
RnU(aWUR5nUR5H,unnUR
U5nUbUSbUSnU
U4UU'M. UULdeU
R(a7U
RH'nUU;dMUULaUR5nU
S4UU'M) UcUnGMYUS:Xde[UUUU
U
5nGMs X�U
'GM� 0nX�nUceUR5HununnUcMUUU'M U(d2[UR55HnU"U5(aMUU	M U$)a�combine the copies information for each item of iterrevs

revs: sorted iterable of revision to visit
children_count: a {parent: <number-of-relevant-children>} mapping.
targetrev: the final copies destination revision (not in iterrevs)
revinfo(rev): a function that return (p1, p2, p1copies, p2copies, removed)
match: a matcher

It returns the aggregated copies information for `targetrev`.
Nr�)�alwaysrz�combine_changeset_copiesrr�rrr�r�copied_from_p1�copied_from_p2r�removed�_merge_copies_dict�keys)r�r��	targetrevrtrr�r��alwaysmatch�final_copies�
all_copies�current_revrSrTrw�current_copies�parent�
parent_rev�remaining_childrenr0�	newcopies�childcopies�dest�source�prevr+�targetrev_items�tt�filenames                            rr�r�^s����,�,�.�K����7�7���J��7�
��(�
�3�
��
��K�%�k�2�O�B�G�!�N�)*�2�w��B��&8�"��
���(��%3�%7�%7�
�%C�"�%�-��"�a�'�"�-?��z�*�%�'�^�^�J��=�F�'�^�^�J��=�F��>�)+�+�I��'� &���
�I� &�I��&�"$�K���{�&-�&<�&<���1��&-�&<�&<��"�$*�K�K�M�	�,7�,=�,=�,?�L�D�&�#)�:�:�f�#5�D�#�/�D��G�4G�)-�a���/:�F�.C�I�d�O�	-@�
 )��6�6�6����!(���A� �I�~�#,��#6�17���
�I�0;�T�/B�	�!��"1�"�)�%.�N�"�Q�;�&�;�%7�!�&�"��#�&�N�u'9�B'5�{�#�M �R��$�/���*�*�*�"1�"7�"7�"9��D�,�2�v��!�%+��T�"�#:���\�.�.�0�1�H���?�?� ��*�2��rr�c���UR5HcupVURU5nUcX`U'M[X2XWU5up�U	(aU[:Xa
XFS4X'MIXGS4X'MSU[:XdM_X`U'Me U$)a�merge two copies-mapping together, minor and major

In case of conflict, value from "major" will be picked.

- `isancestors(low_rev, high_rev)`: callable return True if `low_rev` is an
                                    ancestors of `high_rev`,

- `ismerged(path)`: callable return True if `path` have been merged in the
                    current revision,

return the resulting dict (in practice, the "minor" object, updated)
r)rr�_compare_values�
PICK_MAJOR)
�minor�majorr�rw�
current_merger�r"�other�pick�	overwrites
          rr�r��s����{�{�}����	�	�$����=��$�K�-��T�%��O�D���:�%�#0��(�";�E�K�#0��(�";�E�K���#�#�d��%��Lrc��UupVUupxXW:XaXh:Xde[S4$UbUbUcX R;a[S4$UbUbUcX R;a[S4$U"Xu5(a"UbX R;a[S4$[S4$U"XW5(a"UbX R;a[S4$[S4$Uc[S4$Uc[S4$[S4$)z�compare two value within a _merge_copies_dict loop iteration

return (pick, overwrite).

- pick is one of PICK_MINOR, PICK_MAJOR or PICK_EITHER
- overwrite is True if pick is a return of an ambiguity that needs resolution.
FT)�PICK_EITHER�salvaged�
PICK_MINORr��merged)	rwr�r�r�r��major_tt�major_value�minor_tt�minor_values	         rr�r��s��"��H�!��H����)�)�)��E�!�!����#����$�$�$��4������#����$�$�$��4���	�H�	'�	'���4�>�>�#9��t�#�#��u�$�$�	�H�	'�	'���4�>�>�#9��t�#�#��u�$�$�	�	��4���	�	��4����4��rc�X^^^�TRnURmU4SjmUUU4SjnU$)a;return a function that return multiple data given a <rev>"i

* p1: revision number of first parent
* p2: revision number of first parent
* p1copies: mapping of copies from p1
* p2copies: mapping of copies from p2
* removed: a list of removed files
* ismerged: a callback to know if file was merged in that revision
c�">^�TUmUU4SjnU$)Nc��>�UTR5;agTUnURRUR5nSnUHnUTR:wdMUS-
nM US:�$)NFrrr�)rX�_filelogrs�	_filenode�nullid)r&r(rs�
nb_parents�n�ctxr3s     ��r�ismerged�=_revinfo_getter_extra.<locals>.get_ismerged.<locals>.ismerged>se����3�9�9�;�&���t�9�D��m�m�+�+�D�N�N�;�G��J�������#��!�O�J����?�"rr�)rUr�r�r3s  @�r�get_ismerged�+_revinfo_getter_extra.<locals>.get_ismerged;s����3�i��		#��rc�v>�T"U5upT	UnURupEUR5nXXEUT"U54$r.)�_copies�filesremoved)
rUrSrTr��p1copies�p2copiesr�r�rsr3s
       ���rrt�&_revinfo_getter_extra.<locals>.revinfoKsE���������3�i�� �[�[����"�"�$���x�7�L��4E�E�Er)r\rx)r3r{rtr�rss`  @@rr�r�.s)���
���B��m�m�G�� F��Nrc	�^�0nUR5nUGHbnURUS5n	U	c0n	[X5GH5up�U"U5up�p�nnX�:XaSnUnOX�:XdeSnUnU(d5UR5VVs0sHunnU"U5(dMUU_M nnnU	nU(aWU	R	5nUR5H,unnU	RU5nUbUSbUSnUU4UU'M. UU	LdeUH'nUU;dMUU	LaU	R	5nUS4UU'M) URU5nUcUXk'GMUS:Xa[
UUUU5 GM#[
UUUU5 UXk'GM8 GMe 0nXbR5HununnUcMUUU'M U$s snnf)zuversion of `_combine_changeset_copies` that works with the Google
specific "extra" based storage for copy informationNrr�)r�r��	enumeraterrr�_merge_copies_dict_extra)r�r�r�rtrr�r�r�r�r0�ir5rSrTr�r�r�r�r�r�rrr�r�r�r�r+�othercopiesr�r�s                              rr�r�Us���
�J��,�,�.�K�
������4�(���>��F��h�k�*�D�A�<C�A�J�9�B�H����w���&���w��w���&���-8�->�->�-@��-@���c�E�#�J�H�C��H�-@����I��"�K�K�M�	�$/�$5�$5�$7�L�D�&�!�:�:�f�-�D��'�D��G�,?�!%�a���'(�&�k�I�d�O�	%8�
!��.�.�.����	�>� �F�*�%+�K�K�M�	�$%�t�9�I�a�L��%�.�.��+�K��"� )�
�
��Q�;�,�#�Y�
�H��-�!�;�
�H��%.�J�M�c+��p�L�(�3�9�9�;���l�r�6���!'�L���<����[s�?F)
�F)
c���UR5H\upEURU5nUcXPU'MUSnUSnUSUS:XaM7Xx:XdU"Xx5(aU"U5(dMXXPU'M^ g)znversion of `_merge_copies_dict` that works with the Google
specific "extra" based storage for copy informationNrr)rr)	r�r�r�r�r�r"r��new_tt�other_tts	         rr�r��sw���{�{�}����	�	�$����=��$�K��1�X�F��Q�x�H��Q�x�5��8�#���"�!�&�3�3��D�>�>�#�d��!%rc��UcUnUR5RU5nUR5c<[XR	5X#5n[U[
URU55nU$[XX#5nU$)z<find {dst@b: src@a} copy mapping where a is an ancestor of b)r3�narrowmatchrUrirSr#r6rN)r;r<r`rrbr0s      r�_forwardcopiesr��sr���|���
�F�F�H� � ��'�E��u�u�w��
$�Q�����
<����O�A�G�G�U�;�<���M�)��t�;���Mrc��URRRSS5S:Xa0$[X5n[	X0U5$)zfind renames from a to brB�	copytracesoff)rNrDrEr��_reverse_renames)r;r<rr0s    r�_backwardrenamesr��s=���w�w�z�z����,�7�6�A��	�
�A�
!�F��F�u�-�-rc��0n[UR55H&upEU(aU"U5(dMXQ;aM"XCU'M( U$)z>given copies to context 'dst', finds renames from that context)r]r)r0rrr�rrs      rr�r��sD��
	�A��v�|�|�~�&�����q�����8���!��
'�
�Hrc��URnURR=(a URRSS5nU(aURR	SX4-5 X:XdU(aU(d0$UR5c@XR
5:Xa-U(aURR	S5 [X25$URU5nXP:Xa-U(aURR	S5 [XUS9nO�XQ:Xa-U(aURR	S5 [XUS9nO�U(aURR	S	5 SnUR5[:waUn[XP5n[XQXrS9n	[U5[U	5-n
U
H-nURU5U	RU5:XdM)X�	X�	M/ [X�U5n[UU	5n[!XU5 U$)
z5find {dst@y: src@x} copy mapping for directed comparerJrKs-debug.copies: searching copies from %s to %s
Ns$debug.copies: search mode: dirstate
s#debug.copies: search mode: forward
r8s$debug.copies: search mode: backward
s$debug.copies: search mode: combined
)rNrDrPrQrRrUrSr6�ancestorr�r�rr�rr�r#r)
r��yrr3rRr;r0r`�x_copies�y_copies�	same_keysr�x_backward_renamess
             r�
pathcopiesr�s����7�7�D��G�G���O�$�'�'�"4�"4�X��"O�E�����
�
�=���F�	
�	�v�Q�a��	��u�u�w��1����;���G�G�M�M�B�C��t�+�+�	�
�
�1�
�A��v���G�G�M�M�A�B���E�2��	
����G�G�M�M�B�C�!�!�e�4����G�G�M�M�B�C����5�5�7�g���D�!�!�'��!�!��:����M�C��M�1�	��A��|�|�A��(�,�,�q�/�1��K��K��.�h�5�A�����
���A�&���Mrc��U(aU(aX:Xa[5[504$UR5R5nUR5cKUR5URR5:Xa[[
X55[504$URRSS5n[R"U5SLa[5[504$[U5(a[XX#5$US:Xa)[XU5(a[XX#5$[XX#5$[XX#5$)az
Finds moves and copies between context c1 and c2 that are relevant for
merging. 'base' will be used as the merge base.

Copytracing is used in commands like rebase, merge, unshelve, etc to merge
files that were moved/ copied in one merge parent and modified in another.
For example:

o          ---> 4 another commit
|
|   o      ---> 3 commit that modifies a.txt
|  /
o /        ---> 2 commit that moves a.txt to b.txt
|/
o          ---> 1 merge base

If we try to rebase revision 3 on revision 4, since there is no a.txt in
revision 4, and if user have copytrace disabled, we prints the following
message:

```other changed <file> which local deleted```

Returns a tuple where:

"branch_copies" an instance of branch_copies.

"diverge" is a mapping of source name -> list of destination names
for divergent renames.

This function calls different copytracing algorithms based on config.
rBr�Fs
heuristics)�
branch_copiesr3r��noder/rSr6rDrEr�	parseboolrH�_fullcopytracing�_isfullcopytraceable�_heuristicscopytracing)r3�c1�c2r`r��copytracings      r�mergecopiesrs��B�R�2�8���
���3�3��'�'�)�'�'�)�K�
�w�w�y��R�W�W�Y�$�-�-�*:�*:�*<�<��/�$�<�=��O��
�	
��'�'�.�.��,�?�K����K�(�E�1���
���3�3��t�$�$���"�3�3�
�m�#� ��$�/�/�#�D�b�7�7�%�d��9�9���"�3�3rc�J�UR5cUR5nUR5(amUR5(aXURR	SS5n[UR
SUR5UR555nXC:$g)a�Checks that if base, source and destination are all no-public branches,
if yes let's use the full copytrace algorithm for increased capabilities
since it will be fast enough.

`experimental.copytrace.sourcecommitlimit` can be used to set a limit for
number of changesets from c1 to base such that if number of changesets are
more than the limit, full copytracing algorithm won't be used.
rBscopytrace.sourcecommitlimit�%d::%dF)rUrS�mutablerD�	configintr[r�)r3r	r`�sourcecommitlimit�commitss     rrrQs|��
�v�v�x��
�U�U�W��	�z�z�|�|������ �G�G�-�-��;�
���d�i�i�	�4�8�8�:�r�v�v�x�@�A���*�*�rc	���X;aX;aXU'ggX;agX@X0:wa[XPX`5(dgX@X0:wd$URU5URU5:waUHn	XU	'M	 ggr.)�_relatedrr)
r�dsts1�m1�m2r>r
r`r�renamedeleters
          r�_checksinglesidecopiesres���}��=� %����

��	
�	��B�G�	�H�R�W�d�i�$@�$@��	��B�G�	�r�x�x��}�����
�=��C���I�� >rc�*�\rSrSrSrSSjrSrSrg)riza�Information about copies made on one side of a merge/graft.

"copy" is a mapping from destination name -> source name,
where source is in c1 and destination is in c2 or vice-versa.

"movewithdir" is a mapping from source name -> destination name,
where the file at source present in one context but not the other
needs to be moved to destination by the merge process, because the
other context moved the directory it is in.

"renamedelete" is a mapping of source name -> list of destination
names for files deleted in c1 that were renamed in c2 or vice-versa.

"dirmove" is a mapping of detected source dir -> destination dir renames.
This is needed for handling changes to new files previously grafted into
renamed directories.
Nc�p�Uc0OUUlUc0OUUlUc0OUUlUc0UlgUUlgr.�rr�dirmove�movewithdir)�selfrrrrs     r�__init__�branch_copies.__init__�sA���,�B�D��	�".�"6�B�L���$�_�r�'���!,�!4�2���+��rc	�x�SUR<SUR<SUR<SUR<S3	$)Nz<branch_copies
  copy=z
  renamedelete=z
  dirmove=z
  movewithdir=z
>r)rs r�__repr__�branch_copies.__repr__�s.���	�	��!�!����� � �
�	
r)rrrr)NNNN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r r#�__static_attributes__r�rrrrzs���&GK�F�	
rrc�^^$^%^&^'^(�UR5m&UR5m'UR5m([X15n[X25nU(dU(d[5[504$0n0nUR5H&up�UR	U	/5RU5 M( UR5H&up�UR	U	/5RU5 M( 0n
0n0n0n
0n[
U5[
U5-nUH�n	URU	5nURU	5nU(a�U(a�U	T&;aNU	T';aH[
U5n[
U5nUU-(aUU-HnX�U'X�U'M
 Mu[UU-5X�'M�U	T&;a4U	T';a,[
U5n[
U5nUU-HnX�U'X�U'M
 M�M�M�U(a[U	UT&T'T(X#X�5	 M�U(dM�[U	UT'T&T(XX�5	 M� /m%U%U&U'U(U4Sjm$U$4SjnU$4SjnTRR(Ga�U"5nU"5nSnU(a2TRRSUS-SRU54-5 U(a2TRRSUS-SRU54-5 [
5n[
5nUR5HnURU5 M U
R5HnURU5 M UR5HnURU5 M TRRS	5 SU4S
U44H�unnU(dMTRRSU-5 [U5HPnSnUU
;dUU;aUS
-
nUU;aUS-
nUU;aUS-
nTRRSUUUU4-5 MR M� AATRRS5 [!TXUU5unn[!TX+UU5un n![X�UU!5n"[X�U U5n#U"U#U4$)aThe full copytracing algorithm which finds all the new files that were
added from merge base up to the top commit and for each file it checks if
this file was copied from another file.

This is pretty slow when a lot of changesets are involved but will track all
the copies.
c��>�T(dlTRTT	R55nTRTT	R55n[X-
5n[X!-
5nTRX445 TU$r.)r:r�r]r�)
�idx�	addedinm1�	addedinm2�u1�u2r�rrr>r3s
     �����r�_get_addedfiles�)_fullcopytracing.<locals>._get_addedfiles�sj�����
�
�b�$�*:�*:�*<�=�I��
�
�b�$�*:�*:�*<�=�I��	�-�.�B��	�-�.�B��L�L�"��"��S�z�rc�>�T"S5$)Nrr��r2s�r�<lambda>�"_fullcopytracing.<locals>.<lambda>��
���?�1�%rc�>�T"S5$)Nrr�r5s�rr6r7�r8rs  unmatched files in %ss
%s:
   %s
slocals
   sothersK  all copies found (* = to merge, ! = divergent, % = renamed and deleted):
sremotes   on %s side:
r�*�!�%s    src: '%s' -> dst: '%s' %s
s!  checking for directory renames
)r9rrr�
setdefaultr�r�rr]rrDrPrR�join�values�update�_dir_renames))r3r	r
r`�copies1�copies2�inversecopies1�inversecopies2rr�copy1�copy2�diverge�
renamedelete1�
renamedelete2�
allsourcesr�dsts2�u1fn�u2fnr0r1�header�renamedeleteset�
divergeset�dsts�sider0r+�note�dirmove1�movewithdir2�dirmove2�movewithdir1�branch_copies1�branch_copies2r2r�rrr>s)`                                   @@@@@rrr�s!���
����B�	����B�	
����B���"�G���"�G��w���
���3�3��N��N��M�M�O����!�!�#�r�*�1�1�#�6�$��M�M�O����!�!�#�r�*�1�1�#�6�$�
�E��E��G��M��M��^�$�s�>�':�:�J����"�"�3�'���"�"�3�'���U��"�}��B���E�
���E�
��
�5�=�$�u�}��%(�c�
�%(�c�
� -�$*�%�%�-�#8�G�L����s�b�y��E�
���E�
�� �5�=�C�!$�#�J�!$�#�J�)�	 )���"��U�B��B��%�
��U�"��U�B��B��%�
�G�P
�E���&�D�%�D��w�w����
�V��
�V��+��
��G�G�M�M��6�H�#4�h�m�m�B�6G�"H�H�
���G�G�M�M��6�H�#4�h�m�m�B�6G�"H�H�
��%���U�
��N�N�$�D����d�#�%�!�(�(�*�D��"�"�4�(�+�!�(�(�*�D��"�"�4�(�+�	
���
�
�
+�	
�'��0�9�g�2F�G�L�D�&����G�G�M�M�-��4�5��F�^������:��e���D�L�D��
�?��D�L�D���'��D�L�D����
�
�6�&��)�Q��9M�M��$�	H�
���G�G�M�M�7�8�)�$��7�D�I��H�l�)�$��7�D�I��H�l�"�5��<�P�N�"�5��<�P�N��>�7�2�2rc�v�[5n0nUR5H�upx[R"U5[R"U5p�X�;aM7UR	U	5(a)UR	U
5(aURU	5 MvX�;aXiU
:waURU	5 M�X�U	'M� UHnX�;dM
Xk	M AU(d004$UR5VV
s0sHup�US-U
S-_M nnn
UH%nURRSX�U4-5 M' [USS9n0nU"5HknUU;dMUHZnURU5(dMXnU[U5S-nUU;a%UUU'URRSUU4-5  Mi Mm UU4$s sn
nf)aiFinds moved directories and files that should move with them.

ctx: the context for one of the sides
copy: files copied on the same side (as ctx)
fullcopy: files copied on the same side (as ctx), including those that
          merge.manifestmerge() won't care about
addedfilesfn: function returning added files on the other side (compared to
              ctx)
�/s)   discovered dir src: '%s' -> dst: '%s'
T)�reverseNs'   pending file src: '%s' -> dst: '%s'
)r�rr�dirname�hasdirr�rDrRr]�
startswithr[)r3r�r�fullcopy�addedfilesfn�invalidrrr�dsrc�ddstr�rr�d�dirmove_children_firstrr+�dfs                   rrArA-s����e�G��G��N�N�$����%�%�c�*�H�,<�,<�S�,A�d��?��
�Z�Z��
�
�#�*�*�T�"2�"2��K�K���
�_���$�!6��K�K���!�D�M�%����<��
��	���2�v�
�.5�m�m�o�>�o�d�a�q�4�x��T��!�o�G�>�
�����
�
�9�Q��
�O�K�	
��$�G�T�:���K�
�^���H��+���<�<��?�?� ��a��A���k�1�B���~�)+��A�����
�
�G� �"�g�&���,���K����;?s�,F5c��^^^�UR5cUR5nTR5cTR5m[5nUR5mUR	STR5TR55(d(UR
R
S5 [XTT5$TnUT:wa|[UR55S:Xa(UR
R
S5 [XTT5$URUR55 UR5nUT:waM|0n[TT5nUR5Hup�U	T;dM
X�U'M UUU4Sjn
UVs/sHo�"U5(dMUPM nn0n
U(Ga�[R"[ 5n[R"[ 5nTR#TR55Hin[$R&R)U5n[$R&R+U5nUUR-U5 UUR-U5 Mk UH�n[$R&R)U5n[$R&R+U5nUUnUUnUU-nTR/U5nUR
R1SS5n[U5U:�a4UR
R3[5S5U[U54-5 M�UH+nUR/U5n[7UU5(dM'X�U'M- M� [9U
5[9U504$s snf)	aAFast copytracing using filename heuristics

Assumes that moves or renames are of following two types:

1) Inside a directory only (same directory name but different filenames)
2) Move from one directory to another
                (same filenames but different directory names)

Works only when there are no merge commits in the "source branch".
Source branch is commits from base up to c2 not including base.

If merge is involved it fallbacks to _fullcopytracing().

Can be used by setting the following config:

    [experimental]
    copytrace = heuristics

In some cases the copy/move candidates found by heuristics can be very large
in number and that will make the algorithm slow. The number of possible
candidates to check can be limited by using the config
`experimental.copytrace.movecandidateslimit` which defaults to 100.
rs?switching to full copytracing as base is not an ancestor of c2
r�s0switching to full copytracing because of merges
c�>>�UT;=(a UT;=(a UT;$r.r�)r+r`r
rs ���rr6�(_heuristicscopytracing.<locals>.<lambda>�s���Q�b�[�:�Q�$�Y�:�1��7�:rrBscopytrace.movecandidateslimitsBskipping copytracing for '%s', more candidates than the limit: %d
)rUrSr�r9r�rDrRrr[rsr@rXr�r�collections�defaultdictrr:�osr&�basenamer^r��filectxr�statusrrr)r3r	r
r`�changedfilesr�rC�cprr�filtr+�missingfilesrB�basenametofilename�dirnametofilenameror^�samebasename�samedirname�movecandidates�f2�
maxcandidates�	candidate�f1rs  ``                     @rrrts����2
�v�v�x��
�U�U�W��	�v�v�x��
�U�U�W���5�L�	����B��9�9�Y����
�B�F�F�H�5�5����
�
�
#�	
� ��"�d�3�3�
�C�

��+��s�{�{�}���"��G�G�M�M�N�O�#�D�b�$�7�7����C�I�I�K�(��f�f�h��
��+��G�	��b�	!�B��H�H�J����"�9��C�L��;�D�+�7�|�!�t�A�w�A�|�L�7��G��(�4�4�T�:��'�3�3�D�9�����t�}�}��/�A��w�w�'�'��*�H��g�g�o�o�a�(�G��x�(�/�/��2��g�&�-�-�a�0�	0��A��w�w�'�'��*�H��g�g�o�o�a�(�G�-�h�7�L�+�G�4�K�)�K�7�N����A��B�!�G�G�-�-��!A��M��>�"�]�2�������;���#�n�-�.�	/���+�	��Z�Z�	�*���B��#�#�*+�I�&�
,�3�B��!�=��#9�2�=�=��]8s�?M3�M3c�t�X:XagUR5UR5p2UR5UR5pTUc[U5nUc[U5nUR5UR5pTXE:�a[U5nOXT:�a[U5nOX:H$MG![a gf=f)a2return True if f1 and f2 filectx have a common ancestor

Walk back to common ancestor to see if the two files originate
from the same file. Since workingfilectx's rev() is None it messes
up the integer comparison logic, hence the pre-step check for
None (f1 and f2 can only be workingfilectx's initially).
TF)r%�linkrev�next�
StopIteration)r~r{�g1�g2�f1r�f2rs      rrr�s���
�x��
�\�\�^�R�\�\�^����:�:�<�����S��;��b��B��;��b��B���z�z�|�R�Z�Z�\���y��"�X�����"�X���x��������s�BB*�(B*�*
B7�6B7c��[X!5nUR5n[X@U5 [UR	55HupVXT;dMX5	M UR	5HupxXRU5 M g)a�reproduce copies between base and ctx in the wctx

Unlike mergecopies(), this function will only consider copies between base
and ctx; it will ignore copies between base and wctx. Also unlike
mergecopies(), this function will apply copies to the working copy (instead
of just returning information about the copies). That makes it cheaper
(especially in the common case of base==ctx.p1()) and useful also when
experimental.copytrace=off.

merge.update() will have already marked most copies, but it will only
mark copies if it thinks the source files are related (see
merge._related()). It will also not mark copies if the file wasn't modified
on the local side. This function adds the copies that were "missed"
by merge.update().
N)rrSrrr�
markcopied)	�wctxr�r`�
new_copiesr�r��__rrs	         r�graftcopiesr�sq�� �D�&�J�
�W�W�Y�F��F�*�%���)�)�+�,����>�� �-��$�$�&����	���S�!�'rr.)NN)6�
__future__rrlrn�i18nrrr�rrVrr	r
�utilsr�revlogutilsrr
rm�
importrustrzrr#r,r6r?rHrir|r�rOr�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrArrr�r�rr�<module>r�s���#��	�������
�
�
�N��
6���B�
� 
�*�'�@�F#�L�$i
�Xn�d�
�
�
����>7 �t$�NC�L$�,
� 	.�

� +�\C4�L�(�*$
�$
�NI3�XD �Nj>�Z�B"r

Youez - 2016 - github.com/yon3zu
LinuXploit