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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/lib64/python3.9/site-packages/hgext/narrow/__pycache__/narrowcommands.cpython-39.opt-1.pyc
a

�+�bL_�@s�ddlmZddlZddlZddlmZddlmZmZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZiZe� e�Z dd�Z!d	d
�Z"dd�Z#d
d�Z$dd�Z%e�&ede%�dd�Z'dd�Z(e dddged�fddged�fddded�fddged �fdd!ded"�fdd#ged$�fdd%ded&�fdd'ded(�fdd)d*ed+�fdd,ded-�fg
ej)ed.�d*e j*d/�d2d0d1��Z+dS)3�)�absolute_importN)�_)�hex�short)�bundle2�cmdutil�commands�	discovery�encoding�error�exchange�
extensions�hg�
narrowspec�pathutil�pycompat�	registrar�repair�repoview�requirements�sparse�util�wireprototypes)�urlutilcCs�t�tjdt�}|d�dddtd�f�|d�dddtd�f�|d�dd	dtd
�f�dt��vr�|d�ddgtd
�f�|d�ddgtd�f�t�tjdt�}|d�dddtd�f�t�tjdt	�dS)z@Wraps user-facing mercurial commands with narrow-aware versions.sclone���narrowNs%create a narrow clone of select files�depths0limit the history fetched by distance from heads�
narrowspecsread narrowspecs from filessparse�includes&specifically fetch this file/directory�excludes2do not fetch this file/directory, even if includedspullsarchive)
r
Zwrapcommandr�table�clonenarrowcmd�appendrZenabled�
pullnarrowcmd�archivenarrowcmd)�entry�r'�A/usr/lib64/python3.9/site-packages/hgext/narrow/narrowcommands.py�setup.s@������	��	r)c
s^t����t��}�d}|r�tj�t��|�}|�	t
d�|�zt�|�}WnBty�}	z*t
�t
d�|t�|	j�f��WYd}	~	n
d}	~	00t�||d�\}
}}|r�t
�t
d���t�|
�t�|�d�d<�d�|
��d	�|��d�r�fd
d�}
t�td|
�}|�.|||g|�Rit�����Wd�S1�sP0YdS)
zAWraps clone command, so 'hg clone' first wraps localrepo.clone().rsreading narrowspec from '%s'
�%cannot read narrowspecs from '%s': %sNrs9cannot specify other files using '%include' in narrowspecTrr cs$|||���d�r �d|d<dS)Nr��get��orig�pullop�kwargs��optsr'r(�pullbundle2extraprepare_widen}s

z5clonenarrowcmd.<locals>.pullbundle2extraprepare_widen�_pullbundle2extraprepare)r�byteskwargsr�nullcontextmanager�os�path�joinr
�getcwd�statusr�readfile�IOErrorr�Abort�
strtolocal�strerrorr�parseconfigZConfigErrorrZvalidatepatterns�extendr
�wrappedfunctionrZ	strkwargs)r.�ui�repo�argsr2�wrappedextraprepareZnarrowspecfile�filepath�fdata�inst�includes�excludes�profilesr3r'r1r(r"YsB
����


�r"csnt��}tj|jvr.�fdd�}t�td|�}|�(|||g|�Ri���Wd�S1s`0YdS)z2Wraps pull command to allow modifying narrow spec.cs$|||���d�r �d|d<dS)N�depthrr+r-r1r'r(r3�s

