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__/registrar.cpython-39.pyc
a

�+�bG�@s�ddlmZddlmZmZmZmZejZGdd�de	�Z
Gdd�de
�ZdZGd	d
�d
e
�Z
Gdd�de
�ZGd
d�de
�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de
�ZdS)�)�absolute_import�)�configitems�error�pycompat�utilc@sVeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dZ
dd�Zdd�ZdS)�_funcregistrarbasea�Base of decorator to register a function for specific purpose

    This decorator stores decorated functions into own dict 'table'.

    The least derived class can be defined by overriding 'formatdoc',
    for example::

        class keyword(_funcregistrarbase):
            _docformat = ":%s: %s"

    This should be used as below:

        keyword = registrar.keyword()

        @keyword(b'bar')
        def barfunc(*args, **kwargs):
            '''Explanation of bar keyword ....
            '''
            pass

    In this case:

    - 'barfunc' is stored as 'bar' in '_table' of an instance 'keyword' above
    - 'barfunc.__doc__' becomes ":bar: Explanation of bar keyword"
    NcCs|duri|_n||_dS�N)�_table)�self�table�r
�9/usr/lib64/python3.9/site-packages/mercurial/registrar.py�__init__4sz_funcregistrarbase.__init__cs����fdd�S)Ncs�j|�g��Ri���Sr	)�_doregister)�func��args�decl�kwargsrr
r�<lambda>;�z-_funcregistrarbase.__call__.<locals>.<lambda>r
)rrrrr
rr�__call__:sz_funcregistrarbase.__call__cOs�|�|�}||jvr&d|}t�|��|jrdt�|d�sd|j��|_t	�
|j�}t	�|�||��|_||j|<|j
||g|�Ri|��|S)Ns%duplicate registration for name: "%s"�_origdoc)�_getnamer
r�ProgrammingError�__doc__rZsafehasattr�striprrZsysbytesZsysstr�
_formatdoc�_extrasetup)rrrrr�name�msg�docr
r
rr=s



z_funcregistrarbase._doregistercCs\t|t|��sd}t�|��t|j��|j�}|rJdd�|�}t�|��|j�|j�dS)aMerge the entries of the given registrar object into this one.

        The other registrar object must not contain any entries already in the
        current one, or a ProgrammmingError is raised.  Additionally, the types
        of the two registrars must match.
        s)cannot merge different types of registrars&duplicate registration for names: "%s"s", "N)	�
isinstance�typerr�setr
�intersection�join�update)rZ
registrarbaser!Zdupsr
r
r�_mergeNs

z_funcregistrarbase._mergecCs&|�d�}|dkr|d|�S|SdS)z@Parse function declaration and return the name of function in it�(rN)�find)rr�ir
r
r�_parsefuncdeclas
z!_funcregistrarbase._parsefuncdeclcCs|S)z�Return the name of the registered function from decl

        Derived class should override this, if it allows more
        descriptive 'decl' string than just a name.
        r
)rrr
r
rrisz_funcregistrarbase._getnamecCs|j||fS)z�Return formatted document of the registered function for help

        'doc' is '__doc__.strip()' of the registered function.
        )�
_docformat)rrr"r
r
rrssz_funcregistrarbase._formatdoccCsdS)z6Execute extra setup for registered function, if neededNr
)rr rr
r
rrzsz_funcregistrarbase._extrasetup)N)
�__name__�
__module__�__qualname__rrrrr)r-rr.rrr
r
r
rrs
rc@sVeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZddd�Zdd�ZdS)�commanda�
Decorator to register a command function to table

    This class receives a command table as its argument. The table should
    be a dict.

    The created object can be used as a decorator for adding commands to
    that command table. This accepts multiple arguments to define a command.

    The first argument is the command name (as bytes).

    The `options` keyword argument is an iterable of tuples defining command
    arguments. See ``mercurial.fancyopts.fancyopts()`` for the format of each
    tuple.

    The `synopsis` argument defines a short, one line summary of how to use the
    command. This shows up in the help output.

    There are three arguments that control what repository (if any) is found
    and passed to the decorated function: `norepo`, `optionalrepo`, and
    `inferrepo`.

    The `norepo` argument defines whether the command does not require a
    local repository. Most commands operate against a repository, thus the
    default is False. When True, no repository will be passed.

    The `optionalrepo` argument defines whether the command optionally requires
    a local repository. If no repository can be found, None will be passed
    to the decorated function.

    The `inferrepo` argument defines whether to try to find a repository from
    the command line arguments. If True, arguments will be examined for
    potential repository locations. See ``findrepo()``. If a repository is
    found, it will be used and passed to the decorated function.

    The `intents` argument defines a set of intended actions or capabilities
    the command is taking. These intents can be used to affect the construction
    of the repository object passed to the command. For example, commands
    declaring that they are read-only could receive a repository that doesn't
    have any methods allowing repository mutation. Other intents could be used
    to prevent the command from running if the requested intent could not be
    fulfilled.

    If `helpcategory` is set (usually to one of the constants in the help
    module), the command will be displayed under that category in the help's
    list of commands.

    The following intents are defined:

    readonly
       The command is read-only

    The signature of the decorated function looks like this:
        def cmd(ui[, repo] [, <args>] [, <options>])

      `repo` is required if `norepo` is False.
      `<args>` are positional args (or `*args`) arguments, of non-option
      arguments from the command line.
      `<options>` are keyword arguments (or `**options`) of option arguments
      from the command line.

    See the WritingExtensions and MercurialApi documentation for more exhaustive
    descriptions and examples.
    sreposremotescommits
managementsorganizationsfiless
navigationswdirsimportsmaintenanceshelpsmiscsnoner
NFcCsZ||_||_||_|pt�|_|	|_|
|_|rD|t|�|f|j|<n|t|�f|j|<|Sr	)	�norepo�optionalrepo�	inferrepor%�intents�helpcategory�	helpbasic�listr
)rrr �optionsZsynopsisr3r4r5r6r7r8r
r
rr�s
zcommand._doregistercCs|j�|�|j|<dS)zVrename a command. Used to add aliases, debugstrip ->
        debugstrip|strip
        N)r
�pop)r�old�newr
r
r�rename�szcommand.rename)r
NFFFNNF)r/r0r1rZCATEGORY_REPO_CREATIONZCATEGORY_REMOTE_REPO_MANAGEMENTZCATEGORY_COMMITTINGZCATEGORY_CHANGE_MANAGEMENTZCATEGORY_CHANGE_ORGANIZATIONZCATEGORY_FILE_CONTENTSZCATEGORY_CHANGE_NAVIGATIONZCATEGORY_WORKING_DIRECTORYZCATEGORY_IMPORT_EXPORTZCATEGORY_MAINTENANCEZ
CATEGORY_HELPZ
CATEGORY_MISCZ
CATEGORY_NONErr>r
r
r
rr2~s0E�
r2sreadonlyc@s$eZdZdZejZdZddd�ZdS)	�revsetpredicatea$Decorator to register revset predicate

    Usage::

        revsetpredicate = registrar.revsetpredicate()

        @revsetpredicate(b'mypredicate(arg1, arg2[, arg3])')
        def mypredicatefunc(repo, subset, x):
            '''Explanation of this revset predicate ....
            '''
            pass

    The first string argument is used also in online help.

    Optional argument 'safe' indicates whether a predicate is safe for
    DoS attack (False by default).

    Optional argument 'takeorder' indicates whether a predicate function
    takes ordering policy as the last argument.

    Optional argument 'weight' indicates the estimated run-time cost, useful
    for static optimization, default is 1. Higher weight means more expensive.
    Usually, revsets that are fast and return only one revision has a weight of
    0.5 (ex. a symbol); revsets with O(changelog) complexity and read only the
    changelog have weight 10 (ex. author); revsets reading manifest deltas have
    weight 30 (ex. adds); revset reading manifest contents have weight 100
    (ex. contains). Note: those values are flexible. If the revset has a
    same big-O time complexity as 'contains', but with a smaller constant, it
    might have a weight of 90.

    'revsetpredicate' instance in example above can be used to
    decorate multiple functions.

    Decorated functions are registered automatically at loading
    extension, if an instance named as 'revsetpredicate' is used for
    decorating in extension.

    Otherwise, explicit 'revset.loadpredicate()' is needed.
    �
