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/usr/lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

6�h���.�SSKJr SSKrSSKrSSKrSSKJr SSKJrJ	r	J
r
 SSKJrJ
r
JrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJ r  SSK!J"r# SSK$J%r%J&r& SS	K'J(r( \ RRr)"S
S5r*"SS
\*5r+"SS5r,"SS\,5r-"SS\*5r."SS\.5r/"SS\,5r0"SS\05r1"SS\.5r2"SS\05r3"SS\/5r4S r5S!r6S"r7"S#S$\.5r8"S%S&\05r9"S'S(\.5r:"S)S*5r;g)+�)�annotationsN�)�_)�hex�nullrev�short)�dagop�encoding�error�fileset�match�
mergestate�metadata�obsolete�patch�pathutil�phases�repoview�scmutil�sparse�subrepo�subrepoutil�testing�util)�status)�dateutil�
stringutil)�	timestampc���\rSrSrSrSrSr\R"\5r	Sr
SrSrSr
S	rS
rSrSrS5S
jr\S5rSrSrSrSrSrSrSrSrSrS6SjrSrSr Sr!Sr"Sr#Sr$S r%S!r&S"r'S#r(S$r)S%r*S&r+\S'5r,S(r-S)r.S7S*jr/S+r0S,r1S8S-jr2S9S.jr3S/r4S0r5S:S5S1jjr6S;S2jr7S3r8S4r9g)<�basectx�6a5A basectx object represents the common logic for its children:
changectx: read-only context that is already present in the repo,
workingctx: a context that represents the working directory and can
            be committed,
memctx: a context that represents changes in-memory and can also
        be committed.c��Xlg�N��_repo��self�repos  �3/usr/lib/python3/dist-packages/mercurial/context.py�__init__�basectx.__init__>s���
�c�4�[UR55$r#)r�node�r's r)�	__bytes__�basectx.__bytes__As���T�Y�Y�[�!�!r,c�P�S[U5R<S[U5<S3$�N�<� �>��type�__name__�strr/s r)�__repr__�basectx.__repr__F��� ��J�/�/��T��;�;r,c��[U5[U5:H=(a URUR:H$![a gf=f�NF)r8�_rev�AttributeError�r'�others  r)�__eq__�basectx.__eq__Is>��	���:��e��,�H����e�j�j�1H�H���	��	�s�69�
A�Ac��X:X+$r#�rBs  r)�__ne__�basectx.__ne__O����"�"r,c��XR;$r#��	_manifest�r'�keys  r)�__contains__�basectx.__contains__Rs���n�n�$�$r,c�$�URU5$r#)�filectxrNs  r)�__getitem__�basectx.__getitem__Us���|�|�C� � r,c�,�[UR5$r#)�iterrMr/s r)�__iter__�basectx.__iter__Xs���D�N�N�#�#r,c�"�UR5$)z�Builds a manifest that includes the given status results, if this is
a working copy context. For non-working copy contexts, it just returns
the normal manifest.)�manifest)r'rs  r)�_buildstatusmanifest�basectx._buildstatusmanifest[s���}�}��r,c��U$)zVThis internal method provides a way for child objects to override the
match operator.
rG)r'rCr
s   r)�_matchstatus�basectx._matchstatusas	���r,c	��SnUR5b3UR5UR5:aURU5nURU5nUcURU5n//p�/n/nURURURp�n
[U
5nUR
XsUS9nUR5H�unnUU;aMUcURU5 M$UuunnunnUcU
RU5 MEUcURU5 M[UU:waU	RU5 MtUURRR;aU	RU5 M�UURUU5(aU	RU5 M�URU5 M� U(azUVs/sH#nUU;dMU(aU"U5(dM!UPM% nnUVs/sH#nUU;dMU(aU"U5(dM!UPM% nnUVs/sH
nUU;dMUPM nn[R"X�X�X�U5$s snfs snfs snf)z.build a status with respect to another contextN)r
�clean)�revr\�deleted�unknown�ignored�set�diff�items�appendr%�
nodeconstants�wdirfilenodeids�cmprr)r'rC�sr
�listignored�	listclean�listunknown�mf2�mf1�modified�added�removedrbrdrerf�
deletedset�d�fn�value�node1�flag1�node2�flag2s                        r)�_buildstatus�basectx._buildstatusgs)�����8�8�:�!�d�h�h�j�5�9�9�;�&>��+�+�A�.�C��(�(��+���;��+�+�A�.�C��b�%�����$%�I�I�q�y�y�!�)�)�'����\�
��H�H�S�Y�H�7������I�B���Z����}����R� ��-2�*�N�U�E�N�U�E��}����R� ������r�"��%������#��d�j�j�6�6�F�F�F�
����#��b����e�B�i�(�(�����#����R� �-#�0�"��!�B��S�=��*/�5��9��!�
��"��!�B��S�=��*/�5��9��!�
��%,�D�G�b�r��/C�r�G�G�D��~�~��W�w��
�	
����
��Es0�;
I
�	I
�I
�+
I�9I�I�
I�)Ic�V�[R"XRR5$r#)r�stater%�uir/s r)�substate�basectx.substate�s��� � ��z�z�}�}�5�5r,c�&�URUS$�Nr)r��r'�subpaths  r)�subrev�basectx.subrev�s���}�}�W�%�a�(�(r,c��UR$r#)r@r/s r)rc�basectx.rev�s���y�y�r,c��UR$r#)�_noder/s r)r.�basectx.node�����z�z�r,c�4�[UR55$r#)rr.r/s r)r�basectx.hex�����4�9�9�;��r,c��UR$r#rLr/s r)r[�basectx.manifest�����~�~�r,c��UR$r#)�_manifestctxr/s r)�manifestctx�basectx.manifestctx�s��� � � r,c��UR$r#r$r/s r)r(�basectx.repo�r�r,c�D�[RUR5$r#)r�
phasenames�phaser/s r)�phasestr�basectx.phasestr�s��� � �����.�.r,c�D�UR5[R:�$r#)r�r�publicr/s r)�mutable�basectx.mutable�s���z�z�|�f�m�m�+�+r,Nc�,�[R"XX#S9$)N)�badfn)rr
)r'�cwd�exprr�s    r)�matchfileset�basectx.matchfileset�s���}�}�T��:�:r,c�f�UR5[R"URS5;$)z!True if the changeset is obsoletesobsolete�rc�obsmod�getrevsr%r/s r)r�basectx.obsolete�s"���x�x�z�V�^�^�D�J�J��D�D�Dr,c�f�UR5[R"URS5;$)z True if the changeset is extinctsextinctr�r/s r)�extinct�basectx.extinct�s"���x�x�z�V�^�^�D�J�J�
�C�C�Cr,c�f�UR5[R"URS5;$)z:True if the changeset is not obsolete, but its ancestor is�orphanr�r/s r)�orphan�basectx.orphan�s"���x�x�z�V�^�^�D�J�J�	�B�B�Br,c�f�UR5[R"URS5;$)z�True if the changeset tries to be a successor of a public changeset

Only non-public and non-obsolete changesets may be phase-divergent.
sphasedivergentr�r/s r)�phasedivergent�basectx.phasedivergent�s%��
�x�x�z�V�^�^�D�J�J�8I�J�J�Jr,c�f�UR5[R"URS5;$)z�Is a successor of a changeset with multiple possible successor sets

Only non-public and non-obsolete changesets may be content-divergent.
scontentdivergentr�r/s r)�contentdivergent�basectx.contentdivergent�s%��
�x�x�z�V�^�^�D�J�J�8K�L�L�Lr,c�~�UR5=(d' UR5=(d UR5$)zLTrue if the changeset is either orphan, phase-divergent or
content-divergent)r�r�r�r/s r)�
isunstable�basectx.isunstable�s,���{�{�}�P�� 3� 3� 5�P��9N�9N�9P�Pr,c���/nUR5(aURS5 UR5(aURS5 UR5(aURS5 U$)z�return the list of instabilities affecting this changeset.

Instabilities are returned as strings. possible values are:
- orphan,
- phase-divergent,
- content-divergent.
r�sphase-divergentscontent-divergent)r�rjr�r�)r'�
instabilitiess  r)r��basectx.instabilities�sd���
��;�;�=�=�� � ��+���� � �� � �!3�4�� � �"�"�� � �!5�6��r,c��UR$)z)return contexts for each parent changeset��_parentsr/s r)�parents�basectx.parents�s���}�}�r,c� �URS$�Nrr�r/s r)�p1�
basectx.p1�s���}�}�Q��r,c�h�URn[U5S:XaUS$UR[$)N�r)r��lenr%r)r'r�s  r)�p2�
basectx.p2s0���-�-���w�<�1���1�:���z�z�'�"�"r,c��SUR;aURRU5$SUR;dXR5;a9XR;a*URUURRU54$URRnX RRRU5up4X44$![a5 [R
"UR=(d SU[S55ef=f![a5 [R
"UR=(d SU[S55ef=f)NrMsNonesnot found in manifest�_manifestdelta)�__dict__rM�find�KeyErrorr�ManifestLookupErrorr�r�filesr��flagsr%�manifestlog�
_changesetr[)r'�path�mflr.�flags     r)�	_fileinfo�basectx._fileinfos+���$�-�-�'�
��~�~�*�*�4�0�0��t�}�}�,��
�
��0D��*�*�*��'�'��-��'�'�-�-�d�3����j�j�$�$��	��_�_�5�5�6�;�;�D�A�J�D��z���+�
��/�/��J�J�)�'�4��3K�1L���
�� �	��+�+��
�
�%�g�t�Q�/G�-H��
�	�s�C� )D�?D�?E
c�*�URU5S$r�)r��r'r�s  r)�filenode�basectx.filenode#s���~�~�d�#�A�&�&r,c�`�URU5S$![Ra gf=f)Nrr,)r�r�LookupErrorr�s  r)r��
basectx.flags&s3��	��>�>�$�'��*�*��� � �	��	�s��-�-c�.�[R"U5$r#)r�computechangesetcopiesr/s r)�_copies�basectx._copies,s���.�.�t�4�4r,c� �URS$r��r�r/s r)�p1copies�basectx.p1copies0����|�|�A��r,c� �URS$r�r�r/s r)�p2copies�basectx.p2copies3r�r,c�,�[R"XUS9$)z>return a subrepo for the stored revision of path, never wdir())�allowcreate�r)r'r�r�s   r)�sub�basectx.sub6s�����t�{�C�Cr,c�0�[R"XU5$r#)r�nullsubrepo)r'r��pctxs   r)�nullsub�basectx.nullsub:s���"�"�4�t�4�4r,c�,�[R"XSS9$)zMreturn a subrepo for the stored revision, or wdir if this is a wdir
context.
T)�	allowwdirr�r�s  r)�
workingsub�basectx.workingsub=s�����t�T�:�:r,c
��URnU(dUR5n[R"URUUUUUUR
UUUS9
$)N)�auditor�ctx�listsubreposr�)r%�getcwd�matchmodr
�root�nofsauditor)	r'�pats�include�exclude�defaultrr�r��rs	         r)r
�
basectx.matchCsR��
�J�J����(�(�*�C��~�~�
�F�F�������M�M��%��
�	
r,c
��UcUR5nUbURUn[R"URUUUUUUUUUU	S9$)z;Returns a diff generator for the given contexts and matcher)r
�changes�opts�
losedatafn�pathfn�copy�copysourcematch�
hunksfilterfn)r�r%rrh)
r'�ctx2r
rrrrrrrs
          r)rh�basectx.diff]s^���<��7�7�9�D����:�:�d�#�D��z�z��J�J������!���+�'�
�	
r,c�6�URR5$r#)rM�dirsr/s r)r�basectx.dirs|s���~�~�"�"�$�$r,c�8�URRU5$r#)rM�hasdir)r'�dirs  r)r�basectx.hasdirs���~�~�$�$�S�)�)r,c
�^�UnURUnSn	[U[5(d[U[5(aSn	X�p�URRU5nUR	Xr5n[
R"///////5n
URXzX#XE5n
U	(aD[
R"U
RU
RU
R///U
R5n
U(a�[
R"Xx5H}umnURT5n[R "TU5n
UR
UU
UUUSS9nSH4n[#X�5[#X�5nnUR%U4SjU55 M6 M U
RR'5 U
RR'5 U
RR'5 U
R(R'5 U
R*R'5 U
R,R'5 U
RR'5 U
$![a SnGN0f=f)a�return status of files between two nodes or node and working
directory.

If other is None, compare this node with working directory.

ctx1.status(ctx2) returns the status of change from ctx1 to ctx2

Returns a mercurial.scmutils.status object.

Data can be accessed using either tuple notation:

    (modified, added, removed, deleted, unknown, ignored, clean)

or direct attribute access:

    s.modified, s.added, ...
FTN)r
rfrbrer)rtrurvrdrerfrbc3�2># �UHnSTU4-v� M g7f)s%s/%sNrG)�.0�fr�s  �r)�	<genexpr>�!basectx.status.<locals>.<genexpr>�s����!J�6�a�(�g�q�\�"9�6�s�)r%�
isinstance�	changectx�narrowmatchr_rrrrtrvrurb�itersubreposr�r�r�
subdirmatcher�getattr�extend�sortrdrerf)r'rCr
rorprqr�ctx1r�reversedrr��rev2�submatchrn�k�rfiles�sfilesr�s                  @r)r�basectx.status�s����6���z�z�%� �����$�	�*�*�z�$�	�/J�/J��H��$��
�
�&�&�u�-���!�!�$�.���N�N�2�r�2�r�2�r�2�6������U��
�������
�
�A�I�I�q�w�w��B��A�G�G��A�� '� 4� 4�T� @���� ��;�;�w�/�D�$�1�1�'�5�A���J�J��"�'�#�'�!%�
����A�&-�Q�]�G�A�M�F�F��M�M�!J�6�!J�J��#!A�:	
�
�
����	������	�	�	����	�	�	����	�	�	����	�	�	����	���������E � � �D�	 �s�
H?�?I�Ic�2�[SUR-5e)z)Get a mergestate object for this context.z"%s does not implement mergestate())�NotImplementedError�	__class__�r'rbs  r)r�basectx.mergestate�s��!�0�4�>�>�A�
�	
r,c��[UR55S:�=(d] UR5UR5R5:g=(d' UR	5=(d UR5(+$r�)r�r��branchr��closesbranchr�r/s r)�isempty�basectx.isempty�sb��������!�#�
��{�{�}����	� 0� 0� 2�2�
�� � �"�
��z�z�|�	
�	
r,r$��returnzistatus.Statusr#�T�NNNsglobFNN)	NNNNNNNNN)NNFFFF�F):r9�
__module__�__qualname__�__firstlineno__�__doc__r*r0r
�	strmethod�__str__r;rDrHrPrTrXr\r_r�
propertycacher�r�rcr.rr[r�r(r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr
rhrrrrr@�__static_attributes__rGr,r)r r 6s�����"�� � ��+�G�<��#�%�!�$���@
�	�@
�D�6��6�)��� ��!��/�,�;�E�D�C�K�M�Q�
�"� �#��6'���5��5���D�5�;��������
�8���
���
���
�>%�*�
������c�
�c�J
�
r,r c�J^�\rSrSrSrS'U4SjjrSrSr\r\	S5r
\	S5r\S5r
\	S	5r\	S
5rSrSrS
rSrSrSrSrSr\	U4Sj5rSrSrSrSrSrSrSrSr Sr!Sr"Sr#Sr$S r%S(S!jr&S)S"jr'S#r(S$r)S%r*S&r+U=r,$)*r)i�z�A changecontext object makes access to data related to a particular
changeset convenient. It represents a read-only context already present in
the repo.c�H>�[TU]U5 X lX0lX@lgr#)�superr*r@r��_maybe_filtered)r'r(rcr.�maybe_filteredr:s     �r)r*�changectx.__init__�s"���
������	��
� .�r,c�d�[UR5$![a [U5s$f=fr#)�hashr@rA�idr/s r)�__hash__�changectx.__hash__s-��	���	�	�?�"���	��d�8�O�	�s��/�/c�(�UR[:g$r#)r@rr/s r)�__nonzero__�changectx.__nonzero__
s���y�y�G�#�#r,c���UR(a
URnOURR5nURR	UR55$r#)rRr%�
unfiltered�	changelog�changelogrevisionrcr&s  r)r��changectx._changesetsA������:�:�D��:�:�(�(�*�D��~�~�/�/����
�;�;r,c�6�URR5$r#)r��readr/s r)rM�changectx._manifests��� � �%�%�'�'r,c�\�URRURR$r#)r%r�r�r[r/s r)r��changectx._manifestctxs!���z�z�%�%�d�o�o�&>�&>�?�?r,c�P�URR5upUcX lU$r#)r��read_any_fast_deltarM)r'�base�deltas   r)r��changectx._manifestdelta"s'���'�'�;�;�=����<�"�N��r,c�v�URnUR(a
URnOUR5RnUR	UR
5up4U[:Xa[XURU5SS9/$[XURU5SS9[XURU5SS9/$)NF�rS)	r%rRr_r^�
parentrevsr@rr)r.)r'r(�clr�r�s     r)r��changectx._parents)s����z�z��������B����"�,�,�B����t�y�y�)���
��=��d������E�J�K�K��d������E�B��d������E�B�
�	
r,c��URnURURURURUR
UR4$r#)r�r[�user�dater��description�extra)r'�cs  r)�	changeset�changectx.changeset9s?���O�O��
�J�J�
�F�F�
�F�F�
�G�G�
�M�M�
�G�G�

�	
r,c�.�URR$r#)r�r[r/s r)�manifestnode�changectx.manifestnodeDs�����'�'�'r,c�.�URR$r#)r�rrr/s r)rr�changectx.userG������#�#�#r,c�.�URR$r#)r�rsr/s r)rs�changectx.dateJr~r,c�.�URR$r#)r�r�r/s r)r��changectx.filesMs�����$�$�$r,c���[UR55nURUR55 URUR	55 [U5$r#)rgr��difference_update�
filesadded�filesremoved�sorted)r'rts  r)�
filesmodified�changectx.filesmodifiedPsI���t�z�z�|�$���"�"�4�?�?�#4�5��"�"�4�#4�#4�#6�7��h��r,c�&�URRnSnURRS:XaSnO7URRRSS5nUS:XaSnOUS:waSnUc!U(a[R"U5nU$/nU$�NTschangeset-sidedataF�experimentalscopies.read-fromschangeset-onlys
compatibility)r�r�r%�filecopiesmoder��configr�computechangesetfilesadded)r'r��compute_on_none�sources    r)r��changectx.filesaddedVs����_�_�/�/�
����:�:�$�$�(=�=�#�O��Z�Z�]�]�)�)�/�;N�O�F��*�*�"'���+�+�!�
����%�@�@��F�
��� �
��r,c�&�URRnSnURRS:XaSnO7URRRSS5nUS:XaSnOUS:waSnUc!U(a[R"U5nU$/nU$r�)r�r�r%r�r�r�r�computechangesetfilesremoved)r'r�r�r�s    r)r��changectx.filesremovedis������3�3�����:�:�$�$�(=�=�#�O��Z�Z�]�]�)�)�/�;N�O�F��*�*�"'���+�+�#�����'�D�D�T�J���� "���r,c�R>�URRnURRnSnURRS:XaSnO8URR
R
SS5nUS:XaSnO	US:waS=pUcU(a
[TU] upOUc0nUc0nX4$r�)	r�r�r�r%r�r�r�rQr�)r'r�r�r�r�r:s     �r)r��changectx._copies|s�����?�?�+�+���?�?�+�+�����:�:�$�$�(=�=�#�O��Z�Z�]�]�)�)�/�;N�O�F��*�*�"'���+�+�&*�*�����%*�W�_�"��(��#�!�H����H��!�!r,c�.�URR$r#)r�rtr/s r)rt�changectx.description�s�����*�*�*r,c�t�[R"URRR	S55$�N�branch)r
�tolocalr�ru�getr/s r)r>�changectx.branch�s(�������� 5� 5� 9� 9�)� D�E�Er,c�4�SURR;$�Nsclose�r�rur/s r)r?�changectx.closesbranch�s���4�?�?�0�0�0�0r,c�.�URR$)z#Return a dict of extra information.r�r/s r)ru�changectx.extra�s�����$�$�$r,c�L�URRUR5$)zReturn a list of byte tag names)r%�nodetagsr�r/s r)�tags�changectx.tags�s���z�z�"�"�4�:�:�.�.r,c�L�URRUR5$)z%Return a list of byte bookmark names.)r%�
nodebookmarksr�r/s r)�	bookmarks�changectx.bookmarks�s���z�z�'�'��
�
�3�3r,c��URnUR(a
URnOUR5RnUR	UR
5$r#)r%rRr_r^�	fast_rankr@)r'r(ros   r)r��changectx.fast_rank�sB���z�z��������B����"�,�,�B��|�|�D�I�I�&�&r,c�v�URRRURUR5$r#)r%�_phasecacher�r@r/s r)r��changectx.phase�s'���z�z�%�%�+�+�D�J�J��	�	�B�Br,c�^�UR[R"URS5;$)Nsvisible)r@r�
filterrevsr%r/s r)�hidden�changectx.hidden�s"���y�y�H�/�/��
�
�J�G�G�Gr,c��gr?rGr/s r)�
isinmemory�changectx.isinmemory����r,c��URRRUR5nUVs/sHo RUPM sn$s snf)z�return list of changectx contexts for each child changeset.

This returns only the immediate child changesets. Use descendants() to
recursively walk children.
)r%r_�childrenr��r'rv�xs   r)r��changectx.children�s@��
�J�J� � �)�)�$�*�*�5��'(�)�q�!�
�
�1�
�q�)�)��)s�Ac#�# �URRRUR/5HnURUv� M g7fr#)r%r_�	ancestorsr@)r'�as  r)r��changectx.ancestors�s8������%�%�/�/�����<�A��*�*�Q�-��=���A
Ac#�# �URRRUR/5HnURUv� M g7f)zbRecursively yield all children of the changeset.

