403Webshell
Server IP : 67.20.76.190  /  Your IP : 216.73.217.98
Web Server : Apache
System : Linux host2028.hostmonster.com 5.14.0-611.47.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 8 20:00:39 EDT 2026 x86_64
User : jegocaco ( 1556)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/hgext/largefiles/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/hgext/largefiles/__pycache__/lfcommands.cpython-39.opt-1.pyc
a

�+�b<Z�@s�dZddlmZddlZddlZddlZddlmZddlm	Z	m
Z
ddlmZm
Z
mZmZmZmZmZmZmZmZmZddlmZdd	lmZmZd
dlmZmZej Z e��Z!e!j"dd
dded�dfddded�fged�ddd�dd��Z#dd�Z$dd�Z%dd�Z&d d!�Z'd"d#�Z(d$d%�Z)d&d'�Z*d(d)�Z+d>d*d+�Z,d?d,d-�Z-d.d/�Z.d@d0d1�Z/e!�"d2d3d4ged5�fgej0ed6��dAd8d9��Z1e!�"d:gej0ed;��d<d=��Z2dS)Bz=High-level command function for lfconvert, plus the cmdtable.�)�absolute_importN)�_)�bin�hex)�cmdutil�context�error�	exthelper�hg�lock�
logcmdutil�match�pycompat�scmutil�util)�hashutil�)�convcmd�filemap�)�lfutil�storefactorys	lfconvert�s�size�s9minimum size (MB) for files to be converted as largefilessSIZEs	to-normalFs/convert from a largefiles repo to a normal repos#hg lfconvert SOURCE DEST [FILE ...]T)ZnorepoZ	inferrepocs,t�|�}|drd}nd}tj|d|�d�dd�}t�|�sPt�t	d�|��t�|�slt�t	d�|��t�
||��|�t	d�|�tj
||dd	�}d}d}	}
�zP�fd
d��j�
d����dD�}�j|ji}|�r<|��}	|��}
t�}
t�}|�s|�tjd
�}|�r,t��jdt|��}nd}i}|jt	d�t	d��d��d��B}|D],}|�|���t�||||
||||�	�qZWd�n1�s�0Y|j�tj��r�|j� tj�|�!�D]N}|j�"|��r�|j�#|�z|j�$|j�%|��Wnt&�yYn0�q�|
�r�|j'�(d�t)�*|�n�G��fdd�dt+j,��G��fdd�dt-j.��t/|��\}}|dk�r�t�t	d���t-j.}�t-_.zt-j0|||ddd�W|t-_.n|t-_.0d}W|�r�|j1�2�t3|
|	�|�s(t4� |j�n.|�r|j1�2�t3|
|	�|�s&t4� |j�0dS)aMconvert a normal repository to a largefiles repository

    Convert repository SOURCE to a new repository DEST, identical to
    SOURCE except that certain files will be converted as largefiles:
    specifically, any file that matches any PATTERN *or* whose size is
    above the minimum size threshold is converted as a largefile. The
    size used to determine whether or not to track a file as a
    largefile is the size of the first version of the file. The
    minimum size can be specified either with --size or in
    configuration as ``largefiles.size``.

    After running this command you will need to make sure that
    largefiles is enabled anywhere you intend to push the new
    repository.

    Use --to-normal to convert largefiles back to normal files; after
    this, the DEST repository can be used without largefiles at all.s	to_normalFTrN)�defaults %s is not a local Mercurial reposinitializing destination %s
)Zcreatec3s|]}�|VqdS�N�)�.0�ctx)�rsrcr�A/usr/lib64/python3.9/site-packages/hgext/largefiles/lfcommands.py�	<genexpr>rs�zlfconvert.<locals>.<genexpr>rspatternsrsconverting revisionss	revisionsstip�Zunit�totals
largefilescs.eZdZ��fdd�Z���fdd�Z�ZS)zlfconvert.<locals>.lfsourcecs&t�|��||d�d|jjtj<dS)N�.)�super�__init__Z
filemapper�renamer�	shortname)�self�ui�source)�	__class__�lfsourcerr!r'�sz$lfconvert.<locals>.lfsource.__init__cs~|\}}t�|��||�}|�tj�r2|ddur6|S|d��}t��|�}|durlt�t	d�||f��t
�|�|dfS)Nrs missing largefile for '%s' in %sr)r&�getfile�
startswithrZshortnameslash�strip�findfiler�AbortrrZreadfile)r*�name�revZrealnameZrealrev�f�hash�path)r-r.r rr!r/�s 
�
���z#lfconvert.<locals>.lfsource.getfile)�__name__�
__module__�__qualname__r'r/�
__classcell__r)r.r �r-r!r.�sr.cs eZdZ���fdd�Z�ZS)zlfconvert.<locals>.convertercs&�||�}t�|��|||||�dSr)r&r')r*r+r,�destZ
revmapfile�opts�src)r-�	converterr.rr!r'�s


