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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/proc/self/root/usr/lib/python3/dist-packages/hgext/__pycache__/absorb.cpython-313.pyc
�

6�h^�����SrSSKJr SSKrSSKJr SSKJrJr SSK	J
r
JrJrJ
r
JrJrJrJrJrJrJrJrJrJrJr SSKJr Sr0r\R:"\5r0r\R>"\5r\"S	S
SS9 \"S	S
SS9 \"S	SSS9 SSSS.r \RBr!"SS5r""SS5r#Sr$S4Sjr%S4Sjr&"SS\RN5r(S5Sjr)"SS5r*"S S!5r+S"r,S#r-S5S$jr.\"S	S%S&S\"S'54S(S)S\"S*54S+S,S\"S-54S.S/S\"S054/\R^-\R`-\Rb-\"S15\RdSS29S35r3g)6a?apply working directory changes to changesets (EXPERIMENTAL)

The absorb extension provides a command to use annotate information to
amend modified chunks into the corresponding non-public changesets.

::

    [absorb]
    # only check 50 recent non-public changesets at most
    max-stack-size = 50
    # whether to add noise to new commits to avoid obsolescence cycle
    add-noise = 1
    # make `amend --correlated` a shortcut to the main command
    amend-flag = correlated

    [color]
    absorb.description = yellow
    absorb.node = blue bold
    absorb.path = bold
�)�annotationsN)�_)�hex�short)�cmdutil�commands�context�crecord�error�linelog�mdiff�obsolete�patch�phases�pycompat�	registrar�rewriteutil�scmutil�util)�
stringutilsships-with-hg-core�absorb�	add-noiseT��defaults
amend-flag�max-stack-size�2syellows	blue boldsbold)�absorb.description�absorb.node�absorb.pathc�*�\rSrSrSrSrSrSrSrSr	g)�nullui�Wzblank ui object doing nothingFTc��SnU$)Nc��g�N�)�args�kwdss  �./usr/lib/python3/dist-packages/hgext/absorb.py�nullfunc�$nullui.__getitem__.<locals>.nullfunc_s���r&)�namer*s  r)�__getitem__�nullui.__getitem__^s��	��r,r&N)
�__name__�
__module__�__qualname__�__firstlineno__�__doc__�	debugflag�verbose�quietr.�__static_attributes__r&r,r)r!r!Ws��'��I��G��E�r,r!c�*�\rSrSrSrSrSrSrSrg)�emptyfilecontext�ez.minimal filecontext representing an empty filec��Xlgr%��_repo)�self�repos  r)�__init__�emptyfilecontext.__init__hs���
r,c��g)Nr,r&�r?s r)�data�emptyfilecontext.dataks��r,c�.�URR$r%)r>�nullidrDs r)�node�emptyfilecontext.nodens���z�z� � � r,r=N)	r0r1r2r3r4rArErIr8r&r,r)r:r:es��8���!r,r:c��[5n/nUH,nX1;dM
URU5 URU5 M. U$)z@list -> list. remove duplicated items without changing the order)�set�add�append)�lst�seen�result�xs    r)�uniqrSrs;���5�D�
�F�
���=��H�H�Q�K��M�M�!����Mr,c�T�Un/nUR5[R:waqU(a[U5U:�aOZUR	5n[U5S:waO:URU5 USnUR5[R:waMqUR
5 U$)a(ctx, int?) -> [ctx]. get a linear stack of non-public changesets.

changesets are sorted in topo order, oldest first.
return at most limit items, if limit is a positive number.

merges are considered as non-draft as well. i.e. every commit
returned has and only has 1 parent.
�r)�phaser�public�len�parentsrN�reverse)�headctx�limit�ctxrQrYs     r)�
getdraftstackr^}s����C�
�F�

�)�)�+����
&��S��[�E�)���+�+�-���w�<�1����
�
�c���a�j���)�)�+����
&��N�N���Mr,c��Uc
[5nU(deXS;a/04$/n0nUSR5n[U5H`nX;aUn OXXanURU5 Xr;aSn O:XtU'UR	5nU(dMGUnX;dMPUR5n O UbAX;aURXQ5 O(UR[UR
555 UR5 [U5U4$)a�([ctx], str, set) -> [fctx], {ctx: fctx}

stack is a list of contexts, from old to new. usually they are what
"getdraftstack" returns.

follows renames, but not copies.

seenfctxs is a set of filecontexts that will be considered "immutable".
they are usually what this function returned in earlier calls, useful
to avoid issues that a file was "moved" to multiple places and was then
modified differently, like: "a" was copied to "b", "a" was also copied to
"c" and then "a" was deleted, then both "b" and "c" were "moved" from "a"
and we enforce only one of them to be able to affect "a"'s content.

return an empty list and an empty dict, if the specified path does not
exist in stack[-1] (the top of the stack).

otherwise, return a list of de-duplicated filecontexts, and the map to
convert ctx in the stack to fctx, for possible mutable fctxs. the first item
of the list would be outside the stack and should be considered immutable.
the remaining items are within the stack.

for example, given the following changelog and corresponding filelog
revisions:

  changelog: 3----4----5----6----7
  filelog:   x    0----1----1----2 (x: no such file yet)

- if stack = [5, 6, 7], returns ([0, 1, 2], {5: 1, 6: 1, 7: 2})
- if stack = [3, 4, 5], returns ([e, 0, 1], {4: 0, 5: 1}), where "e" is a
  dummy empty filecontext.
- if stack = [2], returns ([], {})
- if stack = [7], returns ([1, 2], {7: 2})
- if stack = [6, 7], returns ([1, 2], {6: 1, 7: 2}), although {6: 1} can be
  removed, since 1 is immutable.
N���r)	rL�p1�reversedrN�
copysourcer:r@rZrS)	�stack�path�	seenfctxs�fctxs�fctxmap�pctxr]�fctx�copys	         r)�getfilestackrl�s���J���E�	��L�5���9���2�v�
��E��G���8�;�;�=�D������?��D���y��
���T�����D�������� ���4��D��{��v�v�x����"���<��L�L���$��L�L�)�$�)�)�+�6�7�	�M�M�O���;���r,c�$�\rSrSrSrSrSrSrg)�overlaystore��zkread-only, hybrid store based on a dict and ctx.
memworkingcopy: {path: content}, overrides file contents.
c��XlX lgr%��basectx�memworkingcopy)r?rrrss   r)rA�overlaystore.__init__�s
����,�r,c��XR;agURUnXR;aURUnOUR5nUR5UR	54nUR5nX4U4$)z-comply with mercurial.patch.filestore.getfile�NNN)rrrsrE�islink�isexecrc)r?rerj�content�moderks      r)�getfile�overlaystore.getfile�sq���|�|�#�#��|�|�D�!���&�&�&��)�)�$�/�G��i�i�k�G����
�t�{�{�}�-����� ���d�"�"r,rqN)r0r1r2r3r4rAr{r8r&r,r)rnrn�s���-�#r,rnc��Uc7UR5RRUR55nUcUR	5nUcUR5nUR
5nUR5n[UR55RU5n[X5n[R"UR5UUUUUUSUS9	$)za({path: content}, ctx, (p1node, p2node)?, {}?) -> memctx
memworkingcopy overrides file contents.
N)	r@rY�text�files�	filectxfn�user�date�branch�extra)r@�	changelogrYrIr��descriptionr�r�rLr�unionrnr	�memctx)	rsr]rYr��descr�r�r�stores	         r)�overlaycontextr��s���
���(�(�*�&�&�.�.�s�x�x�z�:���}��	�	����|���� ���8�8�:�D��8�8�:�D���	�	���"�"�>�2�E���-�E��>�>�
�X�X�Z��
���
�
���
�
r,c�|�\rSrSrSrSSjrSSjrSrSrSr	\
S	5rS
rSr
SrS
rSSjrSrSrSrg)�filefixupstateia�state needed to apply fixups to a single file

internally, it keeps file contents of several revisions and a linelog.

the linelog uses odd revision numbers for original contents (fctxs passed
to __init__), and even revision numbers for fixups, like:

    linelog rev 1: self.fctxs[0] (from an immutable "public" changeset)
    linelog rev 2: fixups made to self.fctxs[0]
    linelog rev 3: self.fctxs[1] (a child of fctxs[0])
    linelog rev 4: fixups made to self.fctxs[1]
    ...

a typical use is like:

    1. call diffwith, to calculate self.fixups
    2. (optionally), present self.fixups to the user, or change it
    3. call apply, to apply changes
    4. read results from "finalcontents", or call getfinalcontent
Nc��XlX lU=(d
 [5UlX@lUVs/sHoUR5PM snUl[R"[RUR5UlUR5Ul
URR(a UR5UR:XdeSS/Ul/Ul/Ul/Ul[)5Ulgs snf)z�([fctx], ui or None) -> None

fctxs should be linear, and sorted by topo order - oldest first.
fctxs[0] will be considered as "immutable" and will not be changed.
rN)rgrer!�ui�optsrE�contentsr�maplistr
�
splitnewlines�contentlines�
_buildlinelogrr5�_checkoutlinelog�
chunkstats�targetlines�fixups�
finalcontentsrL�ctxaffected)r?rgrer�r��fs      r)rA�filefixupstate.__init__/s����
��	��.������	�,1�1�5�a����5�1��
�$�,�,�U�-@�-@�$�-�-�P����)�)�+����7�7����(�(�*�d�m�m�;�;�;��a�&�������������5����2s�Dc���URSnURSnUR5n[R"U5nX`lURRURR5 URRn[U5[U5:XdeU(a$USSUSSS-4nURU5 URX5XF5Hxn	URX�5n
URS==[U
5-
ss'URS==S-
ss'U=R U
-
slUcMeUR#X$XiU
5 Mz g)a{calculate fixups needed by examining the differences between
self.fctxs[-1] and targetfctx, chunk by chunk.

targetfctx is the target state we move towards. we may or may not be
able to get there because not all modified chunks can be amended into
a non-public fctx unambiguously.

call this only once, before apply().

update self.fixups, self.chunkstats, and self.targetlines.
r`rrUN)r�r�rEr
r�r�r�annotate�maxrev�annotateresultrXrN�_alldiffchunks�_analysediffchunkr��boolr��_showchanges)r?�
targetfctx�fm�a�alines�b�blines�	annotated�dummyendline�chunk�	newfixupss           r)�diffwith�filefixupstate.diffwithHs1��
�M�M�"����"�"�2�&���O�O����$�$�Q�'��!�������d�l�l�1�1�2��L�L�/�/�	��9�~��V��,�,�,��%�b�M�!�,�i��m�A�.>��.B�C�L����\�*��(�(��v�>�E��.�.�u�@�I��O�O�A��$�y�/�1���O�O�A��!�#���K�K�9�$�K��~��!�!�"�f�Y�G�
?r,c
�:�[UR5H�upp4nURXEnURR(ai[US-
S5S-nURR
[S5[URUR55X#[U54-5 URRXX4U5 M� URRSS5(aUR!5UlgUR%5Ulg)z~apply self.fixups. update self.linelog, self.finalcontents.

call this only once, before getfinalcontent(), after diffwith().
rUr�s%s: chunk %d:%d -> %d lines
�
edit_linesFN)rbr�r�r�r5�max�writerrrgrIrXr�replacelinesr��get�_checkoutlinelogwitheditsr�r�)r?�rev�a1�a2�b1�b2r��idxs        r)�apply�filefixupstate.applyks���$,�D�K�K�#8��C�R�R��%�%�b�,�F��w�w� � ��3��7�A��1�,�����
�
��6�7��T�Z�Z��_�1�1�3�4�b�c�&�k�J�K��
�L�L�%�%�c�r�r�:�$9��9�9�=�=��u�-�-�!%�!?�!?�!A�D��!%�!6�!6�!8�D�r,c�V�URRU5nURU$)z@(fctx) -> str. get modified file content for a given filecontext)rg�indexr�)r?rjr�s   r)�getfinalcontent�filefixupstate.getfinalcontent�s'���j�j���t�$���!�!�#�&�&r,c�r�Uup4pVX#UnU(d9U(a2U[SUS-
51nUV	s/sHo�U	SS:wdMX)PM nn	[UV
Vs1sHup�U
iM	 snn
5n/n
[U5S:Xa?URX4S-
S5(a%USnUS:�aUS-nU
R	X�XEU45 OcXC-
Xe-
:XdXV:XaT[X45HEn	X)unnUS:�dMXV:XaS=nnOXY-U-
nUS-nUS-nU
R	X�U	S-UU45 MG UR
U
5$s sn	fs snn
f)aEanalyse a different chunk and return new fixups found

return [] if no lines from the chunk can be safely applied.

the chunk (or lines) cannot be safely applied, if, for example:
  - the modified (deleted) lines belong to a public changeset
    (self.fctxs[0])
  - the chunk is a pure insertion and the adjacent lines (at most 2
    lines) belong to different non-public changesets, or do not belong
    to any non-public changesets.
  - the chunk is modifying lines from different changesets.
    in this case, if the number of lines deleted equals to the number
    of lines added, assume it's a simple 1:1 map (could be wrong).
    otherwise, give up.
  - the chunk is modifying lines from a single non-public changeset,
    but other revisions touch the area as well. i.e. the lines are
    not continuous as seen from the linelog.
rrUT)r��listrX�
_iscontinuousrN�range�_optimizefixups)r?r�r�r�r�r�r��involved�nearbylinenums�i�r�l�involvedrevsr�r��fixuprev�linenum�nb1�nb2s                   r)r�� filefixupstate._analysediffchunk�sf��&������#���I�!�#�a��a��.�1�N�&4��&4��!��Q��1�8L��	��n�
���8�4�8�4�1�Q�8�4�5���	��|���!�d�&8�&8��!�V�T�&J�&J��q�/�C��Q�w���7��� � �(���!;�<��
�W���
�2�8��2�]��(�|���W���7��x�$%�
��c� �f�r�k��!�A�g��"�Q�w�H��$�$�h�1�q�5�#�s�%C�D�#��#�#�I�.�.��/��5s�D.�D.�D3
c#�d# �[R"XX#S9nUHupVUS:waM
Uv� M g7f)z5like mdiff.allblocks, but only care about differences)�lines1�lines2�!N)r
�	allblocks)r�r�r�r��blocksr��btypes       r)r��filefixupstate._alldiffchunks�s2�������f�D��"�L�E���}���K�#�s�.0c	�T�[R"5nS/p2[[UR55HmnURUURUpeUS-S-nURX%X65n[
[U55Hup�p�URXyX�U5 M XVp2Mo U$)zncalculate the initial linelog based on self.content{,line}s.
this is similar to running a partial "annotate".
r,r�rU)	rr�rXr�r�r�rbr�r�)
r?�llogr�r�r�r�r��llrev�chunksr�r�r�r�s
             r)r��filefixupstate._buildlinelog�s������ ����6��s�4�=�=�)�*�A��
�
�a�(�$�*;�*;�A�*>�v���E�A�I�E��(�(��v�>�F�"*�4��<�"8�����!�!�%�R�R�8�#9��v�
+��r,c�.�/n[[UR55HpnUS-S-nURR	U5 SR[
URURR55nURU5 Mr U$)z1() -> [str]. check out file contents from linelogrUr�r,)
r�rXr�rr��join�map�_getliner�rN)r?r�r�r�rys     r)r��filefixupstate._checkoutlinelog�st�����s�4�=�=�)�*�A��q�5�A�+�C��L�L�!�!�#�&��h�h�s�4�=�=�$�,�,�2M�2M�N�O�G��O�O�G�$�	+�
�r,c��URR5n[S5URSR	5-n[UR5VVs/sHup4[
U[5(aMX44PM! nnn[U5HjunupdU[S5SU-S[U5U-
S--[UR55UR5RSS5S4--
nMl U[S	5S[U5---
n[S
5nUHVup4URRUS-S-5 URRHnXxR!U5 M MX UHJnUSS
R#UVV	s/sHup9X7U;aSOSPM sn	n5UR%U54--
nML UR&R)US
SS9n
U
(d[*R,"[S55eS
/[UR5-nSnU[U5-S-n
[.R0"U
5H�nUR3S5(aMX�S-
U
S-S:wa"[*R,"[S5U-5eX�S-Sn[[4R6"X�U
S-
55Hup?US:XdM
X�US==U-
ss'M! M� X�:wa	SS/UlU$s snnfs sn	nf)z&() -> [str]. prompt all lines for editsZHG: editing %s
HG: "y" means the line to the right exists in the changeset to the top
HG:
r`sHG: %s/%s %s %s
�|�-rU�
rsHG: %s
c��[5$r%)rLr&r,r)�<lambda>�:filefixupstate._checkoutlinelogwithedits.<locals>.<lambda>�s��c�er,r�s    %s : %sr,�y� r)�actionsempty editor text�sHG:s : smalformed line: %sN)r�getalllinesrrgre�	enumerate�
isinstancer:rXrrIr��split�defaultdictr�r�rMr�r�r��editr�
InputErrorr
r��
startswithr�bytestrr�)r?�alllines�
editortextr�r��visiblefctxs�j�linesetr��_f�
editedtextr��
leftpadpos�colonpos�linecontent�chs                r)r��(filefixupstate._checkoutlinelogwithedits�s���<�<�+�+�-��
�=�
��j�j��n�!�!�#�	
$�	�"�$�*�*�-�
�-����a�!1�2�
�Q�F�-�	�
�
#�<�0�I�A�v���!�0�1��q����L�)�A�-��1�2��a�f�f�h���
�
��%�%�e�Q�/��2�	5��
�J�1�	�a��n��s�<�/@�(@�A�A�
��m�,�� �D�A��L�L�!�!�1�q�5�A�+�.��\�\�0�0���
���q�!�1�!�
�A��.����&2��%1�E�A�"#�a�j���d�:�%1����
�
�a� �,��
�J���W�W�\�\�*�c�)�\�D�
���"�"�1�%9�#:�;�;��5�3�t�z�z�?�*���
���L� 1�1�A�5���$�$�Z�0�A��|�|�F�#�#���A���1��-��7��&�&�q�)>�'?�!�'C�D�D��q�L�N�+�K�"�� � ���1��!=�>������:��!�_�Q�/�0�K�?�0�	�
1��#� �!�f�D�O����m
��0s�L�;L�L	c�f�Uup#US-(aURUS-U$URU$)z@((rev, linenum)) -> str. convert rev+line number to line contentrUr�)r�r�)r?�lineinfor�r�s    r)r��filefixupstate._getlines;�������7��$�$�S�A�X�.�w�7�7��#�#�G�,�,r,c���X:�agURnURU5nURU5[U5-nURXV5n[	U5X!-
[U5-:H$)z�(a1, a2 : int) -> bool

check if these lines are continuous. i.e. no other insertions or
deletions (from other revisions) among these lines.

closedinterval decides whether a2 should be included or not. i.e. is
it [a1, a2), or [a1, a2] ?
T)r�	getoffset�intr�rX)r?r�r��closedintervalr��offset1�offset2�linesinbetweens        r)r��filefixupstate._iscontinuous&sg���8���|�|���.�.��$���.�.��$�s�>�':�:���)�)�'�;���>�"�b�g��N�0C�&C�C�Cr,c�L^
^�/m/SQ/m
U
U4Sjn[U5H}up4UupVpxn	T
SSn
T
SSnT
SSnXk:Xa@X�:Xa;XZ:Xa6UR[US-
S5U5(aUT
SS'U	T
SS'MhU"5 [U5T
S'M U"5 T$)zh[(rev, a1, a2, b1, b2)] -> [(rev, a1, a2, b1, b2)].
merge adjacent fixups to make them less fragmented.
)r`r`r`r`r`c�Z>�TSSS:waTR[TS55 gg)Nrr`)rN�tuple)�
pcurrentchunkrQs��r)�	pushchunk�1filefixupstate._optimizefixups.<locals>.pushchunk>s0����Q���"�b�(��
�
�e�M�!�$4�5�6�)r,rr�r�rU)r�r�r�r�)r?r�rr�r�r�r�r�r�r��lastrev�lasta2�lastb2rrQs             @@r)r��filefixupstate._optimizefixups7s������-�.�
�	7�"�&�)�H�A�"'��C�R�R�#�A�&�q�)�G�"�1�%�a�(�F�"�1�%�a�(�F����L��N��&�&�s�2��6�1�~�r�:�:�')�
�a� ��#�&(�
�a� ��#���#'��;�
�a� �!*�"	���
r,c
�L^^�SnUupxp�S/X�-
-S/X�-
-p�UH]up�nnn[X�5Hn[U
S5S-
S-UUU-
'M [UU5Hn[U
S5S-
S-UUU	-
'M M_ TR5 TRSSSXxU-
X�U	-
4-SS	9 TR	TR
SS
9 UU4Sjn[Xx5HnU"UUU-
SU"UU5S
S5 M  [X�5HnU"UUU	-
SU"UU5SS5 M  g)Nc�<�URS5(aUSSnU$)Nr�r`)�endswith)�lines r)�trim�)filefixupstate._showchanges.<locals>.trimWs!���}�}�U�#�#��C�R�y���Kr,rrUr�shunks        %s
s@@ -%d,%d +%d,%d @@s	diff.hunk��label�re�linetypec�j>�TR5 SnU(aWTRUnTRUS9 UR5nTRRUR
55 TRSSUSS9 TRSU-SUUUS9 TRTRUS	9 g)
Nr,)rj�node�%-7.7s rr#s	diffchar s%s%s
r%)
�	startitemrgr	rr�rM�	changectxr�rEre)	r��diffcharr r&�	linelabelrIr]r�r?s	       ��r)�	writeline�.filefixupstate._showchanges.<locals>.writelineos�����L�L�N��D���j�j��o���
�
��
�$��w�w�y��� � �$�$�S�]�]�_�5��H�H�W�j�$�n�H�E��H�H��x�'�����
�
�
�G�G����X�G�6r,r�sdeletedsdiff.deleted�+sinserteds
diff.inserted)r�r�r*r�rEre)r?r�r�r�r�r�r!r�r�r�r��aidxs�bidxsr��fa1�fa2�fb1�fb2r�r.s``                  r)r��filefixupstate._showchangesVsV���	������s�b�g����r�w��u�'-�#�C�c�3���3�_��!$�S�!��q��Q� 6��a�"�f�
�%��3��_��!$�S�!��q��Q� 6��a�"�f�
�%�(.�	����
�����"�b�r�'�2�B�w�%?�?��		�	
�	���T�Y�Y���1�	7�$�r��A���a�"�f�
���V�A�Y����
���r��A���a�"�f�
���V�A�Y��� �
�r,)r�r�r�r�rgr�r�rr�rer�r�r%)F)r0r1r2r3r4rAr�r�r�r��staticmethodr�r�r�r�r�r�r�r�r8r&r,r)r�r�s]���*!�2!H�F9�*'�
1/�f����
��B�H-�D�"�>:r,r�c���\rSrSrSrSSjrSSjrSr\S5r	Sr
S	rS
rSr
SrS
rSr\SSj5rSSjr\R*S5rSr\R*S5rSrg)�
fixupstatei�aBstate needed to run absorb

