\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sdZddlmZddlmZddlmZmZm Z m Z m Z m Z mZmZmZmZmZmZejZe jZiZejeZdZd#dZeddZd Zeed#d#d Z ed d d gededfddd#edfddd#edfddd#edfddd#edfddd#edfddgededfged d!ej!d"Z"d#S($sstrip 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@sg}|d}|r#||}n|jd}xat|jD]P}|j|jt||jks|j|jrC|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@stj||j}|s|jsC|jsC|jsC|jritdtj td|nt |rtdtj td|qn|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|dr{|tkr{|g|jjD]}|j ^qZkr{|}nm|||jkrd}d}|j |||||||}|r|j} | j |j }qn|S(Nitmqsparents(wdir())s7max(((parents(%ln::%r) + %r) - %ln::%r) and branch(%s))( t changelogRRtbranchR t safehasattrtnullidR)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|jnt j |||||j }|r!|j dR} |j |krtj|n|j|| g|D]} | df^qWdQXx.t|D]} |jtd| qWnWdQXWdQXdS(NR&tstripsbookmark '%s' deleted (twlockRR(R:RtcleantdirstatetwritetcurrenttransactionR R;t _bookmarkst transactiont_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!@stj|}t}|jds3|jdr<t}n|jt||jd}ttj ||}|j .t|jd}|r|j }|j |st jtddjt|t|jni}x3|jD]%\}} |j| gj|qWxO|jD]A} |j| r:tj|| d} |jt| q:q:W|s|jO|jd9} g|D]} | df^q}|j|| |WdQXWdQXx.t|D]}|jtd |qWqn|s4t jtd ntj|}|j ||j!|}t"fd |j#j$D}tfd |D}t%|d d}|dk rd|j&rdj'|j(dkrdt|_)d}t*|j&}x6t+|j&D]%\}}|j,|kr|}PqqW|j&||5|j-qdnt|}|r{|jdr{t.||}||}|j/d|j'}g}x%|D]}|j0||j1qW|j#}g|D]}||dkr|^q} |j0| |j#j2||j3||j#j|j4t5j6j7||dj,t}nt8|||d|d|d|jdd|WdQXdS(sstrip 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 sc3@s|]}j|VqdS(N(R(R\RO(R9(s1/usr/lib64/python2.7/site-packages/hgext/strip.pys sR)tqtipRVs%d::.RTt.RIRHR&R(9R t byteskwargsRtgettFalseR*tlisttsetR trevrangeR<RAtissubsetRR%RtjoinRtkeyst iteritemst setdefaultRtvaluest issupersett bookmarkrevsRHRRBRRFR?t descendantstuniont differencetanyR>RtgetattrR.RPtlookupt applieddirtytlent enumerateRt savedirtyR:R/textendtfilestrebuildtmanifestR@Rt mergestateR=R;(!RGRR/toptsRIRRKtnodetobookmarkstmarkRtmarkstrsrevsRLRMt bmchangesRNRotrootsRHt rootnodestqtstarttendtit statusentryRJtuctxtdescendantrevst changedfilesRPR>RRt dirchanges((R9R^s1/usr/lib64/python2.7/site-packages/hgext/strip.pytstripcmdcs.    , !      )  N(#t__doc__t __future__Rtmercurial.i18nRt mercurialRRDRRRRtlockmodRRtnodemodR R R R R R-treleasetcmdtabletcommandt testedwithRRRcR(R:RR;tCATEGORY_MAINTENANCER(((s1/usr/lib64/python2.7/site-packages/hgext/strip.pyts0R