HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyc
�
1�3\c
@@s�ddlmZddlZddlZddlmZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZiZeje�Zd�Zd�Zd�Zd�Z d	�Z!ej"e
d
e!�d�Z#d�Z$d
�Z%edddged�fddged�fddged�fddded�fddged�fdde&ed�fdde&ed�fge	j'ed�de(�dd ��Z*dS(!i(tabsolute_importN(t_(tbundle2tcmdutiltcommandst	discoverytencodingterrortexchanget
extensionsthgtmerget
narrowspectnodetpycompatt	registrartrepairt
repositorytrepoviewtsparsetutiltwireprototypescC@s1tjtjdt�}|djdddtd�f�|djdddtd�f�|djdddtd	�f�d
tj�kr�|djddgtd�f�|djdd
gtd�f�ntjtjdt	�}|djdddtd�f�tjtjdt
�dS(s@Wraps user-facing mercurial commands with narrow-aware versions.tcloneittnarrows%create a narrow clone of select filestdepths0limit the history fetched by distance from headsRsread narrowspecs from fileRtincludes&specifically fetch this file/directorytexcludes2do not fetch this file/directory, even if includedtpulltarchiveN(R	twrapcommandRttabletclonenarrowcmdtappendtNoneRtenabledt
pullnarrowcmdtarchivenarrowcmd(tentry((sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pytsetup's"
	c
@s�tj���tj�}�d}|r6tjjtj�|�}|j	t
d�|�ytj|�}Wn>tk
r�}	t
jt
d�|tj|	j�f��nXtj||d�\}
}}|r�t
jt
d���ntj|
�tj|�t�d<�dj|
��dj|�n�drg�fd�}
tjtd	|
�}n|�!||||tj���SWd
QXd
S(sAWraps clone command, so 'hg clone' first wraps localrepo.clone().Rsreading narrowspec from '%s'
s%cannot read narrowspecs from '%s': %sRs9cannot specify other files using '%include' in narrowspecRRc@s1|||��jd�r-�d|d<ndS(NR(tget(torigtpulloptkwargs(topts(sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pytpullbundle2extraprepare_widen\s
t_pullbundle2extraprepareN(RtbyteskwargsRtnullcontextmanagertostpathtjoinRtgetcwdtstatusRtreadfiletIOErrorRtAbortt
strtolocaltstrerrorRtparseconfigRtvalidatepatternstTruetextendR	twrappedfunctionRt	strkwargs(R)tuitrepotargsR,twrappedextrapreparetnarrowspecfiletfilepathtfdatatinsttincludestexcludestprofilesR-((R,sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyR ?s2
 



	c	@sitj�}tj|jkrE�fd�}tjtd|�}n|�||||��SWdQXdS(s2Wraps pull command to allow modifying narrow spec.c@s1|||��jd�r-�d|d<ndS(NR(R((R)R*R+(R,(sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyR-ls
R.N(RR0RtNARROW_REQUIREMENTtrequirementsR	R?R(R)RARBRCR,RDR-((R,sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyR$gs	c
O@s�tj|jkr�|j\}}t|jdg��}t|jdg��}tj||||�\}}}	|r�||d<n|r�||d<q�n|||||�S(s5Wraps archive command to narrow the default includes.RR(RRLRMt
narrowpatstsetR(Rtrestrictpatterns(
R)RARBRCR,t
repo_includest
repo_excludesRIRJtunused_invalid((sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyR%vs
cC@s)|j}tj|jkr(|||�Stj|jj�krXtj	t
d���n|||�t|d<|j\}}||d<||d<||d<||d<tj
|jj�kr%g|jd|j�D]0}|j�tjkr�tj|j��^q�|d<|ds%|d=q%ndS(	Ns%server does not support narrow clonesRtoldincludepatstoldexcludepatstincludepatstexcludepatss::%lntknown(RBRRLRMRt	NARROWCAPtremotetcapabilitiesRR8RR=RNtELLIPSESCAPROtcommonR
tnullidthex(R)R*R+RBRRtctx((sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pytpullbundle2extraprepare�s$	






4
R.cC@sGx@|jD]5}||�s
|jj|�|jj|�q
q
WdS(N(tdirstatetdroptwvfst
unlinkpath(RBtoldincludestoldexcludestnewincludestnewexcludestoldmatchtnewmatchtf((sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyt_narrowcleanupwdir�sc	@sJtj�j||��tj�j||���j�}	tj|	|d|�}
|jtd��g}xYtj	|
j
|
j�D]?}t��fd�|	|j
�D��r�|j|�q�q�W|	jd|�}
tj�d�}t�fd�|
|D��}|r�|jtd��d}|jsGt|�|krux{|D] }|jd	tj|��qNWnPx,|| D] }|jd	tj|��q�W|jtd
�t|�|�|s�tjtd�dtd
���q�n|j��F|
r�g|
D]}|	jj|�^q}�dj�|krxt�jd�dj�|��}tj�|�ntj||	|dd�ng}x��j j!�D]�\}}}|j"d�r�|dd!}�|�s�|j|�q�q�|j"d�r�|dd!}dgt#t$j%|h��|g}t&}x=|D]5}�j'|�}|sht(}Pn|dkrCPqCqCW|s�|j|�q�q�q�W�j)��j*d���xN|D]F}|jtd�|�t$j+�j,j-|���j j.|�q�Wt/�||||����j0||�WdQX�j1�WdQXdS(Nt	commonincs,looking for local changes to affected paths
c3@s(|]}�|�o�|�VqdS(N((t.0Rl(RkRj(sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pys	<genexpr>�ssdescendants(%ln)tvisiblec3@s!|]}�jj|�VqdS(N(t	changelogR
(Rotr(RB(sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pys	<genexpr>�ssTThe following changeset(s) or their ancestors have local changes not on the remote:
i
s%s
s*...and %d more, use --verbose to list all
slocal changes foundthints*use --force-delete-local-changes to ignoret.s(::%n) - %ln + nullttopicRsdata/ii����smeta/i�tallt	narrowingsdeleting %s
(2Rtmatchtroott
unfilteredRtfindcommonoutgoingR5Rt	itertoolstchaintmissingtexcludedtanytfilesR!trevsRt
filterrevstlisttverbosetlenR
tshortRR8tuninterruptableRqtmaxR
tcleanRtstriptstoret	datafilest
startswithtsortedRtdirsR=tvisitdirtFalset
destroyingttransactionRetsvfsR3tmarkremovedRmt
setnarrowpatst	destroyed(RARBRZRnRfRgRhRitforcetunfitoutgoingt
localnodestntrevstostript
hiddenrevstvisibletostriptmaxnodesRrttostripturevttodeleteRltf2tsizetfiletdirR�Rtdtvisit((RkRjRBsA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyt_narrow�s�	)
!
%

&



c@s�tj�j���}tj|j�k}	��fd�}
tjtd|
�}���fd�}|�_	it
d6}
|j��Z|d}|	rL�j}|j
�|j�}}|j��|jtjtj�WdQX|�7�jj|
d��tj�|d|�WdQXWdQX|j��|j||�WdQXn�|j��W}|jd	i|d
6|d6�d6�d
6dd6|d6gd6t
d6�j�}WdQX�jd��H��jj|
d��*�fd�}tj�|d|�WdQXWdQX�j	�d�dj�D�}|dj}�dj�j|�}xN|j �D]@\}}|�jkr]|||j!|�t
fdf�q]q]Wt"j#�|d�dd�ddt
�t"j%�|dt
�WdQXdS( Nc@s%|||��|d<�|d<dS(NRVRW((R)R*R+(RiRh(sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyR-s

R.c@s�j���dS(N(R�((RiRhRB(sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pytsetnewnarrowpatsstdevelsall-warningsitwidentheadstnarrow_widenRfRgRhRit03t	cgversiontcommonheadsRXtellipsestwideningc@s�S(N(((ttr(sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyt<lambda>3RttransactiongettercS@si|]}g|�qS(((Rotk((sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pys
<dictcomp>8s	s!a am f g cd dc r dm dg m e k p prtgRtsadd from widened narrow clonetwctxtmctxt	overwritetbranchmerge(R�sall-warnings(&RRxRyRR\R[R	R?RR�R�R�Rbtp1tp2tparentchanget
setparentsR
R^RAtconfigoverrideRtcommandexecutortcallcommandtresultR�Rt
processbundletsplitR!tmanifesttmatchest	iteritemstflagsRtapplyupdatesR"t
recordupdates(RARBRZRnRfRgRhRiRktellipsesremoteR-RDR�t	overridesR]tdsR�R�tetbundlettgettertactionst
addgactiontmfRltfn((RiRhRBR�sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyt_widen�s\		


	
"


ttrackedRt
addincludesnew paths to includet
removeincludesold paths to no longer includet
addexcludesnew paths to excludesimport-rulessimport narrowspecs from a filet
removeexcludesold paths to no longer excludetclears*whether to replace the existing narrowspecsforce-delete-local-changess/forces deletion of local changes when narrowings[OPTIONS]... [REMOTE]t	inferrepocO@s
tj|�}tj|jkr8|jtd��dS|drY|jtd��dS|jd�}|r>y.tj	j
tj�|�}t
j|�}Wn>tk
r�}tjtd�|tj|j�f��nXtj||d�\}	}
}|rtjtd���n|d	j|	�|d
j|
�ntj|d	�}tj|d�}
tj|d
�}tj|d�}|p�|}|
p�|}|o�|}|r�|j\}}|jd
�|jd|�}xPt|�D]B}|j�|jddddd�|jdd|dd�q�WxPt|�D]B}|j�|jddddd�|jdd|dd�qDW|j�dS|j ��c|j!��Pt"j#|�|j$|p�d�}t%j&|�\}}|j'td�t
j(|��t%j)|||�}|rQt*j+|j,�krQtjtd���nt-j.||�}|j\}}|r�||
}||B}t/|||||||||d�	|}|}n|r�||B}||}t0||||||||�nWdQXWdQXdS(s<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.
    sLThe narrow command is only supported on respositories cloned with --narrow.
iR�s)The --clear option is not yet supported.
timport_ruless%cannot read narrowspecs from '%s': %sRsJincluding other spec files using '%include' is not supported in narrowspecR�R�R�R�R�R5s%s tItlabelsnarrow.includedtpats%s
tXsnarrow.excludeditdefaultscomparing with %s
s%server does not support narrow clonestforce_delete_local_changesN(1RR/RRLRMtwarnRR(R1R2R3RR4RR6R7RR8R9R:RR;R>Rt
parsepatternsRNtpagert	formatterR�t	startitemtwritetendtwlocktlockRt
bailifchangedt
expandpathR
tparseurlR5thidepasswordtpeerRRYR[RtfindcommonincomingR�R�(RARBt
remotepathtpatsR,tnewrulesRFRGRHRVRWRKt
addedincludestremovedincludest
addedexcludestremovedexcludesR�Rwt	only_showRRtfmtiturltbranchesRZRnRfRgRhRi((sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyt
trackedcmdFs�$
 






 

	

(+t
__future__RR|R1tmercurial.i18nRt	mercurialRRRRRRRR	R
RRR
RRRRRRRRRtcommandR'R R$R%RatwrapfunctionRmR�R�R�t
remoteoptsR=R"R(((sA/usr/lib64/python2.7/site-packages/hgext/narrow/narrowcommands.pyt<module>s:�		(					Q	J