�z%lfconvert.<locals>.converter.__init__)r9r:r;r'r<r)rAr.r=r!rA�srAs&all largefiles must be present locallyshg)Zsource_typeZ	dest_type)5rZbyteskwargsrZ
getminsize�getr
Zislocalrr3rZ
repository�status�	changelogZnodesbetweenZheads�nullid�wlockr�setZ
configlistZlongname�matchmodr
�root�list�makeprogressr5�update�_lfconvert_addchangeset�wvfs�existsr)�rmtree�keys�isfile�unlink�
removedirs�dirname�OSErrorZrequirements�addrZwritereporequirementsrZfilemap_sourcerrA�downloadlfiles�convert�dirstate�clear�release�shutil)r+r@r>Zpatsr?Ztolfile�size�rdst�successZdstwlockZdstlockZctxs�revmap�lfiles�normalfiles�matcher�lfiletohash�progressrr6�found�missingZorigr)rAr.r r!�	lfconvert3s�(



�
��(


�

�

ric	s�t���}	t�|	�}
g}|
D�]�}||vr�||vr�t|�||�}
|���vr���|�}|��}|durjd}|ot||v}|
|O}
d|��vr�|r�t�t	d�|��d}
|
r�|�
|�n
|�
|�||v�r�t�|�}|�
|�|���v�r���|�}d|��v�r,|��}|�r,||v�r,t�t	d�|��t�d�}|��|���t|���}|�v�sl�||k�r�|�|�|���|���d�|��v}t�||||�|�|<q|�
|�q���fdd�}t||	�||��dS)	NF�ls+renamed/copied largefile %s becomes symlinkslargefile %s becomes symlinkr�xc
s�t�|�}|dur|z��|�}Wntjy6YdS0|��}|rNt�|�}t�|||�|dd|�	�vd|�	�v|�St
|�|��SdS)N�
rjrk)rZsplitstandin�filectxr�LookupError�
copysource�standinr�
memfilectx�flags�_getnormalcontext)�repo�memctxr6Zsrcfname�fctx�renamed�rrerarr!�
getfilectx$s&




�
z+_lfconvert_addchangeset.<locals>.getfilectx)�_convertparents�_getchangedfiles�_islfile�manifestrmrorrrr3rrWrrp�appendrZsha1rL�datar�digestZwwriteZwritestandin�_commitcontext)r r_rrarbrcrdr^re�parents�files�dstfilesr6ZislfilervrwZrenamedlfileZfstandin�mr7�
executableryrrxr!rM�s\



��





�

rMcCs^t�|||��|||��|��|���}|�|�}t�||�|�	|�|j
��||��<dSr)
rru�description�user�dateZextraZ	commitctxrZcopyalltostoreZ
setparentsrDZtip�node)r_r�rr�ryraZmctx�retrrr!r�Cs�


r�cCsRt|���}|��j|vrN|��}|��D]"}|���|�D]}|�|�q<q*|Sr)rGr�rtrEr}r��diffrW)rr�r�ZmcZpctx�fnrrr!r{Usr{cCsFg}|��D]}|�||���qt|�dkrB|�|��j�q$|S)Nr)r�r~r��lenrtrE)rrar��prrr!rz`srzc
Csrz|�|�}Wntjy$YdS0|��}|��}|dkrLt|j||�}t�||||d|�	�vd|�	�v|�S)N�.hgtagsrjrk)
rmrrnror�_converttagsr+rrqrr)rtrr6rarvrwrrrr!rsjs�rsc	Cs�g}|��D]�}z|�dd�\}}Wn(tyL|�td�|�YqYn0zt|�}Wn(ty�|�td�|�YqYn0z|�dt||�|f�Wqt	y�|�td�|�YqYq0qd�
|�S)N� rs&skipping incorrectly formatted tag %s
s%skipping incorrectly formatted id %s
s%s %s
sno mapping for id %s
r)�
splitlines�split�
ValueError�warnrr�	TypeErrorr~r�KeyError�join)r+rar�newdata�line�idr4Znewidrrr!r�zs$

r�cCsd|dks|dks|dkrdS|r,||�r,dSz|�|���|ddkWStjy^YdS0dS)zlReturn true if file should be considered a largefile, i.e.
    matcher matches it or it is larger than size.r�s	.hgignores.hgsigsFTiN)rmr^rrn)�filerrdr^rrr!r|�sr|c	s�|sdStj||dd�}d}|�dt|��|�|���fdd�|D�}|�dt|��|jtd	�td
�t|�d��Z}|D]D}|�|�t�	||�}|s�t
�td�|��|�||�|d
7}q~Wd�n1s�0YdS)z&upload largefiles to the central storeNT)�putrs,sending statlfile command for %d largefiles
csg|]}�|s|�qSrr)r�h�Zretvalrr!�
<listcomp>�rz uploadlfiles.<locals>.<listcomp>s"%d largefiles need to be uploaded
suploading largefilessfilesr#s6largefile %s missing from store (needs to be uploaded)r)
r�	openstore�debugr�rOrKrrLrr2rr3r�)	r+r r_r��storeZatrfr7r,rr�r!�uploadlfiles�s2
�
���r�cCs.|r|�d�}ndg}t�|�}|j||d�S)a)Verify that every largefile revision in the current changeset
    exists in the central store.  With --contents, also verify that
    the contents of each local largefile file revision are correct (SHA-1 hash
    matches the revision ID).  With --all, check every changeset in
    this repository.sall()r%)�contents)�revsrr�Zverify)r+rt�allr�r�r�rrr!�verifylfiles�s

r�cCs�t�||�}|r t|�t|�@}g}||}|D]v}zt�|t�|��}Wn>ty�}	z&|	jtjkrtWYd}	~	q0�WYd}	~	n
d}	~	00t�||�s0|�	||f�q0|r�t
�|�}
|
�|�}|SggfS)a.cachelfiles ensures that all largefiles needed by the specified revision
    are present in the repository's largefile cache.

    returns a tuple (cached, missing).  cached is the list of files downloaded
    by this operation; missing is the list of files that were needed but could
    not be found.N)
r�
listlfilesrG�
readasstandinrp�IOError�errno�ENOENTr2r~rr�rB)r+rtr��filelistrbZtogetr�lfileZexpectedhash�errr�r�rrr!�cachelfiles�s&

