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

6�h?w����SrSSKJr SSKrSSKrSSKrSSKJr SSKJ	r	 SSK
JrJrJ
r
JrJrJrJrJrJrJrJrJrJrJrJrJrJrJr SSKJrJr SSK J!r! 0r"\RF"\"5r#S	r$S
r%Sr&Sr'S
r(SSSSSS.r)\RT"5r*0r+\RX"\+5r,\,"SSSS9 \*"S\RZS9S5r.\*"S\RZS9S5r/\*"S\RZS9S5r0SS 0r1S!r2S"r3S#r4"S$S%5r5"S&S'\R 5r6S(r7S)r8\#"S*S+S,S\"S-54S.S/S \"S05\"S154/\"S25S3S49S55r9\#"S6\Rt\"S75S3S89S95r;\#"S:S;S<S\"S=54S>S?S\"S@54SASBS\"SC54/\Rt-\"SD5S3S89SE5r<\#"SF\Rt\"SG5S3S89SH5r=SRSIjr>SJr?SKr@SLrASSSMjrBSNrCSOrDSPrESQrFg)TaCexpand keywords in tracked files

This extension expands RCS/CVS-like or self-customized $Keywords$ in
tracked text files selected by your configuration.

Keywords are only expanded in local repositories and not stored in the
change history. The mechanism can be regarded as a convenience for the
current user or for archive distribution.

Keywords expand to the changeset data pertaining to the latest change
relative to the working directory parent of each file.

Configuration is done in the [keyword], [keywordset] and [keywordmaps]
sections of hgrc files.

Example::

    [keyword]
    # expand keywords in every python file except those matching "x*"
    **.py =
    x*    = ignore

    [keywordset]
    # prefer svn- over cvs-like default keywordmaps
    svn = True

.. note::

   The more specific you are in your filename patterns the less you
   lose speed in huge repositories.

For [keywordmaps] template mapping and expansion demonstration and
control run :hg:`kwdemo`. See :hg:`help templates` for a list of
available templates and filters.

Three additional date template filters are provided:

:``utcdate``:    "2006/09/18 15:13:13"
:``svnutcdate``: "2006-09-18 15:13:13Z"
:``svnisodate``: "2006-09-18 08:13:13 -700 (Mon, 18 Sep 2006)"

The default template mappings (view with :hg:`kwdemo -d`) can be
replaced with customized keywords and templates. Again, run
:hg:`kwdemo` to control the results of your configuration changes.

Before changing/disabling active keywords, you must run :hg:`kwshrink`
to avoid storing expanded keywords in the change history.

To force expansion after enabling it, or a configuration change, run
:hg:`kwexpand`.