z4pullnarrowcmd.<locals>.pullbundle2extraprepare_widenr4N)rr6r�NARROW_REQUIREMENTr
rCr)r.rDrErFr2rGr3r'r1r(r$�s�r$c
Os|tj|jvrd|j\}}t|�dg��}t|�dg��}t�||||�\}}}	|rX||d<|rd||d<|||g|�Ri|��S)z5Wraps archive command to narrow the default includes.�include�exclude)rrO�
narrowpats�setr,rZrestrictpatterns)
r.rDrErFr2Z
repo_includesZ
repo_excludesrKrLZunused_invalidr'r'r(r%�s
�
r%cs�|j�tj�jvr|||�Stj|j��vr:t�t	d���|||�d|d<�j
\}}||d<||d<|rr||d<|r~||d<tj|j��vr��fdd	���d
|j
�D�|d<|ds�|d=dS)N�%server does not support narrow clonesTrsoldincludepatssoldexcludepats�includepats�excludepatscs&g|]}|���jkrt|����qSr')�node�nullidr��.0�ctx�rEr'r(�
<listcomp>�s�z+pullbundle2extraprepare.<locals>.<listcomp>�::%ln�known)rErrOr�	NARROWCAP�remote�capabilitiesrr>rrR�ELLIPSESCAP1rS�common)r.r/r0rPrQr'r\r(�pullbundle2extraprepare�s(



�
rer4c

s@t��j||��t��j||������tj�||d�}
|�td��|jtd�td�t	|
j
�t	|
j�d�}g}|�Xt�
|
j
|
j�D]6}
|��t��fdd��|
��D��r�|�|
�q�Wd�n1s�0Y��d|�}t��d�}t�fd	d�||D��}|�r�|�td
��d}|j�s>t	|�|k�r^|D]}
|�dt|
���qBn@|d|�D]}
|�dt|
���qj|�td
�t	|�|�|�s�tjtd�td�d��|����f|�r��fdd�|D�}�d��|v�rt��d�d��|��}t��|�ddi}|	�r4|�td��n|�td��|�|d��$t j!|�|d|	d�Wd�n1�sz0Yg}�j"�#�D]�\}}}|�$d��r�|dd�}�|��sB|�|�nx|�$d��r�|dd�}t%t&�'|h��|g}d }|D]0}��(|�}|�sd}�q2|d!k�r�q2�q|�s�|�|��q���)���*d"�����+||�|D]6}|�td#�|�t,�-�j.�/|���j"�0|��qj|�td$���j1�2��(tj3�d d%�t�4��Wd�n1�s�0YWd�n1�s
0Y��5�Wd�n1�s20YdS)&N��	commonincs,looking for local changes to affected paths
s
changesets)�topicZunit�totalc3s |]}�|�o�|�VqdS�Nr'�rZ�f)�newmatch�oldmatchr'r(�	<genexpr>�rz_narrow.<locals>.<genexpr>sdescendants(%ln)svisiblec3s|]}�j�|�VqdSrj�Z	changelogrW�rZ�rr\r'r(ro�ssTThe following changeset(s) or their ancestors have local changes not on the remote:
�
�%s
s*...and %d more, use --verbose to list all
slocal changes founds*use --force-delete-local-changes to ignore)�hintcsg|]}�j�|��qSr'rprq)�unfir'r(r]rz_narrow.<locals>.<listcomp>�.s(::%n) - %ln + null)�develsstrip-obsmarkersFs%moving unwanted changesets to backup
sdeleting unwanted changesets
r)rh�backupsdata/����smeta/i�Tsalls	narrowingsdeleting %s
s*deleting unwanted files from working copy
)Zassumeclean)6r�match�rootZ
unfilteredr	�findcommonoutgoingr;rZmakeprogress�len�missing�excluded�	itertools�chainZ	increment�any�filesr#ZrevsrZ
filterrevs�list�verboserrZ
StateError�uninterruptiblerW�maxrZclean�configoverrider�strip�storeZ	datafiles�
startswith�sortedr�dirsZvisitdirZ
destroying�transaction�
setnarrowpatsrZ
unlinkpathZsvfsr9Zmarkremoved�dirstate�parentchange�updateworkingcopy�copytoworkingcopyZ	destroyed)rDrErarg�oldincludes�oldexcludes�newincludes�newexcludes�forcery�outgoingZprogressZ
localnodes�nZrevstostripZ
hiddenrevsZvisibletostripZmaxnodesZtostripZurev�	overridesZtodelete�trl�size�file�dirr�rP�dZvisitr')rmrnrErvr(�_narrow�s�� *���
���
��4



