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/lfs/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

�+�b99�@sPdZddlmZddlZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZmZddlmZdd	lmZmZmZd
Ze��Z e �!ej �e �!ej �e j"Z"e j#Z#e j$Z%e j&Z'e j(Z(e j)Z*e j+Z+e j,ddd
d�e j,dddd�e j,dddd�e j,ddd
d�e j,dddd�e j,dddd�e j,dddd�e j,dddd�e j,dddd�ej-ej.ej/fZ0dd�Z1e j'dd��Z2e j*dd ��Z3d!d"�Z4d#d$�Z5e �6ed%�d&d'��Z7e j%d(d)��Z8e �(d*�d+d,��Z9e j+d-d.hd/�d0d1��Z:e �;d2d3d4ged5�fg�d6d7��Z<e j=d8d9d:ded;�fgd<�d=d>��Z>dS)?a�lfs - large file support (EXPERIMENTAL)

This extension allows large files to be tracked outside of the normal
repository storage and stored on a centralized server, similar to the
``largefiles`` extension.  The ``git-lfs`` protocol is used when
communicating with the server, so existing git infrastructure can be
harnessed.  Even though the files are stored outside of the repository,
they are still integrity checked in the same manner as normal files.

The files stored outside of the repository are downloaded on demand,
which reduces the time to clone, and possibly the local disk usage.
This changes fundamental workflows in a DVCS, so careful thought
should be given before deploying it.  :hg:`convert` can be used to
convert LFS repositories to normal repositories that no longer
require this extension, and do so without changing the commit hashes.
This allows the extension to be disabled if the centralized workflow
becomes burdensome.  However, the pre and post convert clones will
not be able to communicate with each other unless the extension is
enabled on both.

To start a new repository, or to add LFS files to an existing one, just
create an ``.hglfs`` file as described below in the root directory of
the repository.  Typically, this file should be put under version
control, so that the settings will propagate to other repositories with
push and pull.  During any commit, Mercurial will consult this file to
determine if an added or modified file should be stored externally.  The
type of storage depends on the characteristics of the file at each
commit.  A file that is near a size threshold may switch back and forth
between LFS and normal storage, as needed.

Alternately, both normal repositories and largefile controlled
repositories can be converted to LFS by using :hg:`convert` and the
``lfs.track`` config option described below.  The ``.hglfs`` file
should then be created and added, to control subsequent LFS selection.
The hashes are also unchanged in this case.  The LFS and non-LFS
repositories can be distinguished because the LFS repository will
abort any command if this extension is disabled.

Committed LFS files are held locally, until the repository is pushed.
Prior to pushing the normal repository data, the LFS files that are
tracked by the outgoing commits are automatically uploaded to the
configured central server.  No LFS files are transferred on
:hg:`pull` or :hg:`clone`.  Instead, the files are downloaded on
demand as they need to be read, if a cached copy cannot be found
locally.  Both committing and downloading an LFS file will link the
file to a usercache, to speed up future access.  See the `usercache`
config setting described below.

The extension reads its configuration from a versioned ``.hglfs``
configuration file found in the root of the working directory. The
``.hglfs`` file uses the same syntax as all other Mercurial
configuration files. It uses a single section, ``[track]``.

The ``[track]`` section specifies which files are stored as LFS (or
not). Each line is keyed by a file pattern, with a predicate value.
The first file pattern match is used, so put more specific patterns
first.  The available predicates are ``all()``, ``none()``, and
``size()``. See "hg help filesets.size" for the latter.

Example versioned ``.hglfs`` file::

  [track]
  # No Makefile or python file, anywhere, will be LFS
  **Makefile = none()
  **.py = none()

  **.zip = all()
  **.exe = size(">1MB")

  # Catchall for everything not matched above
  ** = size(">10MB")

