403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/lib64/python3.9/site-packages/mercurial/__pycache__/templatekw.cpython-39.pyc
a

�+�b}��@sdddlmZddlmZddlmZmZddlmZm	Z	m
Z
mZmZmZm
Z
mZmZmZmZmZddlmZmZejZejZejZejZejZejZd�dd	�Zd
d�ZdZed
edddd�Z e de d<iZ!e�"e!�Z"e"ddhd�dd��Z#e"dddhd�dd��Z$e"ddhd�dd��Z%e"d dhd�d!d"��Z&e"d#ddhd�d$d%��Z'e"d&dhd�d'd(��Z(e"d)ddhd�d*d+��Z)e"d,ddhd�d-d.��Z*e"d/dhd�d0d1��Z+e"d2dhd�d3d4��Z,e"d5d6dhd�d7d8��Z-e"d9d6hd�d:d;��Z.e"d<dhd�d=d>��Z/e"d?dhd�d@dA��Z0d�dCdD�Z1d�dEdF�Z2e"dGhdH�d�dIdJ��Z3e"dKdLhd�dMdN��Z4e"dOddLhd�dPdQ��Z5e"dRddLhd�dSdT��Z6e"dUddLhd�dVdW��Z7e"dXdhd�dYdZ��Z8e"d[hd\�d�d]d^��Z9d_d`�Z:dadb�Z;dcdd�Z<e"dedfd�dgdh��Z=e"didfd�djdk��Z>e"dlhd\�d�dmdn��Z?dodp�Z@e"dqhd\�d�drds��ZAe"dthd\�d�dudv��ZBdwdx�ZCddheC_De"dyddhd�dzd{��ZEe"d|hd}�d�d~d��ZFd�d��ZGe"d�ddhd�d�d���ZHe"d�ddhd�d�d���ZIe"d�dhd�d�d���ZJe"d�dhd�d�d���ZKe"d�d6dhd�d�d���ZLe"d�d�hd�d�d���ZMe"d�dhd�d�d���ZNe"d�ddhd�d�d���ZOe"d�dhd�d�d���ZPe"d�d�hd�d�d���ZQe"d�hd��d�d�d���ZRe"d�ddhd�d�d���ZSe"d�ddhd�d�d���ZTe"d�dhd�d�d���ZUe"d�dhd�d�d���ZVe"d�dhd�d�d���ZWe"d�dhd�d�d���ZXe"d�dhd�d�d���ZYe"d�dhd�d�d���ZZe"d�ddhd�d�d���Z[e"d�dhd�d�d„�Z\e"d�dhd�d�dń�Z]e"d�dhd�d�dȄ�Z^e"d�dhd�d�d˄�Z_e"d�ddhd�d�d΄�Z`e"d�d6hd�d�dф�Zae"d�dhd�d�dԄ�Zbe"d�dhd�d�dׄ�Zce"d�d6hd�d�dڄ�Zde"d�ddhd�d�d݄�Zed�d߄Zfe!�g�ZhdS)��)�absolute_import�)�_)�hex�wdirrev)�diffutil�encoding�error�hbisect�i18n�obsutil�patch�pycompat�	registrar�scmutil�templateutil�util)�
stringutil�urlutilNc
s�|�|d��|�|d��|�|d�}d}|durL|d|7}t�|�d�ntj�||vrndd	d	d
gfi||<||����}|g}|�r�|��}|�vr�q��|���fdd����D�}|r���d	d	d
d�t	|�D�f�|<q�z��fdd���
�D�}t|�dk�rX|d	d|ddk�r6t|�\}	}
}n ��fdd�}t||d�\}	}
}n|d	\}	}
}Wn:t
�y�|�|�|�dd���
�D��Yq�Yn0|	|
d|f�|<q��|S)z8return date, distance and name for the latest tag of rev�repo�ctx�caches
latesttagsN�-����rsnullcs0g|](}��|�r��|�dkr�|�r|�qS)slocal)Ztagtype��.0�t)�match�repo��:/usr/lib64/python3.9/site-packages/mercurial/templatekw.py�
<listcomp>Es �z!getlatesttags.<locals>.<listcomp>cSsg|]}|�qSr r rr r r!r"K�csg|]}�|���qSr ��rev�r�p��
latesttagsr r!r"Nr#rcsn|dd}���durFdd����D�}��d||�}t|�d}n��d���|�}t|�}||dgS)NrrcSsg|]}|���qSr r$)r�cr r r!r"Zr#z.getlatesttags.<locals>.key.<locals>.<listcomp>�
only(%ld, %s)rsonly(%d, %s))r%�parents�revs�len)�x�tag�prevsZchangesZchangessincetag)�ctxrr r!�keyVszgetlatesttags.<locals>.key)r3css|]}|��VqdS�Nr$r&r r r!�	<genexpr>jr#z getlatesttags.<locals>.<genexpr>)�resourcerZ
stringmatcherr�alwaysr%�pop�tags�date�sortedr,r.�max�KeyError�append�extend)
�context�mapping�pattern�cacheZ	cachenamer%Ztodor9ZptagsZpdateZpdistZptagr3r )r2r)rrr!�
getlatesttags+sL�$

