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: //proc/thread-self/root/lib64/python2.7/site-packages/mercurial/upgrade.pyc
�
1�3\c@@sddlmZddlZddlmZddlmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZd�Zd�Zd�Zd	�Zd
�Zd�ZdZd
Zdefd��YZgZd�Zdefd��YZdefd��YZedefd��Y�Z edefd��Y�Z!edefd��Y�Z"edefd��Y�Z#edefd��Y�Z$edefd ��Y�Z%d!�Z&d"�Z'd#�Z(d$�Z)d%�Z*d&�Z+d'�Z,d(�Z-e.dd)�Z0dS(*i(tabsolute_importNi(t_(t	changelogterrortfilelogthgt	localrepotmanifesttpycompattrevlogtscmutiltutiltvfscC@s
ddhS(s�Obtain requirements required to be present to upgrade a repo.

    An upgrade will not be allowed if the repository doesn't have the
    requirements returned by this function.
    trevlogv1tstore((trepo((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytrequiredsourcerequirementsscC@s
dddhS(s�Obtain requirements that will prevent an upgrade from occurring.

    An upgrade cannot be performed if the source repository contains a
    requirements in the returned set.
    ttreemanifesttparentdeltatshared((R((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytblocksourcerequirements(s	cC@s
tjhS(s�Obtain requirements that can be removed during an upgrade.

    If an upgrade were to create a repository that dropped a requirement,
    the dropped requirement must appear in the returned set for the upgrade
    to be allowed.
    (RtSPARSEREVLOG_REQUIREMENT(R((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytsupportremovedrequirements9scC@sdddddtjhS(s�Obtain requirements that upgrade supports in the destination.

    If the result of the upgrade would create requirements not in this set,
    the upgrade is disallowed.

    Extensions should monkeypatch this to add their custom requirements.
    t	dotencodetfncachetgeneraldeltaR
R(RR(R((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytsupporteddestrequirementsDs	cC@sdddtjhS(s�Obtain requirements that can be added to a repository during upgrade.

    This is used to disallow proposed requirements from being added when
    they weren't present before.

    We use a list of allowed requirement additions instead of a list of known
    bad additions because the whitelist approach is safer and will prevent
    future, unknown requirements from accidentally being added.
    RRR(RR(R((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytallowednewrequirementsUscC@st�S(N(tset(R((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytpreservedrequirementsfst
deficiencytoptimizationtimprovementcB@s2eZdZd�Zd�Zd�Zd�ZRS(s�Represents an improvement that can be made as part of an upgrade.

    The following attributes are defined on each instance:

    name
       Machine-readable string uniquely identifying this improvement. It
       will be mapped to an action later in the upgrade process.

    type
       Either ``deficiency`` or ``optimisation``. A deficiency is an obvious
       problem. An optimization is an action (sometimes optional) that
       can be taken to further improve the state of the repository.

    description
       Message intended for humans explaining the improvement in more detail,
       including the implications of it. For ``deficiency`` types, should be
       worded in the present tense. For ``optimisation`` types, should be
       worded in the future tense.

    upgrademessage
       Message intended for humans explaining what an upgrade addressing this
       issue will do. Should be worded in the future tense.
    cC@s(||_||_||_||_dS(N(tnamettypetdescriptiontupgrademessage(tselfR!R"R#R$((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt__init__�s			cC@s#t|t�stS|j|jkS(N(t
isinstanceR tNotImplementedR!(R%tother((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt__eq__�scC@s||kS(N((R%R)((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt__ne__�scC@s
t|j�S(N(thashR!(R%((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt__hash__�s(t__name__t
__module__t__doc__R&R*R+R-(((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR ls
			cC@stj|�|S(N(tallformatvarianttappend(tcls((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytregisterformatvariant�s
t
formatvariantcB@sSeZdZeZdZdZdZdZ	d�Z
ed��Zed��Z
RS(s6an improvement subclass dedicated to repository formatcC@s
t��dS(N(tNotImplementedError(R%((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR&�scC@s
t��dS(s.current value of the variant in the repositoryN(R6(R((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytfromrepo�scC@s
t��dS(s1current value of the variant in the configurationN(R6(R((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt
fromconfig�sN(R.R/R0RR"tNoneR!R#R$tdefaultR&tstaticmethodR7R8(((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR5�s	trequirementformatvariantcB@sAeZdZdZed��Zed��Zed��Z	RS(s�formatvariant based on a 'requirement' name.

    Many format variant are controlled by a 'requirement'. We define a small
    subclass to factor the code.
    cC@stj|tj|��S(N(Rtnewreporequirementstdefaultcreateopts(tui((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt_newreporequirements�scC@s%|jdk	st�|j|jkS(N(t_requirementR9tAssertionErrortrequirements(R3R((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR7�scC@s.|jdk	st�|j|j|j�kS(N(RAR9RBR@R?(R3R((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR8�sN(
R.R/R0R9RAR;R@tclassmethodR7R8(((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR<�s
RcB@s2eZdZdZeZed�Zed�ZRS(RsYlong and reserved filenames may not work correctly; repository performance is sub-optimalssrepository will be more resilient to storing certain paths and performance of certain operations should be improved(	R.R/R!RAtTrueR:RR#R$(((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR�s
RcB@s2eZdZdZeZed�Zed�ZRS(RsLstorage of filenames beginning with a period or space may not work correctlysNrepository will be better able to store files beginning with a space or period(	R.R/R!RARER:RR#R$(((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR�s
RcB@s2eZdZdZeZed�Zed�ZRS(Rs�deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slowersrepository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster(	R.R/R!RARER:RR#R$(((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR�s
tsparserevlogcB@s5eZdZejZeZed�Z	ed�Z
RS(RFsXin order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.s�Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.(R.R/R!RRRAtFalseR:RR#R$(((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyRF
s
		tremovecldeltachaincB@sJeZdZeZed�Zed�Zed��Z	ed��Z
RS(splain-cl-deltas�changelog storage is using deltas instead of raw entries; changelog reading and any operation relying on changelog data are slower than they could beszchangelog storage will be reformated to store raw entries; changelog reading will be faster; changelog size may be reducedc@s,|j}|j�t�fd�|D��S(Nc3@s!|]}|�|�kVqdS(N((t.0trev(t	chainbase(s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pys	<genexpr>5s(RRKtall(Rtcl((RKs7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR7/s		cC@stS(N(RE(R((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR87s(R.R/R!RER:RR#R$R;R7R8(((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyRH stcompressionenginecB@sJeZdZdZed�Zed�Zed��Zed��Z	RS(tcompressiontzlibsMCompresion algorithm used to compress data. Some engine are faster than others;revlog content will be recompressed with the new algorithm.cC@s;x4|jD])}|jd�r
|jdd�dSq
WdS(Nsexp-compression-t-iRP(RCt
startswithtsplit(R3Rtreq((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR7FscC@s|jjdd�S(Ntexperimentalsformat.compression(R?tconfig(R3R((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyR8Ms(
R.R/R!R:RR#R$RDR7R8(((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyRN;scC@s:g}x-tD]%}|j|�s
|j|�q
q
W|S(s8returns a list of deficiencies that the repo suffer from(R1R7R2(Rtdeficienciestfv((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytfinddeficienciesQs

cC@s�g}|jtdddtdtd�dtd���|jtdddtdtd	�dtd
���|jtdddtdtd�dtd
���|jtdddtdtd�dtd���|S(s8Determine optimisation that could be used during upgradeR!t
redeltaparentR"R#s]deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slowerR$sHdeltas within internal storage will choose a new base revision if neededtredeltamultibases�deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of mergess�deltas within internal storage will choose an optimal delta by computing deltas against multiple parents; may slow down execution time significantlyt
redeltaalls�deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not neededsndeltas within internal storage will be fully recomputed; this will likely drastically slow down execution timetredeltafulladds�every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "redeltaall" but even slower since more logic is involved.s�each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it(R2R toptimisationR(Rt
optimizations((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytfindoptimizations_s,	cC@s[g}t|�}xB|D]:}|j}||krF||krFqn|j|�qW|S(s�Determine upgrade actions that will be performed.

    Given a list of improvements as returned by ``finddeficiencies`` and
    ``findoptimizations``, determine the list of upgrade actions that
    will be performed.

    The role of this function is to filter improvements if needed, apply
    recommended optimizations from the improvements list that make sense,
    etc.

    Returns a list of action names.
    (RR!R2(RRWt
sourcereqstdestreqst
newactionst	knownreqstdR!((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytdetermineactions�s

	cC@sp|dkrtj|j�S|jd�rR|td� }tj|jd|�Stj|j|dd!�SdS(s]Obtain a revlog from a repo path.

    An instance of the appropriate class is returned.
    s
00changelog.is00manifest.ittreeii����N(RtsvfstendswithtlenRtmanifestrevlogR(Rtpathtmandir((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt_revlogfrompath�sc#
@s�d}d}d}d}	d}
d}d}d}
d}d}d}d}d}d}d}d}d}d}x||jj�D]k\}}}|jd�r�q|nt||�}|jdtdtdtdt�}||dp�d7}|dp�d}|dpd}||7}||7}t|tj�rT|t|�7}||7}||7}q|t|t	j
�r�|d7}|t|�7}||7}||7}q|t|tj�r�|
d7}
|t|�7}||7}|
|7}
q|tj
d�q|W|s�d	S|jtd
�||||f�|jtd�tj|�tj|�f�d	��fd�}t�} x�|jj�D]�\}}}|jd�r�qunt||�}!t||�}"t|!tj�rbd
| krb|jtd�||tj||�f�|jtd�|tj|�tj|�f�| jd
�|jjtd�d|��nCt|!t	j
�r#d| kr#|jtd�||
tj||�f�|jtd�||tj|�tj|�f�| jd��r�j�n|jjtd�d|��n�d| kr�|jtd�|
|tj|�tj|
�f�| jd��r��j�n|jjtd�d|��n|jtd�t|!�|f�|!j||"d|d|d|�|"jdt�}|dp	d}|	|7}	t|"tj�r5||7}qut|"t	j
�rT||7}qu||7}quW�j�|jtd�|tj||�f�|jtd�|tj|	|�f�d	S(sCopy revlogs between 2 repos.is.dtexclusivefilestrevisionscountttrackedsizet
storedsizeisunknown revlog typeNsPmigrating %d total revisions (%d in filelogs, %d in manifests, %d in changelog)
s'migrating %s in store; %s tracked data
c@s�j�dS(N(t	increment(trlRJtnode(tprogress(s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytoncopiedrevisionstcsQfinished migrating %d manifest revisions across %d manifests; change in size: %s
sKmigrating changelog containing %d revisions (%s in store; %s tracked data)
schangelog revisionsttotaltmsOfinished migrating %d filelog revisions across %d filelogs; change in size: %s
sNmigrating %d manifests containing %d revisions (%s in store; %s tracked data)
smanifest revisionstfsMmigrating %d filelogs containing %d revisions (%s in store; %s tracked data)
sfile revisionsscloning %d revisions from %s
t
addrevisioncbt
deltareusetdeltabothparentss>finished migrating %d changelog revisions; change in size: %s
sFfinished migrating %d total revisions; total change in store size: %s
(RtwalkRiRntstorageinfoRER'RRjRRkRRtProgrammingErrortwriteRRt	bytecountR9RtaddR?tmakeprogresstcompletetnotetclone(#R?tsrcrepotdstrepottrR}R~trevcounttsrcsizet
srcrawsizetdstsizetfcountt	frevcounttfsrcsizetfrawsizetfdstsizetmcountt	mrevcounttmsrcsizetmrawsizetmdstsizet	crevcounttcsrcsizetcrawsizetcdstsizet	unencodedtencodedtsizeRttinfotdatasizetrawsizeRwtseentoldrltnewrl((Rvs7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt_copyrevlogs�s�









 	




#



cC@sM|jd�rtS|jd�r&tS|tjkr9tS|dkrItStS(sDetermine whether to copy a store file during upgrade.

    This function is called when migrating store files from ``srcrepo`` to
    ``dstrepo`` as part of upgrading a repository.

    Args:
      srcrepo: repo we are copying from
      dstrepo: repo we are copying to
      requirements: set of requirements for ``dstrepo``
      path: store file being examined
      mode: the ``ST_MODE`` file type of ``path``
      st: ``stat`` data structure for ``path``

    Function should return ``True`` if the file is to be copied.
    s.is.dtundotlockR(s.is.d(R�R(RiRGRRtstattS_IFREGRE(R�R�RCRltmodetst((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt_filterstorefile[scC@sdS(s�Hook point for extensions to perform additional actions during upgrade.

    This function is called after revlogs and store files have been copied but
    before the new store is swapped into the original location.
    N((R?R�R�RC((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt_finishdatamigrationztcC@s|j�st�|j�s$t�|jtd��d|krRtjj}n]d|krmtjj}nBd|kr�tjj}n'd|kr�tjj}ntjj}|j	d��&}t
|||||d|k�WdQXx�t|jj
jdd	t��D]�\}}}	t||||||	�s8qn|jjtd
�|�|jjj|�}
|jjj|�}tj|
|dt�qWt||||�|jtd��tjd
dd|j�}tj
|�}
tj|j
jd�|
jd��|jtd��tj|j
|jdhB�|jtd��|jtd�|�|jtd��tj�}tj|j |
jd��tj|j |j �tj�|}|jtd�|�|jtd��tj|j
|�|
j!d�|S(syDo the low-level work of upgrading a repository.

    The upgrade is effectively performed as a copy between a source
    repository and a temporary destination repository.

    The source repository is unmodified for as long as possible so the
    upgrade can abort at any time without causing loss of service for
    readers and without corrupting the source repository.
    sP(it is safe to interrupt this process any time before data migration completes)
R\RZR[R]tupgradeNR�R�scopying %s
tcopystats,data fully migrated to temporary repository
tprefixsupgradebackup.tdirtrequiress\marking source repository as being upgraded; clients will be unable to read from repository
tupgradeinprogresss*starting in-place swap of repository data
s'replaced files will be backed up at %s
sreplacing store...
RsCstore replacement complete; repository was inconsistent for %0.1fs
sBfinalizing requirements file and making repository readable again
s
store/lock("tcurrentwlockRBR�RR	tDELTAREUSENEVERtDELTAREUSESAMEREVStDELTAREUSEFULLADDtDELTAREUSEALWAYSttransactionR�tsortedRRtreaddirRER�R?trawvfstjoinRtcopyfileR�RtmkdtempRltvfsmodR
t
writerequiresRCttimertrenametspathtunlink(R?R�R�RCtactionsR}R�tptkindR�tsrctdstt
backuppatht	backupvfsttstarttelapsed((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt_upgraderepo�sZ
1%
c@st|pg�}�j��t���j}|rhtjtd�td�jt|����nt	���j@}|r�tjtd�td�jt|����nt
j�jt
j
�j����jt����j�t��}|r4tjtd�td�jt|����n��jt��}|r�tjtd�td�jt|����n�t��}|r�tjtd�td�jt|����nt��}	g}
x=|	D]5}|j|kr�|
j|�|j|j�q�q�W|rXtjtd�djt|��dtd	���nt��}t�|�j����j�fd
�t|
�D�����fd�}
��fd�}|s~g}g}xF|D]>}|j��r|j|�q�|jr�|j|�q�q�W|s-|r�|rw�jtd
��x.|D]#}�jd|j|jf�qMWn|r��jtd��x.|D]#}�jd|j|jf�q�Wn�jd�n�jtd���jtd��|
�|�g|	D]}|�kr|^q}|rz�jtd��x4|D])}�jtd�|j|jf�qJWndS�jtd��|
�|�g�D]}|j^q�}�jtd���j��9�j��&�jtd��t j!ddd�j"�}d}z��jtd�|��jj$�j�}t%j&|d|dt'�}|j��0|j��t(��|�|�}WdQXWdQXWd�jtd�|��j)j*|dt'�|r�j+td �|��j+td!��nXWdQXWdQXdS("sUpgrade a repository in place.s2cannot upgrade repository; requirement missing: %ss, s=cannot upgrade repository; unsupported source requirement: %ss;cannot upgrade repository; requirement would be removed: %ss@cannot upgrade repository; do not support adding requirement: %ssEcannot upgrade repository; do not support destination requirement: %ss)unknown optimization action requested: %sthints0run without arguments to see valid optimizationsc3@s!|]}|�kr|VqdS(N((RIto(R�(s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pys	<genexpr>sc@s��jtd���jtd�td�jt��j@����j�r��jtd�td�jt�j����n��jr��jtd�td�jt��j���n�jd�dS(Ns
requirements
s   preserved: %s
s, s   removed: %s
s
   added: %s
s
(R�RR�R�RC((tnewreqsRR?(s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytprintrequirementss$
'
'c@s2x+�D]#}�jd|j|jf�qWdS(Ns
%s
   %s

(R�R!R$(ta(R�R?(s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytprintupgradeactions+s
sBrepository lacks features recommended by current config options:

s
%s
   %s

s?repository lacks features used by the default config options:

s
s7(no feature deficiencies found in existing repository)
sEperforming an upgrade with "--run" will make the following changes:

sKadditional optimizations are available by specifying "--optimize <name>":

Ns-upgrade will perform the following actions:

sbeginning upgrade...
s repository locked and read-only
R�supgrade.R�s9creating temporary repository to stage migrated data: %s
Rltcreates!removing temporary repository %s
tforciblys'copy of old repository backed up at %s
sqthe old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
(,Rt
unfilteredRRCRtAbortRR�R�RRR=R?R>tupdateRRRRR`R!R2tdiscardRYRftextendR8R:R�R#twlockR�RR�RlR9t	__class__Rt
repositoryRER�Rtrmtreetwarn(R?Rtruntoptimizetmissingreqstblockedreqstnoremovereqst	noaddreqstunsupportedreqstalloptimizationsR_R�RWR�R�R8tonlydefaultRetitunusedoptimizeR�tupgradeactionsttmppathR�trepouiR�((R�R�RR?s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pytupgraderepo�s�""

"

""

#
	
$
$%
*



(1t
__future__RR�ti18nRR�RRRRRRRR	R
RRR�RRRRRRRR^tobjectR R1R4R5R<RRRRFRHRNRYR`RfRnR�R�R�R�RGR9R�(((s7/usr/lib64/python2.7/site-packages/mercurial/upgrade.pyt<module>sJL	
					*	"
		>	 		�			[