internally, it keeps paths and filefixupstates.

a typical use is like filefixupstates:

    1. call diffwith, to calculate fixups
    2. (optionally), present fixups to the user, or edit fixups
    3. call apply, to apply changes to memory
    4. call commit, to commit changes to hg database
Nc��U(deU=(d
 [5UlX0lXlUSR	5R5Ul/UlSUl0Ul0Ul	0Ul
SUl[5Ul
g)z�([ctx], ui or None) -> None

stack: should be linear, and sorted by topo order - oldest first.
all commits in stack are considered mutable.
r`N)r!r�r�rdr@�
unfiltered�paths�statusrh�fixupmap�
replacemap�	finalnoderLr�)r?rdr�r�s    r)rA�fixupstate.__init__�ss����u��.������	��
��"�I�N�N�$�/�/�1��	���
���������
��������5��r,c�D�URSRX5Ul/UlURR	S5nURR
(dU(aU(aUR
5nOURR
n[5n[U5GHqnURRSU-5 Xn[URXv5up�[SU/U	-55(aM[UR5U	SR5:Xa	U(dM�URU	SS5 X�RU'[!X�4SUR0URD6nUbBUR#5 UR%S5 UR'S	S
USS9 URS	S
9 UR)X�5 X�R*U'URR-U5 UR.RUR.5 GMt g)z9diff and prepare fixups. update self.fixupmap, self.pathsr`r�scalculating fixups for %s
c3��# �UHWn[U[5(aMUR5=(d$ [R"UR55v� MY g7fr%)r�r:rwr�binaryrE)�.0r�s  r)�	<genexpr>�&fixupstate.diffwith.<locals>.<genexpr>�sC����-�A�!�!�%5�6�:����
�9�j�/�/�����9�9�-�s�A!�AA!rUNr�sshowing changes for spath�%s
rr#�r&)rdr>r=r�r��modifiedrrL�sortedr��debugrl�anyrE�updaterhr�r*�plainr�r�r?rNr�)r?�	targetctx�matchr��editopt�interestingpathsrfrer�rg�ctx2fctx�fstates            r)r��fixupstate.diffwith�s����j�j��n�+�+�I�=�����
��)�)�-�-��-���{�{�#�#��E�$�{�{�}��#�{�{�3�3���E�	��+�,�D��G�G�M�M�8�4�?�@�"��J�*�4�:�:�t�G�O�E���$���-����
���� �E�"�I�N�N�$4�4�W�����U�1�2�Y�'�!)�L�L���#�E�I�D�G�G�I�t�y�y�I�F��~��������0�1�����'�4�~��F������)��O�O�J�+�"(�M�M�$���J�J���d�#����#�#�F�$6�$6�7�1-r,c���URR5HWupURR(a'URR	[S5U-5 UR
5 MY g)z*apply fixups to individual filefixupstatessapplying fixups to %s
N)r?�itemsr�r5r�rr��r?re�states   r)r��fixupstate.apply�sL���=�=�.�.�0�K�D��w�w� � ����
�
�a� :�;�d�B�C��K�K�M�1r,c��URR5VVs0sHupXR_M snn$s snnf)z>-> {path: chunkstats}. collect chunkstats from filefixupstates)r?rYr�rZs   r)r��fixupstate.chunkstats�s6��;?�-�-�:M�:M�:O�P�:O�;�4��&�&�&�:O�P�P��Ps�:c�r�URRS5nUR5 URU5 URSR	5UR
;aUR
5 UR5 SSS5 UR$!,(df   UR$=f)z6commit changes. update self.finalnode, self.replacemapr�.N)	r@�transaction�_commitstack�_movebookmarksrIr@�_moveworkingdirectoryparent�_cleanupoldcommitsrA)r?�trs  r)�commit�fixupstate.commit�s���
�Y�Y�
"�
"�9�
-����������#��y�y���#�#�%����8��0�0�2��#�#�%�.��~�~��
.�
-��~�~��s�A-B�
B6c�^�URnURnUR(aKUR5H6up4US(dMUR	[S5X4SUS4-5 M8 gUR(d=UR5mU4SjS5upVUR	[S5XV4-5 gg)z+print things like '1 of 2 chunk(s) applied'rs%s: %d of %d chunk(s) applied
rUc3�P>^# �UHm[U4SjT55v� M g7f)c3�,># �UH	oTv� M g7fr%r&)rF�sr�s  �r)rG�7fixupstate.printchunkstats.<locals>.<genexpr>.<genexpr>s����!6��1�A�$��s�N)�sum)rFr��statss @�r)rG�-fixupstate.printchunkstats.<locals>.<genexpr>s����G��1�c�!6��!6�6�6��s�"&)rrUs%d of %d chunk(s) applied
N)r�r�r6rYr�rr7�values)r?r�r�re�stat�applied�totalros       @r)�printchunkstats�fixupstate.printchunkstats�s����
�W�W���_�_�
�
�:�:�(�.�.�0�
����7�7��H�H��<�=��a��$�q�'�2�3��1�����%�%�'�E�G��G�N�G��H�H�Q�5�6�'�9I�I�J�	r,c��SnSnURGH�nURU5nU(dU(dUnM'UR5=(a URXCU5nUR(a0U(a)SUR
UR
5'[S5nO�URXCUS9nURUnUnUR
5UR
UR
5'U(a>U(a[S5nO[S5nU[U5URU54-nO[S5URU5-nURR(dGM]U(dGMgURR[S5URU5U4-5 GM� U=(a UR
5Ulg)zvmake new commits. update self.finalnode, self.replacemap.
it is splitted from "commit" to avoid too much indentation.
Nsbecame empty and was dropped)ras&%d file(s) changed, became empty as %ss%d file(s) changed, became %ss	became %ss%s: %s
)rd�_getnewfilecontentsr�_willbecomenoop�skip_empty_successorr@rIr�
_commitsingler@rX�_ctx2strr�r6r�rA)r?�
lastcommitted�nextp1r]rs�willbecomenoop�msg�nodestrs        r)rb�fixupstate._commitstacksx��
�
����:�:�C�!�5�5�c�:�N�!�-���� �Y�Y�[��T�-A�-A��V�.�N��(�(�^�.2�������
�+��7�8���,�,�^�V�,�L�� $�	�	�'� 2�
�&��.;�.@�.@�.B�������
�+�!�%�� I�J��� @�A����N�+��
�
�m�4�!��C�
�L�/�D�M�M�-�,H�H�C��w�w����3�3����
�
�a��n��
�
�c�0B�C�/H�H�I�?�@'�?�=�+=�+=�+?��r,c���URR(a#SUR5UR54-$SUR5[	UR554-$)Ns%d:%s)r�r5r�rrrI)r?r]s  r)r|�fixupstate._ctx2str2sL���7�7����s�w�w�y�#�'�'�)�4�4�4��s�w�w�y�%����
�*;�<�<�<r,c���0nURHdnURUnX;aMXAnUR5nURUR	U5nXg:wdMRXrUR5'Mf U$)z~(ctx) -> {path: str}

fetch file contents from filefixupstates.
return the working copy overrides - files different from ctx.
)r=rhrEr?r�re)r?r]rQrerUrjry�
newcontents        r)rx�fixupstate._getnewfilecontents8st�����J�J�D��|�|�D�)�H��"���=�D��i�i�k�G����t�,�<�<�T�B�J��$�&0�t�y�y�{�#���
r,c��URnURR5VVs/sH&up4X@R;dMX0RU4PM( nnn/nUH�up4U(acUR	X445 UR
R(a4UR
R[S5U[U54-5 MmMoUR	US45 UR
R(dM�UR
R[S5U-5 M� URRX!U5 gs snnf)Nsmoving bookmark %s to %s
sdeleting bookmark %s
)r@�
_bookmarksrYr@rNr�r6r�rr�applychanges)r?rfr@r-�hsh�
needupdate�changess       r)rc�fixupstate._movebookmarksJs���y�y��"�_�_�2�2�4�
�4�	���o�o�%�
)�T�?�?�3�'�(�4�	�
�
��#�I�D������{�+��7�7�?�?��G�G�M�M��7�8�D�#�c�(�;K�K��#�
����d�|�,��7�7�?�?�?��G�G�M�M�!�$=�">��"E�F�$�	
���$�$�T�w�7��#
s�E�Ec��^^�UR(dgURRSURR	55nURUR5nUR
5UlOURURnURRmSnUn[TS5(a.TRRmUU4SjnUTRl
TRUR5 TRUR
5UR5UR5 SSS5 U"5 g!,(df   N=f!U"5 f=f)Nsmax(::. - %ln)c��g)Nrr&r&r,r)r��8fixupstate._moveworkingdirectoryparent.<locals>.<lambda>ks��qr,�_fsmonitorstatec�(>�TTRlgr%)r��
invalidate)�bak�dirstates��r)�restore�7fixupstate._moveworkingdirectoryparent.<locals>.restoreps���69��(�(�3r,)rAr@�revsr@�keys�firstrIr��hasattrr�r��changing_parents�rebuild�manifestr=)r?r�r]�noopr�r�r�s     @@r)rd�&fixupstate._moveworkingdirectoryparent_s����~�~��9�9�>�>�"3�T�_�_�5I�5I�5K�L�D��)�)�D�J�J�L�)�C� �X�X�Z�D�N��)�)�D�N�N�+�C��9�9�%�%�������8�.�/�/��*�*�5�5�C�
:�37�H�$�$�/�	��*�*�4�9�9�5�� � �����S�\�\�^�T�Z�Z�H�6�
�I�6�5��
�I�s$�/E%�
:E�E%�
E"�E%�%	E.c�(�U(d%UR5n[U5S:wagUSnUR5UR5:wagUR5R	S5(ag[UR
55R[U55(dgUR5HSupEXB;dXA;a gXnX$nUR5UR5:wa gUR5U:wdMS g g)z�({path: content}, ctx, ctx) -> bool. test if a commit will be noop

if it will become an empty commit (does not change anything, after the
memworkingcopy overrides), return True. otherwise return False.
rUFrscloseT)rYrXr�r�r�rLr�issubsetrY�flagsrE)rsr]rirYreryrj�pfctxs        r)ry�fixupstate._willbecomenoopzs�����k�k�m�G��7�|�q� ���1�:�D��:�:�<�4�;�;�=�(���9�9�;�?�?�8�$�$���3�9�9�;��(�(��^�)<�=�=��+�1�1�3�M�D���4�?���9�D��J�E��{�{�}��
�
��,���z�z�|�w�&��4�r,c
���U=(a X0RR4nUR5nUR(a4URRSS5(aUR
5US'[R"UR5UR5URR5VVs0sHupgXg/_M
 snn5n[XXEUS9n	U	R5$s snnf)z�(ctx, {path: content}, node) -> node. make a single commit

the commit is a clone from ctx, with a (optionally) different p1, and
different file contents replaced by memworkingcopy.
rrs
absorb_source)r�r�)r@rHr��_useobsoleter��
configboolrr�update_hash_refsr�r@rYr�rg)
r?rsr]rarYr��oldnode�newnoder��mctxs
          r)r{�fixupstate._commitsingle�s����/�"�i�i�.�.�/���	�	���������!3�!3�I�|�!L�!L�&)�g�g�i�E�"�#��+�+��H�H�J��O�O��)-���(=�(=�(?�
�(?�$�G���"�(?�
�
�����D�
���{�{�}���
s�C3c�`�[R"UR[R5$)z
() -> bool)r�	isenabledr@�createmarkersoptrDs r)r��fixupstate._useobsolete�s!���!�!�$�)�)�X�-F�-F�G�Gr,c���URR5VVs0sH
upXbU/O/_M nnnU(a"[R"URUSSS9 ggs snnf)NrT)�	operation�fixphase)r@rYr�cleanupnodesr@)r?�k�v�replacementss    r)re�fixupstate._cleanupoldcommits�sh�����-�-�/�
�/���
�}���"�,�/�	�
��� � ��	�	�<�9�t�
���	
s�Ac�D�[R"URS5$)Nr)rrzr�rDs r)rz�fixupstate.skip_empty_successor�s���/�/�����C�Cr,)r�rhrAr?r�r=r@r@rdr>r�r%�NN)r0r1r2r3r4rAr�r��propertyr�rgrurbr|rxrcrdr8ryr{r�
propertycacher�rerzr8r&r,r)r:r:�s���
�!�*(8�T��Q��Q��K�$)@�V=��$8�*�6����:�0
���H��H��
���D��Dr,r:c��[U5[R[R4;agUR
R
5nUR[UR5-S-
n/=Ul	Ul
[R"5nURU5 [R"UR!55nX R"-nUSSVs/sHofR%S5(aMUSSPM! nnXXW44$s snf)zA(crecord.uihunk or patch.recordhunk) -> (path, (a1, a2, [bline]))r�rUNr�)�typer
�uihunkr�
recordhunk�header�filename�fromlinerX�before�afterr�stringior�r
r��getvalue�removedr�)�hunkrer��buf�
patchlinesr�r�r�s        r)�_parsechunkr��s����D�z�'�.�.�%�*:�*:�;�;���;�;���!�D�	
����T�[�[�)�	)�A�	-�B�!�!�D�K�$�*�
�-�-�/�C��J�J�s�O��$�$�S�\�\�^�4�J�	�l�l�	�B�'���^�
F�^��<�<��3E�e�a���e�^�F�
F��b�!�!�!��Gs�D�8	Dc��0n[S5n[[U5H(upEU(aU(dMX4RU5 M* UR	5HjupFX@;dU(dMURSS9 [R"XR55nUH	up�n
X�X�&M SRU5X$'Ml [X 5$)z�(ctx, [crecord.uihunk]) -> memctx

return a memctx with some [1] patches (chunks) applied to ctx.
[1]: modifications are handled. renames, mode changes, etc. are ignored.
c��/$r%r&r&r,r)r��$overlaydiffcontext.<locals>.<lambda>�s��2r,T)rZr,)r�r�r�rNrY�sortr
r�rEr�r�)r]r�rs�patchmapre�info�patches�linesr�r�r�s           r)�overlaydiffcontextr��s����N��:�&�H��+�v�.�
���4������d�#�/�"���)�
���?�'�����T��"��#�#�C�I�N�N�$4�5��%�N�B�F�!�"�L�&�"�x�x�����*��.�.�.r,c���Uc�URSS5nUSn[UR55S:�a[R"[S55e[
Xv5nU(a,[U5U:�aUR[S5U-5 U(d[R"[S55eUcUSnUcS	n[U4S
U0UD6n[R"X4[R"U55n	URS5(av[R"XSR!5UR!5U	5n
[R""U
5n[$R&"XU	5S
n[)USU5nURS5(aSUS'Sn
URS5(dURS5(d&UR+S[R"U55n
UR-X9U
5 U
b�U
R/5 U
R1SS[UR255 U
R5SS9 [7U5H�nX�R2;aMU
R/5 U
R9US9 U
R5SS9 U
R1SSUR;5SS9 [<R>"URA55nU
R1SSUSS9 M� U
RC5 URS5(d�URS5(dEUR2(a4URES SS!9(a[RF"[S"55eURI5 URK5(aURM5 U$URN(dUR1[S#55 U$)$z�pick fixup chunks from targetctx, apply them to stack.

if targetctx is None, the working copy context will be used.
if stack is None, the current draft stack will be used.
return fixupstate.
Nrrr`rUscannot absorb into a merges7absorb: only the recent %d changesets will be analysed
sno mutable changeset to changer&r��interactiver`rr�T�
apply_changes�
print_changesscounts
%d changesets affected
ssummaryrJ)r]s	changesetr(r)rr#s
descfirstlinerIr�dry_runs#apply changes (y/N)? $$ &Yes $$ &Norsabsorb cancelled
snothing applied
)(�	configintrXrYrr�rr^�warnr:rrRr�byteskwargsr�r�diffrI�
parsepatchr�recordfilterr��	formatterr�r*r�r�rErbr	rr�	firstliner��end�promptchoice�
CanceledErrorr�rgrur7)r�r@rdrQ�patsr�r\r[r[�matcherr��
origchunksr�r�r]�
descfirstlines                r)�absorbr��s2��
�}����Y�(9�:���t�*���w��� �!�A�%��"�"�1�%B�#C�D�D��g�-���S��Z�5�(��G�G��%���	�
�����q�!B�C�D�D�����J�	��|����u�,��,�t�,�E��m�m�I�X�-A�-A�$�-G�H�G��x�x�
����z�z�$�b�	��� 0�)�.�.�2B�G�L���%�%�d�+�
��%�%�b�g�>�q�A��&�u�R�y�&�9�	��x�x����!%��_��	
�B��x�x�� � �����(A�(A�
�\�\�)�X�%9�%9�$�%?�
@��	�N�N�9�r�*�	�~�
����
����3�S��9J�9J�5K�	
�	�����$��E�?�C��+�+�+���L�L�N��J�J�3�J���G�G�\�G�*��H�H�W�j�#�'�'�)�>�H�J�&�0�0����1B�C�M��H�H� ���+�	
�
�#�	�����8�8�I�������)�)��!�!����6�� ���%�%�a�(=�&>�?�?�
���
��<�<�>�>��!�!�#��L�����H�H�Q�+�,�-��Lr,�as
apply-changess0apply changes without prompting for confirmation�ps
print-changess;always print which changesets are modified by which changes�isinteractives*interactively select which chunks to apply�es
edit-linessGedit what lines belong to which changesets before commit (EXPERIMENTAL)shg absorb [OPTION] [FILE]...)�helpcategory�	helpbasicc��UR5 UR5 US(d[R"U5 [	X4SU0UD6n[SURR555S:XaSSS5 SSS5 gSSS5 SSS5 g!,(df   N=f!,(df   g=f)a�incorporate corrections into the stack of draft changesets

absorb analyzes each change in your working directory and attempts to
amend the changed lines into the changesets in your stack that first
introduced those lines.

If absorb cannot find an unambiguous changeset to amend for a change,
that change will be left in the working directory, untouched. They can be
observed by :hg:`status` or :hg:`diff` afterwards. In other words,
absorb does not write to the working directory.

Changesets outside the revset `::. and not public() and not merge()` will
not be changed.

Changesets that become empty after applying the changes will be deleted.

By default, absorb will show what it plans to do and prompt for
confirmation.  If you are confident that the changes will be absorbed
to the correct place, run :hg:`absorb -a` to apply the changes
immediately.

Returns 0 on success, 1 if all chunks were ignored and nothing amended.
r�r�c3�*# �UH	oSv� M g7f)rNr&)rFrls  r)rG�absorbcmd.<locals>.<genexpr>�s���7�6���t�6�s�rNrU)�wlock�lockr�checkunfinishedr�rnr�rq)r�r@r�r�r[s     r)�	absorbcmdr�Gs���|
����t�y�y�{��I���#�#�D�)��r�3�d�3�d�3���7�U�-�-�4�4�6�7�7�1�<��
#���
=�#���{�{����s)�B4�AB#�B4�B4�#
B1	�-B4�4
Cr%rv)4r4�
__future__r�collections�mercurial.i18nr�mercurial.noderr�	mercurialrrr	r
rrr
rrrrrrrr�mercurial.utilsr�
testedwith�cmdtable�command�configtable�
configitem�
colortabler�r!r:rSr^rl�	filestorernr�r�r:r�r�r��
dryrunopts�templateopts�walkopts�CATEGORY_COMMITTINGr�r&r,r)�<module>rs����4#���������"'�#�
�
��
�
�
�H�
%����
�
!�
!�+�
.�
�
�9�l�D�1�
�9�m�T�2�
�9�'��4�%� ���
��%�%����
!�
!���.O �d#�5�?�?�#�.�8w�w�tnD�nD�b	"�"/�@O�d	�
�
���
�A�B�		
�
���
�L�M�		
�
���
�;�<�		
�
���
�"�
�		
�'�:���;�<���=�>���?�@�%�&��,�,��I%�L�M%�Lr,

Youez - 2016 - github.com/yon3zu
LinuXploit