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 :  /lib64/python3.9/site-packages/hgext/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/hgext/__pycache__/show.cpython-39.pyc
a

�+�b�?�@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�0/usr/lib64/python3.9/site-packages/hgext/show.py�_extrasetupBszshowcmdfunc._extrasetup)NN)�__name__�
__module__�__qualname__�__doc__Z
_docformatrrrrrr<sr�show�T�template�sdisplay with templatesTEMPLATEsVIEW)ZhelpcategoryNcCsx|��r&|s&td�}tjtd�|d��tj}|s�|�d�|�td��|�d�t|�	��D]\}}|�dt
�|j��q^|�d�tjtd�td	�d��||vr�tjtd
�|td�d��|p�d}||}|�d�|j
�r,d|j
}	|�|	d
|i��}
||||
�Wd�S1�s 0YnH|j�rjd|j}t�|||�}tj|||dd�}
||||
�S|||�SdS)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)Zbuffered)Zplainrr�Abort�showview�_tableZpager�write�sorted�itemsr
Zsysbytesr rr	rZlookuptemplaterZchangesettemplater)�ui�repo�view�templater%Zviewsrr�fnr�fm�ref�spec�	displayerrrr�showZsF�


�
�

.
r6s	bookmarks)rc
s��j}t|�s,t|tj�s(|�td��dS�fdd�|��D�}�j}t	dd�|D��}t
�|�}t|���D]\\}}	|�
�|j�|	d�|�dd	|�|�d
|�|	�|�|	��|j||k||d�qpdS)z(bookmarks and their associated changesets(no bookmarks set)
Ncsg|]}�|���qSr)�rev)�.0�node�r.rr�
<listcomp>�r$z!showbookmarks.<locals>.<listcomp>css|]}t|�VqdS�N)�len)r8�brrr�	<genexpr>�r$z showbookmarks.<locals>.<genexpr>��ctxsbookmarks%s�node)�activeZlongestbookmarklen�nodelen)Z
_bookmarksr=�
isinstancer	Z
jsonformatterr*r�valuesZ_activebookmark�max�longestshortestr+r,Z	startitem�contextZhexfunc�data)
r-r.r2Zmarks�revsrCZlongestnamerDZbmr9rr:r�
showbookmarks�s"

�rLsstack)rc	s|d}|��tkr"t�td���|��tjkrB|�td��dSt	�
||�}d}|durn|��}|��h}nt|�d|��}||}|�
���tkr�|�
�}d}|j}	|	�|��g�D]D}
||
}|��tjkr�q�|�|���t|���dkr�d}q�q�tt|dd	��}|�r,t|�d
|��|��}nt�}t|�|B|hB}t||�}
zt�dtj�d}Wn tjtjf�y�d}Yn0t�||�}tj|d|
|d
���fdd�}|�ri�|D]*}|	j|g|��d�}tt|���|<�q�||d}t|�fdd�dd�}t |�D]�\}}
||
}|�r8|�d�n
|�d�|�!d�|j"||
d�|�#|�|�d�|�r�|�d�n
|�d�|�d�|jtd��|
dd�|�r�|�d �|jd!||�||�fd"d�|�d#��q|�d$�|jtd%�d&d�|�r2|�d'�|jtd(�d&d�|�d)�|D]n}
||
}|
|��k�rTd*nd+}|�rj|�d�n
|�d�|�|d�|j"||
d�|�#|�|�d��q6|�r|�r�|�d,�n
|�d-�|jtd.�dd&d�|�!d�|j"||
d�|�#|�|�d�dS)/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)})Z	resourcescs��||��d��S)N)sctxrB)Z
renderdefault�hexr@)�shortesttmplrr�shortest!szshowstack.<locals>.shortest)Zstoprev���cs�|Sr<r)�x)�revdistancerr�<lambda>4r$zshowstack.<locals>.<lambda>)�keyrOs: s  so  )rDr&s:/s /s    (s%d commits aheadsstack.commitdistance)Zlabels; shg rebase --source %s --dest %ssstack.rebasehints)
s:
:    s
(stack head)
sstack.labels \ /  s(multiple children)
s  |
�@�os:/   s /   s(stack base))$r7rrr'rZphaserZpublicr*rZ	stackbase�setrKZp1�	changelogZdescendants�addr=Zchildren�listr+rHrZfindcmdr�tableZAmbiguousCommandZUnknownCommandr	ZtemplateresourcesZ
maketemplater�	ancestors�	enumerateZwritenoi18nr6�flush)r-r.r5ZwdirctxZbaserevZbasectxZ	stackrevsrAZbranchpointattip�clr7ZnewheadsZallrevsrDZ
haverebaseZtresrR�headr_Z	sourcectxZsortedheads�i�symbolr)rUrQr�	showstack�s�����
��


��





�
��







rfs!_underway([commitage[, headage]])c	Cst�|dd�}d|vrd|d<d|vr.d|d<d}g}|dr`|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 stringrM)
rZgetargsdict�appendrZ	getstringrrKZbasesetr7r)	r.ZsubsetrT�argsZrsZrsargsZmutableZrelevantZwdirrevrrr�underwayrevset�s>
��
��risworkcCsN|�d�}t||�}t�||�}|�ddd�tj||||tjd|id�dS)zchangesets that aren't finishedssort(_underway(), topo)sexperimentalsgraphshortenTsnodelen)ZpropsN)rKrHr
Z	dagwalker�	setconfigrZdisplaygraphZ
asciiedges)r-r.r5rKrDZrevdagrrr�showwork�s

�rkcCst|�dd�D]b}tjD]V}d||f}tj|tjdd�\}}||vrFq|�d|d�rVq|jd|d|dd	�qqdS)
Nscommandssshow.aliasprefixs%s%sT)�strictsaliassshow %sr!)�source)	Z
configlistr(r)rZfindpossiblerr^Zconfigrj)r-�prefixr/r�choiceZallcommandsrrr�extsetup�s
�
rp�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����|����VqdSr<)r=rZshortesthexnodeidprefixr9)r8�r�rb�minlenr.rrr?�s�z"longestshortest.<locals>.<genexpr>)r[rG)r.rKrtrrsrrH�s�rHc	Cs�ttttj����}g}ttj���D]*}|�dt�	|�
|��tj|jf�q&t�	d�tddj
��t�	d��|�ftdd_
dS)Nz    %s   %ss%s

%s
    r!rs

)rG�mapr=r(r)�keysr+rgr
Zsysstr�ljustZ_origdoc�cmdtabler �rstrip�join)Zlongest�entriesrWrrr�_updatedocstrings
����r|)NN)rq)%r Z
__future__rZmercurial.i18nrZmercurial.noderZ	mercurialrrrrr	r
rrr
rrrrZ
testedwithrxZcommandZrevsetpredicateZ_funcregistrarbaserr(ZCATEGORY_CHANGE_NAVIGATIONr6rLrfrirkrprHr|rrrr�<module>s><
��
C



?
8




Youez - 2016 - github.com/yon3zu
LinuXploit