Jr�cs�|���t�fdd�tjD��}|o6tj�vo6tj�v}	��fdd�}
t�td|
�}���fdd�}|�_	dd	i}
|d
}|�
���L|rڈj}|��|�
�}}|��� |��j�j�Wd�n1s�0Y|	�r|� tj�||d�Wd�n1�s0Yn�g}|�r<�fdd
���d|�D�}|���2}|�d||��d|||d����}Wd�n1�s~0Yt��d|���}|�b�j�|
d��2tj�|jdd�}tj�||d�Wd�n1�s�0YWd�n1�s0Y|�rN|���|�||�Wd�n1�sD0Y��d��X�j���,��	�t���t� ��Wd�n1�s�0YWd�n1�s�0YWd�n1�s�0YdS)Nc3s|]}|�vVqdSrjr')rZZcap)�	remotecapr'r(ro\sz_widen.<locals>.<genexpr>cs|||��|d<�|d<dS)NrUrVr'r-)r�r�r'r(r3hs
z-_widen.<locals>.pullbundle2extraprepare_widenr4cs�����dSrj)r�r')r�r�rEr'r(�setnewnarrowpatstsz _widen.<locals>.setnewnarrowpats)rxsall-warningsFr)Zheadscs"g|]}|���jkr|���qSr')rWrXrYr\r'r(r]�s�z_widen.<locals>.<listcomp>r^snarrow_widens03)soldincludessoldexcludessnewincludessnewexcludess	cgversionscommonheadsr_sellipsesswiden)�source)�opswidening)!rbr�rZSUPPORTED_ELLIPSESCAPrcZELLIPSESCAPr
rCrr�r�r��p1�p2r�Z
setparentsrXZpullrSZcommandexecutorZcallcommand�resultZtransactionmanager�urlrDr�rZbundleoperationr�Z
processbundlerr�r�)rDrErargr�r�r�r�ZellipsesremoteZ
isoldellipsesr3rGr�r�rdZdsr�r�Zknown�eZbundleZ	trmanagerr�r')r�r�r�rEr(�_widenKsv����
.2