rDcCs6tj}|d�}ttdd�|��D�t�|��d���S)z"Return a dict of log column labelssbookmark:    %s
branch:      %s
changeset:   %s
copies:      %s
date:        %s
extra:       %s=%s
files+:      %s
files-:      %s
files:       %s
instability: %s
manifest:    %s
obsolete:    %s
parent:      %s
phase:       %s
summary:     %s
tag:         %s
user:        %s
cSsg|]}|�dd�d�qS)�:rr)�split)r�sr r r!r"�r#z!getlogcolumns.<locals>.<listcomp>T)r�identity�dict�zip�
splitlinesrr)r�columnsr r r!�
getlogcolumnsps���rMs{rev}:{node|formatnode}� s{name} ({source})s
{key}={value}s{key}={value|stringescape})�parent�manifest�	file_copy�envvar�extrarQsfilecopysauthorr)ZrequirescCs
t||�S)zAlias for ``{user}``)�showuser�r@rAr r r!�
showauthor�srVsbisectrcCs(|�|d�}|�|d�}t�||���S)z'String. The changeset bisection status.rr)r6r
Zlabel�node)r@rArr2r r r!�
showbisect�srX�branchcCs|�|d�}|��S)zMString. The name of the branch on which the changeset was
    committed.
    r)r6�branch�r@rAr2r r r!�
showbranch�sr\�branchescCsB|�|d�}|��}|dkr0t||d|gdd�St||dgdd�S)z�List of strings. The name of the branch on which the
    changeset was committed. Will be empty if the branch name was
    default. (DEPRECATED)
    rsdefaultrYr]��plural)r6rZ�
compatlist)r@rAr2rZr r r!�showbranches�s�ras	bookmarkscsP|�|d�}|�|d�}|��}|j��fdd�}t||d|�}t|||tj�S)z{List of strings. Any bookmarks associated with the
    changeset. Also sets 'active', the name of the active bookmark.
    rrcs|��d�S)N)�bookmarksactivescurrentr ��v��activer r!�<lambda>�r#zshowbookmarks.<locals>.<lambda>rb)r6�	bookmarks�_activebookmark�_showcompatlist�_hybridrrH)r@rArr2rh�makemap�fr rer!�
showbookmarks�srn�childrencCs0|�|d�}dd�|��D�}t||d|dd�S)z/List of strings. The children of the changeset.rcSsg|]}d|��|f�qS)s%d:%sr$)rZcctxr r r!r"�r#z showchildren.<locals>.<listcomp>roschild)�element)r6Zchildrenr`)r@rAr2Z	childrevsr r r!�showchildren�s

�rqscurrentbookmarkcCs
t||�S)zUString. The active bookmark, if it is associated with the changeset.
    (DEPRECATED))�showactivebookmarkrUr r r!�showcurrentbookmark�srssactivebookmarkcCs6|�|d�}|�|d�}|j}|r2||��vr2|SdS)zDString. The active bookmark, if it is associated with the changeset.rrr#)r6rirh)r@rArr2rfr r r!rr�srrsdatecCs|�|d�}tj|��dd�S)z<Date information. The date when the changeset was committed.rs%d.0%d)Zshowfmt)r6rr:r[r r r!�showdate�srtsdesccCsZ|�|d�}|��}t|tj�r4t�t�|����St|tj�rNt�|���S|��SdS)z.String. The text of the changeset description.rN)	r6�description�
isinstancerZlocalstrZtolocalZ	fromlocal�stripZsafelocalstr)r@rAr2rGr r r!�showdescription�srxsdiffstat�uicCsj|�|d�}|�|d�}t�|ddi�}|j|d�}t�t�|��}t�|�\}}}	}
}dt	|�|	|
fS)ziString. Statistics of changes with the following format:
    "modified files: +added/-removed lines"
    ryrsnoprefixF)Zoptss%d: +%d/-%d)
r6rZdiffallopts�diffr
ZdiffstatdatarZ	iterlinesZdiffstatsumr.)r@rA�uir2ZdiffoptsrzZstatsZmaxnameZmaxtotalZaddsZremovesZbinaryr r r!�showdiffstat
sr|�envvarscsB|�|d�}|���t��fdd�t��D���t||d�dd�S)z5A dictionary of environment variables. (EXPERIMENTAL)ryc3s|]}|�|fVqdSr4r �r�k��envr r!r5r#zshowenvvars.<locals>.<genexpr>rRr}r^)r6Zexportableenvironr�sortdictr;�
compatdict�r@rAr{r r�r!�showenvvarssr��extrascsv|�|d�}|���t��fdd�t��D����fdd���fdd��D�}t||d|d	d
�}t|���fdd��S)zRList of dicts with key, value entries of the 'extras'
    field of this changeset.rc3s|]}|�|fVqdSr4r r~��extrasr r!r5'r#zshowextras.<locals>.<genexpr>cs|�|d�S)N)skeysvaluer �rr�r r!rg(r#zshowextras.<locals>.<lambda>csg|]}�|��qSr r r~)rlr r!r")r#zshowextras.<locals>.<listcomp>rSr�r^csd|t��|�fS�Ns%s=%s)rZ	escapestrr�r�r r!rg/r#)r6Zextrarr�r;rjrk)r@rAr2r*rmr )r�rlr!�
showextras!s
�r�s
_fast_rankcCs(|�|d�}|��}|dur dSd|S)z�the rank of a changeset if cached

    The rank of a revision is the size of the sub-graph it defines as a head.
    Equivalently, the rank of a revision `r` is the size of the set
    `ancestors(r)`, `r` included.
    rNs%d)r6�	fast_rank)r@rAr2Zrankr r r!r�3s
r�FcCsZ|�|d�}|�|d�}d|vs,|d|krR|��j||||d�}||d<||d<|dS)Nr�revcaches
filestatus�
filestatusall)ZlistignoredZ	listcleanZlistunknown)r6�p1�status)r@rA�listallr2�revcache�statr r r!�_getfilestatusBs�r�cst|�|d�}d|vs |d|krlt|||d�}i|d<}tt�d�|�D] \�}|��fdd�|D��qJ|dS)Nr�s
filestatusmapr��r�sMAR!?ICc3s|]}|�fVqdSr4r )rrm��charr r!r5Tr#z$_getfilestatusmap.<locals>.<genexpr>)r6r�rJrZiterbytestr�update)r@rAr�r�r��statmap�filesr r�r!�_getfilestatusmapNsr�sfile_copies>rr�rrcCst|�|d�}|�|d�}|�|d�}|�|d��d�}|durdd|vrTt�|�|d<|d}||�}t�||d|�S)	zLList of strings. Files copied in this changeset with
    their sources.
    rrrr��copiesNs	getcopiesrQ)r6�getrZgetcopiesfnr�compatfilecopiesdict)r@rArr2rC�copiesZ	getcopiesr r r!�showfilecopiesXs�r�sfile_copies_switchr�cCs&|�|d��d�pg}t�||d|�S)z^List of strings. Like "file_copies" but displayed
    only if the --copied switch is set.
    r�r�rQ)r6r�rr�)r@rAr�r r r!�showfilecopiesswitchps�r�s	file_addscCs |�|d�}t�||d|���S)z/List of strings. Files added by this changeset.rsfile_add)r6r�compatfileslistZ