Configs::

    [lfs]
    # Remote endpoint. Multiple protocols are supported:
    # - http(s)://user:pass@example.com/path
    #   git-lfs endpoint
    # - file:///tmp/path
    #   local filesystem, usually for testing
    # if unset, lfs will assume the remote repository also handles blob storage
    # for http(s) URLs.  Otherwise, lfs will prompt to set this when it must
    # use this value.
    # (default: unset)
    url = https://example.com/repo.git/info/lfs

    # Which files to track in LFS.  Path tests are "**.extname" for file
    # extensions, and "path:under/some/directory" for path prefix.  Both
    # are relative to the repository root.
    # File size can be tested with the "size()" fileset, and tests can be
    # joined with fileset operators.  (See "hg help filesets.operators".)
    #
    # Some examples:
    # - all()                       # everything
    # - none()                      # nothing
    # - size(">20MB")               # larger than 20MB
    # - !**.txt                     # anything not a *.txt file
    # - **.zip | **.tar.gz | **.7z  # some types of compressed files
    # - path:bin                    # files under "bin" in the project root
    # - (**.php & size(">2MB")) | (**.js & size(">5MB")) | **.tar.gz
    #     | (path:bin & !path:/bin/README) | size(">1GB")
    # (default: none())
    #
    # This is ignored if there is a tracked '.hglfs' file, and this setting
    # will eventually be deprecated and removed.
    track = size(">10M")

    # how many times to retry before giving up on transferring an object
    retry = 5

    # the local directory to store lfs files for sharing across local clones.
    # If not set, the cache is located in an OS specific cache location.
    usercache = /path/to/global/cache
�)�absolute_importN)�_)�bin)�bundlecaches�config�context�error�
extensions�	exthelper�filelog�filesetlang�	localrepo�
logcmdutil�minifileset�pycompat�revlog�scmutil�templateutil�util)�
repository�)�	blobstore�wireprotolfsserver�wrappersships-with-hg-coresexperimentals	lfs.serveT)�defaultslfs.user-agentslfs.disableusercacheFslfs.worker-enable�lfssurls	usercache�	threshold�tracksnone()sretry�cCs|dhO}dS)Nr�)�uiZ	supportedrr�8/usr/lib64/python3.9/site-packages/hgext/lfs/__init__.py�featuresetup�sr"cCstj�t�dS�N)r
Zfeaturesetupfuncs�addr"�r rrr!�_uisetup�sr&cs����sdSt����j_t����j_G��fdd�d�j����_d�jvrzdd�}|�dd|d�|�dd|d�n�j	�
dtj�dS)	Ncs(eZdZejd���fdd�	�Z�ZS)z_reposetup.<locals>.lfsrepoFNcs&t|��jjd<t�|�j|||d�S)Nslfstrack)�origctx)�_trackedmatcher�svfs�options�super�	commitctx)�self�ctxrr')�	__class__�lfsrepo�reporr!r,�sz%_reposetup.<locals>.lfsrepo.commitctx)FN)�__name__�
__module__�__qualname__r
Zunfilteredmethodr,�
__classcell__r�r0r1)r/r!r0�sr0rcs�|����d|jvr$Wd�dS|�d�}|rN|�dt|d�t|��}n|�dt|d��}|j�|D]X�t��fdd����D��rl|j�d�|j	�t
j�t�
|�|j�dtj�q�qlWd�n1s�0YdS)	NrrZ	node_lasts%n:%nZnodes%nc3s*|]"}|�vr�|�r�|��VqdSr#)�islfs)�.0�f�r.�matchrr!�	<genexpr>s�z7_reposetup.<locals>.checkrequireslfs.<locals>.<genexpr>)�lock�requirements�get�setrZ_storenarrowmatch�any�filesr$�featuresrZREPO_FEATURE_LFSrZwritereporequirements�prepushoutgoinghooksr�prepush)r r1�kwargsZlast�srr:r!�checkrequireslfss"


�
z$_reposetup.<locals>.checkrequireslfsshookss
commit.lfsspretxnchangegroup.lfs)
�localrr)ZlfslocalblobstoreZremoteZlfsremoteblobstorer/r>Z	setconfigrDr$rrE)r r1rHrr6r!�
_reposetup�s
�rJc
s�|j�d�sL|j�dd�}|j�dd�}|rBt�|�d||f}t�|�S|j�	d�}|sddd�St��}|�d|�zdd	�|�
d�D��Wn8tjy�}zt�
td
�|��WYd}~n
d}~00�fdd
�}|S)zdReturn a function (path, size) -> bool indicating whether or not to
    track a given file with lfs.s.hglfsrrrs(%s) | size('>%d')cSsdS�NFr)�prGrrr!�<lambda>4�z!_trackedmatcher.<locals>.<lambda>cSs$g|]\}}t�|�t�|�f�qSr)r�compile)r8�pattern�rulerrr!�
<listcomp><s�z#_trackedmatcher.<locals>.<listcomp>sparse error in .hglfs: %sNcs*�D] \}}|||�r|||�SqdSrKr)�path�size�patrQ�Zrulesrr!�_matchGs
z_trackedmatcher.<locals>._match)Zwvfs�existsr rZconfigbytesr�parserrOZtryread�itemsrZ
ParseError�Abortr)r1Z	trackspecZ	threshold�dataZcfg�erWrrVr!r(#s(

�
(r(cCs4tj}||dtj�||dtj�||dtj�dS)NZaddrevisionZrenamedrT)r	�wrapfunctionrZfilelogaddrevisionZfilelogrenamedZfilelogsize)rr^rrr!�wrapfilelogRsr_sresolverevlogstorevfsoptionscCsj||||�}t�|�D]N\}}|tjturtj|dvrRtd�tj}t�|��t	|dtj<qfq|S)Nsflagprocessorss2cannot register multiple processors on flag '%#x'.)
r	�sys�modulesr2rZREVIDX_EXTSTOREDrrr[�lfsprocessor)�origr r>rC�opts�name�module�msgrrr!�_resolverevlogstorevfsoptionsZs��
rhcCs6ttj�tjtj_tj�	dtj
�dtjdd<dS)Nrs03sv2s
cg.version)
r_rrZfilectxislfsrZbasefilectxr7rZfileprefetchhooksr$Z_prefetchfilesrZ_bundlespeccontentoptsr%rrr!�	_extsetupls

rislfs()cs4t�|ddtd��|j��fdd�}|j|dd�S)zFile that uses LFS storage.rslfs takes no argumentscstj�|dd�duS)NT�Zremoved)rZpointerfromctx)r9�r.rr!�lfsfilep�szlfsfileset.<locals>.lfsfileps<lfs>)Zpredrepr)rZgetargsrr.�	predicate)Zmctx�xrlrrkr!�
lfsfilesetzsros	lfs_files�ctx)Zrequirescsb|�|d�}tj|dd��t����}�fdd����fdd�}t�||d|�}t�|||tj	�S)	zMList of strings. All files modified, added, or removed by this
    changeset.rpTrjcs(dd�}tt��|�|d�}t�|�S)NcSs|ddk|fS)Nrsversionr)rnrrr!rM�rNz+lfsfiles.<locals>.pointer.<locals>.<lambda>)�key)�sortedrZ	iteritemsrZsortdict)�vZsortkeyfuncrZ)�pointersrr!�pointer�szlfsfiles.<locals>.pointercs*|�|r�|��ndt��|��d�S)N)sfileslfsoids
lfspointer)ZoidrZ
hybriddict)rs�rurtrr!rM�s�zlfsfiles.<locals>.<lambda>slfs_file)
�resourcerZpointersfromctxrr�keysrZ_showcompatlistZhybridr�identity)r�mappingr.rBZmakemapr9rrvr!�lfsfiles�sr{sdebuglfsupload�rsrevs$upload large files introduced by REVcKs0|�dg�}t�|t�||��}t�||�dS)zDupload lfs blobs added by the working copy parent or given revisionsZrevN)r?rZextractpointersrZrevrangeZuploadblobs)r r1rdZrevsrtrrr!�debuglfsupload�sr}�verifyrNsno-lfssskip missing lfs blob content)rdcKs�|j�dd�}|�d�}|r2|dur6|tjM}nd}|durH|tjO}|�d|i��"|||fi|��Wd�S1s~0YdS)Nr~�	skipflags�no_lfsFrT)r~r)r Z	configint�poprZREVISION_FLAG_EXTSTOREDZconfigoverride)rcr r1rdZ	skipflagsr�rrr!�verify�s

r�)?�__doc__Z
__future__rr`Zmercurial.i18nrZmercurial.noderZ	mercurialrrrrr	r
rrr
rrrrrrrZmercurial.interfacesr�rrrZ
testedwithZeh�mergeZcmdtableZconfigtableZ
finalextsetupZextsetupZfinaluisetupZuisetupZfilesetpredicateZfinalreposetupZ	reposetupZtemplatekeywordZ
configitemZ
readfromstoreZwritetostoreZbypasscheckhashrbr"r&rJr(r_r^rhriror{Zcommandr}Zwrapcommandr�rrrr!�<module>s�sH
����������

2/





�
�

Youez - 2016 - github.com/yon3zu
LinuXploit