For just the immediate children, use children()
N)r%r_�descendantsr@)r'rxs  r)r��changectx.descendants�s:���
���%�%�1�1�4�9�9�+�>�A��*�*�Q�-��?�r�c�T�UcURU5n[URXXS9$)z&get a file context from this changeset)�fileidr)�filelog)r�rSr%)r'r�r�r�s    r)rS�changectx.filectx�s-���>��]�]�4�(�F���J�J��t�
�	
r,c	�^�URnUcURSRnURRR	URU5nU(d"URR
RmGO2[U5S:XaUSmGOURRRSS5H=n[R"URU5nUR5mTU;dM= O2 URRRURU5mU(a~URRR![#S5[%T5[%UR5[%U54-SR'U4Sj[)U555-5 URT$![Ra GMf=f)z�return the "best" ancestor context of self and c2

If there are multiple candidates, it will show a message and check
merge.preferancestor configuration before falling back to the
revlog ancestor.rrsmergespreferancestors(note: using %s as ancestor of %s and %s
r,c3�b># �UH$nUT:wdM[S5[U5-v� M& g7f)s:      alternatively, use --config merge.preferancestor=%s
N)rr)r$�n�ancs  �r)r&�%changectx.ancestor.<locals>.<genexpr>s=�����".�A���8�
#��9�� ��(�	#�
".�s�
/�/)r�r�r%r_�commonancestorsheadsrk�nullidr�r��
configlistr�	revsymbolr�RepoLookupErrorr.�ancestorrrr�joinr�)r'�c2�warn�n2�cahsrrr�s       @r)r��changectx.ancestor�s|����X�X��
�:����Q��%�%�B��z�z�#�#�8�8����R�H����*�*�*�*�1�1�C�
��Y�!�^��q�'�C��Z�Z�]�]�-�-�h�8I�J���!�+�+�D�J�J��:�C��h�h�j���$�;��K��j�j�*�*�3�3�D�J�J��C����
�
�
�
�$�$��F�G� ��:�u�T�Z�Z�'8�%��)�D�E��h�h��"(���
��	���z�z�#����/�,�,����s�!G�G�Gc�v�URRRURUR5$)z.True if this changeset is an ancestor of other)r%r_�
isancestorrevr@rBs  r)�isancestorof�changectx.isancestorofs'���z�z�#�#�1�1�$�)�)�U�Z�Z�H�Hr,c�^^�UU4Sjn[R"TRRT5U5nTRRU5$)�Generates matching file names.c�>^�[U4SjTR55(agTRT[S5T-5 g)Nc3�d># �UH%nTU:H=(d TRUS-5v� M' g7f)�/N)�
startswith)r$rnrys  �r)r&�.changectx.walk.<locals>.bad.<locals>.<genexpr>s*����M�}�!�2��7�5�b�m�m�A��H�5�5�}�s�-0sno such file in rev %s)�anyr��badr)ry�msgr
r's` ��r)r��changectx.walk.<locals>.bads6����M�t�}�}�M�M�M���I�I�b�!�5�6��=�>r,)r�badmatchr%r*rM�walk)r'r
r��ms``  r)r��changectx.walks@���	?�
���d�j�j�4�4�U�;�S�A���~�~�"�"�1�%�%r,c�$�URU5$r#)r��r'r
s  r)�matches�changectx.matches!s���y�y���r,)rMrRr�r@rD�NNrF)-r9rGrHrIrJr*rXr[�__bool__rMr�rM�propertyr�r�r�rwrzrrrsr�r�r�r�r�rtr>r?rur�r�r�r�r�r�r�r�r�rSr�r�r�r�rN�
__classcell__�r:s@r)r)r)�s#����
.��$��H��<��<��(��(��@��@������

��

�	
�(�$�$�%� ��&�&� "�� "�D+�F�1�%�/�4�'�C�H��*� � �
�+�ZI�&� � r,r)c���\rSrSrSr\S5r\S5r\S5r\S5r	\S5r
Sr\rS	r
\R"\
5rS
rSrSrS
rSrSr\S5rSrSrSrSrSrSrSrSrSr Sr!Sr"Sr#Sr$Sr%Sr&S r'S!r(S"r)S#r*S$r+S%r,S&r-S'r.S(r/S)r0S*r1S+r2S,r3S-r4S<S/jr5S0r6S1r7S=S2jr8S3r9S4r:S5r;S6r<S7r=S>S8jr>S?S9jr?S:r@S;rAg.)@�basefilectxi%a8A filecontext object represents the common logic for its children:
filectx: read-only access to a filerevision that is already present
         in the repo,
workingfilectx: a filecontext that represents files from the working
                directory,
memfilectx: a filecontext that represents files in-memory,
c�L�URRUR5$r#)r%�file�_pathr/s r)�_filelog�basefilectx._filelog.s���z�z���t�z�z�*�*r,c��SUR;aURR5$SUR;aURUR5$UR
R
UR5$)N�
_changectx�_descendantrev)r�rrc�_adjustlinkrevrr��linkrev�_filerevr/s r)�	_changeid�basefilectx._changeid2s_���4�=�=�(��?�?�&�&�(�(�
����
.��&�&�t�':�':�;�;��=�=�(�(����7�7r,c��SUR;a%URRUR5$URRUR5$)N�_fileid)r�r��lookupr
rr�r�r/s r)�	_filenode�basefilectx._filenode=s@����
�
�%��=�=�'�'����5�5��?�?�+�+�D�J�J�7�7r,c�L�URRUR5$r#)r�rcrr/s r)r�basefilectx._filerevDs���}�}� � ����0�0r,c��UR$r#�r�r/s r)�	_repopath�basefilectx._repopathHs���z�z�r,c�R�UR g![Ra gf=f�NTF)rrr�r/s r)r[�basefilectx.__nonzero__Ls)��	��N�N���� � �	��	�s��&�&c��SUR5UR4-$![Ra SUR5-s$f=f)Ns%s@%ss%s@???)r�rrr�r/s r)r0�basefilectx.__bytes__VsG��	+��t�y�y�{�D�O�O�<�<�<��� � �	+��t�y�y�{�*�*�	+�s�!�'A�
Ac�P�S[U5R<S[U5<S3$r3r7r/s r)r;�basefilectx.__repr__^r=r,c�|�[URUR45$![a [	U5s$f=fr#)rVr�rrArWr/s r)rX�basefilectx.__hash__as7��	�����T�^�^�4�5�5���	��d�8�O�	�s� #�;�;c���[U5[U5:H=(a9 URUR:H=(a URUR:H$![a gf=fr?)r8r�rrArBs  r)rD�basefilectx.__eq__gsZ��	��T�
�d�5�k�)�6��J�J�%�+�+�-�6��N�N�e�o�o�5�
��
�	��	�s�AA�
A&�%A&c��X:X+$r#rGrBs  r)rH�basefilectx.__ne__qrJr,c��UR$r#)rr/s r)�filerev�basefilectx.filerevt����}�}�r,c��UR$r#)rr/s r)r��basefilectx.filenodewr�r,c�L�URRUR5$r#)rr�r�r/s r)�_flags�basefilectx._flagszs�����$�$�T�Z�Z�0�0r,c��UR$r#)r(r/s r)r��basefilectx.flags~����{�{�r,c��UR$r#)r�r/s r)r��basefilectx.filelog�r$r,c��UR$r#�rr/s r)rc�basefilectx.rev�r�r,c�L�URRUR5$r#)r�rrr/s r)r�basefilectx.linkrev�s���}�}�$�$�T�]�]�3�3r,c�6�URR5$r#)rr.r/s r)r.�basefilectx.node�������#�#�%�%r,c�6�URR5$r#)rrr/s r)r�basefilectx.hex�s�����"�"�$�$r,c�6�URR5$r#)rrrr/s r)rr�basefilectx.user�r6r,c�6�URR5$r#)rrsr/s r)rs�basefilectx.date�r6r,c�6�URR5$r#)rr�r/s r)r��basefilectx.files�������$�$�&�&r,c�6�URR5$r#)rrtr/s r)rt�basefilectx.description�s�����*�*�,�,r,c�6�URR5$r#)rr>r/s r)r>�basefilectx.branch�s�����%�%�'�'r,c�6�URR5$r#)rrur/s r)ru�basefilectx.extra�r?r,c�6�URR5$r#)rr�r/s r)r��basefilectx.phase�r?r,c�6�URR5$r#)rr�r/s r)r��basefilectx.phasestr�������'�'�)�)r,c�6�URR5$r#)rrr/s r)r�basefilectx.obsolete�rJr,c�6�URR5$r#)rr�r/s r)r��basefilectx.instabilities�s�����,�,�.�.r,c�6�URR5$r#)rr[r/s r)r[�basefilectx.manifest�rJr,c��UR$r#)rr/s r)r)�basefilectx.changectx�s�����r,c��UR$r#��_copiedr/s r)�renamed�basefilectx.renamed�����|�|�r,c�F�UR=(a URS$r�rTr/s r)�
copysource�basefilectx.copysource�s���|�|�/����Q��/r,c��UR$r#r$r/s r)r(�basefilectx.repo�r�r,c�4�[UR55$r#)r��datar/s r)�size�basefilectx.size�r�r,c��UR$r#rr/s r)r��basefilectx.path�r�r,c�l�[R"UR55$![a gf=fr?)r�binaryr_�OSErrorr/s r)�isbinary�basefilectx.isbinary�s0��	��$�$�T�Y�Y�[�1�1���	��	�s�#&�
3�3c�(�SUR5;$)N�x�r�r/s r)�isexec�basefilectx.isexec�����t�z�z�|�#�#r,c�(�SUR5;$�N�lrkr/s r)�islink�basefilectx.islink�rnr,c��g)z�whether this filectx represents a file not in self._changectx

This is mainly for merge code to detect change/delete conflicts. This is
expected to be True for all subclasses of basectx.FrGr/s r)�isabsent�basefilectx.isabsent�s��
r,Fc���UR(aURU5$URc[R"S5eURc�UR
R(a4URRURUR55$UR5S-
UR5:Xa4URRURUR55$UR5UR5:XdUR5S:Xa4URRURUR55$g)�Fcompare with other file context

returns True if different than fctx.
s;filectx.cmp() must be reimplemented if not backed by revlog�rqT)�
_customcmprmrr�ProgrammingErrorr%�_encodefilterpatsr�r_r`r��r'�fctxs  r)rm�basefilectx.cmp�s���
�?�?��8�8�D�>�!��>�>�!��(�(�N��
��>�>�!��z�z�+�+��}�}�(�(��������E�E��y�y�{�Q��$�)�)�+�-��}�}�(�(��������E�E��9�9�;�$�)�)�+�%������)=��=�=�$�$�T�^�^�T�Y�Y�[�A�A�r,Nc��URnUR5RnURnUR	5nX:XaU$[USS5nSn	Uc=URSR
5V
s/sHo�R5PM nn
SnOU/nUcURX�US9=p�Xx;a�U	cURX�US9n	URnURn
U	HSnUbX�:a gURU5nX�S;dM(UXoSRSS9RU
5:XdMQUs $ U$s sn
f)	a,return the first ancestor of <srcrev> introducing <fnode>

If the linkrev of the file revision does not point to an ancestor of
srcrev, we'll walk down the ancestors until we find one introducing
this file revision.

:srcrev: the changeset revision we search ancestors from
:inclusive: if true, the src revision will also be checked
:stoprev: an optional revision to stop the walk at. If no introduction
          of this file content could be found before this floor
          revision, the function will returns "None" and stops its
          iteration.
�_ancestrycontextNT��	inclusive�rF)�exact)r%r^r_r�rr-r�rcr�rr�rc�read_delta_parentsr�)r'�srcrevr��stoprevr(ror��lkr�	memberanc�iteranc�p�revs�fnoder�r��acs                r)r�basefilectx._adjustlinkrevsG���z�z��
�_�_�
�
(�
(�������l�l�n���=��J��D�"4�d�;�	����>�%)�Z�Z��%5�%=�%=�%?�@�%?��E�E�G�%?�D�@��I��8�D���"$�,�,�t�I�,�"N�N�I������,�,�t�I�,�F���N�N�E��:�:�D����&�1�;���W�W�Q�Z���a�5�=���q�E�
�5�5�E�5�B�F�F�t�L�� !���$�
��=As�;D;c�Z�UR5U:�agURUS9nUcgX!:�$)zBTrue if a filectx has been introduced after a given floor revisionT�r�F)r�	_introrev)r'�changelogrev�introrevs   r)�isintroducedafter�basefilectx.isintroducedafter;s5���<�<�>�\�)���>�>�,�>�7������'�'r,c�"�UR5$)aOreturn the rev of the changeset which introduced this file revision

This method is different from linkrev because it take into account the
changeset the filectx was created from. It ensures the returned
revision is one of its ancestors. This prevents bugs from
'linkrev-shadowing' when a file revision is used by multiple
changesets.
)r�r/s r)r��basefilectx.introrevDs���~�~��r,c� �Sn[U5nSU;a
URnO SU;aURR5nUbUR	USUS9$SU;a%UR	UR
US9nUbX@lU$UR
5$)a
Same as `introrev` but, with an extra argument to limit changelog
iteration range in some internal usecase.

If `stoprev` is set, the `introrev` will not be searched past that
`stoprev` revision and "None" might be returned. This is useful to
limit the iteration range.
NrrT)r�r�rr�)�varsrrrcrrr)r'r��toprev�attrsr�s     r)r��basefilectx._introrevOs������T�
���%���^�^�F�
�U�
"��_�_�(�(�*�F����&�&�v��w�&�O�O�
��
&��*�*�4�+>�+>��*�P�H��#�!)���O��<�<�>�!r,c��UR5nUR5U:XaU$URUR5US9$)zrReturn filectx having identical contents, but pointing to the
changeset revision where this filectx was introduced)�changeid)r�rcrSr�)r'r�s  r)�introfilectx�basefilectx.introfilectxls;���=�=�?���8�8�:��!��K��|�|�D�M�M�O�h�|�?�?r,c�"�[URXUS9nS[U5;dS[U5;a)UR5Ul[USS5UlU$S[U5;a#URUl[USS5UlU$)z@create parent filectx keeping ancestry info for _adjustlinkrev()�r�r�rrr�Nr)rSr%r�rcrr-r�)r'r�r�r�r~s     r)�_parentfilectx�basefilectx._parentfilectxts����t�z�z�4��H���$�t�*�$���T�
�(B�
#'�(�(�*�D��$+�D�2D�d�$K�D�!�
��	��d��
+�"&�"5�"5�D��$+�D�2D�d�$K�D�!��r,c
�
�URnURnURRUR5nUVs/sH,nX@RR
R:wdM(XU4PM. nnURUR5nU(a7URSUSUSURRUS545 UVVV	s/sHupxo�RXxU	5PM sn	nn$s snfs sn	nnf�Nrr)r�r�r�rr%rkr�rV�insertr�r�)
r'r��flr�r.�plrr�r��ls
          r)r��basefilectx.parents�s����
�
��
�]�]���-�-�'�'����7�� �
����z�z�/�/�6�6�6�
�U�"���	�
�
�J�J�t�~�~�&���
�I�I�a�!�A�$��!��d�j�j�o�o�a��d�&;�<�=�JL�M�"���Q�#�#�D��3�"�M�M��%
��$Ns�'C9�-C9�C>c�(�UR5S$r�)r�r/s r)r��basefilectx.p1�s���|�|�~�a� � r,c��UR5n[U5S:XaUS$[URURSUR
S9$)Nr�r���r�)r�r�rSr%r�r�)r'r�s  r)r��basefilectx.p2�s>���L�L�N���q�6�Q�;��Q�4�K��t�z�z�4�:�:�b�$�-�-�P�Pr,c��^^^	�[R"U4Sj5m	UU	4SjnTR5n[USS5c�TRR5RnTR5c=URTR5Vs/sHowR5PM snSS9nOURTR5/SS9nX�l
[R"XTX#S9$s snf)aReturns a list of annotateline objects for each line in the file

- line.fctx is the filectx of the node where that line was last changed
- line.lineno is the line number at the first appearance in the managed
  file
- line.text is the data on that line (including newline character)
c�:>�TRRU5$r#)r%r�)r�r's �r)�<lambda>�&basefilectx.annotate.<locals>.<lambda>�s���T�Z�Z�_�_�Q�-?r,c�.>�UR UR5nT(d5UVs/sH(o"R5UR5:XdM&UPM* nnUH0nSUR;dMT"UR55UlM2 U$s snf)Nr�)rr�r�r�r�)r%r�r��follow�getlogs   ��r)r��%basefilectx.annotate.<locals>.parents�sw���

�K�K�����B��!#�<��A�v�v�x�1�6�6�8�';�a���<���!�Q�Z�Z�/�!'�����!1�A�J���I��=s�%B�Br�NTr�)�skiprevs�diffopts)
r�lrucachefuncr�r-r%r^r_rcr�r�r�r	�annotate)
r'r�r�r�r�riror�r�r�s
``       @r)r��basefilectx.annotate�s�����"�"�#?�@��	�*� � �"���4�+�T�2�:����&�&�(�2�2�B��x�x�z�!��\�\�&*�l�l�n�5�n��U�U�W�n�5��"����\�\�4�8�8�:�,�$�\�?��$&�!��~�~��H�
�	
��
6s�C/c#��# �0nUnU(aSnOSnUR5SUH%nXRUR5UR54'M' U(dgUR[	U55nUv� Md7fr�)r�rr��pop�max)r'�followfirst�visitrv�cut�parents      r)r��basefilectx.ancestors�ss���������C��C���)�)�+�d�s�+��?E�v�~�~�'����):�;�<�,����	�	�#�e�*�%�A��G�
�s�A6A8c�r�URRUR5UR55$)z�Returns `data()` after running repository decoding filters.

This is often equivalent to how the data would be expressed on disk.
)r%�
wwritedatar�r_r/s r)�decodeddata�basefilectx.decodeddata�s'��
�z�z�$�$�T�Y�Y�[�$�)�)�+�>�>r,r0)FNr#)FNNrF)Br9rGrHrIrJrMr�rrrrr[r�r0r
rKrLr;rXrDrHr"r�r(r�r�rcrr.rrrrsr�rtr>rur�r�rr�r[r)rVrZr(r`r�rgrlrrrurzrmrr�r�r�r�r�r�r�r�r�r�r�rNrGr,r)r�r�%s�����+��+��8��8��8��8��1��1�������H�+�� � ��+�G�<���#����1��1����4�&�%�&�&�'�-�(�'�'�*�*�/�*���0�� ���$�$���J�'�R8�t(�	 �"�:@�� N�0!�Q�2
�h� ?r,r�c�r�\rSrSrSrSSjr\S5rSSjrSr	Sr
S	rS
r\S5r
SrS
rg)rSi�zZA filecontext object makes access to data related to a particular
filerevision convenient.Nc��XlX lUcUcUc
SUUU4-5eUbXPlUbX0lUbX`lUbX@lgg)zXchangeid must be a revision number, if specified.
fileid can be a file revision or node.Ns.bad args: changeid=%r, fileid=%r, changectx=%r)r%r�r�rrr
)r'r(r�r�r�r�r)s       r)r*�filectx.__init__�sw���
��
�
� �F�$6�)�:O�	
�<����@
�
�	
�O���#�M���%�N�� �'�O���!�L�r,c��URUR$![Ra* URR	5URs$f=fr#)r%rr�FilteredRepoLookupErrorr^r/s r)r�filectx._changectxsM��	;��:�:�d�n�n�-�-���,�,�	;�"�:�:�(�(�*�4�>�>�:�:�#	;�s��;A�Ac�X�[URURUURUS9$)zEopens an arbitrary revision of the file without
opening a new filelog)r�r�r�)rSr%r�r�)r'r�r�s   r)rS�filectx.filectx,s,����J�J��J�J���M�M��
�	
r,c�L�URRUR5$r#)r��rawdatarr/s r)r��filectx.rawdata7s���}�}�$�$�T�^�^�4�4r,c�L�URRUR5$)zlow-level revlog flags)r�r�rr/s r)�rawflags�filectx.rawflags:s���}�}�"�"�4�=�=�1�1r,c�P�URRUR5$![Raj UR
RRSS5S:Xag[R"[S5[UR5-[S5S9ef=f)Nscensorspolicysignorer,scensored node: %ss"set censor.policy to ignore errors)�hint)r�rcrr�CensoredNodeErrorr%r�r��Abortrrr/s r)r_�filectx.data>s���	��=�=�%�%�d�n�n�5�5���&�&�	��z�z�}�}�#�#�I�y�9�Y�F���+�+��&�'�%����*?�?��<�=��
�	�s�$'�>B%�'>B%c�L�URRUR5$r#)r�r`rr/s r)r`�filectx.sizeIs���}�}�!�!�$�-�-�0�0r,c��URRUR5nU(dgUR5UR	5:XaU$UR5nURnURR5HnX4RU5:Xa gM U$![Ra M7f=f)acheck if file was actually renamed in this changeset revision

If rename logged in file revision, we report copy for changeset only
if file revisions linkrev points back to the changeset in question
or both changeset parents contain different file revisions.
N)r�rVrrcrr�rr�r�rr�)r'rV�namer�r�s     r)rU�filectx._copiedLs����-�-�'�'����7�����8�8�:�����'��N��y�y�{���������(�(�*�A�
��J�J�t�,�,��-�+�����$�$�
��
�s�B(�(C�?Cc
���URRUR5nUVs/sH,n[URUR
X RS9PM. sn$s snf)Nr�)r�r�rrSr%r�r�s   r)r��filectx.childrenfsV���M�M�"�"�4�>�>�2���
���
�D�J�J��
�
�1�m�m�L��
�	
��
s�3A )rrr
r�r�r%)NNNNr#)r9rGrHrIrJr*rMrrSr�r�r_r`rUr�rNrGr,r)rSrS�sa�� �����"�@�;��;�,	
�5�2�	�1�����2
r,rSc�F^�\rSrSrSrS#U4SjjrSrSr\R"\5r
Sr\r\
S5r\
S5r\
S	5rS
rSrSrS
rSrSrSrSrSrSr\r\r\rSrSrSr Sr!Sr"Sr#Sr$Sr%Sr&Sr'Sr(Sr)S r*S$S!jr+S"r,U=r-$)%�committablectxioz�A committablectx object provides common functionality for a context that
wants the ability to commit, e.g. workingctx or memctx.c�>�[TU]U5 SUlSUlX lU(a[
R"U5UlU(aX0lU(aX`l	0Ul
U(aUR5Ul
Ub#[R"U5URS'URRS5(dSURS'gg)Nr�sdefault)rQr*r@r��_textr�	parsedate�_date�_user�_status�_extrarr
�	fromlocalr��	r'r(�textrrrsrurr>r:s	        �r)r*�committablectx.__init__ss����	�������	���
��
��!�+�+�D�1�D�J���J��"�L������*�*�,�D�K���%-�%7�%7��%?�D�K�K�	�"��{�{���y�)�)�%/�D�K�K�	�"�*r,c�8�[URS5S-$)Nr�+)�bytesr�r/s r)r0�committablectx.__bytes__�s���T�]�]�1�%�&��-�-r,c�D�URRR gr#�r%rk�wdirhexr/s r)r�committablectx.hex�s���
�
� � �(�(r,c��g�NTrGr/s r)r[�committablectx.__nonzero__����r,c�6�URR5$r#)r%rr/s r)r��committablectx._status�s���z�z� � �"�"r,c�J�URRR5$r#)r%r��usernamer/s r)r��committablectx._user�s���z�z�}�}�%�%�'�'r,c��URRnURSS5nUc[R"5nU$)Nsdevelsdefault-date)r%r��
configdater�makedate)r'r�rss   r)r��committablectx._date�s7��
�Z�Z�]�]���}�}�X��7���<��$�$�&�D��r,c��gr#rGr�s  r)r��committablectx.subrev�r�r,c��gr#rGr/s r)rz�committablectx.manifestnode�r�r,c�p�UR=(d$ URRR5$r#)r�r%r�rr/s r)rr�committablectx.user�s"���z�z�5�T�Z�Z�]�]�3�3�5�5r,c��UR$r#)r�r/s r)rs�committablectx.date�r�r,c��UR$r#)r�r/s r)rt�committablectx.description�r�r,c��[URRURR-URR-5$r#)r�r�rtrurvr/s r)r��committablectx.files�s:����L�L�!�!�D�L�L�$6�$6�6����9M�9M�M�
�	
r,c�.�URR$r#)r�rtr/s r)rt�committablectx.modified�s���|�|�$�$�$r,c�.�URR$r#)r�rur/s r)ru�committablectx.added�s���|�|�!�!�!r,c�.�URR$r#)r�rvr/s r)rv�committablectx.removed�����|�|�#�#�#r,c�.�URR$r#)r�rdr/s r)rd�committablectx.deleted�rr,c�H�[R"URS5$r�)r
r�r�r/s r)r>�committablectx.branch�s��������I� 6�7�7r,c� �SUR;$r��r�r/s r)r?�committablectx.closesbranch�s���4�;�;�&�&r,c��UR$r#r r/s r)ru�committablectx.extra�r,r,c��gr?rGr/s r)r��committablectx.isinmemory�r�r,c��/$r#rGr/s r)r��committablectx.tags�����	r,c�v�/nUR5H"nURUR55 M$ U$r#)r�r.r�)r'�br�s   r)r��committablectx.bookmarks�s.��������A�
�H�H�Q�[�[�]�#� ��r,c��[R"URR5nUR	5Hn[XR
55nM U$r#)r�newcommitphaser%r�r�r�r�)r'r�r�s   r)r��committablectx.phase�s?���%�%�d�j�j�m�m�4������A���w�w�y�)�E� ��r,c��gr?rGr/s r)r��committablectx.hidden�r�r,c��/$r#rGr/s r)r��committablectx.children�r(r,c��SUR;aURRU5$UR	U5$![a gf=f![
a gf=f)NrMr,)r�rMr�r��	_flagfuncrfr�s  r)r��committablectx.flags�sc���$�-�-�'�
��~�~�+�+�D�1�1�	��>�>�$�'�'��	�
��
��
�	��	�s �?�A�
A�A�
A�Ac�>�URSRU5$)z1return the "best" ancestor context of self and c2r)r�r�)r'r�s  r)r��committablectx.ancestor�s���}�}�Q��(�(��,�,r,c#�# �URShv�N URRRURVs/sHoR	5PM sn5HnURUv� M gNjs snf7fr#)r�r%r_r�rc)r'r�r�s   r)r��committablectx.ancestorssc����=�=� � ����%�%�/�/�"�m�m�,�m��U�U�W�m�,�
�A��*�*�Q�-��
�	!��,�s!�B�A=�1B�A?�!B�?Bc��g)a)Perform post-commit cleanup necessary after committing this ctx