filesaddedr[r r r!�showfileadds{s�r�s	file_delscCs |�|d�}t�||d|���S)z1List of strings. Files removed by this changeset.rsfile_del)r6rr�Zfilesremovedr[r r r!�showfiledels�s�r�s	file_modscCs |�|d�}t�||d|���S)z2List of strings. Files modified by this changeset.rsfile_mod)r6rr�Z
filesmodifiedr[r r r!�showfilemods�s�r�sfilescCs |�|d�}t�||d|���S)zRList of strings. All files modified, added, or removed by this
    changeset.
    rsfile)r6rr�r�r[r r r!�	showfiles�sr�s	graphnode>rrrcCs0|�|d�}|�|d�}|�|d�}t|||�S)zUString. The character representing the changeset node in an ASCII
    revision graph.rrr)r6�getgraphnode)r@rArr2rCr r r!�
showgraphnode�sr�cCst|||�pt|�Sr4)�getgraphnodecurrent�getgraphnodesymbol)rr2rCr r r!r��sr�cCs�|j��}|d|jkr$|dd�}|��|vr4dS|�d�}|dur�ddlm}|j�|�}|��rt|j	|j
f}nd}||d<|��|vr�dSdSdS)Nr�@smerge_nodes)�
mergestater �%r#)Zdirstater,ZnullidrWr��r��readZunresolvedcount�local�other)rr2rCZwpnodesZmerge_nodesZ
mergestatemodr�r r r!r��s 

r�cCs,|��rdS|��rdS|��r$dSdSdS)N�x�*�_�o)�obsoleteZ
isunstableZclosesbranch�r2r r r!r��sr�s
graphwidthr cCsdS)z?Integer. The width of the graph drawn by 'log --graph' or zero.rr rUr r r!�showgraphwidth�sr�sindexcCst�td���dS)z7Integer. The current iteration of the loop. (0 indexed)scan't use index in this contextN)r	ZAbortrrUr r r!�	showindex�sr��	latesttagcCst||d�S)z�List of strings. The global tags on the most recent globally
    tagged ancestor of this changeset.  If no such tags exist, the list
    consists of the single string "null".
    N)�showlatesttagsrUr r r!�
showlatesttag�sr�csBt|||���fdd�}�d}t||d|dd�}t|||tj�S)z4helper method for the latesttag keyword and functioncst�d||d�S)Nr)schangessdistancer��tag)�_showchangessincetagrcr(r r!rg�s
�z showlatesttags.<locals>.<lambda>rr�rE)�	separator)rDrjrkrrH)r@rArBrlr9rmr r(r!r��s
r�slatesttagdistancecCst||�dS)z(Integer. Longest path to the latest tag.r)rDrUr r r!�showlatesttagdistance�sr�schangessincelatesttagcCs,t||�dd}|�|d|i�}t||�S)z-Integer. All ancestors not in the latest tag.rrr�)rD�
overlaymapr�)r@rAr0r r r!�showchangessincelatesttag�sr�cCsj|�|d�}|�|d�}d}|��g}|�|d�}|��durTd}dd�|��D�}t|�d||��|S)	Nrrrr�rcSsg|]}|���qSr r$r&r r r!r"r#z(_showchangessincetag.<locals>.<listcomp>r+)r6r%�symbolr,r.r-)r@rArr2�offsetr-r0r r r!r�s
r�rPcs�|�|d�}|�|d�}|��}|dur>|jj}t�|jj�n|j�|��t|��|�	|��d��}|�
d|�}t�|d|��fdd��S)Nrr��rev�noderPcs
��d�S)Nr�r �r/�ZmhexZmrevr r!rg)r#zshowmanifest.<locals>.<lambda>)
r6ZmanifestnodeZ
nodeconstantsZwdiridrZwdirhexZmanifestlogr%rr�ZprocessrZ
hybriditem)r@rArr2Zmnodermr r�r!�showmanifests
�r�sobsfate>ryrrcCslt||�}|�|d�}|�|d�}g}|�||�D]*}t�|||d|dtj�}|�|�q2t||d|�S)Nryr�
successors�markerssfate)	�showsuccsandmarkersr6ZtovaluerZobsfateprinterr�formatchangeidr>r`)r@rAZsuccsandmarkersr{r�valuesr/rdr r r!�showobsfate-s
�r�cCsT|�|d�}|�|d�}|j�|�}|dur0dS|�||���}t|||j||d�S)z<helper method to generate a template keyword for a namespacerrNr^)r6�namesr�rWr`�templatename)r@rA�	namespacerr2�nsr�r r r!�	shownamesBs�r�s
namespacesc	s�|�|d��|�|d�}t���dd�}t��j�D]>\}}|��|���}t||d|�}t||||�tj	��|<q4t||dt
���}��fdd�}t|�|tj	�S)	zBDict of lists. Names attached to this changeset per
    namespace.rrcs�fdd�S)Ncsd|�j|iS)N�name)r�rc�r�r r!rg\r#z5shownamespaces.<locals>.makensmapfn.<locals>.<lambda>r r�r r�r!�makensmapfnZsz#shownamespaces.<locals>.makensmapfnr��	namespacecs"|�|�j|j�j|jd�S)N)r�snamessbuiltins	colorname)r�ZbuiltinZ	colornamer��Z