``%s``
    %sFrcCs||_||_||_dSr	)Z_safeZ
_takeorder�_weight)rr r�safeZ	takeorder�weightr
r
rr!szrevsetpredicate._extrasetupN)FFr�	r/r0r1rrr-rr.rr
r
r
rr?�s(r?c@s$eZdZdZejZdZddd�ZdS)	�filesetpredicatea�Decorator to register fileset predicate

    Usage::

        filesetpredicate = registrar.filesetpredicate()

        @filesetpredicate(b'mypredicate()')
        def mypredicatefunc(mctx, x):
            '''Explanation of this fileset predicate ....
            '''
            pass

    The first string argument is used also in online help.

    Optional argument 'callstatus' indicates whether a predicate
     implies 'matchctx.status()' at runtime or not (False, by
     default).

    Optional argument 'weight' indicates the estimated run-time cost, useful
    for static optimization, default is 1. Higher weight means more expensive.
    There are predefined weights in the 'filesetlang' module.

    ====== =============================================================
    Weight Description and examples
    ====== =============================================================
    0.5    basic match patterns (e.g. a symbol)
    10     computing status (e.g. added()) or accessing a few files
    30     reading file content for each (e.g. grep())
    50     scanning working directory (ignored())
    ====== =============================================================

    'filesetpredicate' instance in example above can be used to
    decorate multiple functions.

    Decorated functions are registered automatically at loading
    extension, if an instance named as 'filesetpredicate' is used for
    decorating in extension.

    Otherwise, explicit 'fileset.loadpredicate()' is needed.
    r@FrcCs||_||_dSr	)Z_callstatusrA)rr rZ
callstatusrCr
r
rrTszfilesetpredicate._extrasetupN)FrrDr
r
r
rrE's)rEc@seZdZdZdZdS)�_templateregistrarbasez@Base of decorator to register functions as template specific ones:%s: %sN)r/r0r1rr.r
r
r
rrFYsrFc@seZdZdZddd�ZdS)�templatekeywordaWDecorator to register template keyword

    Usage::

        templatekeyword = registrar.templatekeyword()

        # new API (since Mercurial 4.6)
        @templatekeyword(b'mykeyword', requires={b'repo', b'ctx'})
        def mykeywordfunc(context, mapping):
            '''Explanation of this template keyword ....
            '''
            pass

    The first string argument is used also in online help.

    Optional argument 'requires' should be a collection of resource names
    which the template keyword depends on.

    'templatekeyword' instance in example above can be used to
    decorate multiple functions.

    Decorated functions are registered automatically at loading
    extension, if an instance named as 'templatekeyword' is used for
    decorating in extension.

    Otherwise, explicit 'templatekw.loadkeyword()' is needed.
    r
