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__/namespaces.cpython-39.opt-1.pyc
a

�+�b� �@s\ddlmZddlmZddlmZmZmZmZdd�Z	Gdd�de
�ZGd	d
�d
e
�ZdS)�)�absolute_import�)�_)�pycompat�	registrar�
templatekw�utilcCs|durgS|gSdS)zF
    a convenience method to return an empty list instead of None
    N�)�valr	r	�:/usr/lib64/python3.9/site-packages/mercurial/namespaces.py�tolistsrc@sTeZdZdZdZdd�Zdd�Zdd�Zdd
d�Zdd
�Z	e	Z
ddd�Zdd�Zd	S)�
namespacesz�provides an interface to register and operate on multiple namespaces. See
    the namespace class below for details on the namespace object.

    rc
Cs�t��|_t��}dd�}dd�}dd�}tdd|d|||dd�}|�|�d	d�}d
d�}dd�}tdd
|d
|||dhdd�}|�|�dd�}	dd�}
dd�}tdd|d|	|
|dd�}|�|�dS)NcSs
|j��S�N)�
_bookmarks�keys��repor	r	r�<lambda>$�z%namespaces.__init__.<locals>.<lambda>cSst|j�|��Sr)rr�get�r�namer	r	rr%rcSs
|�|�Sr)Z
nodebookmarks�r�noder	r	rr&rs	bookmarkssbookmarkT)�templatename�logfmt�	listnames�namemap�nodemap�builtincSsdd�|��D�S)NcSsg|]\}}|�qSr	r	)�.0�t�nr	r	r�
<listcomp>2rz9namespaces.__init__.<locals>.<lambda>.<locals>.<listcomp>)Ztagslistrr	r	rr2rcSst|jj�|��Sr)rZ
_tagscache�tagsrrr	r	rr3rcSs
|�|�Sr)Znodetagsrr	r	rr4rstagsstagstip)rrrrr�
deprecatedrcSs|����Sr)Z	branchmaprrr	r	rrArcSst|�|d��S)NT)rZ	branchtiprr	r	rrBrcSs||��gSr)�branchrr	r	rrCrsbranchessbranch)rZsortdict�_namesrZ
getlogcolumns�	namespace�addnamespace)�self�columnsZbmknamesZ
bmknamemapZ
bmknodemapr"ZtagnamesZ
tagnamemapZ
tagnodemapZbnamesZbnamemapZbnodemapr	r	r�__init__sT
�	
�

�	znamespaces.__init__cCs
|j|S)zreturns the namespace object)r')r*r(r	r	r�__getitem__Osznamespaces.__getitem__cCs
|j��Sr)r'�__iter__�r*r	r	rr.Ssznamespaces.__iter__NcCs|j�||�Sr)r'r)r*r(�defaultr	r	rrVsznamespaces.getcCst�|j�Sr)r�	iteritemsr'r/r	r	r�itemsYsznamespaces.itemscsb|dur|j�|�j��n�|j�j<�jtjvr^t�tj�}|�jddhd��fdd��}dS)z�register a namespace

        namespace: the name to be registered (in plural form)
        order: optional argument to specify the order of namespaces
               (e.g. 'branches' should be listed before 'bookmarks')

        Nsreposctx)Zrequirescst�||�j�Sr)rZ	shownamesr)�context�mapping�r(r	r�
generatekwosz+namespaces.addnamespace.<locals>.generatekw)r'�insertrr�keywordsr�templatekeyword)r*r(�orderr9r6r	r5rr)^sznamespaces.addnamespacecCsBt�|j�D] \}}|�||�}|r|Sqttd�|��dS)a
        Return the 'best' node for the given name. What's best is defined
        by the namespace's singlenode() function. The first match returned by
        a namespace in the defined precedence order is used.

        Raises a KeyError if there is no such node.
        sno such name: %sN)rr1r'�
singlenode�KeyErrorr)r*rr�ns�vr"r	r	rr;ss

znamespaces.singlenode)N)N)
�__name__�
__module__�__qualname__�__doc__Z_names_versionr,r-r.rr2r1r)r;r	r	r	rr
s1

r
c
@s2eZdZdZddd�Zdd�Zdd	�Zd
d�ZdS)
r(aprovides an interface to a namespace

    Namespaces are basically generic many-to-many mapping between some
    (namespaced) names and nodes. The goal here is to control the pollution of
    jamming things into tags or bookmarks (in extension-land) and to simplify
    internal bits of mercurial: log output, tab completion, etc.

    More precisely, we define a mapping of names to nodes, and a mapping from
    nodes to names. Each mapping returns a list.

    Furthermore, each name mapping will be passed a name to lookup which might
    not be in its domain. In this case, each method should return an empty list
    and not raise an error.

    This namespace object will define the properties we need:
      'name': the namespace (plural form)
      'templatename': name to use for templating (usually the singular form
                      of the plural namespace name)
      'listnames': list of all names in the namespace (usually the keys of a
                   dictionary)
      'namemap': function that takes a name and returns a list of nodes
      'nodemap': function that takes a node and returns a list of names
      'deprecated': set of names to be masked for ordinary use
      'builtin': bool indicating if this namespace is supported by core
                 Mercurial.
    NFcCs�||_||_||_||_||_||_||_||_|r:||_|jdurL|j|_|jdur^|j|_|jdur~d|j�	d�d|_|	dur�t
�|_n|	|_|
|_dS)aVcreate a namespace

        name: the namespace to be registered (in plural form)
        templatename: the name to use for templating
        logname: the name to use for log output; if not specified templatename
                 is used
        colorname: the name to use for colored log output; if not specified
                   logname is used
        logfmt: the format to use for (i18n-ed) log output; if not specified
                it is composed from logname
        listnames: function to list all names
        namemap: function that inputs a name, output node(s)
        nodemap: function that inputs a node, output name(s)
        deprecated: set of names to be masked for ordinary use
        builtin: whether namespace is implemented by core Mercurial
        singlenode: function that inputs a name, output best node (or None)
        Ns%s:�
s%s
)
rr�logname�	colornamerrrrr;�ljust�setr%r)r*rrrDrErrrrr%rr;r	r	rr,�s(



znamespace.__init__cCst|�||��S)z[method that returns a (sorted) list of names in a namespace that
        match a given node)�sortedr)r*rrr	r	r�names�sznamespace.namescCst|�||��S)z]method that returns a list of nodes in a namespace that
        match a given name.

        )rHr)r*rrr	r	r�nodes�sznamespace.nodescsN|�||�}|rJt|�dkrB|j�t�fdd�|D��}��|�S|dSdS)z�returns the best node for the given name

        By default, the best node is the node from nodes() with the highest
        revision number. It can be overriden by the namespace.rc3s|]}��|�VqdSr)Zrev)r r�Zclr	r�	<genexpr>�rz'namespace.singlenode.<locals>.<genexpr>rN)r�lenZ	changelog�maxr)r*rrr"Zmaxrevr	rKrr;�s
znamespace.singlenode)
NNNNNNNNFN)r?r@rArBr,rIrJr;r	r	r	rr(�s�
>r(N)
Z
__future__rZi18nr�rrrrr�objectr
r(r	r	r	r�<module>s

l

Youez - 2016 - github.com/yon3zu
LinuXploit