namespacesrr r!rles


�zshownamespaces.<locals>.makemap)r6rr�r�	iteritemsr�rWrjrkrH�list)	r@rAr2r�rr�r�rmrlr r�r!�shownamespacesQsr�snegrevcCs@|�|d�}|��}|dus$|dkr(dS|�|d�}|t|�S)zmInteger. The repository-local changeset negative revision number,
    which counts in the opposite direction.rNrr)r6r%r.)r@rAr2r%rr r r!�
shownegrevpsr�r�cCs|�|d�}|��S)zUString. The changeset identification hash, as a 40 hexadecimal
    digit string.
    r)r6rr[r r r!�shownode|sr��obsoletecCs|�|d�}|��rdSdS)z9String. Whether the changeset is obsolete. (EXPERIMENTAL)rr�r#)r6r�r[r r r!�showobsolete�sr�sonelinesummarycCs0ddlm}|�|d�}|�|d�}|�||�S)z�String. A one-line summary for the ctx (not including trailing newline).
    The default template be overridden in command-templates.oneline-summary.r)�cmdutilryr)r�r�r6Zformat_changeset_summary)r@rAr�r{r2r r r!�showonelinesummary�sr��path�fctxcCs|�|d�}|��S)zDString. Repository-absolute path of the current file. (EXPERIMENTAL)r�)r6�path�r@rAZfctxr r r!�showpath�sr�speerurlscsZ|�|d�}|jj�t�|j�}t�dd�|D����fdd�}�fdd�}td�||�S)	zcA dictionary of repository locations defined in the [paths] section
    of your configuration file.rcss|]\}}||jfVqdSr4)�rawloc)rrr'r r r!r5�r#zshowpeerurls.<locals>.<genexpr>cs��|}d|i}t|�dkrR|dj|d<t�|dj�}t�t|��}|�|�t��}|D]8}t�tt�|j���}|j|d<|�|�|g|d<q^|S)Nr�rrsurlsurls)	r.r�rr�Z
suboptionsrr�r;r�)rZps�dZsub_optsZ	path_dictr')�pathsr r!rl�s


zshowpeerurls.<locals>.makemapcsd|�|fSr�r r�)�urlsr r!�
format_one�sz showpeerurls.<locals>.format_oneN)r6r{r�rZ
list_pathsrr�rk)r@rArZ	all_pathsrlr�r )r�r�r!�showpeerurls�sr�spredecessorscsV|�|d��|�|d�}tt��|����}t�t|�}td|�fdd��fdd��S)zDReturns the list of the closest visible predecessors. (EXPERIMENTAL)rrNcsd�|iS�Nrr r��rr r!rg�r#z"showpredecessors.<locals>.<lambda>cst��|�Sr4�rr�r�r�r r!rg�r#)	r6r;rZclosestpredecessorsrWrZmaplistrrk)r@rAr2Zpredecessorsr r�r!�showpredecessors�s