cCs
||_dSr	)�	_requires)rr r�requiresr
r
rr|sztemplatekeyword._extrasetupN)r
�r/r0r1rrr
r
r
rrG_srGc@seZdZdZddd�ZdS)�templatefiltera(Decorator to register template filer

    Usage::

        templatefilter = registrar.templatefilter()

        @templatefilter(b'myfilter', intype=bytes)
        def myfilterfunc(text):
            '''Explanation of this template filter ....
            '''
            pass

    The first string argument is used also in online help.

    Optional argument 'intype' defines the type of the input argument,
    which should be (bytes, int, templateutil.date, or None for any.)

    'templatefilter' instance in example above can be used to
    decorate multiple functions.

    Decorated functions are registered automatically at loading
    extension, if an instance named as 'templatefilter' is used for
    decorating in extension.

    Otherwise, explicit 'templatefilters.loadkeyword()' is needed.
    NcCs
||_dSr	)Z_intype)rr rZintyper
r
rr�sztemplatefilter._extrasetup)NrJr
r
r
rrK�srKc@s eZdZdZejZddd�ZdS)�templatefuncaDecorator to register template function

    Usage::

        templatefunc = registrar.templatefunc()

        @templatefunc(b'myfunc(arg1, arg2[, arg3])', argspec=b'arg1 arg2 arg3',
                      requires={b'ctx'})
        def myfuncfunc(context, mapping, args):
            '''Explanation of this template function ....
            '''
            pass

    The first string argument is used also in online help.

    If optional 'argspec' is defined, the function will receive 'args' as
    a dict of named arguments. Otherwise 'args' is a list of positional
    arguments.

    Optional argument 'requires' should be a collection of resource names
    which the template function depends on.

    'templatefunc' instance in example above can be used to
    decorate multiple functions.

    Decorated functions are registered automatically at loading
    extension, if an instance named as 'templatefunc' is used for
    decorating in extension.

    Otherwise, explicit 'templatefuncs.loadfunction()' is needed.
    Nr
cCs||_||_dSr	)Z_argspecrH)rr rZargspecrIr
r
rr�sztemplatefunc._extrasetup)Nr
)r/r0r1rrr-rrr
r
r
rrL�s rLc@s*eZdZdZdZdZdZdZd	dd�ZdS)
�
internalmergeaXDecorator to register in-process merge tool

    Usage::

        internalmerge = registrar.internalmerge()

        @internalmerge(b'mymerge', internalmerge.mergeonly,
                       onfailure=None, precheck=None,
                       binary=False, symlink=False):
        def mymergefunc(repo, mynode, orig, fcd, fco, fca,
                        toolconf, files, labels=None):
            '''Explanation of this internal merge tool ....
            '''
            return 1, False # means "conflicted", "no deletion needed"

    The first string argument is used to compose actual merge tool name,
    ":name" and "internal:name" (the latter is historical one).

    The second argument is one of merge types below:

    ========== ======== ======== =========
    merge type precheck premerge fullmerge
    ========== ======== ======== =========
    nomerge     x        x        x
    mergeonly   o        x        o
    fullmerge   o        o        o
    ========== ======== ======== =========

    Optional argument 'onfailure' is the format of warning message
    to be used at failure of merging (target filename is specified
    at formatting). Or, None or so, if warning message should be
    suppressed.

    Optional argument 'precheck' is the function to be used
    before actual invocation of internal merge tool itself.
    It takes as same arguments as internal merge tool does, other than
    'files' and 'labels'. If it returns false value, merging is aborted
    immediately (and file is marked as "unresolved").

    Optional argument 'binary' is a binary files capability of internal
    merge tool. 'nomerge' merge type implies binary=True.

    Optional argument 'symlink' is a symlinks capability of inetrnal
    merge function. 'nomerge' merge type implies symlink=True.

    'internalmerge' instance in example above can be used to
    decorate multiple functions.

    Decorated functions are registered automatically at loading
    extension, if an instance named as 'internalmerge' is used for
    decorating in extension.

    Otherwise, explicit 'filemerge.loadinternalmerge()' is needed.
    s``:%s``
    %sNs	mergeonlys	fullmergeFc
Cs>||_||_||_|p||jk}|p,||jk}	||	d�|_dS)N)sbinaryssymlink)�	mergetype�	onfailure�precheck�nomergeZcapabilities)
rr rrNrOrPZbinary�symlinkZ	binarycapZ
symlinkcapr
r
rrs
zinternalmerge._extrasetup)NNFF)	r/r0r1rr.rQZ	mergeonlyZ	fullmergerr
r
r
rrM�s7�rMN)Z
__future__r�rrrrZgetitemregisterZ
configitem�objectrr2ZINTENT_READONLYr?rErFrGrKrLrMr
r
r
r�<module>set22! (

Youez - 2016 - github.com/yon3zu
LinuXploit