https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/hgext/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/hgext/__pycache__/show.cpython-310.pyc
o

�]Lb�?�@s6dZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZdZiZe�e�Ze��ZGdd�dej�Ze�Zed	d
ddd
ed�fged�ejd�d)dd��Zeddd�dd��Zeddd�dd��Zed�dd��Z eddd�d d!��Z!d"d#�Z"d*d%d&�Z#d'd(�Z$e$�dS)+ajunified 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.
�)�absolute_import)�_)�nullrev)
�cmdutil�commands�destutil�error�	formatter�graphmod�
logcmdutil�phases�pycompat�	registrar�revset�
revsetlang�scmutilsships-with-hg-corec@seZdZdZdZddd�ZdS)�showcmdfuncz;Register a function to be invoked for an `hg show <thing>`.s%s -- %sNcCs||_||_dS)aCalled 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)�_fmtopic�
_csettopic)�self�name�func�fmtopic�	csettopic�r�,/usr/lib/python3/dist-packages/hgext/show.py�_extrasetupBs
zshowcmdfunc._extrasetup�NN)�__name__�
__module__�__qualname__�__doc__�
_docformatrrrrrr<sr�show�T�template�sdisplay with templatesTEMPLATEsVIEW)�helpcategoryNcCsp|��r|std�}tjtd�|d��tj}|sO|�d�|�td��|�d�t|�	��D]\}}|�dt
�|j��q/|�d�tjtd�td	�d��||vr`tjtd
�|td�d��|pcd}||}|�d�|j
r�d|j
}	|�|	d
|i��}
||||
�Wd�S1s�wYdS|jr�d|j}t�|||�}tj|||dd�}
||||
�S|||�S)a�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 mode)�hintr#savailable views:
�
s%s
sno view requesteds#use "hg show VIEW" to choose a viewsunknown view: %ss$run "hg show" to see available viewssshow%sr%NT)�buffered)�plainrr�Abort�showview�_table�pager�write�sorted�itemsr
�sysbytesr!rr	r�lookuptemplater�changesettemplater)�ui�repo�view�templater(�viewsrr�fnr�fm�ref�spec�	displayerrrr�showZsH�


�
�


$�

r@s	bookmarks)rc
s��j}t|�st|tj�s|�td��dS�fdd�|��D�}�j}t	dd�|D��}t
�|�}t|���D].\}}	|�
�|j�|	d�|�dd	|�|�d
|�|	�|�|	��|j||k||d�q8dS)z(bookmarks and their associated changesets(no bookmarks set)
Ncsg|]}�|���qSr)�rev)�.0�node�r7rr�
<listcomp>�sz!showbookmarks.<locals>.<listcomp>css�|]}t|�VqdS�N)�len)rB�brrr�	<genexpr>�s�z showbookmarks.<locals>.<genexpr>��ctxsbookmarks%s�node)�active�longestbookmarklen�nodelen)�
_bookmarksrG�
isinstancer	�
jsonformatterr0r�values�_activebookmark�max�longestshortestr1r2�	startitem�context�hexfunc�data)
r6r7r<�marks�revsrM�longestnamerO�bmrCrrDr�
showbookmarks�s$

��r_sstack)rc	s
|d}|��tkrt�td���|��tjkr!|�td��dSt	�
||�}d}|dur7|��}|��h}nt|�d|��}||}|�
���tkrO|�
�}d}|j}	|	�|��g�D]"}
||
}|��tjkrkn|�|���t|���dkr~d}nq\tt|dd	��}|r�t|�d
|��|��}nt�}t|�|B|hB}t||�}
zt�dtj�d}Wntjtjfy�d}Ynwt�||�}tj|d|
|d
���fdd�}|�r�i�|D]}|	j|g|��d�}tt|���|<q�||d}t|�fdd�dd�}t |�D]i\}}
||
}|�r|�d�n|�d�|�!d�|j"||
d�|�#|�|�d�|�r=|�d�n|�d�|�d�|jtd��|
dd�|�rk|�d �|jd!||�||�fd"d�|�d#��q|�d$�|jtd%�d&d�|�r�|�d'�|jtd(�d&d�|�d)�|D]7}
||
}|
|��k�r�d*nd+}|�r�|�d�n|�d�|�|d�|j"||
d�|�#|�|�d��q�|�r|�r�|�d,�n|�d-�|jtd.�dd&d�|�!d�|j"||
d�|�#|�|�d�dSdS)/zcurrent line of work�.s;stack view only available when there is a working directorysA(empty stack; working directory parent is a published changeset)
Ns%d::.F�T)�reverses heads(%d::) - %ld - not public()srebases{shortest(node, %d)})�	resourcescs��||��d��S)N)sctxrL)�
renderdefault�hexrJ)�shortesttmplrr�shortest!szshowstack.<locals>.shortest)�stoprev���cs�|SrFr)�x)�revdistancerr�<lambda>4szshowstack.<locals>.<lambda>)�keyrbs: s  so  )rOr)s:/s /s    (s%d commits aheadsstack.commitdistance)�labels; shg rebase --source %s --dest %ssstack.rebasehints)
s:
:    s
(stack head)
sstack.labels \ /  s(multiple children)
s  |
�@�os:/   s /   s(stack base))$rArrr,r�phaser�publicr0r�	stackbase�setr\�p1�	changelog�descendants�addrG�children�listr1rVr�findcmdr�table�AmbiguousCommand�UnknownCommandr	�templateresources�
maketemplater�	ancestors�	enumerate�writenoi18nr@�flush)r6r7r?�wdirctx�baserev�basectx�	stackrevsrK�branchpointattip�clrA�newheads�allrevsrO�
haverebase�tresrg�headr��	sourcectx�sortedheads�i�symbolr)rkrfr�	showstack�s������
��
�
��





�
��







�r�s!_underway([commitage[, headage]])c	Cst�|dd�}d|vrd|d<d|vrd|d<d}g}|dr0|d7}|�t�|dtd���|j|g|�R�}t�|�}||�d|�7}d	}g}|dr_|d7}|�t�|dtd
���||j|g|�R�7}|d��}|t	kr||t�|h�7}||@S)Nsunderwayscommitage headages	commitagesheadagesnot public() and not obsolete()s
 and date(%s)scommitage requires a stringsparents(%ld)shead() and not closed()sheadage requires a stringr`)