Specifically, this updates backing stores this working context
wraps to reflect the fact that the changes reflected by this
workingctx have been committed.  For example, it marks
modified and added files as normal in the dirstate.

NrG)r'r.s  r)�
markcommitted�committablectx.markcommitted	s�r,c��gr?rG)r'�missing�merger>s    r)�dirty�committablectx.dirtyr�r,)r�r�r�r@r�r�r�)r,NNNNN�FTT).r9rGrHrIrJr*r0rr
rKrLr[r�rMr�r�r�r�rzrrrsrtr�rtrurvrdr�r�r�r>r?rur�r�r�r�r�r�r�r�r�r;r@rNr�r�s@r)r�r�os���?��
�
����0�:.�)�� � ��+�G���H��#��#��(��(�������6���
�
%�"�$�$��M��J��L�8�'��������
�-� ���r,r�c�D^�\rSrSrSrS!U4SjjrSrSrSr\	S5r
S"SjrU4S	jrS
r
\	S5rSrS"S
jrS#SjrS$SjrS$SjrSrS%SjrSrSrSrS&S'Sjjr\	S5r\	S5rSrU4SjrSrSrSr Sr!S(Sjr"S r#U=r$$))�
workingctxia]A workingctx object makes access to data related to
the current working directory convenient.
date - any valid date string or (unixtime, offset), or None.
user - username string, or None.
extra - a dictionary of extra values, or None.
changes - a list of file lists as returned by localrepo.status()
           or None to use the repository status.