�r�sreporootcCs|�|d�}|jS)z5String. The root directory of the current repository.r)r6�root)r@rArr r r!�showreporoot�sr�ssizecCs|�|d�}|��S)z:Integer. Size of the current file in bytes. (EXPERIMENTAL)r�)r6�sizer�r r r!�showsize�sr�sstatus>r�r�rcCsNt�||d�}t�|||�}|s$dSt||�}||vrDt||dd�}|�|�S)z7String. Status code of the current file. (EXPERIMENTAL)r�NTr�)rZ	runsymbol�	stringifyr�r�)r@rAr�r�r r r!�
showstatus�s
r�ssuccessorssetscs����d�����d�}g}|��rxtj�|��dd�}dd�|D�}|D],}td|�fdd	��fd
d	��}|�|�qJ��fdd���fd
d�}t||�|dd	�tj�S)z�Returns a string of sets of successors for a changectx. Format used
    is: [ctx1, ctx2], [ctx3] if ctx has been split into ctx1 and ctx2
    while also diverged into ctx3. (EXPERIMENTAL)rrT)ZclosestcSsg|]}dd�|D��qS)cSsg|]}t|��qSr �r�r�nr r r!r"�r#z1showsuccessorssets.<locals>.<listcomp>.<listcomp>r )r�ssr r r!r"�r#z&showsuccessorssets.<locals>.<listcomp>Ncsd�|iSr�r r�r�r r!rg�r#z$showsuccessorssets.<locals>.<lambda>cst��|�Sr4r�r�r�r r!rgr#cst���|�Sr4)rr�)r�rUr r!�rendersz"showsuccessorssets.<locals>.renderc3sd��fdd�|D��VdS)Ns; c3s|]}�|�VqdSr4r )rr��r�r r!r5	r#z2showsuccessorssets.<locals>.gen.<locals>.<genexpr>)�join)�datar�r r!�genszshowsuccessorssets.<locals>.gencSsd|iS)Nssuccessorsetr r�r r r!rgr#)	r6r�rZsuccessorssetsrWrkr>rrH)r@rAr2rZssetsr��hrr )r@rAr�rr!�showsuccessorssets�s&

��rssuccsandmarkersc
s|�|d��|�|d�}t��|�}|dur0g}g}|D]�}|d}dd�|D�}td|�fdd��fd	d��}g}|d
D]|}t|d�}	tdd
�|dD��}
d}|ddur�tdd
�|dD��}|	|
f|dd�|f|dd�}|�|�q||�||d��q8t�|�S)z�Returns a list of dict for each final successor of ctx. The dict
    contains successors node id in "successors" keys and the list of
    obs-markers from ctx to the set of successors in "markers".
    (EXPERIMENTAL)
    rrNr�cSsg|]}t|��qSr r�r�r r r!r"%r#z'showsuccsandmarkers.<locals>.<listcomp>csd�|iSr�r r�r�r r!rg)r#z%showsuccsandmarkers.<locals>.<lambda>cst��|�Sr4r�r�r�r r!rg*r#r�rcss|]}t|�VqdSr4r�r�r r r!r51r#z&showsuccsandmarkers.<locals>.<genexpr>r�css|]}t|�VqdSr4r�r�r r r!r54r#r�)r�r�)	r6rZsuccessorsandmarkersrkr�tupler>r�mappinglist)
r@rAr2r�r�iZ
successorsZfinalmarkers�mZhexprecZhexsucsZ
hexparentsZ	newmarkerr r�r!r�s4

�&r�sp1cCs"|�|d�}tjd|��itd�S)z�Changeset. The changeset's first parent. ``{p1.rev}`` for the revision
    number, and ``{p1.node}`` for the identification hash.r��tmpl)r6r�mappingdictr��
_changeidtmplr[r r r!�showp1=srsp2cCs"|�|d�}tjd|��itd�S)z�Changeset. The changeset's second parent. ``{p2.rev}`` for the revision
    number, and ``{p2.node}`` for the identification hash.rr
)r6rr�p2r
r[r r r!�showp2Esrsp1revcCs|�|d�}|����S)z�Integer. The repository-local revision number of the changeset's
    first parent, or -1 if the changeset has no parents. (DEPRECATED)r)r6r�r%r[r r r!�	showp1revMsrsp2revcCs|�|d�}|����S)z�Integer. The repository-local revision number of the changeset's
    second parent, or -1 if the changeset has no second parent. (DEPRECATED)r)r6rr%r[r r r!�	showp2revUsrsp1nodecCs|�|d�}|����S)z�String. The identification hash of the changeset's first parent,
    as a 40 digit hexadecimal string. If the changeset has no parents, all
    digits are 0. (DEPRECATED)r)r6r�rr[r r r!�
showp1node]srsp2nodecCs|�|d�}|����S)z�String. The identification hash of the changeset's second
    parent, as a 40 digit hexadecimal string. If the changeset has no second
    parent, all digits are 0. (DEPRECATED)r)r6rrr[r r r!�
showp2nodefsrsparentscsp|�|d��|�|d�}t��|�}dd�|D�}dd�|D�}t||d|�}t||�fdd��fd	d�td
�S)z�List of strings. The parents of the changeset in "rev:node"
    format. If the changeset has only one "natural" parent (the predecessor
    revision) nothing is shown.rrcSsg|]}|���qSr r$r&r r r!r"wr#zshowparents.<locals>.<listcomp>cSs.g|]&}d|��fd|��fd|��fg�qS)r�r��phase)r%r�phasestrr&r r r!r"xs�rOcsd�|iSr�r r�r�r r!rg�r#zshowparents.<locals>.<lambda>cst��|�Sr4r�r�r�r r!rg�r#)Zkeytype)r6rZmeaningfulparentsrjrk�int)r@rAr2Zpctxsr1r,rmr r�r!�showparentsos�

�rrcCs|�|d�}|��S)z!String. The changeset phase name.r)r6rr[r r r!�	showphase�srsphaseidxcCs|�|d�}|��S)z.Integer. The changeset phase index. (ADVANCED)r)r6Zphaser[r r r!�showphaseidx�srr�cCs|�|d�}t�|�S)z8Integer. The repository-local changeset revision number.r)r6rZintrevr[r r r!�showrev�srssubreposcCs�|�|d�}|j}|s$t||dg�S|��jp0i}g}|D]&}||vsV||||kr:|�|�q:|D]}||vrf|�|�qft||dt|��S)z:List of strings. Updated subrepositories in the changeset.rssubrepo)r6�substater`r�r>r;)r@rAr2rZ	psubstateZsubrepos�subr r r!�showsubrepos�sr�tagscCst||d�S)z8List of strings. Any tags associated with the changeset.r)r�rUr r r!�showtags�sr s	termwidthcCs|�|d�}|��S)z+Integer. The width of the current terminal.ry)r6Z	termwidthr�r r r!�
showtermwidth�sr!susercCs|�|d�}|��S)z/String. The unmodified author of the changeset.r)r6�userr[r r r!rT�srT�
instabilitiescCs"|�|d�}t||d|��dd�S)zYList of strings. Evolution instabilities affecting the changeset.
    (EXPERIMENTAL)
    rsinstabilityr#r^)r6r`Z
instabilitiesr[r r r!�showinstabilities�s�r$s	verbositycCs.|�|d�}|jrdS|jr dS|jr*dSdS)zOString. The current output verbosity in 'debug', 'quiet', 'verbose',
    or ''.rysdebugsquietsverboser#)r6Z	debugflag�quiet�verboser�r r r!�
showverbosity�sr'swhyunstablecs�|�|d��|�|d�}dd��t��|�}|D]H}|�d�r0|d}tddd�|D��fd	d
���fdd
��}||d<q0d}tj||d
d�S)zRList of dicts explaining all instabilities of a changeset.
    (EXPERIMENTAL)
    rrcSsdt�|�|��fS)Ns%s (%s))rr�rr�r r r!�
formatnode�sz#showwhyunstable.<locals>.formatnodesdivergentnodesNcSsg|]}|���qSr r�)rZdnoder r r!r"�r#z#showwhyunstable.<locals>.<listcomp>csd�|iSr�r r�r�r r!rg�r#z!showwhyunstable.<locals>.<lambda>cs��|�Sr4r r��r(rr r!rg�r#sM{instability}:{if(divergentnodes, " ")}{divergentnodes} {reason} {node|short}�
)r�sep)r6rZwhyunstabler�rkrr)r@rAr2�entries�entryZdnodesZdnhybridrr r)r!�showwhyunstable�s"

�
�r.cCs"t�|j�D]\}}|t|<qdS)z1Load template keyword from specified registrarobjN)rr�Z_table�keywords)r{ZextnameZregistrarobj�name�funcr r r!�loadkeywordsr2)N)F)F)iZ
__future__rrrrWrrr�rrr	r
rr
rrrrrZutilsrrZhybridrkZ
hybriddictZ
hybridlistr�r`rjrDrMr
Zdefaulttemplr/ZtemplatekeywordrVrXr\rarnrqrsrrrtrxr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�Z	_requiresr�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�rrrrrrrrrrrr r!rTr$r'r.r2r�Z
i18nfunctionsr r r r!�<module>s.8
E �






















�







	





















!
,


















Youez - 2016 - github.com/yon3zu
LinuXploit