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/hgext/git/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

�+�b�-�@sdZddlmZddlZddlmZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZddlmZmZmZmZdZiZe�e�Zed	d
dd�ejZGd
d�de�Zdd�ZGdd�de�Zdd�Zdd�ZdZ Gdd�de�Z!d#dd�Z"dd�Z#dd �Z$d!d"�Z%dS)$z�grant Mercurial the ability to operate on Git repositories. (EXPERIMENTAL)

This is currently super experimental. It probably will consume your
firstborn a la Rumpelstiltskin, etc.
�)�absolute_importN)�_)	�commands�error�
extensions�	localrepo�pycompat�	registrar�scmutil�store�util�)�dirstate�gitlog�gitutil�indexsships-with-hg-core�git�log-index-cache-missF)�defaultc@sLeZdZdd�Zejdd��Zdd�Zdd�Zd	d
�Z	dd�Z
ddd�Zd
S)�gitstorec	Csf||�|_|j|_|jj|_t�|j�|_t���	t
j�t
j�|dd���|_
dd�|_dd�|_dS)N�..�.gitc_sdS�N�)�args�kwargsrr�8/usr/lib64/python3.9/site-packages/hgext/git/__init__.py�<lambda>?�z#gitstore.__init__.<locals>.<lambda>cSsdSrr)�xrrrr@r)�vfs�opener�base�pathrZ	_calcmodeZ
createmoder�
get_pygit2Z
Repository�os�normpath�join�git�_progress_factory�_logfn)�selfr#�vfstyperrr�__init__4s

�
zgitstore.__init__cCst�|j|j|j�Sr)rZ	get_indexr(r*r)�r+rrr�_dbBszgitstore._dbcCs\|dvrtj�|jd�S|dkr0tj�|jd�S|dvrLtj�|jdd|�Std|��d	S)
z�Fake store.join method for git repositories.

        For the most part, store.join is used for @storecache
        decorators to invalidate caches when various files
        change. We'll map the ones we care about, and ignore the rest.
        )s
