HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //lib64/python2.7/site-packages/hgext/show.pyc
�
1�3\c@@s�dZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZdZiZeje�Zej�Zdejfd��YZe�Zed	d
ddd
ed�fged�dej�d d d��Zeddd�d��Zeddd�d��Z ed�d��Z!eddd�d��Z"d�Z#dd�Z$d�Z%e%�d S(!sjunified command to show various repository information (EXPERIMENTAL)

This extension provides the :hg:`show` command, which provides a central
command for displaying commonly-accessed repository data and views of that
data.

The following config options can influence operation.

``commands``
------------

``show.aliasprefix``
   List of strings that will register aliases for views. e.g. ``s`` will
   effectively set config options ``alias.s<view> = show <view>`` for all
   views. i.e. `hg swork` would execute `hg show work`.

   Aliases that would conflict with existing registrations will not be
   performed.
i(tabsolute_import(t_(tnullrev(
tcmdutiltcommandstdestutilterrort	formattertgraphmodt
logcmdutiltphasestpycompatt	registrartrevsett
revsetlangtscmutilsships-with-hg-coretshowcmdfunccB@s#eZdZdZddd�ZRS(s;Register a function to be invoked for an `hg show <thing>`.s%s -- %scC@s||_||_dS(sCalled with decorator arguments to register a show view.

        ``name`` is the sub-command name.

        ``func`` is the function being decorated.

        ``fmtopic`` is the topic in the style that will be rendered for
        this view.

        ``csettopic`` is the topic in the style to be used for a changeset
        printer.

        If ``fmtopic`` is specified, the view function will receive a
        formatter instance. If ``csettopic`` is specified, the view
        function will receive a changeset printer.
        N(t_fmtopict
_csettopic(tselftnametfunctfmtopict	csettopic((s0/usr/lib64/python2.7/site-packages/hgext/show.pyt_extrasetupCs	N(t__name__t
__module__t__doc__t
_docformattNoneR(((s0/usr/lib64/python2.7/site-packages/hgext/show.pyR=stshowtTttemplatetsdisplay with templatetTEMPLATEtVIEWthelpcategorycC@s�|j�r=|r=td�}tjtd�d|��ntj}|s�|jd�|jtd��|jd�x=t|j	��D])\}}|jdt
j|j��q�W|jd�tjtd�dtd	���n||krtjtd
�|dtd���n|p'd}||}|jd�|j
r�d|j
}	|j|	i|d
6��}
||||
�SWdQXnc|jr�d|j}tj|||�}tj|||dt�}
||||
�S|||�SdS(s�show various repository information

    A requested view of repository data is displayed.

    If no view is requested, the list of available views is shown and the
    command aborts.

    .. note::

       There are no backwards compatibility guarantees for the output of this
       command. Output may change in any future Mercurial release.

       Consumers wanting stable command output should specify a template via
       ``-T/--template``.

    List of available views:
    s2invoke with -T/--template to control output formats%must specify a template in plain modethintRsavailable views:
s
s%s
sno view requesteds#use "hg show VIEW" to choose a viewsunknown view: %ss$run "hg show" to see available viewssshow%sR Ntbuffered(tplainRRtAborttshowviewt_tabletpagertwritetsortedtitemsRtsysbytesRRRRtlookuptemplateR	tchangesettemplatertTrue(tuitrepotviewR R%tviewsRRtfnRtfmtreftspect	displayer((s0/usr/lib64/python2.7/site-packages/hgext/show.pyRYs:	

!


	
	
t	bookmarksRc
C@s7|j}t|�sAt|tj�s=|jtd��ndSg|j�D]}||j�^qN}|j	}t
d�|D��}t||�}x�t|j
��D]�\}	}|j�|jd||�|jdd|	�|jd|j|�|j|��|jd|	|kd	|d
|�q�WdS(s(bookmarks and their associated changesets(no bookmarks set)
Ncs@s|]}t|�VqdS(N(tlen(t.0tb((s0/usr/lib64/python2.7/site-packages/hgext/show.pys	<genexpr>�stctxtbookmarks%stnodetactivetlongestbookmarklentnodelen(t
_bookmarksR=t
isinstanceRt
jsonformatterR,Rtvaluestrevt_activebookmarktmaxtlongestshortestR-R.t	startitemtcontextthexfunctdata(
R3R4R8tmarksRBtrevsRCtlongestnameREtbm((s0/usr/lib64/python2.7/site-packages/hgext/show.pyt
showbookmarks�s"	)	
%tstackRc@s�|d}|j�tkr4tjtd���n|j�tjkr`|jtd��dSt	j
||�}d}|dkr�|j�}|j�h}nt|j
d|��}||}|j�j�tkr�|j�}nt}|j}	xx|	j|j�g�D]^}
||
}|j�tjkr<Pn|j|j��t|j��dkrt}PqqWtt|dt��}|r�t|j
d|j�|��}n	t�}t|�|Bt|g�B}t||�}
ytjd	tj�t}Wn#tjtjfk
r.t}nXtj ||�}tj!|d
|
d|���fd�}|r6i�xB|D]:}|	j"|gd
|j��}tt|���|<qW||d}t|d�fd�dt�}xt#|�D]\}}
||
}|r%|jd�n
|jd�|jd�|j$|d|
�|j%|�|jd�|r�|jd�n
|jd�|jd�|jtd��|
dd�|r�|jd�|jd||�||�fdd�n|jd�q�W|jd �|jtd!�dd"�n|rr|jd#�|jtd$�dd"�|jd%�nx�|D]�}
||
}|
|j�kr�d&nd'}|r�|jd�n
|jd�|j|d�|j$|d|
�|j%|�|jd�qyW|r�|r'|jd(�n
|jd)�|jtd*�ddd"�|jd�|j$|d|
�|j%|�|jd�ndS(+scurrent line of workt.s;stack view only available when there is a working directorysA(empty stack; working directory parent is a published changeset)
Ns%d::.itreverses heads(%d::) - %ld - not public()trebases{shortest(node, %d)}t	resourcesc@s!�ji|d6|j�d6�S(NR@RB(t
renderdefaultthex(R@(tshortesttmpl(s0/usr/lib64/python2.7/site-packages/hgext/show.pytshortestststoprevi����tkeyc@s�|S(N((tx(trevdistance(s0/usr/lib64/python2.7/site-packages/hgext/show.pyt<lambda>R!s: s  so  REs
s:/s /s    (s%d commits aheadtlabelsstack.commitdistances; shg rebase --source %s --dest %ssstack.rebasehints)
s:
:    s
(stack head)
sstack.labels \ /  s(multiple children)
s  |
t@tos:/   s /   s(stack base)(&RJRRR(RtphaseR
tpublicR,Rt	stackbaseRtsetRStp1tFalset	changelogtdescendantstaddR=tchildrenR2tlistR-RMRtfindcmdRttabletAmbiguousCommandtUnknownCommandRttemplateresourcest
maketemplatert	ancestorst	enumerateRtflush(R3R4R;twdirctxtbaserevtbasectxt	stackrevsR@tbranchpointattiptclRJtnewheadstallrevsREt
haverebasettresR_theadRyt	sourcectxtsortedheadstitsymbol((RcR^s0/usr/lib64/python2.7/site-packages/hgext/show.pyt	showstack�s�

	
	

	
	







	









s!_underway([commitage[, headage]])c	C@s]tj|dd�}d|kr.d|d<nd|krGd|d<nd}g}|dr�|d7}|jtj|dtd���n|j||�}tj|�}||jd|�7}d	}g}|dr
|d7}|jtj|dtd
���n||j||�7}|dj	�}|t
krU|tj|h�7}n||@S(Ntunderwayscommitage headaget	commitagetheadagesnot public() and not obsolete()s
 and date(%s)scommitage requires a stringsparents(%ld)shead() and not closed()sheadage requires a stringRX(R
tgetargsdictRtappendRt	getstringRRStbasesetRJR(	R4tsubsetRbtargstrstrsargstmutabletrelevanttwdirrev((s0/usr/lib64/python2.7/site-packages/hgext/show.pytunderwayrevsetbs2






tworkc
C@sp|jd�}t||�}tj||�}|jddt�tj||||tjdi|d6�dS(schangesets that aren't finishedssort(_underway(), topo)texperimentaltgraphshortentpropsREN(	RSRMRt	dagwalkert	setconfigR2R	tdisplaygrapht
asciiedges(R3R4R;RSREtrevdag((s0/usr/lib64/python2.7/site-packages/hgext/show.pytshowwork�scC@s�x�|jdd�D]�}x�tjD]�}d||f}tj|tjdt�\}}||krlq#n|jd|d�r�q#n|j
d|d|dd�q#WqWdS(	NRsshow.aliasprefixs%s%ststricttaliassshow %stsourceR(t
configlistR)R*RtfindpossibleRRtR2tconfigRR�(R3tprefixR5Rtchoicetallcommands((s0/usr/lib64/python2.7/site-packages/hgext/show.pytextsetup�sic@s3|s
�S�j�t���fd�|D��S(s�Return the length of the longest shortest node to identify revisions.

    The result of this function can be used with the ``shortest()`` template
    function to ensure that a value is unique and unambiguous for a given
    set of nodes.

    The number of revisions in the repo is taken into account to prevent
    a numeric node prefix from conflicting with an integer revision number.
    If we fail to do this, a value of e.g. ``10023`` could mean either
    revision 10023 or node ``10023abc...``.
    c3@s3|])}ttj��j|����VqdS(N(R=RtshortesthexnodeidprefixRB(R>tr(R�tminlenR4(s0/usr/lib64/python2.7/site-packages/hgext/show.pys	<genexpr>�s(RnRL(R4RSR�((R�R�R4s0/usr/lib64/python2.7/site-packages/hgext/show.pyRM�s
	cC@s�ttttjj���}g}xPttjj��D]9}|jtj	d|j
|�tj|jf��q:Wtj	d�tddj
j�tj	d�j|�ftdd_
dS(Ns    %s   %ss%s

%s
    Ris

(RLtmapR=R)R*tkeysR-R�Rtsysstrtljustt_origdoctcmdtableRtrstriptjoin(tlongesttentriesRa((s0/usr/lib64/python2.7/site-packages/hgext/show.pyt_updatedocstring�s(N(&Rt
__future__Rtmercurial.i18nRtmercurial.nodeRt	mercurialRRRRRRR	R
RRR
RRt
testedwithR�tcommandtrevsetpredicatet_funcregistrarbaseRR)tCATEGORY_CHANGE_NAVIGATIONRRRVR�R�R�R�RMR�(((s0/usr/lib64/python2.7/site-packages/hgext/show.pyt<module>s.X		<�2