c
��>�SnU(aSU;aURR5n[TU]XX4XVUS9 g![a  [R"[S55ef=f)Nr�sbranch name not in UTF-8!�r>)�dirstater>�UnicodeDecodeErrorrr�rrQr*r�s	        �r)r*�workingctx.__init__!sl������	��.�
C����-�-�/��	����T����O��&�
C��k�k�!�$@�"A�B�B�
C�s	�=�*A'c#�# �URRnUH)nURU5R(dM%Uv� M+ g7fr#�r%rG�	get_entry�tracked)r'rxr%s   r)rX�workingctx.__iter__,s7����J�J�����A��{�{�1�~�%�%�%����s�:A	�	A	c�`�URRRU5R$r#rKrNs  r)rP�workingctx.__contains__2s#���z�z�"�"�,�,�S�1�9�9�9r,c�B�URRR$r#r�r/s r)r�workingctx.hex5s���z�z�'�'�/�/�/r,c
�`�URRR5nUSURRR:XaUSSnURR5nUVs/sH2n[
URURRU5USS9PM4 sn$s snf)Nrr�Frm)	r%rGr�rkr�r^r)r_rc)r'r��unfir�s    r)r��workingctx._parents8s����J�J���'�'�)���Q�4�4�:�:�+�+�2�2�2��#�2��A��z�z�$�$�&��
�	
���
��
�
�D�N�N�.�.�q�1�1�U�
��	
�	
��
s�/9B+c�p�Uc URRRnURRnUR	UR5 URX5nURUnU(a.UH(nXe;dM
XFU;dMUR
XFU5 M* X RRR:XaP[UR5R55H%upgXe;dMXu;dMUR
SU5 M' SSS5 g!,(df   g=fr#)
r%rkr�rG�changing_parents�
setparentsrr��copiesri)r'�p1node�p2noderGrYr�r%rns        r)rX�workingctx.setparentsFs����>��Z�Z�-�-�4�4�F��:�:�&�&��
�
&�
&�t�z�z�
2��(�(��8�F��:�:�f�%�D�� �A��}���d�):� �
�
�f�i��3� ����1�1�8�8�8�"�8�?�?�#4�#:�#:�#<�=�D�A��}��� �
�
�d�A�.�>�3�
2�
2�s%�0D'�	D'�A*D'�D'�D'�'
D5c�:>�UR [TU]	U5$r#)rMrQr�)r'r�r:s  �r)r��workingctx._fileinfoYs�������w� ��&�&r,c�^^^^	^
�URRR5RmUR	5n[U5S:aUSR
5m
UU
4SjnU$Uup4URU5nUR
5UR
5UR
5smmm	UUUU	4SjnU$)Nr�rc�6>�T"X5nTRU5$r#rk)r%�	copiesget�mans ��r)�func�'workingctx._buildflagfunc.<locals>.funchs����a�O���y�y��|�#r,c�>�T"X5nTRU5TRU5TRU5p2nX:XaU$X:XaU$X#:XaU$g�Nr,rk)r%�fl1�fl2�flara�m1�m2�mas    ����r)rcrdssP����a�O�� "�����R�X�X�a�[�"�(�(�1�+�#���:��J��:��J��:��J�r,)r%rGrYr�r�r�r[r�)r'r�rcr�r��pararjrkrlrbs      @@@@@r)�_buildflagfunc�workingctx._buildflagfunc^s�����J�J�'�'�.�.�0�4�4�	��,�,�.���w�<�!���!�*�%�%�'�C�
$�,���F�B����R��B��������
�r�{�{�}�J�B��B�	
�	
��r,c�`�URRRUR5$r#)r%rG�flagfuncrnr/s r)r4�workingctx._flagfunc�s#���z�z�"�"�+�+�D�,?�,?�@�@r,c�F�URU5$![a gf=frf)r4rfr�s  r)r��workingctx.flags�s(��	��>�>�$�'�'���	��	�s��
 � c�,�[URXUS9$)z-get a file context from the working directory)rDr�)�workingfilectxr%�r'r�r�s   r)rS�workingctx.filectx�s����J�J��w�
�	
r,c��[UR5H(nURU5RUS9(dM( g U=(a UR	5=(d� U=(a/ UR5UR
5R5:g=(d^ UR5=(dG UR5=(d0 UR5=(d U=(a UR5$)z-check whether a working directory is modified)r>T)r�r�r�r@r�r>r�rtrurvrd)r'r>r?r>rns     r)r@�workingctx.dirty�s�����
�
�&�A��x�x��{� � �� �1�1��'�
�
 �t�w�w�y�
,��>�4�;�;�=�D�G�G�I�,<�,<�,>�>�
,��}�}��
,��z�z�|�
,��|�|�~�	
,�
�*�D�L�L�N�
	
r,c
�t^^
�URR5 URRURRsnm
U
U4Sjn/nURRR
nUGH]n[R"U[RRTU55 U"U5nURSS5n	U	S:waFUR U	:�a6UR[S5USUR -S-U"U54-5 ["R$"UR&5(d\["R("UR&5(d7UR[S	5U"U5-5 URU5 GM!T
R+U5(aGM:UR[S
5U"U5-5 GM` UsSSS5 $![a9 UR[S5U"U5-5 URU5 GM�f=f!,(df   g=f)Nc�P>�TR[R"TU55$r#��pathtorr��r%�ds�prefixs ��r)r�� workingctx.add.<locals>.<lambda>�����r�y�y����v�q�)A�Br,�%s does not exist!
suislarge-file-limitrso%s: up to %d MB of RAM may be required to manage this file
(use 'hg revert %s' to cancel the pending addition)
r�i@Bs:%s not added: only files and symlinks supported currently
s%s already tracked!
)r%�wlockr�rG�wvfs�lstatr�
checkportable�osr�r�rfr�rrj�configbytes�st_size�stat�S_ISREG�st_mode�S_ISLNK�set_tracked)r'�listr�r��uipath�rejectedr�r%�st�limitr�s  `       @r)�add�workingctx.add�s����
�Z�Z�
�
�
��Z�Z�]�]�D�J�J�$7�$7�F�B��B�F��H��J�J�O�O�)�)�E����%�%�b�"�'�'�,�,�v�q�*A�B���q��B�
���u�.A�B���A�:�"�*�*�u�"4��G�G��3���a�"�*�*�n��7����C�
D�����R�Z�Z�0�0�D�L�L����4L�4L��G�G��5��!��)�	$���O�O�A�&�����*�*��G�G�A�6�7�&��)�C�D�A�B�M �
�����G�G�A�5�6����B�C��O�O�A�&���� �
�s7�BH)�0G#�8C3H)�0)H)�#>H&�!H)�%H&�&H)�)
H7c�^^�URR5 URRmUU4Sjn/nUHcnTRU5(aMURRR[
S5U"U5-5 URU5 Me UsSSS5 $!,(df   g=f)Nc�P>�TR[R"TU55$r#r}rs ��r)r��#workingctx.forget.<locals>.<lambda>�r�r,s%s not tracked!
)r%r�rG�
set_untrackedr�r�rrj)r'r�r�r�r�r%r�s  `   @r)�forget�workingctx.forget�s����
�Z�Z�
�
�
����$�$�B�B�F��H����'�'��*�*��J�J�M�M�&�&�q�)=�'>����'J�K��O�O�A�&��� �
�
�s�9B1�A
B1�1
B?c�.�URRRU5n[R"UR5(dz[R"UR5(dUURRR[
S5URRRU5-5 gURR5 URRnURU5 URX5 SSS5 g![aW URRR[
S5URRRU5-5 gf=f!,(df   g=f)Nr�s1copy failed: %s is not a file or a symbolic link
)r%r�r��FileNotFoundErrorr�r�rrGr~r�r�r�r�r�r�r)r'r��destr�r�s     r)r�workingctx.copy�s��	������&�&�t�,�B����R�Z�Z�(�(�D�L�L����,D�,D��J�J�M�M����G�H��*�*�%�%�,�,�T�2�3�
�
���!�!�#��Z�Z�(�(�����t�$�����%�$�#��!�	��J�J�M�M����)�*�T�Z�Z�-@�-@�-G�-G��-M�M�
�
�		��$�#�s�%D"� 9F�"AF�F�
Fc��URnU(dUR5n[R"UR5(+n	[
R"URUUUUUURUUUU	S9$)N)rrrr��icasefs)r%rr�fscasesensitiver	rr
r)
r'rrr
rrr�r�rr�s
          r)r
�workingctx.match�sn��
�J�J����(�(�*�C��*�*�1�6�6�2�2���~�~�
�F�F�������I�I��%���
�	
r,c��U(a%URRR(aU$/nUH�nURU5S:XarXR	5nUS:Xd0[U5S:�d!SU;d[R"U5(a*URRRSU-5 M�URU5 M� U$)Nrqr,i�
s*ignoring suspect symlink placeholder "%s"
)r%rG�
_checklinkr�r_r�rrer��debugrj)r'r��saner%rxs     r)�_filtersuspectsymlink� workingctx._filtersuspectsymlinks�����
�
�+�+�6�6��L����A��z�z�!�}��$��G�L�L�N����H��1�v��~���z�!�(�(��+�+��J�J�M�M�'�'�F��J����K�K��N���r,c�n�U(d////4$/n/n/n/nURSn[U5H�nX�;d>URU5URU5:wdXxRX5(aUR	U5 MZUcUR	U5 MpXR5n	U	Rn
U	Rn[R"X�5nUbX�U4n
UR	X�45 M�UR	U5 M� X4XV4$![a UR	U5 GMf=fr�)r�r�r�rmrjr�r�r�r�reliable_mtime_ofrf)r'r��mtime_boundaryrtrdrb�fixupr�r%rn�moder`�
file_mtime�
cache_infos              r)�_checklookup�workingctx._checklookups����r�2�r�>�!����������}�}�Q������A�
"��M��z�z�!�}��
�
�1�
�5��w�{�{�4�7�+�+��O�O�A�&�#�+��L�L��O���
�
��A��9�9�D��9�9�D�!*�!<�!<�Q�!O�J�!�-�&*�*�%=�
����a�_�5����Q��+�>�%�.�.���
"����q�!�!�
"�s%�AD�
D� AD�;D�D4�3D4c�^�[R"URRS5 URRmURR5nU(a7TR(aU4SjnOTRnUH
upVU"XV5 M U(d%URRR(a�TRnURRS5 URRTLdeTRnU(a,URR5n	TRU	5 O.U(a'Sn
URRRU
5 U(aUHnU"X5 M
 SSS5 URR!5 gg!,(df   N*=f![Ra TR5 NSf=f!URR!5 f=f)z1update dirstate for files that are actually cleansstatus.pre-dirstate-write-filec�&>�TRUSSS9$)NT��
p1_tracked�
wc_tracked)�update_file)r%�pfdrGs  �r)r��-workingctx._poststatusfixup.<locals>.<lambda>Rs����(<�(<��#�#�)=�)r,Fs*skip updating dirstate: identity mismatch
N)r�wait_on_cfgr%r�rG�postdsstatus�is_changing_parents�	set_clean�_dirtyr��currenttransaction�writer�r�	LockError�
invalidate�clearpostdsstatus)
r'rr��
poststatus�normalr%�pdf�	pre_dirty�
post_dirty�trr��psrGs
            @r)�_poststatusfixup�workingctx._poststatusfixupKsw������D�J�J�M�M�+L�M��:�:�&�&���Z�Z�,�,�.�
���+�+���"�+�+������q�� �����,�,�3�3�
/�
%�O�O�	��Z�Z�%�%�e�,��:�:�.�.�(�:�:�:�!)���J�!�!�Z�Z�:�:�<�� ���r�*�"�K���
�
�
�
�+�+�A�.�!�",�B��t�,�#-�-�$�
�
�,�,�.�34�-�,���?�?�
&��#�#�%�
&���
�
�,�,�.�sI�'G�/B!F4�G�4
G�>G�G/�G�$G,�)G/�+G,�,G/�/Hc	��/nSU;a[UR5nURRnUR	UR5 URXX#US9upxn	/n
U(a�UR
Xy5up�p�URRU5 URRU5 U
(a"U(aURRU
5 U
(a)U(a"URRSU
55 URX�5 SSS5 UR5(a�WR(d"UR(dUR(aK[R
"URUR UR"UR///5UlU$X�lW$!,(df   N�=f)z7Gets the status from the dirstate -- internal use only.s.hgsub)rfrbrec3�*# �UH	upUv� M g7fr#rG)r$r%rs   r)r&�-workingctx._dirstatestatus.<locals>.<genexpr>�s���#8�%�$�!�A�%�s�N)r�r�r%rG�running_statusrr�rtr.rdrbr��alwaysrerfrrurvr�)r'r
rfrbre�subreposrGrmrnr�r��	modified2�deleted2�	clean_sets              r)�_dirstatestatus�workingctx._dirstatestatusvsU��������d�m�m�,�H��:�:�&�&��
�
$�
$�T�Z�Z�
0�%-�_�_���w�&5�&�"�C�N�
�E��8<�8I�8I��9�5�	�Y��
�
�!�!�)�,��	�	� � ��*����G�G�N�N�9�-��U��G�G�N�N�#8�%�#8�9��!�!�!�+�'1�*�<�<�>�>��y�y�A�I�I����&�~�~��J�J�������A�I�I�r�2�r� ����� !����?1�
0�s
�CG�
Gc�<�0n0nURRR5nURUSR5nURUSR5n[	UR55[	UR
55-nURR5nURRR5R5H/up�X�;d
U"U5(dMX�;aX�U'M$X�;dM+X�U'M1 X4$r�)
r%rGr�r[rgrurtr*rYri)
r'r�r�r��
p1manifest�
p2manifest�
changedsetr*�dst�srcs
          r)r��workingctx._copies�s��������*�*�%�%�-�-�/���Z�Z���
�+�4�4�6�
��Z�Z���
�+�4�4�6�
������&��T�]�]�_�)=�=�
��j�j�,�,�.���
�
�+�+�2�2�4�:�:�<�H�C��$�K��,<�,<��� � #��
��"� #��
�
=��!�!r,c�8�URUR5$)a$generate a manifest corresponding to the values in self._status

This reuse the file nodeid from parent, but we use special node
identifiers for added and modified files. This is used by manifests
merge to see that files are different and by update logic to avoid
deleting newly added files.
)r\r�r/s r)rM�workingctx._manifest�s���(�(����6�6r,c��UR5nUSR5R5nURnURR
RUR4URR
RUR44H*upVUHnXSU'URXt"U55 M! M, URUR-HnXs;dM
X7	M U$![a M_f=f)z9Builds a manifest that includes the given status results.r)r�r[rr4r%rk�addednodeidru�modifiednodeidrt�setflagrfrdrv)r'rr�rb�ff�ir�r%s        r)r\�workingctx._buildstatusmanifest�s����,�,�.���a�j�!�!�#�(�(�*��
�^�^��
�Z�Z�
%�
%�
1�
1�6�<�<�@�
�Z�Z�
%�
%�
4�
4�f�o�o�F�
�D�A����A����K�K��2�a�5�)��	
����&�.�.�0�A��x��F�1��
������s�%C/�/
C=�<C=c��>�URX4XV5nURUR5URSS&XRS:wa[TU]XX4XV5nU$)abuild a status with respect to another context

This includes logic for maintaining the fast path of status when
comparing the working directory against its parent, which is to skip
building a new manifest if self (working directory) is not comparing
against its parent (repo['.']).
N�.)r�r�rtr%rQr)r'rCrnr
rorprqr:s       �r)r�workingctx._buildstatus�sa���
� � ��Y�L���2�2�1�:�:�>��
�
�1�
��J�J�t�$�$���$��%�i��A��r,c�J^^�TTRS:wa
UU4SjnX2lU$)acoverride the match method with a filter for directory patterns

We use inheritance to customize the match.bad method only in cases of
workingctx since it belongs only to the working directory when
comparing against the parent changeset.