00changelog.is00manifest.isHEADslockshgit-bogus-lock)sobsstores
phaserootss
narrowspecs	bookmarksr�.hgsNeed to pick file for %s.N)r%r#r'�NotImplementedError)r+�frrrr'Isz
gitstore.joincCst�|j|j�Sr)r�	changelogr(r/)r+Z
trypendingZconcurrencycheckerrrrr3^szgitstore.changelogcCst�|j|j�Sr)r�manifestlogr(r/)r+�repoZstorenarrowmatchrrrr4bszgitstore.manifestlogcCsdSrrr.rrr�invalidatecachesfszgitstore.invalidatecachesNcCsdSrr)r+�trrrr�writeiszgitstore.write)N)�__name__�
__module__�__qualname__r-rZ
propertycacher/r'r3r4r6r8rrrrr3s
rcCs^d|vrRtj�tj�|dd��s.t�td���t��durHt�td���t	||�S||||�S)NrrrsIrepository specified git format in .hg/requires but has no .git directorysDthe git extension requires the Python pygit2 library to be installed)
r%r#�existsr'r�Abortrrr$r)�orig�requirementsZ
storebasepathr,rrr�
_makestorens����
r@c@seZdZdd�ZdS)�gitfilestoragecCs2|dd�dkr|dd�}t�|jj|jj|�S)Nrr
�/)rZfilelogrr(r/)r+r#rrr�file�szgitfilestorage.fileN)r9r:r;rCrrrrrA�srAcKs(|d}t|t�rtS|||fi|��S)Nr)�
isinstancerrA)r>r?Zfeaturesrrrrr�_makefilestorage�s
rEcCs�tj�|d�}tj�|�r*|�td��nVt�tj�|d��ttj�|ddd�d��}|�d�Wd�n1sv0Yttj�|d�d	��}|�d
�Wd�n1s�0YdS)Nr0s$git repo already initialized for hg
rsinfosexclude�abs
.hg
srequires�wbsgit
)	r%r#r'r<�warnr�mkdir�openr8)�uir#ZdothgZexcluder2rrr�_setupdothg�s�(rLzrefs/heads/c@szeZdZdd�Zdd�Zdd�Zdd�Zdd
d�Zedd
��Z	e	j
dd
��Z	dd�Zdd�Zdd�Z
dd�Zddd�Zd	S)�
gitbmstorecCs||_d|_|jd|_dS)NT�HEAD)�gitrepo�_aclean�
references�_active)r+rOrrrr-�szgitbmstore.__init__cCstt�|�|jjvSr)�_BMS_PREFIXr�fsdecoderOrQ)r+�namerrr�__contains__�s�zgitbmstore.__contains__ccs6|j��D]&}|�t�r
t�|tt�d��Vq
dSr)rO�listall_references�
startswithrSr�fsencode�len)r+�rrrr�__iter__�s
zgitbmstore.__iter__cCs|jjtt�|���jjSr)rOrQrSrrT�peel�id�raw)r+�krrr�__getitem__�s�zgitbmstore.__getitem__Nc	Cs:z||vr||WS|WSt��jy4|YS0dSr)rr$ZInvalidSpecError)r+r`rrrr�get�s
zgitbmstore.getcCs@|jjd}t|jt�r$|j�t�s(dSt�|jt	t�d��S)NrN)
rOrQrD�target�strrXrSrrYrZ)r+�hrrr�active�s�zgitbmstore.activecCsD|durt|pd}|dur4||jjvr4td|��||_d|_dS)Nsbookmark %s does not exist!F)rSrOrQ�AssertionErrorrRrP)r+�mark�githeadrrrrf�s
cCs(|jr
dS|jj�d|jd�d|_dS)NrNT)rPrOrQ�createrRr.rrr�_writeactive�szgitbmstore._writeactivecCsZg}|j��D]F}|�t�sq|jj|��jj|kr8q|�t	�
|tt�d���q|Sr)rOrWrXrSrQr]r^r_�appendrrYrZ)r+�noder[�refrrr�names�s
zgitbmstore.namescCs&|dkr"|jr|jSt�td���|S)N�.sno active bookmark)rfrZRepoLookupErrorr)r+Zbnamerrr�
expandname�s
zgitbmstore.expandnamecCsX|D]N\}}|dur.|jj�tt�|��q|jjjtt�|�t�|�dd�qdS)z$Apply a list of changes to bookmarksNT)�force)	rOrQ�deleterSrrTrjr�	togitnode)r+r5r7ZchangesrUrmrrr�applychanges�s��zgitbmstore.applychangesFcCs�t|}|jjd}||jjvrZ|sZ|rH|jj||krD||krDgSt�t�td�|��t|�dkr�|s�zt�	|j
|�}Wntjy�d}Yn0|r�|j
j�
td�|�gS)NrNs.bookmark '%s' already exists (use -f to force)�Fs[bookmark %s matches a changeset hash
(did you leave a -r out of an 'hg bookmark' command?)
)rSrOrQr1rr=rrZr
ZisrevsymbolZ_repo�LookupErrorrKrH)r+rhrrrcriZcurZ
shadowhashrrr�
checkconflicts0
�
���zgitbmstore.checkconflict)N)FN)r9r:r;r-rVr\rarb�propertyrf�setterrkrorqrurxrrrrrM�s


rMrpcKs8|�dd�r$t�|�}t||�dS||fd|i|��S)Nr(Fr�dest)rbr�abspathrL)r>rKr{Zoptsr#rrr�inits


r}cs\|��rXt|jt�rX|j�|jj|j_|�dd�r>|jj	|j_
G�fdd�d��}||_|S)Nrrcs,eZdZdd�Z�fdd�Zedd��ZdS)zreposetup.<locals>.gitlocalrepocSst�|j|jj|jj�Sr)rZgitdirstaterKr r"rr(r.rrr�
_makedirstate/s�z-reposetup.<locals>.gitlocalrepo._makedirstatecs\�j|g|�Ri|��}|dur$dS|jjt�|�jj}|jjj�|�|jjj�	�|Sr)
�commitrr(rrtZtreer^rZ	read_treer8)r+rr�ret�tid�r>rrr5sz&reposetup.<locals>.gitlocalrepo.commitcSst|jj�Sr)rMrr(r.rrr�
_bookmarksCsz*reposetup.<locals>.gitlocalrepo._bookmarksN)r9r:r;r~rryr�rr�rr�gitlocalrepo.sr�)�localrDrr�	__class__rKZmakeprogressr)Z
configboolrHr*)rKr5r�rr�r�	reposetup'sr�cCs|dhO}dS)Nrr)rKZ	supportedrrr�
_featuresetupKsr�cCsLt�tdt�t�tdt�t�tjdt�}|d�	dg�tj
�t�dS)Ns	makestoresmakefilestoragesinitr
)rrNs'setup up a git repository instead of hg)
rZwrapfunctionrr@rEZwrapcommandr�tabler}�extendZfeaturesetupfuncs�addr�)rK�entryrrr�extsetupPs�r�)rp)&�__doc__Z
__future__rr%Zmercurial.i18nrZ	mercurialrrrrrr	r
rr�rrrrZ
testedwithZconfigtableZ
configitemZpygit2_versionZ
getversion�objectrr@rArErLrSrMr}r�r�r�rrrr�<module>s2,
�;y
	$

Youez - 2016 - github.com/yon3zu
LinuXploit