^c"ddlmZddlmZddlmZmZmZm Z m Z m Z m ZmZmZmZmZmZe jZiZejeZd%dZdZ d&d Zed d d ged edfdddedfdddedfdddedfdddedfdddedfddgededfdd ded!fged"ej#d$ZdS)')_)getattr) bookmarkscmdutilerrorhglock logcmdutil mergestatepycompat registrarrepairscmutilutilFc|}|s)tj|tj|ntj|d|S)NT) skipmerge)statusrcheckunfinished bailifchanged)repoforcess 1/usr/lib/python3/dist-packages/mercurial/strip.pychecklocalchangesrsW A 6%%%d####5555 Hc |j|d\}}|d}tj|dr&||jkr|d|jjDvr|}nm|||krOd}d}||||||||}|r.|j}| | }|S)Nsmqcg|] }|j Snode).0xs r z%_findupdatetarget..)s333a16333rsparents(wdir())s7max(((parents(%ln::%r) + %r) - %ln::%r) and branch(%s))) changelogparentsbranchr safehasattrnullidmqappliedrevsr!first) rnodesunodep2 currentbranchpwdirrevset branchtargetcls r_findupdatetargetr6"s&&uQx00IE2J%%''M u%%2 $+   3347?333 3 3 $u+,,.. . ."Kyy E5%}    2BGGL..0011E LrTNc 8|5|5|rbt||t||}t j|||j||rtj ||||ntj |||||j } |r| d5} |j|vrtj|| || d|Ddddn #1swxYwYt%|D]'} |t'd| z(dddn #1swxYwYddddS#1swxYwYdS)N)rsstripcg|]}|dfSNrr"bs rr$zstrip..Us1O1O1O1d)1O1O1Orbookmark '%s' deleted )wlockr rr6rcleandirstatewritecurrenttransactionr softstripstrip _bookmarks transaction_activebookmark bookmarksmod deactivate applychangessortedr) uirr,updatebackuprrsofturev repomarkstrbookmarks rrCrC9s CCtyy{{CC  ; d% 0 0 0 0$T400D HT4 M   7 7 9 9 : : :  1  RtV 4 4 4 4 LT4 0 0 0O  C!!(++ Qr'944 +D111&&tR1O1OY1O1O1OPPP Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q#9-- C C566ABBBB)CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCsYFB4E7?D) E7)D- -E70D- 1:E7+ F7E; ;F>E; ?FFFs debugstriprrevsNstrip specified revision (optional, can specify revisions without this option)sREVfforcesDforce removal of changesets, discard uncommitted changes (no backup)rs no-backupsdo not save backup bundlenobackups&do not save backup bundle (DEPRECATED)nsignored (DEPRECATED)kkeeps,do not modify working directory during stripBbookmarks.remove revs only reachable from given bookmarksBOOKMARKsofts:simply drop changesets from visible history (EXPERIMENTAL)s1hg debugstrip [-k] [-f] [-B bookmark] [-r] REV...) helpcategoryc *  tj|}d}|ds|drd}jt ||dz}t t j|}5t |d}|rj }| |sftj tddt|t |z zi}|D].\}} || g|/|D]T} || r=t-j| d } |t | U|s5d5} d |D} || | d d d n #1swxYwYd d d n #1swxYwYt|D]'}|td |z(|s!tj td t |}|| ||}tA fdj!"D}fd|D}tGdd }||j$r%&d vrbd|_'d }tQ|j$}tS|j$D]\}}|j*|vr|}n|j$||=|+t|}|r/|drtY|}|}-d|%}g}|D]/}|.|/0j!fdD}|.|j!0||1|j!2tfj45d}tm|||||d||dd d d n #1swxYwYd S)astrip 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. Ts no_backuprWFrTr\sbookmark '%s' not found,rcg|]}|dfSr9rr:s rr$zdebugstrip..s > > >q!T > > >rNr<sempty revision setc3\K|]&}|jko|vV'dSr9)r)rev)r"pr5r strippedrevss r zdebugstrip..sR     :l!:      rc:h|]}|Srr )r"rr5s r zdebugstrip..s#///ARWWQZZ///rr*sqtiprZs only(., %d)cHg|]}|j|Sr) get_entry maybe_clean)r"fr?s rr$zdebugstrip..s?8+=+=a+@+@+LrrVr])rMrLrrrN)7r byteskwargsgetr%listsetr revranger=rDissubsetrAbortrjoinrJkeysitems setdefaultappendvalues issupersetr bookmarkrevsrLr rErIr@ descendantsunion differenceanyr?r&rr+rclookup applieddirtylen enumerater! savedirtyr6r,extendfilesrebuildmanifestrA mergestatemodr r>rC)!rKrr,optsrMrrPnodetobookmarksmarkr!marksrsrevsrQ bmchangesrRr}rootsrL rootnodesqstartendi statusentryrOuctxdescendantrevs changedfilesrc dirchangesr5r?res! ` @@@r debugstriprZsf   % %D F xx +!6!6 B ::(( (D z"4.. / /D a a --..  GI%%i00 k011iiy3y~~7G7G3H3H'H I IJJK!O'oo// B B d**444;;DAAAA(//11 - -''..-$1$aAAFKKF ,,, GYY[[@@$"2"2;"?"?@2 > >I > > >I**4Y???@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@!'y 1 1GGHHHQ9::XEFFFF 8+a 56677 7"....// zz+..  ,,      ]**,,      0////// D$ % % =QY=vvdkk'**++|;;!%!)nn&/ &:&:NA{"'944!" 5 IeCi( i    dhhw'' $T400D:D"YY~txxzzBBNL% 7 7##DIOO$5$56666}H#J    + + + M ! !$  F F F M   7 7 9 9 : : :  $ * *4 0 0 0F   ((8$$g qa a a a a a a a a a a a a a a F 1s\)E,VI2+$I I2I I2"I #I2& V2I6 6V9I6 :LVV V )F)TTNNF)i18nrr rrrGrrrr lockmodr r rr rrrreleasecmdtablecommandrr6rCCATEGORY_MAINTENANCErrrrrs                             /  ) H % %    6    CCCCB     A   AfII     A3     lD!!$@"A"AB    A7 8 8  sD!!4556    A= > >      A? @ @ AkNN      AK L L  U0bA:;;-i555lI I m55lI I I r