Expansions spanning more than one line and incremental expansions,
like CVS' $Log$, are not supported. A keyword template map "Log =
{desc}" expands to the first line of the changeset description.
�)�annotationsN)�_)�webcommands)�cmdutil�context�dispatch�error�
extensions�filelog�	localrepo�
logcmdutil�match�merge�patch�pathutil�pycompat�	registrar�scmutil�templatefilters�templateutil�util)�dateutil�
stringutil)�	timestampsships-with-hg-coresgadd addremove annotate bundle export grep incoming init log outgoing push tip verify convert email glogz/annotate changeset rev filediff diff comparisonsfmerge kwexpand kwshrink record qrecord resolve transplant unshelve rebase graft backout histedit fetchsrecords
green boldscyan bold underlinesgreensboldsnone)skwfiles.enabledskwfiles.deletedskwfiles.enabledunknownskwfiles.ignoredskwfiles.ignoredunknown�
keywordset�svnF)�defaultsutcdate)�intypec�>�Sn[R"USS4U5$)z?Date. Returns a UTC-date in this format: "2009/08/18 11:00:13".s%Y/%m/%d %H:%M:%Sr�r�datestr��date�
dateformats  �//usr/lib/python3/dist-packages/hgext/keyword.py�utcdater&�s$��&�J����T�!�W�a�L�*�5�5�s
svnisodatec�0�[R"US5$)zUDate. Returns a date in this format: "2009-08-18 13:00:13
+0200 (Tue, 18 Aug 2009)".
s%%Y-%m-%d %H:%M:%S %1%2 (%a, %d %b %Y)r )r#s r%�
svnisodater)�s��
���D�"J�K�Kr's
svnutcdatec�>�Sn[R"USS4U5$)zADate. Returns a UTC-date in this format: "2009-08-18
11:00:13Z".
s%Y-%m-%d %H:%M:%SZrr r"s  r%�
svnutcdater+�s$��
'�J����T�!�W�a�L�*�5�5r'�hgcmdr'c�x�SSS.nSSSSSSS	.S
SSSS
S.4nURX RS
S55 U$)zBReturns default keywordmaps according to keywordset configuration.s{node|short}s
{author|user})sRevisionsAuthors{date|utcdate}s{file|basename},vs{root}/{file},vs;{file|basename},v {node|short} {date|utcdate} {author|user}s9{root}/{file},v {node|short} {date|utcdate} {author|user})�DatesRCSfilesRCSFilesSource�IdsHeaders{date|svnisodate}s>{file|basename},v {node|short} {date|svnutcdate} {author|user})r.r/sLastChangedRevisions
LastChangedBysLastChangedDaterr)�update�
configbool)�ui�	templates�kwsetss   r%�_defaultkwmapsr5�sk��%�#��I�'�,�,�)�Q�S�	
�*�T�$3�.� 4�	
��F�$���V�M�M�-��@�A�B��r'c��U"SU5$)zhHelper for keyword expansion removal in text.
Depending on subfunc also returns number of substitutions.s$\1$�)�text�subfuncs  r%�_shrinktextr:�s���8�T�"�"r'c��URVs/sHo"U;dM
UPM nnURVs/sHo"U;dM
UPM nnX44$s snfs snf)z�Retrieves modified and added files from a working directory state
and returns the subset of each contained in given changed files
retrieved from a change context.)�modified�added)�wstatus�changed�fr<r=s     r%�
_preselectrA�sP��#�+�+�<�+�a�G�|��+�H�<��
�
�6�
�1�g��Q�
�E�6��?���=��6s�	A
�A
�	A�Ac���\rSrSrSrSr\S5r\RS5r
\RS5r\RS5rSr
S	rS
rSrSSjrS
rSrSrSrg)�kwtemplater��zf
Sets up keyword templates, corresponding keyword regex, and
provides keyword substitution functions.
c��Xl[R"U5Ul[R"UR
S/X45Ul[S[R5;Ul	SUl
URRS5nU(a[U5Ul
g[UR5Ul
g)Nr'r,F�keywordmaps)r2�weakref�ref�_repor�root�kwtools�
restricted�split�restrict�
postcommit�configitems�dictr3r5)�selfr2�repo�inc�exc�kwmapss      r%�__init__�kwtemplater.__init__�s������[�[��&��
��[�[����C��S�>��
���)�Z�-=�-=�-?�?��
�������$�$�^�4���!�&�\�D�N�+�D�G�G�4�D�Nr'c�"�UR5$�N)rI�rRs r%rS�kwtemplater.repos���z�z�|�r'c��SR[[RURR555$)z+Returns bar-separated and escaped keywords.�|)�join�mapr�reescaper3�keysr[s r%�escape�kwtemplater.escape	s-���y�y��Z�0�0�$�.�.�2E�2E�2G�H�I�Ir'c�H�[R"SUR-5$)z&Returns regex for unexpanded keywords.s\$(%s)\$��re�compilercr[s r%�rekw�kwtemplater.rekws���z�z�,����4�5�5r'c�H�[R"SUR-5$)z$Returns regex for expanded keywords.s\$(%s): [^$\n\r]*? \$rfr[s r%�rekwexp�kwtemplater.rekwexps���z�z�3�d�k�k�A�B�Br'c�(^^^�UUU4SjnU"XQ5$)z1Replaces keywords in data with expanded template.c�~>�URS5n[R"TRTRTR
U5nTRR
5 URTTRRTS9 [R"TRR55nSX4-$)N�)rJ�files	$%s: %s $)�groupr
�
maketemplaterr2rSr3�
pushbuffer�showrJr�	firstline�	popbuffer)�mobj�kw�ct�ekw�ctx�pathrRs    ���r%�kwsub�%kwtemplater.substitute.<locals>.kwsubs�������A��B��)�)�������D�N�N�2�$6��B�
�G�G��� ��G�G�C�d�i�i�n�n�4�G�8�!�+�+�D�G�G�,=�,=�,?�@�C��2�)�+�+r'r7)rR�datar}r|r9r~s` ``  r%�
substitute�kwtemplater.substitutes���	,��u�#�#r'c�P�URRXS9R5$)z4Similar to filelog.linkrev, but returns a changectx.)�fileid)rS�filectx�	changectx)rRr}r�s   r%�linkctx�kwtemplater.linkctx's#���y�y� � �� �5�?�?�A�Ar'c��UR(dhURU5(aR[R"U5(d7UR	X5nURX1X@RR5$U$)z$Returns data with keywords expanded.)rNrr�binaryr�r�ri�sub)rRr}�noder�r|s     r%�expand�kwtemplater.expand+sW���
�
��
�
�4� � ��%�%�d�+�+��,�,�t�*�C��?�?�4�s�I�I�M�M�B�B��r'c��UVs/sH3o0RU5(dMSURU5;dM1UPM5 sn$s snf)zcReturns subset of candidates which are configured for keyword
expansion but are not symbolic links.�l)r�flags)rR�candr|r@s    r%�iskwfile�kwtemplater.iskwfile6s5�� �N�4�a�:�:�a�=��T����1��5M��4�N�N��Ns�A�A�Ac���UR(dU(dUR(aURX!5nU(dgUR=(a UnUR(dU(aU(aUR5nUR(dU(a
URnOUR
nU(a[
S5n	O[
S5n	URSn
UGHvnUR(a.URRU5RWU5nOURRU5n[R"U5(aM{U(a�UR5n
U(aURUWU5nO^UR(aM[U
5S:�a>U
H8nX�;dM
X�R!X5(aM&X�R#5n O UR%X�XR&5up�O:UR(aUR)U5nO[+X�R&5up�U(dGMpUR,R/X�-5 URR1USSS9nUR3U5 UR55 U(anX�R75nUR8nUR:n[<R>"U5nUUU4nURR@RCUU5 GM>UR(dGMRURR@REUSS9 GMy g)	z7Overwrites selected files expanding/shrinking keywords.Ns"overwriting %s expanding keywords
s"overwriting %s shrinking keywords
rpswbT)�
atomictemp)�
p1_tracked)#rNrOr��manifestrirlrrSrq�read�wreadrr��parentsr��len�cmpr�r��subn�searchr:r2�note�wvfs�write�close�lstat�st_mode�st_sizer�mtime_of�dirstate�	set_clean�update_file_p1)rRr|�
candidates�lookupr�ri�kwcmd�mf�re_kw�msg�wctxr@r�r��p�found�fp�s�mode�size�mtime�
cache_datas                      r%�	overwrite�kwtemplater.overwrite;sN���=�=�F�d�o�o����z�7�J����
�
�(�&���=�=�F�v�����B��=�=�D��I�I�E��L�L�E���:�;�C��:�;�C��y�y�����A��}�}��y�y�~�~�a�(�-�-�b��e�4���y�y���q�)��� � ��&�&����+�+�-����,�,�q�"�Q�%�0�C��]�]�s�7�|�a�'7�%���6�!�$�(�(�3�6�*:�*:�"#�$�.�.�"2�C�!�%�#�o�o�d�s�J�J�G���e�������T�*��)�$�
�
�;����u������S�W�%��Y�Y�^�^�A�u��^�>����������
����
�
��A��9�9�D��9�9�D�%�.�.�q�1�E�"&��e�!4�J��I�I�&�&�0�0��J�?��_�_�_��I�I�&�&�5�5�a�D�5�I�Kr'c��URU5(a:[R"U5(d[X RR
5$U$)z4Returns text with all keyword substitutions removed.)rrr�r:rlr�)rR�fnamer8s   r%�shrink�kwtemplater.shrinkts;���:�:�e���Z�%6�%6�t�%<�%<��t�\�\�%5�%5�6�6��r'c���URU5(aZSRU5n[R"U5(d.[	X0R
R5RS5$U$)z1Returns lines with keyword substitutions removed.r'T)rr_rr�r:rlr��
splitlines)rRr��linesr8s    r%�shrinklines�kwtemplater.shrinklineszsT���:�:�e����8�8�E�?�D��$�$�T�*�*�"�4���)9�)9�:�E�E�d�K�K��r'c�J�UR(aURX5$U$)zUIf in restricted mode returns data read from wdir with
keyword substitutions removed.)rNr�)rRr�r�s   r%r��kwtemplater.wread�s���=�=��;�;�u�+�+��r')rIrrOrNr3r2N�F)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rW�propertyrSr�
propertycachercrirlr�r�r�r�r�r�r�r��__static_attributes__r7r'r%rCrC�s����
5�����
���J��J�
���6��6�
���C��C�
$�B�	�O�
7J�r��r'rCc�T^�\rSrSrSrU4SjrU4SjrSU4SjjrU4SjrSr	U=r
$)	�	kwfilelogi�zz
Subclass of filelog to hook into its read, add, cmp methods.
Keywords are "stored" unexpanded, and processed on reading.
c�<>�[TU]X5 X lX0lgrZ)�superrW�kwtr})rR�openerr�r}�	__class__s    �r%rW�kwfilelog.__init__�s���
����&����	r'c�>�[TU]U5nURU5(aU$URR	UR
X5$)z&Expands keywords when reading filelog.)r�r��renamedr�r�r})rRr�r�r�s   �r%r��kwfilelog.read�s>����w�|�D�!���<�<�����K��x�x���t�y�y�$�5�5r'c�r>�URRURU5n[TU]XX4XV5$)z5Removes keyword substitutions when adding to filelog.)r�r�r}r��add)rRr8�meta�tr�link�p1�p2r�s       �r%r��
kwfilelog.add�s.����x�x���t�y�y�$�/���w�{�4�r��8�8r'c�n>�URRURU5n[TU]X5$)z-Removes keyword substitutions for comparison.)r�r�r}r�r�)rRr�r8r�s   �r%r��
kwfilelog.cmp�s*����x�x���t�y�y�$�/���w�{�4�&�&r')r�r})NN)r�r�r�r�r�rWr�r�r�r��
__classcell__)r�s@r%r�r��s!����
�
6�9�
'�'r'r�c	�z�U(aaUR[R"X$[R"U55SURS5=(d URS5S9$UR
S5(a[R"[S55e[R"[S55e)zXBails out if [keyword] configuration is not active.
Returns status of working directory.T�unknown�all)r�cleanr��keywords[keyword] patterns cannot matchs no [keyword] patterns configured)
�statusrrr�byteskwargs�getrPr	�Abortr)r2rSr�r��pats�optss      r%�_statusr��s�����{�{��-�-��H�,@�,@��,F�G���H�H�Y�'�:�4�8�8�E�?��
�	
�

�~�~�j�!�!��k�k�!�>�?�@�@�
�+�+�a�;�<�
=�=r'c�~�USn[UR55S:�a[R"[	S55e[USS5nUR
5 URRU5 [XXV/UQ70UD6nUR(d3UR(d"UR(dUR(a[R"[	S55eURXWRSU5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)z7Selects files and passes them to kwtemplater.overwrite.Nrpsoutstanding uncommitted merge�_keywordkwtsoutstanding uncommitted changesT)r�r�r	r�r�getattr�wlockr��changing_filesr�r<r=�removed�deletedr�r�)r2rSr�r�r�r�r�r�s        r%�	_kwfwriter��s�����:�D�
�4�<�<�>��Q���k�k�!�<�=�>�>�
�$�
�t�
,�C�	
����t�}�}�3�3�D�9���4�<�t�<�t�<���?�?�f�l�l�f�n�n�����+�+�a� B�C�D�D��
�
�d�L�L�$��7�	:���9�9����s%�D.�;BD�D.�
D+	�'D.�.
D<skwdemo�dsdefaults"show default keyword template maps�f�rcfilesread maps from rcfilesFILEs+hg kwdemo [-d] [-f RCFILE] [TEMPLATEMAP]...T)�optionalrepoc��
^�U4SjnSn[R"SS5nTR[S5U-5 UcTnOURn[
R"XvSS9nTRS	USS	5 TRS
S5nTRS
SUS	5 TRS5n	U(dURS
5(GaFTR[S55 U	(aTR[S55 URS5(dU	(d<U(aTR[S55 OTR[S55 URS
5(a TRURS55 U(aZSSRU5-n
URRSU
5 TRURRS55 [!TRS55nO�URS5(a�U(aTR[S55 OTR[S55 [#T5nU	(aFTR[S55 UR%5Hup�TRSX�S	5 M O8TR[S55 U	(a[!U	5nO[#T5n['T5 [)TU5 TR+S5 U"S	TRS	55 U"S
TRS
55 U"SUR%55 SSR[-UR/555-S-nUR0RX^5 UR35 UR4R7U5 USR9U/5 SSS5 TR[S5U-5 TRU5 UR4R;S UR=55 TRS!5HNunnUR?S"S#5S$RAS%5S&:�dM0URBRS!USS	5 MP [S'5nTRES(U-5 URGUS)9 SSS5 TR[S*55 TRURIU55 UR0RKURL5 g!,(df   GN`=f!,(df   N�=f)+azprint [keywordmaps] configuration and an expansion example

Show current, custom, or default keyword template maps and their
expansions.

Extend the current configuration by specifying maps as arguments
and using -f/--rcfile to source an external hgrc file.

Use -d/--default to disable current configuration.

See :hg:`help templates` for information on templates and filters.
c��>�TRSU-5 [U5HEup#[U[5(a[R
"U5nTRSX#4-5 MG g)Ns[%s]
s%s = %s
)r��sorted�
isinstance�boolr�pprint)�section�items�k�vr2s    �r%�	demoitems�demo.<locals>.demoitems�sT���
����W�$�%��5�M�D�A��!�T�"�"��%�%�a�(���H�H�\�Q�F�*�+�"r'sdemo.txtr'skwdemo.s$creating temporary repository at %s
NT)�creater�rrrF�rcfiles3
	configuration using custom keyword template maps
s!	extending current template maps
rs#	overriding default svn keywordset
s#	overriding default cvs keywordset
r�s[keywordmaps]
%s
�
shgrcs-
	configuration using default svn keywordset
s-
	configuration using default cvs keywordset
s!	disabling current template maps
s4
	configuration using current keyword template maps
s[extensions]
keyword =
�$s$
$s$
s
keywords written to %s:
s
demobranchshooks�.rprscommit���s.hg keyword configuration and expansion exampleshg ci -m '%s'
)r8s
	keywords expanded
)'r�mkdtempr�r�baseuir�instance�	setconfigr1rPr�r��
readconfigr_�vfsr�rQr5r�uisetup�	reposetup�writenoi18nrrbr�r�r�r�r��	setbranch�currenttransactionrM�findr2�
notenoi18n�commitr��rmtreerJ)r2rS�argsr�r�fn�tmpdirr�svn�uikwmaps�rcmapsrVrr�keywords�name�cmdr�s`                 r%�demor(�s����.,�
�B�
�
�
�c�:�
.�F��G�G�A�6�7�&�@�A��|����������f�T�:�D��L�L��R��j�1�
�-�-�
�v�
.�C��L�L����Z�8��~�~�n�-�H��t�x�x��!�!�
�	�	�!�M�N�O���I�I�a�>�?�@��8�8�I���h���	�	�!�D�E�F��	�	�!�D�E�F��8�8�H����M�M�$�(�(�9�-�.��+�e�j�j��.>�>�F��H�H�N�N�7�F�+��M�M�$�(�(�-�-��0�1��b�n�n�^�4�5��	
���)�	�	���I�I�a�K�L�M��I�I�a�K�L�M���#����I�I�a�>�?�@����������^�Q�:�>�'��	�	�	�!�N�O�P���(�^�F�#�B�'�F��B�K�
�b�$���N�N�/�0�
�j�"�.�.��4�5�
�m�R�^�^�M�:�;�
�n�f�l�l�n�-��g�l�l�6�&�+�+�-�#8�9�9�F�B�H��I�I�O�O�B�!�	
����
�]�]�
)�
)�$�
/���J�N�N�B�4� �0�
����0�1�B�6�7�
������
�
���
�t�/F�/F�/H�I�����1�I�D�#��z�z�$��"�1�%�*�*�9�5��:����!�!�(�D�#�z�B�2��A�B��
�
�
�(�3�.�/�������
��I�I�a�*�+�,��H�H�T�Z�Z��^���I�I���T�Y�Y��0�
/��
��s,�?U�U
�1BU�AU�

U	�U�
U*skwexpands!hg kwexpand [OPTION]... [FILE]...)�	inferrepoc�$�[XS/UQ70UD6 g)z�expand keywords in the working directory

Run after (re)enabling keyword expansion.

kwexpand refuses to run if given files contain local changes.
TN�r��r2rSr�r�s    r%r�r�)s���b��,�t�,�t�,r'�kwfiles�Asalls&show keyword status flags of all files�i�ignores"show files excluded from expansion�usunknowns%only show unknown (not tracked) filess hg kwfiles [OPTION]... [FILE]...c
��[USS5nUSn[XXT/UQ70UD6nU(aUR5nOSn/nURS5(aURS5(a/[	UR
UR-UR-5nURX�5n	URURU5n
URURU5nURS5(aURS5(aX�U4nO///4nURS5(dURS5(aAUUV
s/sHo�U	;dM
U
PM sn
URV
s/sHo�U;dM
U
PM sn
4-
nSR5n[U[R"S5U5nURS	[R "U55nS
nURS5(dUR"(aSnUHYunnnSU-nUHGn
UR%5 UR'UU
S
9 UR)UUUR+X�54-US9 MI M[ UR-5 gs sn
fs sn
f)aGshow files configured for keyword expansion

List which files in the working directory are matched by the
[keyword] configuration patterns.

Useful to prevent inadvertent keyword expansion and to speed up
execution by including only files that are actual candidates for
expansion.

See :hg:`help keyword` on how to construct patterns both for
inclusion and exclusion of files.

With -A/--all and -v/--verbose the codes used to show the status
of files are::

  K = keyword expansion candidate
  k = keyword expansion candidate (not tracked)
  I = ignored
  i = ignored (not tracked)
r�Nr'r�r��ignores5enabled deleted enabledunknown ignored ignoredunknownsK!kIir-s%.0s%s
s%s %s
skwfiles.)�kwstatusr})�label)r�r��getcwdr�rr<r=r�r�r�r�rM�zipr�bytestr�	formatterr��verbose�	startitemr��plain�pathto�end)r2rSr�r�r�r�r��cwd�files�kwfiles�	kwdeleted�	kwunknown�	showfilesr@�kwlabels�kwstates�fm�fmt�kwstate�char�	filenamesr5s                      r%r@r@:s��@�$�
�t�
,�C���:�D�
�R�t�
8�4�
8�4�
8�F���k�k�m�����E��8�8�I���$�(�(�5�/�/��v������5����D�E���l�l�5�'�G����V�^�^�T�2�I����V�^�^�T�2�I��8�8�H������%����	�1�	���B�J�	��x�x����$�(�(�8�,�,���2��1�'�!1�Q��2����=��1�9�*<�Q��=�
�	
�	�H�M�M�O�H��8�X�-�-�h�7��C�H�	���j�(�"6�"6�t�"<�	=�B�
�C��x�x����"�*�*���$,� ���y��g�%���A��L�L�N��G�G�T��G�*��H�H�S�D�$�+�+�a�"5�6�6�e�H�D��%-��F�F�H��
3��=s�
	I8�I8�-	I=�:I=skwshrinks!hg kwshrink [OPTION]... [FILE]...c�$�[XS/UQ70UD6 g)z�revert expanded keywords in the working directory

Must be run before changing/disabling active keywords.

kwshrink refuses to run if given files contain local changes.
FNr+r,s    r%r�r��s���b��-��-��-r'c��U"XX4XV5 [[USS5SS5nU(a,URURUR5Ulgg)zpMonkeypatch/wrap patch.patchfile.__init__ to avoid
rejects or conflicts due to expanded keywords in working dir.rSNr�)r�r�r�r�)�origrRr2�gp�backend�store�eolmoder�s        r%�kwpatchfile_initrS�sI��	��2��/�
�'�'�6�4�0�-��
F�C�
��_�_�T�Z�Z����<��
�r'c/��# �[USS5nU(aURnSUlU"U/UQ70UD6Shv�N U(aWUlggN!U(aWUlff=f7f)z*Monkeypatch patch.diff to avoid expansion.r�NT)r�rN)rNrSr�kwargsr�rNs      r%�kwdiffrV�sg���
�$�
�t�
,�C�
��<�<�����$���.�t�.�v�.�.�.��#�C�L��	/���#�C�L��s+�(A%�A�A�A�A%�A�A"�"A%c#�# �[URSS5nU(a!URn[RUlU"U5Shv�N U(aWUlggN!U(aWUlff=f7f)z2Wraps webcommands.x turning off keyword expansion.r�N)r�rSrr�never)rN�webr��	origmatchs    r%�
kwweb_skipr[�sd���
�#�(�(�M�4�
0�C�
��I�I�	��J�J��	�"���9����!�C�I��	���!�C�I��s0�AA9�A%�A#�A%�A9�#A%�%A6�6A9c
��[USS5nUc
U"XX4XV5$UR5 URRU5 SUlU"XX4XV5nX�R5:wa3X(n	SUlURX�R5SS5 SUlUsSSS5 sSSS5 $!,(df   O=fSSS5 g!,(df   g=f)z3Wraps cmdutil.amend expanding keywords after amend.r�NTF)	r�r�r��changing_parentsrOr�rNr�r@)
rNr2rS�old�extrar�r�r��newidr|s
          r%�kw_amendra�s���
�$�
�t�
,�C�
�{��B�c�$�5�5�	
����t�}�}�5�5�d�;�����R�s�4�6���H�H�J���+�C��C�L��M�M�#�y�y�{�E�4�8� �C�L��<�;���;�;�����s$�C
�AB3� 	C
�3
C	�=C
�
Cc�^^	^
^�[TSS5m
T
cU"UTX4U5$TR5 U"UTX4U5 URS5(a
SSS5 gTSmTR5m	U	U
UU4SjnTRR5Vs/sH+nSTR
U5;dMU"U5(dM)UPM- nnT
RTUSS5 SSS5 gs snf!,(df   g=f)a�Wraps cmdutil.copy so that copy/rename destinations do not
contain expanded keywords.
Note that the source of a regular file destination may also be a
symlink:
hg cp sym x                -> x is symlink
cp sym x; hg cp -A sym x   -> x is file (maybe expanded keywords)
For the latter we have to follow the symlink to find out whether its
target is configured for expansion and we therefore must unexpand the
keywords in the destination.r�Nsdry_runc�>�TRRU5nSTRU5;a?[R"TR
T[RRU55nTRU5$)z�Returns true if dest is a regular file and configured for
expansion or a symlink which points to a file configured for
expansion.r�)
r��copiedr�r�	canonpathrJ�osr}�realpathr)�dest�sourcer?r�rSr�s  ����r%�haskwsource�kw_copy.<locals>.haskwsource�se����]�]�)�)�$�/�F��t�z�z�&�)�)�!�+�+��I�I�s�B�G�G�$4�$4�V�$<����9�9�V�$�$r'r�F)r�r�r�r6r��copiesr�r�)rNr2rSr�r��renamerjr@r�r?r�r�s  `      @@@r%�kw_copyrn�s�����$�
�t�
,�C�
�{��B��d�&�1�1�	
�����R��t�6�*��8�8�J����
���D�z���k�k�m��		%�		%��]�]�)�)�+�
�+���4�:�:�a�=�(�
�-8��^�
�+�	�
�
	�
�
�d�J��u�5�/
���$
�%
��s/�#C,�:C,�C'�3C'�C'�C,�'C,�,
C:c	��[USS5nUc
U"XU/UQ70UD6$UR5 SUlUSnUR5nU"XU/UQ70UD6n	USn
Xz:wat[	X�R55up�SUlURRU5 URX�SS5 URX�SSS5 SSS5 SUlU	sSSS5 $!,(df   N =f!,(df   g=f)z9Wraps record.dorecord expanding keywords after recording.r�NTrF)
r�r�rOr�rAr@rNr�r]r�)
rNr2rS�
commitfuncr�r�r�r|r>�ret�recctxr<r=s
             r%�kw_dorecordrs�s���
�$�
�t�
,�C�
�{��B�j�8�4�8�4�8�8�	
��������4�j���*�*�,���2�Z�7�$�7�$�7���d����=�(��,�,�.�A�O�H� �C�L����/�/��5��
�
�f��t�<��
�
�f�U�D�$�?�6� �C�L��
��6�5��
��s$�A1C2�(C!�C2�!
C/	�+C2�2
Dc�B�UR(aURU5$[URSS5nUcU"X5$URcxURR
(dUR
UR55(aSUR5;dGUR5S-
UR5:Xd"UR5UR5:Xa4URRURUR55$g)Nr�r��T)�
_customcmpr�r�rI�	_filenode�_encodefilterpatsrr}r�r��_filelogr�)rNrR�fctxr�s    r%�
kwfilectx_cmpr{s�������x�x��~��
�$�*�*�m�T�
2�C�
�{��D���	
�����J�J�(�(��y�y�����%�%��D�J�J�L�(��y�y�{�Q��$�)�)�+�-��9�9�;�$�)�)�+�%��}�}� � ��������=�=�r'c�v�Sn[R"[SU5 [R"[RS[
5 [R"[RS[5 [R"[S[5 [R"[S[5 [R"[S[5 [R"[S[5 [R5H#n[R"[ U["5 M% S	[$lg
)aMonkeypatches dispatch._parse to retrieve user command.
Overrides file method to return kwfilelog instead of filelog
if file matches user configuration.
Wraps commit to overwrite configured files with updated
keyword substitutions.
Monkeypatches patch and webcommands.c�6�U"X5up4p%nU[S'X4X%U4$)z9Monkeypatch dispatch._parse to obtain running hg command.r,)rK)rNr2rr'�func�options�
cmdoptionss       r%�kwdispatch_parse�!uisetup.<locals>.kwdispatch_parse$s)��/3�B�~�,��4�*������$��3�3r'�_parser�rW�diff�amend�copy�dorecordFN)r
�wrapfunctionrrr�r{r�	patchfilerSrVrrarnrs�nokwwebcommandsrMrr[r�MAYBE_USE_RUST_UPDATE)r2r��cs   r%rrs���4����H�h�0@�A����G�O�O�U�M�B����E�O�O�Z�9I�J����E�6�6�2����G�W�h�7����G�V�W�5����G�Z��=�
�
"�
"�
$������Q�
�;�%�"'�E�r'c�^�UR5(ac[S[R5;dDS[R
"UR5;d URRS5(ag/S/p2URS5H/upEUS:waURU5 MURU5 M1 U(dg[XX#5m"U4SjS	UR5nXal
TUlg![a N�f=f)
z0Sets up repo as kwrepo for keyword substitution.r,s.hgsbundle:Ns.hg*r�r0c�h>^�\rSrSrU4SjrUU4SjrU4SjrSUU4SjjrS	UU4SjjrSr	U=r
$)
�reposetup.<locals>.kwrepoiPc�N>�USS:XaUSSn[URTU5$)Nr�/rp)r��svfs)rRr@r�s  �r%rq�reposetup.<locals>.kwrepo.fileQs,�����t�t�|��a�b�E���T�Y�Y��Q�/�/r'c�D>�[TU]U5nTRX5$rZ)r�r�)rR�filenamer�r�r�s   ��r%r��reposetup.<locals>.kwrepo.wreadVs ����7�=��*�D��9�9�X�,�,r'c�Z>�URUl[TU]"U0UD6U?$!U?f=frZ)�kwcommitctx�	commitctxr�r)rRrr�r�s   �r%r� reposetup.<locals>.kwrepo.commitZs3���"�-�-�D�N�
#��w�~�t�4�t�4��N��D�N�s�&�*c�>�[TU]XU5nTR(dXTRnSTlTR	X[UR
5UR5-5SS5 UTlU$)NTF)r�r�rOrNr�rr=r<)rRr|r	�origctx�nrNr�r�s      ��r%r��%reposetup.<locals>.kwrepo.kwcommitctxcsf�����!�#�g�6�A��>�>��<�<��#����
�
��G�V�C�I�I�K�#�,�,�.�$@�A�5�$�� (����Hr'c�>�UR5 T
RnU(dUSR5n[T	U]X5nU(dNUSn[UR
5W5upxST
lT
RXgSS5 T
RXhSS5 UUT
lsSSS5 $!UT
lf=f!,(df   g=f)NrFT)r�rNr@r��rollbackrAr�r�)rR�dryrun�force�origrestrictr?rqr|r<r=r�r�s         ��r%r��"reposetup.<locals>.kwrepo.rollbackos��������"�|�|��0�!�"&�t�*�"2�"2�"4���'�*�6�9�C�!�"�4�j��*4�S�Z�Z�\�7�*K���',����
�
�c�T�4�@��
�
�c�$��>��#/�C�L����$0�C�L����s#�
B<�A?B0�B<�0	B9�9B<�<
C
)r�)FN)FF)r�r�r�r�rqr�rr�r�r�r�)r�r�s@�r%�kwrepor�Ps&���	0�
	-�	#�
	�
	�	0�	0r'r�)�localrK�nokwcommandsrMr�	splitpathrJ�_url�
startswith�AttributeErrorrP�appendrCr�r�)r2rSrTrU�pat�optr�r�s       @r%rr7s����	
��
�
����x� �L�$6�$6�$8�8������	�	�2�2��y�y�#�#�J�/�/��0��G�9���N�N�:�.����)���J�J�s�O��J�J�s�O�	/�
��
�b��
)�C�.0����.0�`�N��D����
��
�s�A8C?�?
D�DrZr�)Gr��
__future__rrfrgrG�mercurial.i18nr�mercurial.hgwebr�	mercurialrrrr	r
rrr
rrrrrrrrrr�mercurial.utilsrr�mercurial.dirstateutilsr�cmdtable�command�
testedwithr�r�rL�recordextensions�
colortable�templatefilter�configtable�
configitemr#r&r)r+rKr5r:rArCr�r�r�r(�walkoptsr�r@r�rSrVr[rarnrsr{rrr7r'r%�<module>r�s���:6�r#�	�	���'������(�.�
��
�
�
�H�
%��
#�
�4�
�D��
5����&�.�'��&��
��)�)�+����
�
!�
!�+�
.�
�
��
����
�<�#4�#4�5�6�6�6��
�l�&7�&7�8�L�9�L��
�l�&7�&7�8�6�9�6��S�/���8#��U�U�p'����'�:>�
8�	�
�	
�z�4��#H�!I�J�	
�y�#�q�!9�:�A�g�J�G���4�5���[ ��[ �|	������*�+��	�-�
�-�	��	
�v�t�Q�H�I�J�	
�y�$��"G� H�I�	
�z�4��#K�!L�M��
�����)�*��
�8
�
�8
�v	������*�+��	�.�
�.�=�
$�
"�
� $6�N�.�,(�6Jr'

Youez - 2016 - github.com/yon3zu
LinuXploit