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

�+�b 7�@s�dZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZddlmZe
jr�ddlZejjZnddlZejZdZiZe�e�Ze��Ze��Zed	d
dd�ed	d
dd�ed	ddd�Gdd�de�Z Gdd�de!�Z"dd�Z#dd�Z$dd�Z%ed	ddhd�dd��Z&edddhd�d d!��Z'ed"ddhd�d#d$��Z(d%d&�Z)ed'�d(d)��Z*ed*�d+d,��Z+ed-�d.d/��Z,dS)0a@ showing remotebookmarks and remotebranches in UI (EXPERIMENTAL)

By default both remotebookmarks and remotebranches are turned on. Config knob to
control the individually are as follows.

Config options to tweak the default behaviour:

remotenames.bookmarks
  Boolean value to enable or disable showing of remotebookmarks (default: True)

remotenames.branches
  Boolean value to enable or disable showing of remotebranches (default: True)

remotenames.hoistedpeer
  Name of the peer whose remotebookmarks should be hoisted into the top-level
  namespace (default: 'default')
�)�absolute_import)�_)�bin)�	bookmarks�error�
extensions�logexchange�
namespaces�pycompat�	registrar�
revsetlang�smartset�templateutil�util)�
stringutilNsships-with-hg-core�remotenames�	bookmarksT)�default�branches�hoistedpeersdefaultc@sleZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZeZdS)�lazyremotenamedicta�
    Read-only dict-like Class to lazily resolve remotename entries

    We are doing that because remotenames startup was slow.
    We lazily read the remotenames file once to figure out the potential entries
    and store them in self.potentialentries. Then when asked to resolve an
    entry, if it is not in self.potentialentries, then it isn't there, if it
    is in self.potentialentries we resolve it and store the result in
    self.cache. We cannot be lazy is when asked all the entries (keys).
    cCs"i|_i|_||_||_d|_dS)NF)�cache�potentialentries�_kind�_repo�loaded)�self�kind�repo�r�7/usr/lib64/python3.9/site-packages/hgext/remotenames.py�__init__as
zlazyremotenamedict.__init__cCsFd|_|j}t�||j�D]&\}}}|d|}|||f|j|<qdS)z?Read the remotenames file, store entries matching selected kindT�/N)rrrZreadremotenamefilerr)rr�nodeZrpathZrname�namerrr �_loadhs�zlazyremotenamedict._loadcCsr||jvrdS|j|\}}}|j}t|�}z|j�|�WntyPYdS0|jdkrl||��rldS|gS)z;Check that the node for potentialentry exists and return itNr)rrr�	changelog�rev�LookupErrorrZclosesbranch)rZpotentialentryr#Zremoter$rZbinnoderrr �_resolvedatars
zlazyremotenamedict._resolvedatacCs.|js|��|�|�}|dur$|St��dS�N)rr%�_fetchandcache�KeyError�r�key�valrrr �__getitem__�s
zlazyremotenamedict.__getitem__cCs
t|j�Sr*)�iterr�rrrr �__iter__�szlazyremotenamedict.__iter__cCs
t|j�Sr*)�lenrr2rrr �__len__�szlazyremotenamedict.__len__cCst�dSr*��NotImplementedErrorr2rrr �__setitem__�szlazyremotenamedict.__setitem__cCst�dSr*r6r2rrr �__delitem__�szlazyremotenamedict.__delitem__cCs<||jvr|j|S|�|�}|dur4||j|<|SdSdSr*)rr)r-rrr r+�s



z!lazyremotenamedict._fetchandcachecCs|js|��|j��S)z&Get a list of bookmark or branch names)rr%r�keysr2rrr r:�szlazyremotenamedict.keysccs<|js|��t�|j�D]\}}|t|d�gfVqdS)z Iterate over (name, node) tuplesrN)rr%r
�	iteritemsrr)r�kZvtuprrr r;�szlazyremotenamedict.iteritemsN)�__name__�
__module__�__qualname__�__doc__r!r%r)r0r3r5r8r9r+r:r;�itemsrrrr rUs
	
	rc@sXeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)�remotenamesa%
    This class encapsulates all the remotenames state. It also contains
    methods to access that state in convenient ways. Remotenames are lazy
    loaded. Whenever client code needs to ensure the freshest copy of
    remotenames, use the `clearnames` method to force an eventual load.
    cGs||_|��dSr*)r�
clearnames)rr�argsrrr r!�szremotenames.__init__cCs(td|j�|_td|j�|_|��dS)zClear all remote names staterrN)rrr�branches�_invalidatecacher2rrr rC�szremotenames.clearnamescCsd|_d|_d|_d|_dSr*)�
_nodetobmarks�
_nodetobranch�
_hoisttonodes�
_nodetohoistsr2rrr rF�szremotenames._invalidatecachecCs|jSr*)rr2rrr �bmarktonodes�szremotenames.bmarktonodescCsF|js@|��}i|_t�|�D] \}}|j�|dg��|�q|jS)Nr)rGrKr
r;�
setdefault�append)rrKr$r#rrr �nodetobmarks�szremotenames.nodetobmarkscCs|jSr*)rEr2rrr �
branchtonodes�szremotenames.branchtonodescCsL|jsF|��}i|_t�|�D]&\}}|D]}|j�|g��|�q*q|jSr*)rHrOr
r;rLrM)rrOr$�nodesr#rrr �nodetobranch�szremotenames.nodetobranchcCsZ|jsT|��}i|_|d7}t�|�D],\}}|�|�r&|t|�d�}||j|<q&|jS)Nr")rIrKr
r;�
startswithr4�r�hoistZmarktonodesr$r#rrr �hoisttonodes�s
zremotenames.hoisttonodescCsh|jsb|��}i|_|d7}t�|�D]:\}}|�|�r&|t|�d�}|j�|dg��|�q&|jS)Nr"r)rJrKr
r;rRr4rLrMrSrrr �nodetohoists�s
zremotenames.nodetohoistsN)
r=r>r?r@r!rCrFrKrNrOrQrUrVrrrr rB�s	rBc	Cs^d|jvrdS|jd}|�|�D],}|�||�}|s8q"|d}|ddf||<q"|||||�S)N�remotebookmarksr� �)�names�	listnamesrP)	Zorig�uirZfmZbmarks�nsr$rPr#rrr �wrapprintbookmarks�s