r�cCs�|jj}d}d}|�ddtj�D]0}t||||��\}}|t|�7}|t|�7}q"|�td�|�|dkr�|�td�|�||fS)Nrsfile(%s)spath:s %d additional largefiles cached
s!%d largefiles failed to download
)	rDr�r�rr)r�r�rCr)r+rtZtonodeZtotalsuccessZtotalmissingr5r`rhrrr!rX�srXc	s�t�|||�}|����^t�||�}tt�|��t|�B}�dur^t����fdd�|D�}|����Xi}t��d\}	}
|j}|d}|D�] }
tj	j
t�|||
�|j
d�}t�|
�}tj	j
t�|||�|j
d�}|�|��r�|�|��r|�|
��rt�|�|
�|�|��|�|�t�||�}|dk�r�|
|v�rh|j�|�j�r^|j|
dd�n
��|
�|j|
dddd	�|||
<q�|�|
�r�|j�|
�|vr�|�|
�|
d
7}
q�Wd�n1�s�0Y|�|���|�r<�fdd�|D�}�D]$}|j�t�|��|j�|��q�|td��t ||d|�|����|D]�}
d
}|�!|
�}|�r�t�"|||
��sv�qJ|j|
ddd�d
}t�|
�}|�|��r|�#|�j$d@}|�#|
�}|j$}||d@k�r|dM}|�r�||d?d@t%j&@O}|�'|
|�d
}|	|7}	t�(|||
|��qJWd�n1�s60Y|�|���|�rh|td�|	|
f�Wd�n1�s~0YdS)z�Update largefiles according to standins in the working directory

    If ``printmessage`` is other than ``None``, it means "print (or
    ignore, for false) message forcibly".
    Ncsg|]}|�vr|�qSrr�rr6)r�rr!r�	rz updatelfiles.<locals>.<listcomp>)rr)�startrT)Z
ignoremissing)�
p1_tracked�
wc_trackedZpossibly_dirtyrcsg|]}|�vr|�qSrrr�)�droppedrr!r�?rsgetting changed largefiles
r)r�r��@i����r�Is"%d largefiles updated, %d removed
))rZgetstatuswriterrFZopenlfdirstaterGr�ZparentchangerN�osr8�relpathrZ
backuppathrIrprOr]�copyfiler�Z
unlinkpathr�rZZ	get_entryZany_trackedrWZupdate_file�	normalize�writeZcurrenttransaction�_mapZreset_staterr�rBZ
copyfromcache�stat�st_moder�umask�chmodZsynclfdirstate)r+rtr�ZprintmessageZnormallookupZstatuswriterZ
lfdirstaterbrL�updatedZremovedrNZwctxr�Z	lfileorigrpZstandinorigZ
expecthashr6Zupdate1Zstandinexec�st�moder)r�r�r!�updatelfiles�s�
�
�



�
��
*

�

4�r�slfpull�rsrevs#pull largefiles for these revisionss--r REV... [-e CMD] [--remotecmd CMD] [SOURCE]�defaultc	Ks�||_|�dg�}|s$t�td���t�||�}d}|D]2}|�td�|�t|||�\}}|t	|�7}q8|�
td�|�dS)a0pull largefiles for the specified revisions from the specified source

    Pull largefiles that are referenced from local changesets but missing
    locally, pulling from a remote repository to the local cache.

    If SOURCE is omitted, the 'default' path will be used.
    See :hg:`help urls` for more information.

    .. container:: verbose

      Some examples:

      - pull largefiles for all branch heads::

          hg lfpull -r "head() and not closed()"

      - pull largefiles on the default branch::

          hg lfpull -r "branch(default)"
    r5sno revisions specifiedrs#pulling largefiles for revision %d
s%d largefiles cached
N)ZlfpullsourcerBrr3rrZrevrangeZnoter�r�rC)	r+rtr,r?r�Z	numcachedr5�cachedrhrrr!�lfpullusr�s
debuglfputsFILEcKs.t�|�}t�|��||�|�d|�dS)Ns%s
r)rZhashfilerr�r�r�)r+rt�filepath�kwargsr7rrr!�
debuglfput�s
r�)FF)N)NNF)r�)3�__doc__Z
__future__rr�r�r]Zmercurial.i18nrZmercurial.noderrZ	mercurialrrrr	r
rrr
rHrrrZmercurial.utilsrrYrr�rrr\ZehZcommandrirMr�r{rzrsr�r|r�r�r�rXr�Z
remoteoptsr�r�rrrr!�<module>	sn4
����
]
!

�
{��$

Youez - 2016 - github.com/yon3zu
LinuXploit