�
��(
��P
,
r��trackedr�
addincludesnew paths to include�
removeincludesold paths to no longer includesauto-remove-includesFs.automatically choose unused includes to remove�
addexcludesnew paths to excludesimport-rulessimport narrowspecs from a file�
removeexcludesold paths to no longer exclude�clears*whether to replace the existing narrowspecsforce-delete-local-changess/forces deletion of local changes when narrowing�backupTs$back up local changes when narrowingsupdate-working-copys.update working copy when the store has changeds[OPTIONS]... [REMOTE])Z	inferrepoZhelpcategoryc&stt�|�}tj|jvr$t�td���|dr:t�td���|�d�}|r�z tj	�
t��|�}t
�|�}WnBty�}z*t�td�|t�|j�f��WYd}~n
d}~00t�||d�\}	}
}|r�t�td���|d	�|	�|d
�|
�t�|d	�}t�|d�}
t�|d
�}t�|d�}|d
}|d}|�p\|
�p\|�p\|�p\|�p\|�p\|}|j\}}||8}|
|M}
||8}||M}|�p�|}|
�p�|}|�r>|�d�|�d|�}t|�D]2}|��|jddddd�|jdd|dd��q�t|�D]2}|��|jddddd�|jdd|dd��q�|��dS|�r|����|� ��||�!d��P|j"�#��$t�$|�t�%|�Wd�n1�s�0YWd�n1�s�0YWd�n1�s�0YWd�n1�s�0YdS|�s,|�s,|�s,|�&td��dS|����(|� ����t'�(|�t)�*d|||�}|\}}|�&td�t)�+|��t,�-|||�}�z�|�r�t.j/|�0�v�r�t�1td���t2�3||�}|�r�t2j4|||d�}|�&td��t5�}t6�7|j8|j9�D]} |�:|| �;���q�g}!t|�D]:}"t�<|j=|"g|��t>�fd d!�|D���s |!�?|"��q |!�r�|!D]}#|�&d|#��qf|�@td"��dk�r�|
�:|!�d#}n|�&td$��|�r�||
}$||B}%tA|||||||$|%|d%|d&�
|$}|%}|�r||B}$||}%tB|||||||$|%�W|�C�n
|�C�0Wd�n1�sF0YWd�n1�sf0YdS)'a
show or change the current narrowspec

    With no argument, shows the current narrowspec entries, one per line. Each
    line will be prefixed with 'I' or 'X' for included or excluded patterns,
    respectively.

    The narrowspec is comprised of expressions to match remote files and/or
    directories that should be pulled into your client.
    The narrowspec has *include* and *exclude* expressions, with excludes always
    trumping includes: that is, if a file matches an exclude expression, it will
    be excluded even if it also matches an include expression.
    Excluding files that were never included has no effect.

    Each included or excluded entry is in the format described by
    'hg help patterns'.

    The options allow you to add or remove included and excluded expressions.

    If --clear is specified, then all previous includes and excludes are DROPPED
    and replaced by the new ones specified to --addinclude and --addexclude.
    If --clear is specified without any further options, the narrowspec will be
    empty and will not match any files.

    If --auto-remove-includes is specified, then those includes that don't match
    any files modified by currently visible local commits (those not shared by
    the remote) will be added to the set of explicitly specified includes to
    remove.

    --import-rules accepts a path to a file containing rules, allowing you to
    add --addinclude, --addexclude rules in bulk. Like the other include and
    exclude switches, the changes are applied immediately.
    sJthe tracked command is only supported on repositories cloned with --narrowr�s'the --clear option is not yet supportedsimport_rulesr*NrsJincluding other spec files using '%include' is not supported in narrowspecr�r�r�r�sauto_remove_includessupdate_working_copyr�sstatuss%s �Isnarrow.included)Zlabelspatrt�Xsnarrow.excludedrs	narrow-wcsnothing to widen or narrow
scomparing with %s
rTrfs&looking for unused includes to remove
c3s|]}�|�VqdSrjr'rk�r|r'r(ro~rztrackedcmd.<locals>.<genexpr>s0remove these unused includes (yn)?$$ &Yes $$ &NoTsfound no unused includes
sforce_delete_local_changesr�)Drr5rrOrZ
InputErrorrr,r7r8r9r
r:rr<r=ZStorageErrorr?r@rrArBrZ
parsepatternsrRZpager�	formatterr�Z	startitem�write�endZwlock�lockr�r�r�r�r�r;rZ
bailifchangedrZget_unique_pull_pathZhidepasswordrZpeerrr`rbr>r	Zfindcommonincomingr~rSr�r�r�r��updater�r|r}r�r#Zpromptchoicer�r��close)&rDrEZ
remotepathZpatsr2ZnewrulesrHrIrJZincludepatsZexcludepatsrMZ
addedincludesZremovedincludesZ
addedexcludesZremovedexcludesZautoremoveincludesZupdate_working_copyZ	only_showr�r�ZwideningZ	narrowingZfm�irrr�Zbranchesrargr�Z
localfilesr�ZsuggestedremovalsrP�sr�r�r'r�r(�
trackedcmd�s4M
��	
���
��������




��
�
�������	
��Tr�)N),Z
__future__rr�r7Zmercurial.i18nrZmercurial.noderrZ	mercurialrrrr	r
rrr
rrrrrrrrrrrZmercurial.utilsrr!Zcommandr)r"r$r%reZwrapfunctionr�r�Z
remoteoptsZCATEGORY_MAINTENANCEr�r'r'r'r(�<module>stT
+2�zf������%�&�,

Youez - 2016 - github.com/yon3zu
LinuXploit