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

�+�b�9�@s�dZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZdZiZe�e�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Zdd�Zdd�Zedddged�ed�fddged�ed�fddged�ed�fd d!d"ed#�fd$d%ged&�ed�fd$d'ged(�ed�fd$d)ged*�ed�fd$d+d"ed,�fd$d-d"ed.�fd$d/d"ed0�fg
e	j ed1�d2d3�d4d5��Z!d6S)7aG	allow sparse checkouts of the working directory (EXPERIMENTAL)

(This extension is not yet protected by backwards compatibility
guarantees. Any aspect may break in future releases until this
notice is removed.)

This extension allows the working directory to only consist of a
subset of files for the revision. This allows specific files or
directories to be explicitly included or excluded. Many repository
operations have performance proportional to the number of files in
the working directory. So only realizing a subset of files in the
working directory can improve performance.

Sparse Config Files
-------------------

The set of files that are part of a sparse checkout are defined by
a sparse config file. The file defines 3 things: includes (files to
include in the sparse checkout), excludes (files to exclude from the
sparse checkout), and profiles (links to other config files).

The file format is newline delimited. Empty lines and lines beginning
with ``#`` are ignored.

Lines beginning with ``%include `` denote another sparse config file
to include. e.g. ``%include tests.sparse``. The filename is relative
to the repository root.

The special lines ``[include]`` and ``[exclude]`` denote the section
for includes and excludes that follow, respectively. It is illegal to
have ``[include]`` after ``[exclude]``.

Non-special lines resemble file patterns to be added to either includes
or excludes. The syntax of these lines is documented by :hg:`help patterns`.
Patterns are interpreted as ``glob:`` by default and match against the
root of the repository.

Exclusion patterns take precedence over inclusion patterns. So even
if a file is explicitly included, an ``[exclude]`` entry can remove it.