r�getargsdict�appendr�	getstringrr\�basesetrAr)	r7�subsetrj�args�rs�rsargs�mutable�relevant�wdirrevrrr�underwayrevset�s>
��
��r�sworkcCsN|�d�}t||�}t�||�}|�ddd�tj||||tjd|id�dS)zchangesets that aren't finishedssort(_underway(), topo)sexperimentalsgraphshortenTsnodelen)�propsN)r\rVr
�	dagwalker�	setconfigr�displaygraph�
asciiedges)r6r7r?r\rO�revdagrrr�showwork�s


�r�cCst|�dd�D]1}tjD]+}d||f}tj|tjdd�\}}||vr#q|�d|d�r+q|jd|d|dd	�qqdS)
Nscommandssshow.aliasprefixs%s%sT)�strictsaliassshow %sr#)�source)	�
configlistr-r.r�findpossiblerr|�configr�)r6�prefixr8r�choice�allcommandsrrr�extsetup�s

���r��cs(|s�S�j�t���fdd�|D��S)a�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...``.
    c3s(�|]}tt����|����VqdSrF)rGr�shortesthexnodeidprefixrC)rB�r�r��minlenr7rrrI�s
��
�z"longestshortest.<locals>.<genexpr>)rvrU)r7r\r�rr�rrV�s�rVc	Cs�ttttj����}g}ttj���D]}|�dt�	|�
|��tj|jf�qt�	d�tddj
��t�	d��|�ftdd_
dS)Nz    %s   %ss%s

%s
    r#rs

)rU�maprGr-r.�keysr1r�r
�sysstr�ljust�_origdoc�cmdtabler!�rstrip�join)�longest�entriesrmrrr�_updatedocstrings
����r�r)r�)%r!�
__future__r�mercurial.i18nr�mercurial.noder�	mercurialrrrrr	r
rrr
rrrr�
testedwithr��command�revsetpredicate�_funcregistrarbaserr-�CATEGORY_CHANGE_NAVIGATIONr@r_r�r�r�r�rVr�rrrr�<module>s@<
��
C


?

8




https://t.me/RX1948 - 2025