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/proc/self/root/lib64/python2.7/site-packages/hgext/strip.pyc
�
1�3\c@@s�dZddlmZddlmZddlmZmZm	Z	m
Z
mZm
Z
mZmZmZmZmZmZejZejZiZeje�ZdZd#d�Zedd�Zd	�Zeed#d#d
�Z eddd
ged�ed�fddd#ed�fddd#ed�fddd#ed�fddd#ed�fddd#ed�fddged�ed�fged �d!ej!�d"��Z"d#S($s�strip changesets and their descendants from history

This extension allows you to strip changesets and all their descendants from the
repository. See the command help for details.
i(tabsolute_import(t_(t	bookmarkstcmdutilterrorthgtlocktmergetnodetpycompatt	registrartrepairtscmutiltutilsships-with-hg-corecC@s�g}|d}|r#||}n|j�d}xat|j�D]P}|j|�jt�||jks�|j|�j�rC|j|�qCqCW|S(srreturn list of subrepos at a different revision than substate.
    Abort if any subrepos have uncommitted changes.iN(	tNonetparentstsortedtsubstatetsubt
bailifchangedtTruetdirtytappend(trepotbaserevtinclsubstwctxtbctxts((s1/usr/lib64/python2.7/site-packages/hgext/strip.pyt
checksubstate"s

$tcC@s�tj|�|j�}|s�|jsC|jsC|jsC|jritd�tj	td|���nt
|�r�td�tj	td|���q�n|S(Nslocal changes foundslocal changed subrepos found(RtcheckunfinishedtstatustmodifiedtaddedtremovedtdeletedRRtAbortR(Rtforcet	excsuffixR((s1/usr/lib64/python2.7/site-packages/hgext/strip.pytchecklocalchanges1s
$

c
C@s�|jj|d�\}}|dj�}tj|d�r{|tkr{|g|jjD]}|j	^qZkr{|}nm|||j�kr�d}d}|j
|||||||�}|r�|j}	|	j	|j��}q�n|S(Nitmqsparents(wdir())s7max(((parents(%ln::%r) + %r) - %ln::%r) and branch(%s))(t	changelogRRtbranchR
tsafehasattrtnullidR)tappliedRtrevstfirst(
Rtnodestunodetp2t
currentbranchtxtpwdirtrevsettbranchtargettcl((s1/usr/lib64/python2.7/site-packages/hgext/strip.pyt_findupdatetarget=s(			cC@s1|j��|j��|rht|d|�t||�}tj||�|jj|j��nt	j
||||�|j}|r!|jd��R}	|j
|kr�tj|�n|j||	g|D]}
|
df^q��WdQXx.t|�D]}|jtd�|�q�WnWdQXWdQXdS(NR&tstripsbookmark '%s' deleted
(twlockRR(R:RtcleantdirstatetwritetcurrenttransactionRR;t
_bookmarksttransactiont_activebookmarktbookmarksmodt
deactivatetapplychangesRRR(tuiRR/tupdatetbackupR&Rturevt	repomarksttrtbtbookmark((s1/usr/lib64/python2.7/site-packages/hgext/strip.pyR;Os 

	2R;trtrevsNstrip specified revision (optional, can specify revisions without this option)tREVtfR&sDforce removal of changesets, discard uncommitted changes (no backup)s	no-backupsdo not save backup bundletnobackups&do not save backup bundle (DEPRECATED)tnsignored  (DEPRECATED)tktkeeps,do not modify working directory during striptBRNs.remove revs only reachable from given bookmarktBOOKMARKs,hg strip [-k] [-f] [-B bookmark] [-r] REV...thelpcategoryc!@s�tj|�}t}|jd�s3|jd�r<t}n|j�t|�|jd�}ttj	||��}|j
��.t|jd��}|r|j}|j|�s�t
jtd�djt|t|j������ni}x3|j�D]%\}}	|j|	g�j|�qWxO|j�D]A}
|j|
�r:tj||
d�}|jt|��q:q:W|s|j��O|jd��9}g|D]}
|
df^q�}|j|||�WdQXWdQXx.t|�D]}|jtd	�|�q�Wqn|s4t
jtd
���nt�j|��}|j |��|j!|�}t"��fd�|j#j$�D��}t�fd�|D��}t%|d
d�}|dk	rd|j&rd�j'|j(d���krdt|_)d}t*|j&�}x6t+|j&�D]%\}}|j,|kr|}PqqW|j&||5|j-�qdnt|�}|r{|jd�r{t.||�}||}|j/d|j'��}g}x%|D]}|j0||j1��q�W|j#}g|D]}||dkr�|^q�} |j0| �|j#j2||j3�|�|j#j|j4��t5j6j7||dj,��t}nt8|||d|d|d|jd�d|�WdQXdS(s�strip changesets and all their descendants from the repository

    The strip command removes the specified changesets and all their
    descendants. If the working directory has uncommitted changes, the
    operation is aborted unless the --force flag is supplied, in which
    case changes will be discarded.

    If a parent of the working directory is stripped, then the working
    directory will automatically be updated to the most recent
    available ancestor of the stripped parent after the operation
    completes.

    Any stripped changesets are stored in ``.hg/strip-backup`` as a
    bundle (see :hg:`help bundle` and :hg:`help unbundle`). They can
    be restored by running :hg:`unbundle .hg/strip-backup/BUNDLE`,
    where BUNDLE is the bundle file created by the strip. Note that
    the local revision numbers will in general be different after the
    restore.

    Use the --no-backup option to discard the backup bundle once the
    operation completes.

    Strip is not a history-rewriting operation and can be used on
    changesets in the public phase. But if the stripped changesets have
    been pushed to a remote repository you will likely pull them again.

    Return 0 on success.
    t	no_backupRSRPRNsbookmark '%s' not foundt,iNsbookmark '%s' deleted
sempty revision setc3@s0|]&}|tko'�j|��kVqdS(N(R-RP(t.0tp(R9tstrippedrevs(s1/usr/lib64/python2.7/site-packages/hgext/strip.pys	<genexpr>�sc3@s|]}�j|�VqdS(N(R(R\RO(R9(s1/usr/lib64/python2.7/site-packages/hgext/strip.pys	<genexpr>�sR)tqtipRVs%d::.RTt.RIRHR&R(9R	tbyteskwargsRtgettFalseR*tlisttsetRtrevrangeR<RAtissubsetRR%RtjoinRtkeyst	iteritemst
setdefaultRtvaluest
issupersettbookmarkrevsRHRRBRRFR?tdescendantstuniont
differencetanyR>RtgetattrR.RPtlookuptapplieddirtytlent	enumerateRt	savedirtyR:R/textendtfilestrebuildtmanifestR@Rt
mergestateR=R;(!RGRR/toptsRIRRKtnodetobookmarkstmarkRtmarkstrsrevsRLRMt	bmchangesRNRotrootsRHt	rootnodestqtstarttendtitstatusentryRJtuctxtdescendantrevstchangedfilesRPR>RRt
dirchanges((R9R^s1/usr/lib64/python2.7/site-packages/hgext/strip.pytstripcmdcs�.		
	,
!	


	)
	N(#t__doc__t
__future__Rtmercurial.i18nRt	mercurialRRDRRRRtlockmodRRtnodemodR	R
RRR
R-treleasetcmdtabletcommandt
testedwithRRRcR(R:RR;tCATEGORY_MAINTENANCER�(((s1/usr/lib64/python2.7/site-packages/hgext/strip.pyt<module>s0R