^cH( dZddlmZddlmZmZmZmZm Z m Z m Z m Z m Z mZmZiZe jeZiZe jeZedddedddd Z dd Zed d dd edfd ddedfddd ededfgejzejzejzejzedejdZdZedgejddZd S)aHuncommit part or all of a local changeset (EXPERIMENTAL) This command undoes the effect of a local commit, returning the affected files to their uncommitted state. This means that files modified, added or removed in the changeset will be left unchanged, and so will remain modified, added and removed in the working directory. )_) cmdutilcommandscontextcopieserrorobsutilpathutilpycompat registrar rewriteutilscmutil experimentaluncommitondirtywdirF)default uncommit.keepsships-with-hg-coreNc  |}t|}fd|D} | sdS|s&|S|| z t j|| fd D |df fd } s'|jtd|| }|s| }|s| }tj|||jg| | |||} || S)zrRecommit ctx with changed files not in match. Return the new node identifier, or None if nothing changed. c*h|]}| |Sr).0fmatchs 0/usr/lib/python3/dist-packages/hgext/uncommit.py z"_commitfiltered..Fs&333Q%%((3q333Nc$i|] \}}|v || Srr)rdstsrcfiless r z#_commitfiltered..Ss$ F F F83c3rrc ||vrdS||}tj|||||||}|S)N) copysource)r memfilectxpathdataislinkisexecget)repomemctxr$ contentctxredirectfctxmctxcopieds r filectxfnz"_commitfiltered..filectxfnUs| z ! !4$!   IIKK IIKK KKMM KKMMzz$''    rsnote: keeping empty commit parentstextrr0userdateextra)p1setrnode copiesmod pathcopiesitemsuistatusr descriptionr4r5rr*nullidr6 commitctx)r)ctxr keepcommitmessager4r5base initialfilesexcluder0newr/rs ` @@r_commitfilteredrI=s 6688Dsyy{{##L3333,333G t vvxx}} 7 "E  !$ , ,F F F F Fv||~~ F F FF14r       ; q899::://## xxzz xxzz . dk*   iikk   C >>#  runcommitrkeeps(allow an empty commit after uncommittingsallow-dirty-working-copys'allow uncommit with outstanding changesnsnotesstore a note on uncommitsTEXTs[OPTION]... [FILE]...) helpcategorycj tj|tj||tj|}|5|5|}|j|j |j |j f\}}}}tt||z|z|zt|z} |dp|jdd} | s'|r| r#tj|t#d|d} t%j|| gdt+| dkr!t/jt#d t3j| ||} | rS| | | d } t| j t| jzt| j z}t| |z }|r!|d t;j|Dz}t?|D]}|| j vrt#d }n9|j!"|rt#d}nt#d}t/jt#dt3j#||z||$d5|ds|ds| %|d<tj&||}|}|sA|'d|'d}n|dd}tQ|| | |||'d|'d}|F|t#d ddddddddddSi}|| )kr|f|| )<nd|| )<|j*+5t3j,|||| dddn #1swxYwYt3j-||dd dddn #1swxYwYdddn #1swxYwYddddS#1swxYwYdS)auncommit part or all of a local changeset This command undoes the effect of a local commit, returning the affected files to their uncommitted state. This means that files modified or deleted in the changeset will be left unchanged, and so will remain modified in the working directory. If no files are specified, the commit will be pruned, unless --keep is given. sallow_dirty_working_copyrrs/requires --allow-dirty-working-copy to uncommit)hint.rJscannot uncommit merge changesetT) listcleanch|]}|Srr)rrs rrzuncommit..s@@@1Q@@@rs0file was not changed in working directory parents.file was untracked in working directory parentsfile does not existscannot uncommit "%s"smessageslogfilerKNrsusersdate)rDr4r5snothing to uncommit rfixphase).rcheck_note_sizeresolve_commit_optionsr byteskwargswlocklockr>modifiedaddedremoveddeletedanyr8r= configbool bailifchangedrr precheckrevlenr2r InputErrorrrrr7r dirssortedcleanwvfsexists getuipathfn transactionr? logmessager(rIr9dirstate parentchange movedirstate cleanupnodes)r=r)patsoptsstmard isdirtypathallowdirtywcopyoldrseligiblebadfilesrrOrDrCnewidmappings runcommitr{s< D!!! "2t,,,   % %D ULULtyy{{ULUL [[]]["(BJ B 1a#a!eai!m,,s4yy899  ' I W  1G H H       !IJJ    4jTCGGII; <<< s{{}}   ! !"1%G#H#HII I c4.. ;;==  36688Ud ;;A17||c!*oo5AIFH5;;==))H4H  A@@ h(?(?@@@@H%%  <<KDDY%%a((5NOODD344D&-..1J1DT1J1J11M1MM   k * *% L% L$ 5Z(8 5#&??#4#4Z (T22GJ 88G$$0!%'!2!2JJ!#')9""J$XXg&&XXg&&E} !4556661% L% L% L% L% L% LaULULULULULULULULULULULULULULTG ''',h ##') #++-- ? ?$T4;>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?  w d K K K KK% L% L% L% L% L% L% L% L% L% L% L% L% L% L% LaULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULULsT('J?T&C#S9 T T(,A5S9!S > S9 S S9S S9- T9S= =TS= T T(T T(T T((T,/T,c#K|jj|dD]+}t j||V,dS)zFyields the obsolete markers marking the given changeset as a successorrN)r)obsstore predecessorsr(r9r marker)rBr%s rpredecessormarkersrsh #044SXXZZDD//nSXXZZ......//runamendT)rM helpbasicc L|}|5|5|d5|dt j|gdtdkr!tj tdd}tfd|Ds!tj tdtt}t|dkr3td}tj |t|z|d }||}|d <fd } t%j|f| | } || } || } |j} | 5t;j|| d d d n #1swxYwY| fi}t;j ||ddd d d n #1swxYwYd d d n #1swxYwYd d d d S#1swxYwYd S)a3undo the most recent amend operation on a current changeset This command will roll back to the previous version of a changeset, leaving working directory in state in which it was before running `hg amend` (e.g. files modified as part of an amend will be marked as modified `hg status`) rrPrQscannot unamend merge changeset)s amend_sourceunamend_sourcec3DK|]}|vVdSN)r6)rkeycurctxs r zunamend..s0BBS3&,,..(BBBBBBrsAworking copy parent was not created by 'hg amend' or 'hg unamend's:changeset must have one predecessor, found %i predecessorsrrcR |S#t$rYdSwxYwr)filectxKeyError)r)ctx_r$predctxs rr0zunamend..filectxfn+s< t,,,   tt s  &&r1NTrT)! unfilteredrYrZrlr rbrcrdr2rrerr_listrprednoder6hexrr*r7p2r?rr4r5rArnrorrpr9rq)r=r)rsunfi expected_keysmarkerserextrasr0newctx newprednode newpredctxrnrrrs @@runamendrs ??  D 9G9Gtyy{{9G9GD$4$4Z$@$@9G9GdTFJJLL>:>>> v~~ 1 $ $"1%F#G#GHH H< BBBBMBBBBB "$ )&1122 w<<1  OPPA"1s7||#344 41:&&((x.$*JJLL !      ZZ\\7::<<0$$&&--//    nnV,, +& =  " " $ $ 3 3  z 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3;;==;.1T7JFFFFs9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9Gs~LLH,K*J$  K*$J( (K*+J( ,2K* L*K. .L1K. 2L5 LL LL LL L)NNN)__doc__mercurial.i18nr mercurialrrrrr:rr r r r r rcmdtablecommand configtable configitem testedwithrIwalkopts commitopts commitopts2 commitopts3CATEGORY_CHANGE_MANAGEMENTrrrrrrrs}                            ) H % % !Y !+ . .     # AE;;;;|  gtQQJKKL  '  A8 9 9  wQQ:;;QQwZZH     A3#&dLdL'&dLN///  3  CGCG  CGCGCGr