For example, say you have a repository with 3 directories, ``frontend/``,
``backend/``, and ``tools/``. ``frontend/`` and ``backend/`` correspond
to different projects and it is uncommon for someone working on one
to need the files for the other. But ``tools/`` contains files shared
between both projects. Your sparse config files may resemble::

  # frontend.sparse
  frontend/**
  tools/**

  # backend.sparse
  backend/**
  tools/**

Say the backend grows in size. Or there's a directory with thousands
of files you wish to exclude. You can modify the profile to exclude
certain files::

  [include]
  backend/**
  tools/**

  [exclude]
  tools/tests/**
�)�absolute_import)�_)�setattr)�cmdutil�commands�dirstate�error�
extensions�
logcmdutil�match�merge�pycompat�	registrar�sparse�utilsships-with-hg-corecCs*dt_t|�t|�t|�t|�dS)NT)rZenabled�_setupclone�	_setuplog�	_setupadd�_setupdirstate)�ui�r�2/usr/lib64/python3.9/site-packages/hgext/sparse.py�extsetupgs
rcCsj|}t|�sJ�|turJ||jvr>|j|}t||||��qJ|jd}q|turfttd�||f��dS)ziReplace a filecache property with a new class. This allows changing the
    cache invalidation condition.rstype '%s' has no property '%s'N)�callable�object�__dict__r�	__bases__�AttributeErrorr)�clsZpropnameZreplacementZorigcls�origrrr�replacefilecacheps

�r cCs2tjd}|d�d�dd�}t�td|�dS)Nslog|history�)��sparseNs1limit to changesets affecting the sparse checkoutcs<|�|�}|j�d�r8t������fdd�}|�|�}|S)Nr#cs"�|}t�fdd�|��D��S)Nc3s|]}�|�r|VqdS�Nr��.0�f)�sparsematchrr�	<genexpr>�r"zD_setuplog.<locals>._initialrevs.<locals>.ctxmatch.<locals>.<genexpr>)�any�files)Zrev�ctx��repor(rr�ctxmatch�sz1_setuplog.<locals>._initialrevs.<locals>.ctxmatch)�opts�getr�matcher�filter)rr.ZwoptsZrevsr/rr-r�_initialrevs�s


z_setuplog.<locals>._initialrevss_initialrevs)r�table�appendr	�wrapfunctionr
)r�entryr4rrrr�s
�	rcsn|�d��|�d��|�d��|�d�}|sV�s8�s8�rV���fdd�}t�td|�|||g|�Ri|��S)N�include�excludeZenable_profileZnarrowcs4tj|����i���dd�||g|�Ri|��S)NT)r9r:�
enableprofileZusereporootpaths)r�updateconfigr.Z
unfiltered)rr,�args�kwargs�r;r:r9rr�clonesparse�s
�z$_clonesparsecmd.<locals>.clonesparsesupdate)r1r	r7�mergemod)rrr.r=r0Z
narrow_patr@rr?r�_clonesparsecmd�s



rBcCs`tjd}|d�ddgdf�|d�ddgdf�|d�ddgd	f�t�tjdt�dS)
Nscloner!r"�enable-profilesenable a sparse profile�includesinclude sparse pattern�excludesexclude sparse pattern)rr5r6r	�wrapcommandrB)rr8rrrr�s

rcCs4tjd}|d�d�dd�}t�tjd|�dS)Nsaddr!)�sr#Ns8also include directories of added files in sparse configc	_s^|�d�rFt�}|D]}t�|�\}}|�|�qtj||t|�d�|||g|�Ri|��S)Nr)r9)r1�setr�split�addrr<�list)	rrr.Zpatsr0�dirs�pat�dirname�basenamerrr�_add�s
z_setupadd.<locals>._add)rr5r6r	rF)rr8rPrrrr�s
�		rcsnd
dd�}t�tjd|�ddd�}t�tjd|�gd	�}td
��|D] }�fdd�}t�tj||�qHdS)z|Modify the dirstate to prevent stat'ing excluded files,
    and to prevent modifications to files outside the checkout.
    Tc	Ss<t�|���}t�|j|g�}t�||�}|||||||�Sr$)�matchmod�exactr+Zunionmatcher�_sparsematcherZintersectmatchers)	r�selfrZsubrepos�unknownZignoredZfullZemZsmrrr�walk�sz_setupdirstate.<locals>.walkswalkNcsh|j����sZ�fdd�|D�}|r6�fdd�|D�}|durZ�fdd�|D�}|�|�}|||||�S)Ncsg|]}�|�r|�qSrrr%�r2rr�
<listcomp>�r"z4_setupdirstate.<locals>._rebuild.<locals>.<listcomp>csg|]}�|�r|�qSrrr%rWrrrX�r"csh|]}�|�s|�qSrrr%rWrr�	<setcomp>�r"z3_setupdirstate.<locals>._rebuild.<locals>.<setcomp>)rS�always�union)rrT�parentZallfilesZchangedfilesZdirstatefilestoremoverrWr�_rebuild�s
z _setupdirstate.<locals>._rebuildsrebuild)sset_trackeds
set_untrackedscopyswinclude file with `hg debugsparse --include <pattern>` or use `hg add -s <file>` to include file directory while addingcs\|j}|��sF|D]2}|dur||�s||vrtjtd�|�d��q||g|�Ri|��S)Ns3cannot add '%s' - it is outside the sparse checkout��hint)rSrZr�Abortr)rrTr=r>r(r'r^rr�_wrappers���z _setupdirstate.<locals>._wrapper)T)N)r	r7rr)rrVr]Z	editfuncs�funcrarr^rr�s

�rsdebugsparse�IrDs$include files in the sparse checkoutsPATTERN�XrEs$exclude files in the sparse checkout�d�deletesdelete an include/exclude rule�f�forceFs.allow changing rules even with pending changesr"rCsenables the specified profilesdisable-profilesdisables the specified profilesimport-rulessimports rules from a filesclear-ruless"clears local include/exclude rules�refreshs,updates the working after sparseness changes�resetsmakes the repo full agains
[--OPTION]T)Z	helpbasiccKs�t�|�}|�d�}|�d�}|�d�}|�d�}|�d�}|�d�}|�d�}	|�d�}
|�d	�}|�d
�}t�|ddd	�}
t|p�|p�|
p�|p�|p�|�}t|t|
�g�}|dkr�t�t	d���|d
k�r2|j
�d��r$|�|j
�
d�d�t�|�}|�r |�t	d��|�d�|�d�dSt�t	d���|�rTtj||||||
|||d�	|�rltj||||d�|	�r�tj||d�|�r�zV|��}tttj||��t�|�|d��}tj|||d
|d|dd�W|��n
|��0dS)a�make the current checkout sparse, or edit the existing checkout

    The sparse command is used to make the current checkout sparse.
    This means files that don't meet the sparse condition will not be
    written to disk, or show up in any working copy operations. It does
    not affect files in history in any way.

    Passing no arguments prints the currently applied sparse rules.

    --include and --exclude are used to add and remove files from the sparse
    checkout. The effects of adding an include or exclude rule are applied
    immediately. If applying the new rule would cause a file with pending
    changes to be added or removed, the command will fail. Pass --force to
    force a rule change even with pending changes (the changes on disk will
    be preserved).

    --delete removes an existing include/exclude rule. The effects are
    immediate.

    --refresh refreshes the files on disk based on the sparse rules. This is
    only necessary if .hg/sparse was changed by hand.

    --enable-profile and --disable-profile accept a path to a .hgsparse file.
    This allows defining sparse checkouts and tracking them inside the
    repository. This is useful for defining commonly used sparse checkouts for
    many people to use. As the profile definition changes over time, the sparse
    checkout will automatically be updated appropriately, depending on which
    changeset is checked out. Changes to .hgsparse are not applied until they
    have been committed.

    --import-rules accepts a path to a file containing rules in the .hgsparse
    format, allowing you to add --include, --exclude and --enable-profile rules
    in bulk. Like the --include, --exclude and --enable-profile switches, the
    changes are applied immediately.

    --clear-rules removes all local include and exclude rules, while leaving
    any enabled profiles in place.

    Returns 0 if editing the sparse checkout succeeds.
    rDrErhsenable_profilesdisable_profilesimport_rulessclear_rulesrfrirjr!stoo many flags specifiedrr#�
s/Temporarily Included Files (for merge/rebase):
Ns@the debugsparse command is only supported on sparse repositories)r9r:�reset�deleter;�disableprofile�force)ro�)ZaddedZdroppedZconflicting)r
Zbyteskwargsr1rZcheck_at_most_one_arg�bool�sumrr`rZvfs�exists�status�readrZreadtemporaryincludes�joinr<Zimportfromfiles�
clearrules�wlock�map�lenZrefreshwdirr2Zprintchanges�release)rr.r0r9r:ror;rnZimportrulesrwrmZrefreshrl�actionr<�countZtemporaryincludesrxZfcountsrrr�debugsparses�i










��

�������r~N)"�__doc__Z
__future__rZmercurial.i18nrZmercurial.pycompatrZ	mercurialrrrrr	r
rrQrrAr
rrrZ
testedwithZcmdtableZcommandrr rrBrrrZtemplateoptsr~rrrr�<module>s�B8
	?���������:�;�@

Youez - 2016 - github.com/yon3zu
LinuXploit