r^cCst�tdt�dS)Ns_printbookmarks)rZwrapfunctionrr^)r\rrr �extsetup
sr_c
s�|j�dddd�|��sdSt|�|_tj}|�dd�r�|ddddd	d
�dd
�dd
�d
�}|j�	|�|�
dd���r�|dddd�fdd
��fdd
��fdd
�d
�}|j�	|�|�dd�r�|dddddd
�dd
�dd
�d
�}|j�	|�dS)NsexperimentalrTsremotenames-extrrW�remotebookmarksremote bookmark:  %s
cSs|j����Sr*)�_remotenamesrKr:�rrrr �<lambda>rYzreposetup.<locals>.<lambda>cSs|j���|g�Sr*)rarK�get�rr$rrr rc s
�cSs|j���|g�Sr*)rarNrd�rr#rrr rc#s
�)ZtemplatenameZ	colornameZlogfmtr[ZnamemapZnodemaprshoistednamesshoistednameshoisted name:  %s
cs|j�����Sr*)rarUr:rb�rTrr rc1s�cs|j����|g�Sr*)rarUrdrergrr rc4s��cs|j����|g�Sr*)rarVrdrfrgrr rc7s��r�remotebranches�remotebranchsremote branch:  %s
cSs|j����Sr*)rarOr:rbrrr rcCrYcSs|j���|g�Sr*)rarOrdrerrr rcDs
�cSs|j���|g�Sr*)rarQrdrfrrr rcGs
�)r\Z	setconfig�localrBrar	�	namespaceZ
configboolrZZaddnamespaceZconfig)r\rr]ZremotebookmarknsZ
hoistednamensZremotebranchnsrrgr �	reposetupsN
�



��
rl�repo�ctx)ZrequirescCst|�|d�}|�|d�}g}d|jvr<|jd�||���}d|jvr`||jd�||���7}tj||d|dd�S)z<List of strings. Remote names associated with the changeset.rmrnrWrhs
remotenamer��plural��resourcerZr#rZ
compatlist)�context�mappingr�ctxrBrrr �
remotenameskwNs


�rvrWcCsP|�|d�}|�|d�}g}d|jvr<|jd�||���}tj||d|dd�S)z@List of strings. Remote bookmarks associated with the changeset.rmrnrWr`rorq)rsrtrruZremotebmarksrrr �remotebookmarkskw`s
�rwrhcCsP|�|d�}|�|d�}g}d|jvr<|jd�||���}tj||d|dd�S)z?List of strings. Remote branches associated with the changeset.rmrnrhrirorq)rsrtrruZremotebranchesrrr �remotebrancheskwss
�rxc
s�t�|ddtd��}|r:t�t�|dtd���\}}}nd}}tj}t�}|j	�|D]D}	|	|j
vrX|j
|	}
|
�|�D] }||�s�qz|�|
�
||��qzqX|dkr�|s�t�td�|���fdd	�|D�}|t�|�@S)
z<utility function to return a set of revs based on the rtypesr�sonly one argument acceptedsargument must be a stringNsliteralsremote name '%s' does not existc3s"|]}��|�r��|�VqdSr*)Zhasnoder')�.0�n�Zclrr �	<genexpr>�rYz_revsetutil.<locals>.<genexpr>)rZgetargsrrZ
stringmatcherZ	getstringr�always�setr&rZr[�updaterPrZRepoLookupErrorr
Zbaseset)
r�subset�xZrtypesrDr�patternZmatcherrPZrtyper]r$Zrevsrr|r �_revsetutil�s,�


�r�sremotenames([name])cCst|||d�S)z�All changesets which have a remotename on them. If `name` is
    specified, only remotenames of matching remote paths are considered.

    Pattern matching is supported for `name`. See :hg:`help revisions.patterns`.
    )rWrh�r��rr�r�rrr �remotenamesrevset�sr�sremotebranches([name])cCst|||d�S)z�All changesets which are branch heads on remotes. If `name` is
    specified, only remotenames of matching remote paths are considered.

    Pattern matching is supported for `name`. See :hg:`help revisions.patterns`.
    )rhr�r�rrr �remotebranchesrevset�sr�sremotebookmarks([name])cCst|||d�S)z�All changesets which have bookmarks on remotes. If `name` is
    specified, only remotenames of matching remote paths are considered.

    Pattern matching is supported for `name`. See :hg:`help revisions.patterns`.
    )rWr�r�rrr �remotebmarksrevset�sr�)-r@Z
__future__rZmercurial.i18nrZmercurial.noderZ	mercurialrrrrr	r
rrr
rrZmercurial.utilsrZispy3�collections.abc�collections�abc�MutableMappingZmutablemappingZ
testedwithZconfigtableZ
configitemZtemplatekeywordZrevsetpredicater�objectrBr^r_rlrvrwrxr�r�r�r�rrrr �<module>	s`4

���_F@



	
	

Youez - 2016 - github.com/yon3zu
LinuXploit