If we aren't comparing against the working directory's parent, then we
just use the default match object sent to us.
r�c��>�UT;aeTRU5(dNTRRRSTRRRU5U4-5 ggg)Ns%s: %s
)rr%r�r�rGr~)r%r�rCr's  ��r)r��$workingctx._matchstatus.<locals>.bad�sW����E�>�%�,�,�q�/�/��J�J�M�M�&�&�#�t�z�z�':�':�'A�'A�!�'D�c�&J�J��+:�>r,)r%r�)r'rCr
r�s``  r)r_�workingctx._matchstatus�s'����D�J�J�t�$�$�
��I��r,c	��[URRRURR	U5[UR
5SSS95$)r�TF)r�rerf)r�r%rGr�r*r�r�s  r)r��workingctx.walksP����J�J���$�$��
�
�&�&�u�-���
�
�.���	
%�
�
�	
r,c�^�URRU5nURRm[U4SjTR	U555$)Nc3�l># �UH)nTRU5R(dM%Uv� M+ g7fr#)rLrM)r$r%r�s  �r)r&�%workingctx.matches.<locals>.<genexpr>s%����N�!2�A�b�l�l�1�o�6M�6M�a�a�!2�s�$4�	4)r%r*rGr�r�)r'r
r�s  @r)r��workingctx.matchess@����
�
�&�&�u�-��
�Z�Z�
 �
 ���N����E�!2�N�N�Nr,c���URRRUR5 UR5UR	5-H(nURRRUSSS9 M* UR
5H(nURRRUSSS9 M* URRRU5 URR5 [R"URU5 SSS5 URRRURR55 g!,(df   NL=f)NTr�F)
r%rGrWrtrur�rvrX�!_quick_access_changeid_invalidater�aftercommitr�r�)r'r.r%s   r)r;�workingctx.markcommitteds��
�Z�Z�
 �
 �
1�
1�$�*�*�
=��]�]�_�t�z�z�|�3���
�
�#�#�/�/��$�4�0��4��\�\�^���
�
�#�#�/�/��%�E�0��$�
�J�J���*�*�4�0��J�J�8�8�:����t�z�z�4�0�>�"	
�
�
���!�!�$�*�*�"?�"?�"A�B�#>�
=�s�C*E � 
E.c��U(a)[RRUR5$[RR	UR5$r#)�
mergestatemodrrbr%rcr;s  r)r�workingctx.mergestate$s;��� �+�+�1�1�$�*�*�=�=��'�'�,�,�T�Z�Z�8�8r,)r�)r,NNNNr#rB�r,rE�FFFrBrF)%r9rGrHrIrJr*rXrPrrMr�rXr�rnr4r�rSr@r�r�rr
r�r�r�r�r�rMr\rr_r�r�r;rrNr�r�s@r)rDrDs����IM�	P��:�0��
��
�/�&'�
 �D�A��A��
�
� '�R	�&�*�������
�>�2*/�X)/�X:?�'�	�'�R�"��"�"�7��7��0�*�.	
�O�
C�(9�9r,rDc�D�\rSrSrSrSSjrSr\rSrSr	Sr
S	rS
rg)�committablefilectxi*z�A committablefilectx provides common functionality for a file context
that wants the ability to commit, e.g. workingfilectx or memfilectx.Nc�t�XlX lSUlS=UlUlUbX0lU(aX@lggr#)r%r�rrrr�r)r'r(r�r�rs     r)r*�committablefilectx.__init__.s9���
��
����)-�-��
�����#�M��!�O�r,c��gr�rGr/s r)r[�committablefilectx.__nonzero__9r�r,c�"�UR5$r#)rcr/s r)r�committablefilectx.linkrev>s���x�x�z�r,c���UR5nU(dgUURRSRR	XR
RR54$r�)rZrr�rMr�r%rkr�r�s  r)rV�committablefilectx.renamedBsW����� ������O�O�$�$�Q�'�1�1�5�5��j�j�.�.�5�5�
�
�	
r,c�^�U4SjnTRnTRnTRRnTR	5nU(aUS-/nOX!"USU5U4/nUSSHnURX!"Xr5U45 M UVV	V
s/sH<up�n
U	TRRR:wdM,TRX�U
S9PM> sn
n	n$s sn
n	nf)z5return parent filectxs, following copies if necessaryc�x>�URRUTRRR5$r#)rMr�r%rkr�)rr�r's  �r)r��,committablefilectx.parents.<locals>.filenodePs*����=�=�$�$�T�4�:�:�+C�+C�+J�+J�K�Kr,r#rrNr�)
r�r�rr�rVrjr%rkr�r�)r'r�r�r��pclrVr��pcr�r�r�s`          r)r��committablefilectx.parentsMs����	L��z�z��
�]�]���o�o�&�&���,�,�.����G�#�$�B���#�a�&�$�/��4�5�B��a�b�'�B��I�I�t�X�b�/��4�5��
�
����a��D�J�J�,�,�3�3�3�
8�D����Q��7��
�	
��
s�+C�=Cc��/$r#rGr/s r)r��committablefilectx.childrenfr(r,)rrr�rrr�r%r�)
r9rGrHrIrJr*r[r�rrVr�r�rNrGr,r)rr*s-��L�	"���H��	
�
�2r,rc�^�\rSrSrSrSU4Sjjr\S5rSrSr	Sr
SrS	rS
r
SrSrS
rSSjrSSjrSrSrSrSrU=r$)rvijznA workingfilectx object makes access to data related to a particular
file in the working directory convenient.c�&>�[TU]XX45 gr#�rQr*)r'r(r�r�rDr:s     �r)r*�workingfilectx.__init__ns���
����W�9r,c�,�[UR5$r#)rDr%r/s r)r�workingfilectx._changectxqs���$�*�*�%�%r,c�L�URRUR5$r#)r%�wreadr�r/s r)r_�workingfilectx.dataus���z�z����
�
�+�+r,c�`�URRRUR5$r#)r%rG�copiedr�r/s r)rZ�workingfilectx.copysourcexs!���z�z�"�"�)�)�$�*�*�5�5r,c�t�URRRUR5R$r#)r%r�r�r�r�r/s r)r`�workingfilectx.size{s%���z�z���$�$�T�Z�Z�0�8�8�8r,c�`�URRRUR5$r#)r%r�r�r�r/s r)r��workingfilectx.lstat~����z�z���$�$�T�Z�Z�0�0r,c���URR5upURRR	UR
5[RU4$![a X4s$f=fr#)	rrsr%r�r�r�r��ST_MTIMEr�)r'�t�tzs   r)rs�workingfilectx.date�s\�����$�$�&���	��J�J�O�O�)�)�$�*�*�5�d�m�m�D�b�I�I�� �	��7�N�	�s�AA � 
A0�/A0c�`�URRRUR5$r#)r%r��existsr�r/s r)r+�workingfilectx.exists�s���z�z���%�%�d�j�j�1�1r,c�`�URRRUR5$r#)r%r��lexistsr�r/s r)r.�workingfilectx.lexists�s���z�z���&�&�t�z�z�2�2r,c�`�URRRUR5$r#)r%r��auditr�r/s r)r1�workingfilectx.audit�r$r,c�$�URU5$)rx)rmr}s  r)rm�workingfilectx.cmp�s���x�x��~�r,c��URRRSS5nURRR	UR
XS9 g)�+wraps unlink for a repo's working directoryr�sremoveemptydirs)�
ignoremissing�rmdirN)r%r��
configboolr��
unlinkpathr�)r'r7r8s   r)�remove�workingfilectx.remove�sA���
�
�
�
�(�(��:L�M���
�
���"�"��J�J�m�	#�	
r,c�V�URR"URX4SU0UD6$)�wraps repo.wwrite�backgroundclose)r%�wwriter��r'r_r�r?�kwargss     r)r��workingfilectx.write�s2���z�z� � ��J�J��
�5D�
�HN�
�	
r,c�b�URRRXR5 g)zmarks this file a copy of `src`N)r%rGrr�)r'r�s  r)�
markcopied�workingfilectx.markcopied�s���
�
��� � ��j�j�1r,c�h�URRnURnURU5 URRRSS5(a�UR
U5(a&URU5(dURUSS9 [[[R"U555H,nURU5(dMURU5  g gUR
U5(a)URU5(dURU5 ggg)zcRemoves conflicting items in the working directory so that
``write()`` can be called successfully.
r�smerge.checkpathconflictsT)�forciblyN)r%r�r�r1r�r9�isdirrr�rmtreer1r�r�finddirs�isfileorlink�unlink�
removedirs)r'r�r%r�s    r)�clearunknown�workingfilectx.clearunknown�s����z�z�����J�J���
�
�1�
��:�:�=�=�#�#��8�
�
�
�z�z�!�}�}�T�[�[��^�^����A���-��d�8�#4�#4�Q�#7�8�9���$�$�Q�'�'��K�K��N��:��z�z�!�}�}�T�[�[��^�^�����"�&4�}r,c�d�URRRURX5 gr#)r%r��setflagsr�)r'r�r�s   r)rR�workingfilectx.setflags�s���
�
��� � ����Q�2r,rGr�rF)r9rGrHrIrJr*rMrr_rZr`r�rsr+r.r1rmr;r�rErOrRrNr�r�s@r)rvrvjsl���1�:��&��&�,�6�9�1��2�3�1��
�
�2�#�.3�3r,rvc�,^�\rSrSrSrU4SjrSrS&SjrSr\	S5r
\	S5rS	rS
r
SrSrS
rSrSrSrSrSrSrSrSrSrS'SjrSrSrSrSrSrS(Sjr Sr!Sr"S r#S!r$S)S"jr%S&S#jr&S*S$jr'S%r(U=r)$)+�overlayworkingctxi�amWraps another mutable context with a write-back cache that can be
converted into a commit context.

self._cache[path] maps to a dict with keys: {
    'exists': bool?
    'date': date?
    'data': str?
    'flags': str?
    'copied': str? (path or None)
}
If `exists` is True, `flags` must be non-None and 'date' is non-None. If it
is `False`, the file was deleted.
c�D>�[TU]U5 UR5 gr#)rQr*rb)r'r(r:s  �r)r*�overlayworkingctx.__init__�s���
������
�
�r,c�N�XlU/Ul[R"US5 g)N�	_manifest)�_wrappedctxr�r�clearcachedproperty)r'�
wrappedctxs  r)�setbase�overlayworkingctx.setbase�s#��%��#���
�	
� � ��|�4r,c���Uc URRRnXRR	5:XdeURURR5U/Ulgr#)r%rkr�rZr.r^r�)r'rZr[s   r)rX�overlayworkingctx.setparents�s[���>��Z�Z�-�-�4�4�F��)�)�.�.�0�0�0�0��)�)�4�:�:�+@�+@�+B�6�+J�K��
r,c�L�URU5(arURUS(aBURUSbURUS$URUR5$[R
"SU-5eURUR5$�N�exists�data�No such file or directory: %s)�isdirty�_cacherZr_rr{r�s  r)r_�overlayworkingctx.data�s����<�<�����{�{�4� ��+��;�;�t�$�W�-�9��;�;�t�,�W�5�5� �+�+�D�1�6�6�8�8��,�,�4�t�;����#�#�D�)�.�.�0�0r,c���UR5nUSR5R5nURnUR	5H<nUR
RRX$'URXC"U55 M> UR5H<nUR
RRX$'URXC"U55 M> UR5HnX$	M U$r�)r�r[rr4rur%rkr�r�rtr�rv)r'r�rbr�r�s     r)rM�overlayworkingctx._manifest�s����,�,�.���a�j�!�!�#�(�(�*���~�~���J�J�L�D��
�
�0�0�<�<�C�I��K�K��d�4�j�)�!��M�M�O�D��
�
�0�0�?�?�C�I��K�K��d�4�j�)�$��L�L�N�D��	�#��
r,c�^�U4SjnU$)Nc�(>�TRUS$)N�flags�rg)r�r's �r)r%�&overlayworkingctx._flagfunc.<locals>.f	s����;�;�t�$�X�.�.r,rG�r'r%s` r)r4�overlayworkingctx._flagfunc	s���	/��r,c�x�[UR5UR5-UR5-5$r#)r�rurtrvr/s r)r��overlayworkingctx.files
	s)���d�j�j�l�T�]�]�_�4�t�|�|�~�E�F�Fr,c���URR5Vs/sH6nURUS(dMURU5(dM4UPM8 sn$s snf�Nrc�rg�keys�_existsinparentrps  r)rt�overlayworkingctx.modified	sY���[�[�%�%�'�
�'���{�{�1�~�i�(�
�-1�-A�-A�!�-D�
�'�
�	
��
��A�A�Ac���URR5Vs/sH6nURUS(dMURU5(aM4UPM8 sn$s snfrurvrps  r)ru�overlayworkingctx.added	sY���[�[�%�%�'�
�'���{�{�1�~�i�(�
�15�1E�1E�a�1H�
�'�
�	
��
rzc���URR5Vs/sH6nURUS(aMURU5(dM4UPM8 sn$s snfrurvrps  r)rv�overlayworkingctx.removed	sY���[�[�%�%�'�
�'���;�;�q�>�)�,�
�15�1E�1E�a�1H�
�'�
�	
��
rzc��0nURR5nURR5HCnU"U5(dMUR	US5 URUSnU(dM?XAU'ME U$�N�copied�r%r*rgrwr��r'rYr*r%r�s     r)r��overlayworkingctx.p1copies%	�o�����j�j�,�,�.�����!�!�#�A��q�>�>���J�J�q�$���[�[��^�I�.�F��v�"�q�	�
$��
r,c��0nURR5nURR5HCnU"U5(dMUR	US5 URUSnU(dM?XAU'ME U$r�r�r�s     r)r��overlayworkingctx.p2copies1	r�r,c��gr�rGr/s r)r��overlayworkingctx.isinmemory=	r�r,c��URU5(aURUS$URUR5$)N�date)rfrgrZrsr�s  r)�filedate�overlayworkingctx.filedate@	s?���<�<�����;�;�t�$�W�-�-��#�#�D�)�.�.�0�0r,c�f�URUSURU5URU5US9 g)NT)r+rsr�r)�
_markdirtyr�r�)r'r��origins   r)rE�overlayworkingctx.markcopiedF	s4����������t�$��*�*�T�"��	�	
r,c�T�URU5(aURUS$gr�)rfrgr�s  r)�copydata�overlayworkingctx.copydataO	s(���<�<�����;�;�t�$�Y�/�/�r,c���URU5(aBURUS(aURUS$[R"SU-5eURUR5$)Nrcrmre)rfrgrr{rZr�r�s  r)r��overlayworkingctx.flagsU	sm���<�<�����{�{�4� ��+��{�{�4�(��2�2��,�,�4�t�;����#�#�D�)�/�/�1�1r,c�h�XR;aURUS$XR5;$ru)rgr�rNs  r)rP�overlayworkingctx.__contains__`	s/���+�+���;�;�s�#�I�.�.��g�g�i��r,c�X�URU g![Ra gf=fr)rZrr�r�s  r)rx�!overlayworkingctx._existsinparente	s2��	�
���T�"����(�(�	��	�s��)�)c
�b^�U4SjnURS5n[[U55H'nSRUSU5nUT;dMU"X5 M) TR	U/SS9n[TR
5R5RU55n[U5S:�a}[U5S:Xa
USU:XagUVs/sHo�T;dM
UPM nnU(dg[R"SXTR
5[U5S	RU54-5egs snf)
aReplicates conflict checks done by wvfs.write().

Since we never write to the filesystem and never call `applyupdates` in
IMM, we'll never check that a path is actually writable -- e.g., because
it adds `a/foo`, but `a` is actually a file in the other commit.
c�*>�STR5UR5;a7[R"SXTR5R	54-5e[R"SXTR5R	54-5e)Nrqs*error: %s conflicts with symlink %s in %d.s+error: '%s' conflicts with file '%s' in %d.)r�r�rr�rc)r��	componentr's  �r)�fail�/overlayworkingctx._auditconflicts.<locals>.failw	s�����t�w�w�y��+�1�1�3�3��k�k��!%�$�'�'�)�-�-�/� B�C���
�k�k��"�t�w�w�y�}�}��?�@��r,r�rspath)rrNsberror: file '%s' cannot be written because  '%s/' is a directory in %s (containing %d entries: %s)s, )�split�ranger�r�r
r�r�r[r�rr�)	r'r�r��
componentsr�r�r
�mfilesr�s	`        r)�_auditconflicts�!overlayworkingctx._auditconflictso	s���	� �Z�Z��%�
��s�:��'�A��	�	�*�Q�q�/�2�I��D� ��T�%�(��
�
�D�6�7�
�3���d�g�g�i�(�(�*�/�/��6�7���v�;��?��6�{�a��F�1�I��$5��!'�5��A��9�a��F�5����+�+� ��t�w�w�y�#�f�+�u�z�z�&�7I�J�K��
���6s�	D,�D,c��Uc[R"S5eURU5 URUSU[R
"5US9 g)Nsdata must be non-NoneT)r+r_rsr�)rr{r�r�rr)r'r�r_r�rBs     r)r��overlayworkingctx.write�	sL���<��(�(�)A�B�B����T�"������D�x�/@�/@�/B�%�	�	
r,c�x�SnU(aSnO	U(aSnURUS[R"5US9 g)Nr,rqrjT)r+rsr�)r�rr)r'r�r�r�r�s     r)rR�overlayworkingctx.setflags�	s4������D�
��D�����T��0A�0A�0C�4��Pr,c�$�URUSS9 g)NF)r+)r�r�s  r)r;�overlayworkingctx.remove�	s������U��+r,c�,�URU5(anURUS(aESURUS;a/URURUSR55$URUS$UR	U5$)zaexists behaves like `lexists`, but needs to follow symlinks and
return False if they are broken.
rcrqrmrd)rfrgr+�striprxr�s  r)r+�overlayworkingctx.exists�	s����<�<�������D�!�)�,��D�K�K��-�h�7�7��{�{�4�;�;�t�#4�W�#=�#C�#C�#E�F�F��{�{�4�(��3�3��#�#�D�)�)r,c�t�URU5(aURUS$URU5$)z'lexists returns True if the path existsrc)rfrgrxr�s  r)r.�overlayworkingctx.lexists�	s6���<�<�����;�;�t�$�Y�/�/��#�#�D�)�)r,c��URU5(aKURUS(a[URUS5$[R"SU-5eUR
UR
5$rb)rfrgr�rr{rZr`r�s  r)r`�overlayworkingctx.size�	sr���<�<�����{�{�4� ��+��4�;�;�t�,�W�5�6�6��,�,�4�t�;�������%�*�*�,�,r,c
�r^�Uc&TR5n[U5S:XaUSS4nUScTRUSS4nO$TRUSTRUS4nTR5nU4Sjn	UcTRR5n[
TRUUUU	UUUUUS9
$)z�Converts this ``overlayworkingctx`` into a ``memctx`` ready to be
committed.

``text`` is the commit message.
``parents`` (optional) are rev numbers.
Nrrc
�>�TRRU5nUcTRU5$US(a#[UUUUSSUS;SUS;US5$g)Nrcrdrqrmrjr�)rgr�rS�
memfilectx)r(�memctxr��hitr's    �r)�getfile�+overlayworkingctx.tomemctx.<locals>.getfile�	sq����+�+�/�/�$�'�C��{��|�|�D�)�)��Y��!������L��C��M�)��C��M�)��	�N���r,)rsrurrr>�editor)r�r�r%r�rZr>r�)
r'r�r>rursr�rrr�r�r�s
`         r)�tomemctx�overlayworkingctx.tomemctx�	s����"�?��l�l�n�G��7�|�q� �"�1�:�t�,���1�:���z�z�'�!�*�-�t�4�G��z�z�'�!�*�-�t�z�z�'�!�*�/E�F�G��
�
���	�&�>��%�%�,�,�.�F���J�J����������
�	
r,c��UR5R5nUR5US'URUR	5UR5UUR
5UR5S9$)Nsamend_source)r�r>rursrr)rurrr�rtr>rsrr)r'�	precursorrus   r)�tomemctx_for_amend�$overlayworkingctx.tomemctx_for_amend
sl�����!�&�&�(��!*�����o���}�}��&�&�(��#�#�%�����!����!��
�	
r,c��XR;$r#rnr�s  r)rf�overlayworkingctx.isdirty 
s���{�{�"�"r,c� �SUl0Ulgr#)�_mergestatergr/s r)rb�overlayworkingctx.clean#
s�������r,c	�p�/n[R"UR5UR5R	5[R
"UR5URR554/5 URR5HenURUnURUnUR5US:Xa,UR5US:XaURU5 McMeMg UHnURU	M U$![Ra M�f=f)z�Removes keys from the cache that are actually clean, by comparing
them with the underlying context.

This can occur during the merge process, e.g. by passing --tool :local
to resolve a conflict.
rdrm)r�
prefetchfilesr(r�rc�
matchfilesrgrwrZr_r�rjrr�)r'rwr��cache�
underlyings     r)�_compact�overlayworkingctx._compact'
s����	����I�I�K��G�G�I�M�M�O��&�&�t�y�y�{�D�K�K�4D�4D�4F�G��
�	
��K�K�$�$�&�D��K�K��%�E�	
�!�-�-�d�3�
��O�O�%��w��7�"�(�(�*�e�H�o�=��K�K��%�>�8�'��D����D�!�����
�,�,�
��
�s�/AD�D5�4D5c��U(aXUcUURRU5=(d 0nURS5nUcURUR5nUUUUUS.URU'[R
"US5 g)Nrd)rcrdr�rmr�rY)rgr�rZr_rr[)r'r�r+r_rsr�r�oldentrys        r)r��overlayworkingctx._markdirtyL
s����d�l��{�{���t�,�2��H��<�<��(�D��|��'�'��-�2�2�4�������
����D��	
� � ��|�4r,c�,�[URXUS9$)N)r�r�)�overlayworkingfilectxr%rws   r)rS�overlayworkingctx.filectxa
s��$��J�J��7�
�	
r,c��U(d
URc%[R"UR5UlUR$r#)r�r��
memmergestater%r;s  r)r�overlayworkingctx.mergestatef
s3���D�$�$�,�,�:�:�4�:�:�F�D�����r,)rgr�r�rZr#r�NNNNNN)NNr,NrF)*r9rGrHrIrJr*r]rXr_rMrMr4r�rtrurvr�r�r�r�rEr�r�rPrxr�r�rRr;r+r.r`r�r�rfrbr�r�rSrrNr�r�s@r)rUrU�s������5�L�
1��
��
�����G�
�
�
�
�
��1�
��	2� �
�.�`
�Q�,�*�"*�-���
��
��?
�B	
�#��#�LEI�5�*
�
 � r,rUc�^�\rSrSrSrSU4SjjrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrSSjrSSjrSrSrU=r$)r�il
z�Wrap a ``workingfilectx`` but intercepts all writes into an in-memory
cache, which can be flushed through later by calling ``flush()``.c�J>�[TU]XX45 XlX@lX lgr#)rQr*r%�_parentr�)r'r(r�r�r�r:s     �r)r*�overlayworkingfilectx.__init__p
s!���
����W�5��
����
r,c�D�UR5UR5:g$r#�r_r}s  r)rm�overlayworkingfilectx.cmpv
����y�y�{�d�i�i�k�)�)r,c��UR$r#)r�r/s r)r)�overlayworkingfilectx.changectxy
rXr,c�L�URRUR5$r#)r�r_r�r/s r)r_�overlayworkingfilectx.data|
����|�|� � ����,�,r,c�L�URRUR5$r#)r�r�r�r/s r)rs�overlayworkingfilectx.date
����|�|�$�$�T�Z�Z�0�0r,c�"�UR5$r#)r.r/s r)r+�overlayworkingfilectx.exists�
s���|�|�~�r,c�L�URRUR5$r#)r�r+r�r/s r)r.�overlayworkingfilectx.lexists�
����|�|�"�"�4�:�:�.�.r,c�L�URRUR5$r#)r�r�r�r/s r)rZ� overlayworkingfilectx.copysource�
r�r,c�L�URRUR5$r#)r�r`r�r/s r)r`�overlayworkingfilectx.size�
r�r,c�P�URRURU5 gr#)r�rEr�)r'r�s  r)rE� overlayworkingfilectx.markcopied�
s��������
�
�F�3r,c��gr#rGr/s r)r1�overlayworkingfilectx.audit�
���r,c�L�URRUR5$r#)r�r�r�r/s r)r��overlayworkingfilectx.flags�
s���|�|�!�!�$�*�*�-�-r,c�N�URRURX5$r#)r�rRr�)r'rrrls   r)rR�overlayworkingfilectx.setflags�
s���|�|�$�$�T�Z�Z��@�@r,c�R�URR"URX40UD6$r#)r�r�r�rAs     r)r��overlayworkingfilectx.write�
s"���|�|�!�!�$�*�*�d�D�V�D�Dr,c�L�URRUR5$r#)r�r;r��r'r7s  r)r;�overlayworkingfilectx.remove�
r�r,c��gr#rGr/s r)rO�"overlayworkingfilectx.clearunknown�
r�r,)r�r�r%r�rF)r9rGrHrIrJr*rmr)r_rsr+r.rZr`rEr1r�rRr�r;rOrNr�r�s@r)r�r�l
s`���I��*��-�1��/�1�-�4�
�.�A�E�/�
�
r,r�c�T^�\rSrSrSrSU4SjjrSS	Sjjr\S5rSr	U=r
$)
�workingcommitctxi�
z�A workingcommitctx object makes access to data related to
the revision being committed convenient.

This hides changes in the working directory, if they aren't
committed in this context.
c�(>�[TU]XXEXb5 gr#r)r'r(rr�rrrsrur:s       �r)r*�workingcommitctx.__init__�
s���	����T��@r,c
��U(a.URVs/sHoUUR;dMUPM nnO/n[R"URR
Vs/sHoQ"U5(dMUPM snURRVs/sHoQ"U5(dMUPM snURRVs/sHoQ"U5(dMUPM sn///U5$s snfs snfs snfs snf)z�Return matched files only in ``self._status``

Uncommitted files appear "clean" via this context, even if
they aren't actually so in the working directory.
)rM�_changedsetrrr�rtrurv)r'r
rfrbrer%s      r)r�� workingcommitctx._dirstatestatus�
s���� $���L��1�4�;K�;K�2K�Q��E�L�E��E��~�~����-�-�:�-�1��q��Q�-�:����*�*�7�*�1�e�A�h�Q�*�7����,�,�9�,�1��a��Q�,�9�����
�	
��M��
;��7��9s.�C-�C-� C2�4C2�C7
�(C7
�C<�C<c���[URR5nURURR5 URURR
5 U$)z/Return the set of files changed in this context)rgr�rt�updaterurv)r'�changeds  r)r�workingcommitctx._changedset�
sI���d�l�l�+�+�,�����t�|�|�)�)�*����t�|�|�+�+�,��r,rG)r,NNNrrB)r9rGrHrIrJr*r�rMrrNr�r�s@r)rr�
s;����DH�A�:?�
�	�
�,���r,rc�^^�0mUU4SjnU$)z�Create a filectxfn that caches based on the path.

We can't use util.cachefunc because it uses all arguments as the cache
key and this creates a cycle since the arguments include the repo and
memctx.
c�2>�UT;aT"XU5TU'TU$r#rG)r(r�r�r�rcs   ��r)�
getfilectx�(makecachingfilectxfn.<locals>.getfilectx�
s%����u���t�T�2�E�$�K��T�{�r,rG)rcr
r�s` @r)�makecachingfilectxfnr�
s���
�E��
�r,c�^�U4SjnU$)z�Given a context return a memfilectx for ctx[path]

This is a convenience method for building a memctx based on another
context.
c
�>�TUnUR5n[UUUUR5UR5UR	5US9$�N)rrrlrZ)rZr�r_rrrl)r(r�r�r~rZrs     �r)r
�"memfilefromctx.<locals>.getfilectx�
sL����4�y���_�_�&�
������I�I�K��;�;�=��;�;�=�!�
�	
r,rG)rr
s` r)�memfilefromctxr�
s���
��r,c�^�U4SjnU$)z�Given a patch (e.g. patchstore object) return a memfilectx

This is a convenience method for building a memctx based on a patchstore.
c
�Z>�TRU5up4nUcgUupg[UUUUUUUS9$r)r�r�)	r(r�r�r_r�rZrrrl�
patchstores	        �r)r
�$memfilefrompatch.<locals>.getfilectx�
sI���!+�!3�!3�D�!9���J��<������������!�
�	
r,rG)rr
s` r)�memfilefrompatchr�
s���

��r,c�x^�\rSrSrSrSrSU4SjjrSSjrSr\	S5r
\	S
Sj5rS	rS
r
U=r$)r�ia�Use memctx to perform in-memory commits via localrepo.commitctx().

Revision information is supplied at initialization time while
related files data and is made available through a callback
mechanism.  'repo' is the current localrepo, 'parents' is a
sequence of two parent revisions identifiers (pass None for every
missing parent), 'text' is the commit message and 'files' lists
names of files touched by the revision (normalized and relative to
repository root).

filectxfn(repo, memctx, path) is a callable receiving the
repository, the current memctx object and the normalized path of
requested file, relative to repository root. It is fired by the
commit function for every file in 'files', but calls order is
undefined. If the file is available in the revision being
committed (updated or added), filectxfn returns a memfilectx
object. If the file was removed, filectxfn return None for recent
Mercurial. Moved files are represented by marking the source file
removed and the new file added with copy information (see
memfilectx).

user receives the committer name and defaults to current
repository username, date is the commit date in any format
supported by dateutil.parsedate() and defaults to current date, extra
is a dictionary of metadata or is left empty.
Tc	�>�[TU]XXgX�S9 SUlSUlUVs/sH+o�=(d  URR
RPM- nnUup�X�4Vs/sHo�RUPM snUl[[U55nX@l
0Ul[U[R5(a[U5nO[!U5(d[#U5n[%U5UlU
(a?U
"URU/5UlURR+UR(5 ggs snfs snf)NrF)rQr*r@r�r%rkr�r�r�rg�_filesr�r(r�	filestorer�callablerr�
_filectxfnr��savecommitmessage)r'r(r�r�r��	filectxfnrrrsrur>r�r�r�r�r:s              �r)r*�memctx.__init__1s	���	����T���F���	���
�CJ�K�7�a�8����1�1�8�8�8�7��K����13��9��1���A���9��
��s�5�z�"������
��i����1�1�(��3�I��)�$�$�&�y�1�I�/�y�9������
�
�D�"�5�D�J��J�J�(�(����4���!L��9s�2D>� Ec�:�URURX5$)zhget a file context from the working directory

Returns None if file doesn't exist and should be removed.)rr%rws   r)rS�memctx.filectxUs�����t�z�z�4�6�6r,c�8�URRU5$�zcommit context to the repo�r%�	commitctxr/s r)�commit�
memctx.commit[����z�z�#�#�D�)�)r,c��URSnUR5R5nURRH%nUR
RRX#'M' URRH%nUR
RRX#'M' URRHnX2;dM
X#	M U$)z;generate a manifest based on the return values of filectxfnr)r�r[rr�rtr%rkr�rur�rv)r'r�rbr%s    r)rM�memctx._manifest_s���
�}�}�Q����m�m�o�"�"�$�����&�&�A��Z�Z�-�-�<�<�C�F�'����#�#�A��Z�Z�-�-�9�9�C�F�$����%�%�A��x��F�&��
r,c	��^^�UR5R5mURSnUR5[:waUR5mUU4SjnOU4Sjn///pTnUR
HPnU"U5(dUR
U5 M#X(aUR
U5 M?UR
U5 MR [R"X4U////5$)z?Calculate exact status from ``files`` specified at constructionrc�&>�UT;=(d UT;$r#rG�r%�man1�man2s ��r)r�� memctx._status.<locals>.<lambda>}�����d��!7�a�4�i�!7r,c�>�UT;$r#rG�r%r1s �r)r�r3�	����d�r,�	r�r[r�rcrrrjrr�	r'r��managingrtrurvr%r1r2s	       @@r)r��memctx._statusss�����w�w�y�!�!�#��
�]�]�1�
���6�6�8�w���;�;�=�D�7�H�*�H�#%�r�2������A��A�;�;����Q��������"����q�!�
��~�~�h�w��B��B�G�Gr,c��URSR5[:XaURS/$UR$)Nrr)r�rcrr/s r)r��memctx.parents�s8���=�=�����!�W�,��M�M�!�$�%�%��}�}�r,)rrr�r�r@r�r�)NNNNNr#rB)r9rGrHrIrJ�_returnnoneformissingfilesr*rSr)rMrMr�r�rNr�r�s@r)r�r�se����<"&���
����"5�H7�*�����&�H��H�0�r,r�c�X^�\rSrSrSrS
U4SjjrSrSrSrSSjr	Sr
S	rU=r$)r�i�zhmemfilectx represents an in-memory file to commit.

See memctx and committablefilectx for more details.
c�>�[TU]XSU5 X@lU(aSUlOU(aSUlOSUlXplg)a!
path is the normalized file path relative to repository root.
data is the file content as a string.
islink is True if the file is a symbolic link.
isexec is True if the file is executable.
copied is the source file path if current file was copied in the
revision being committed, or None.Nrqrjr,)rQr*�_datar(�_copysource)	r'r(r)r�r_rrrlrZr:s	        �r)r*�memfilectx.__init__�s<���"	����T�9�5��
���D�K�
��D�K��D�K�%�r,c��UR$r#)rBr/s r)rZ�memfilectx.copysource�s�����r,c�D�UR5UR5:g$r#r�r}s  r)rm�memfilectx.cmp�r�r,c��UR$r#�rAr/s r)r_�memfilectx.data�r�r,c�2�URUR	g)r6N)rr�r�s  r)r;�memfilectx.remove�s��
�O�O�D�J�J�'r,c��Xlg)r>NrI�r'r_r�rBs    r)r��memfilectx.write�s���
r,)rBrAr()FFNrF)
r9rGrHrIrJr*rZrmr_r;r�rNr�r�s@r)r�r��s6�������&�6 �*��(�
�r,r�c�^�\rSrSrSrSU4SjjrSr\S5rSSjr	Sr
\S5r\S
S	j5r
S
rU=r$)�metadataonlyctxi�a�Like memctx but it's reusing the manifest of different commit.
Intended to be used by lightweight operations that are creating
metadata-only changes.

Revision information is supplied at initialization time.  'repo' is the
current localrepo, 'ctx' is original revision which manifest we're reuisng
'parents' is a sequence of two parent revisions identifiers (pass None for
every missing parent), 'text' is the commit.

user receives the committer name and defaults to current repository
username, date is the commit date in any format supported by
dateutil.parsedate() and defaults to current date, extra is a dictionary of
metadata or is left empty.
c	�>�UcUR5n[TU]	XXVU5 SUlSUlX lUR
5UlUcUR5nOUV	s/sHo�cMXPM
 nn	USSn[U5S:a)URU[5 [U5S:aM)U=up�UlUR5Rup�X�RRR :waU
R
5U:wa[#S5eX�RRR :waUR
5U
:wa[#S5eUR%5Ul0UlU(a?U"URU/5UlURR-UR*5 ggs sn	f)Nr�z=can't reuse the manifest: its p1 doesn't match the new ctx p1z=can't reuse the manifest: its p2 doesn't match the new ctx p2)rtrQr*r@r��_originalctxrz�
_manifestnoder�r�rjrr�r�r%rkr��RuntimeErrorr�rr�r�r )r'r(�originalctxr�r�rrrsrur�r�r�r��mp1�mp2r:s              �r)r*�metadataonlyctx.__init__�s�����<��*�*�,�D�
����T��7���	���
�'��(�5�5�7����?�!�)�)�+�G�(/�A��1�w�t�w��G�A��!�*���'�l�Q���N�N�4��=�)��'�l�Q��!(�(������#�#�%�-�-���
���)�)�0�0�0�R�_�_�5F�#�5M��0��
����)�)�0�0�0�R�_�_�5F�#�5M��7��
�
"�'�'�)�����
����
�
�D�"�5�D�J��J�J�(�(����4���/Bs�'G�1Gc��UR$r#)rTr/s r)rz�metadataonlyctx.manifestnodes���!�!�!r,c�H�URRUR$r#)r%r�rTr/s r)r��metadataonlyctx._manifestctx	s���z�z�%�%�d�&8�&8�9�9r,c�4�URRXS9$)N)r�)rSrSrws   r)rS�metadataonlyctx.filectx
s��� � �(�(��(�?�?r,c�8�URRU5$r&r'r/s r)r)�metadataonlyctx.commitr+r,c�6�URR5$r#)rSr[r/s r)rM�metadataonlyctx._manifests��� � �)�)�+�+r,c	��^^�UR5R5mURSnUR5[:waUR5mUU4SjnOU4Sjn///pTnUR
HLnU"U5(dUR
U5 M#X`;aUR
U5 M;UR
U5 MN [R"X4U////5$)zZCalculate exact status from ``files`` specified in the ``origctx``
and parents manifests.
rc�&>�UT;=(d UT;$r#rGr0s ��r)r��)metadataonlyctx._status.<locals>.<lambda>$r4r,c�>�UT;$r#rGr6s �r)r�rf&r7r,r8r9s	       @@r)r��metadataonlyctx._statuss����
�w�w�y�!�!�#��
�]�]�1�
���6�6�8�w���;�;�=�D�7�H�*�H�#%�r�2������A��A�;�;����Q��������"����q�!�
��~�~�h�w��B��B�G�Gr,)rrTr�rSr�r@r�r�r�r#rB)r9rGrHrIrJr*rzr�r�rSr)rMrMr�rNr�r�s@r)rQrQ�sp���
�&�
�
�
���.5�`"��:��:�@�*��,��,��H��Hr,rQc�L�\rSrSrSrS
SjrSrSrSrSr	S	r
S
rSrSr
g)�arbitraryfilectxi4z|Allows you to use filectx-like functions on a file in an arbitrary
location on disk, possibly not in the working directory.
Nc��X lXlgr#)r%r�)r'r�r(s   r)r*�arbitraryfilectx.__init__9s���
��
r,c��SUR5;=(d SUR5;nU(dw[U[5(abUR(aQ[R
"UR
5URRUR
555(+$UR5UR5:g$rp)	r�r(rvr%�filecmprmr��wjoinr_)r'r~�symlinkss   r)rm�arbitraryfilectx.cmp>s����4�:�:�<�'�?�4�4�:�:�<�+?���J�t�^�<�<�����{�{�4�9�9�;��
�
�0@�0@�����0M�N�N�N��y�y�{�d�i�i�k�)�)r,c��UR$r#rr/s r)r��arbitraryfilectx.pathIr�r,c��grfrGr/s r)r��arbitraryfilectx.flagsLs��r,c�B�[R"UR5$r#�r�readfiler�r/s r)r_�arbitraryfilectx.dataO����}�}�T�Z�Z�(�(r,c�B�[R"UR5$r#rwr/s r)r��arbitraryfilectx.decodeddataRrzr,c�D�[R"UR5 gr#)rrMr�r/s r)r;�arbitraryfilectx.removeUs�����D�J�J�r,c�X�U(ae[R"URU5 gr#)r�	writefiler�rNs    r)r��arbitraryfilectx.writeXs����y����t�z�z�4�(r,)r�r%r#)r9rGrHrIrJr*rmr�r�r_r�r;r�rNrGr,r)rjrj4s/����
	*���)�)� �)r,rj)<�
__future__rrnr�r��i18nrr.rrr�r	r
rrr
rrr�rrr�rrrrrrrrrr�
interfacesr�istatus�utilsrr�
dirstateutilsrrMr r)r�rSr�rDrrvrUr�rrrrr�r�rQrjrGr,r)�<module>r�s9��#��	�����
�����(����"�"�
�}
�}
�@l ��l �^	I?�I?�X{
�k�{
�|e�W�e�PP9��P9�f=��=�@Y3�'�Y3�xc ��c �L
5
�.�5
�p)�z�)�X�"�.�0�^��D1�#�1�hkH�n�kH�\&)�&)r,

Youez - 2016 - github.com/yon3zu
LinuXploit