$cat>>$HGRCPATH<<EOF>[defaults]>amend=-d"0 0">fold=-d"0 0">metaedit=-d"0 0">[web]>push_ssl=false>allow_push=*>[phases]>publish=False>[alias]>qlog=log--template='{rev} - {node|short}{desc} ({phase})\n'>[diff]>git=1>unified=0>[extensions]>EOF$echo"evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/">>$HGRCPATH$mkcommit(){>echo"$1">"$1">hgadd"$1">hgci-m"add $1">}$mkstack(){>#Createsastackofcommitbasedon$1withmessagesfrom$2,$3..>hgupdate$1-C>shift>mkcommits$*>}$glog(){>hglog-G--template'{rev}:{node|short}@{branch}({phase}) {desc|firstline}\n'"$@">}$shaof(){>hglog-T{node}-r"first(desc($1))">}$mkcommits(){>foriin$@;domkcommit$i;done>}Testtheevolutiontesttopicisinstalled$hghelpevolutionSafelyRewritingHistory""""""""""""""""""""""""Obsolescencemarkersmakeitpossibletomarkchangesetsthathavebeendeletedorsupersetinanewversionofthechangeset.Unlikethepreviouswayofhandlingsuchchanges,bystrippingtheoldchangesetsfromtherepository,obsolescencemarkerscanbepropagatedbetweenrepositories.Thisallowsforasafeandsimplewayofexchangingmutablehistoryandalteringitafterthefact.Changesetphasesarerespected,suchthatonlydraftandsecretchangesetscanbealtered(see'hg help phases'fordetails).Obsolescenceistrackedusing"obsolete markers",apieceofmetadatatrackingwhichchangesetshavebeenmadeobsolete,potentialsuccessorsforagivenchangeset,themomentthechangesetwasmarkedasobsolete,andtheuserwhoperformedtherewritingoperation.Themarkersarestoredseparatelyfromstandardchangesetdatacanbeexchangedwithoutanyoftheprecursorchangesets,preventingunnecessaryexchangeofobsolescencedata.Thecompletesetofobsolescencemarkersdescribesahistoryofchangesetmodificationsthatisorthogonaltotherepositoryhistoryoffilemodifications.Thischangesethistoryallowsfordetectionandautomaticresolutionofedgecasesarisingfrommultipleusersrewritingthesamepartofhistoryconcurrently.Currentfeaturestatus======================Thisfeatureisstillindevelopment.Ifyouseethishelp,youhaveenabledanextensionthatturnedthisfeatureon.Obsolescencemarkerswillbeexchangedbetweenrepositoriesthatexplicitlyassertsupportfortheobsolescencefeature(thiscancurrentlyonlybedoneviaanextension).Instability===========Rewritingchangesetsmightintroduceinstability.Therearetwomainkindsofinstability:orphaninganddiverging.Orphansarechangesetsleftbehindwhentheirancestorsarerewritten.Divergencehastwovariants:*Content-divergenceoccurswhenindependentrewritesofthesamechangesetsleadtodifferentresults.*Phase-divergenceoccurswhentheold(obsolete)versionofachangesetbecomespublic.Itispossibletopreventlocalcreationoforphansbyusingthefollowingconfig:[experimental]evolution=createmarkers,allnewcommands,exchangeYoucanalsoenablethatoptionexplicitly:[experimental]evolution=createmarkers,allnewcommands,allowunstable,exchangeorsimply:[experimental]evolution=allvariousinit$hginitlocal$cdlocal$mkcommita$mkcommitb$cat>>.hg/hgrc<<EOF>[phases]>publish=True>EOF$hgpull-q.#make1public$rm.hg/hgrc$mkcommitc$mkcommitd$hgup10filesupdated,0filesmerged,2filesremoved,0filesunresolved$mkcommite-qcreatednewhead$mkcommitf$hgqlog5-e44648563c73addf(draft)4-fbb94e3a0ecfadde(draft)3-47d2a3944de8addd(draft)2-4538525df7e2addc(draft)1-7c3bad9141dcaddb(public)0-1f0dee641bb7adda(public)testkillandimmutablechangeset$hglog-r1--template'{rev}{phase}{obsolete}\n'1public$hgprune1abort:cannotprunepublicchangesets:7c3bad9141dc(see'hg help phases'fordetails)[255]$hglog-r1--template'{rev}{phase}{obsolete}\n'1publictestsimplekill$hgid-n5$hgprune.0filesupdated,0filesmerged,1filesremoved,0filesunresolvedworkingdirectoryisnowatfbb94e3a0ecf1changesetspruned$hgqlog4-fbb94e3a0ecfadde(draft)3-47d2a3944de8addd(draft)2-4538525df7e2addc(draft)1-7c3bad9141dcaddb(public)0-1f0dee641bb7adda(public)testmultiplekill$hgprune4-r30filesupdated,0filesmerged,1filesremoved,0filesunresolvedworkingdirectoryisnowat7c3bad9141dc2changesetspruned$hgqlog2-4538525df7e2addc(draft)1-7c3bad9141dcaddb(public)0-1f0dee641bb7adda(public)testkillwithdirtychanges$hgup21filesupdated,0filesmerged,0filesremoved,0filesunresolved$echo4>g$hgaddg$hgprune.0filesupdated,0filesmerged,1filesremoved,0filesunresolvedworkingdirectoryisnowat7c3bad9141dc1changesetspruned$hgstAgSmoketestdebugobsrelsethashtree:$hgdebugobsrelsethashtree1f0dee641bb7258c56bd60e93edfa2405381c41e00000000000000000000000000000000000000007c3bad9141dcb46ff89abf5f61856facd56e476c*(glob)4538525df7e2b9f09423636c61ef63a4cb872a2d*(glob)47d2a3944de8b013de3be9578e8e344ea2e6c097*(glob)fbb94e3a0ecf6d20c2cc31152ef162ce45af982f*(glob)e44648563c73f75950076031c6fdf06629de95f1*(glob)Smoketeststablerange.obshash:$hgdebugobshashrange--subranges--rev'head()'revnodeindexsizedepthobshash17c3bad9141dc022*(glob)01f0dee641bb701100000000000017c3bad9141dc112*(glob)$cd..##########################importingParrentest##########################$cat<<EOF>>$HGRCPATH>[ui]>logtemplate="{rev}\t{bookmarks}: {desc|firstline} - {author|user}\n">EOFCreatingAndUpdatingChangeset===============================SetuptheBaseRepo-------------------Westartwithaplainbaserepo::$hginitmain;cdmain$cat>main-file-1<<-EOF>One>>Two>>Three>EOF$echoTwo>main-file-2$hgaddaddingmain-file-1addingmain-file-2$hgcommit--messagebase$cd..andclonethisintoanewrepowherewedoourwork::$hgclonemainworkupdatingtobranchdefault2filesupdated,0filesmerged,0filesremoved,0filesunresolved$cdworkCreateFirstPatch------------------Tobeginwith,wejustdothechangesthatwillbetheinitialversionofthechangeset::$echoOne>file-from-A$sed-i''-es/One/Eins/main-file-1$hgaddfile-from-ASothisiswhatwewouldlikeourchangesettobe::$hgdiffdiff--gita/file-from-Ab/file-from-Anewfilemode100644---/dev/null+++b/file-from-A@@-0,0+1,1@@+Onediff--gita/main-file-1b/main-file-1---a/main-file-1+++b/main-file-1@@-1,1+1,1@@-One+EinsTocommititwejust-commitit::$hgcommit--message"a nifty feature"andplaceabookmarksowecaneasilyrefertoitagain(whichwecouldhavedonebeforethecommit)::$hgbookfeature-ACreateSecondPatch-------------------Let's do this again for the second changeset:: $ echo Two >file-from-B $ sed -i'' -e s/Two/Zwie/ main-file-1 $ hg add file-from-BBefore committing, however, we need to switch to a new bookmark for the secondchangeset. Otherwise we would inadvertently move the bookmark for our first changeset.It is therefore advisable to always set the bookmark before committing:: $ hg book feature-B $ hg commit --message "another feature (child of $(hg log -r . -T '{node|short}'))"So here we are:: $ hg book feature-A 1:568a468b60fc * feature-B 2:73296a82292aFix The Second Patch--------------------There'satypoinfeature-B.Wespelled*Zwie*insteadof*Zwei*::$hgdiff--changetip|grep-FZwie+ZwieFixingthisisveryeasy.Justchange::$sed-i''-es/Zwie/Zwei/main-file-1and**amend**::$hgamendThisresultsinanewsinglechangesetforouramendedchangeset,andtheoldchangesetplustheupdatingchangesetarehiddenfromviewbydefault::$hglog3feature-B:anotherfeature(childof568a468b60fc)-test1feature-A:aniftyfeature-test0:base-test$hgupfeature-A-q$hgbookmark-ifeature-A$sed-i''-es/Eins/Un/main-file-1(amendofpublicchangesetdenied)$hgphase--public0-vphasechangedfor1changesets(amendofonancestors)$hgamend1neworphanchangesets$hglog4feature-A:aniftyfeature-test3feature-B:anotherfeature(childof568a468b60fc)-test1:aniftyfeature-test0:base-test$hgup-q0$glog--hiddeno4:ba0ec09b1bab@default(draft)aniftyfeature||*3:6992c59c6b06@default(draft)anotherfeature(childof568a468b60fc)||||x2:73296a82292a@default(draft)anotherfeature(childof568a468b60fc)||/|x1:568a468b60fc@default(draft)aniftyfeature|/@0:e55e0562ee93@default(public)base$hgdebugobsolete73296a82292a76fb8a7061969d2489ec0d84cd5e6992c59c6b06a1b4a92e24ff884829ae026d018b0(ThuJan0100:00:001970+0000){'ef1':'8','operation':'amend','user':'test'}568a468b60fc99a42d5d4ddbe181caff1eef308dba0ec09b1babf3489b567853807f452edd46704f0(ThuJan0100:00:001970+0000){'ef1':'8','operation':'amend','user':'test'}$hgevolvemove:[3]anotherfeature(childof568a468b60fc)atop:[4]aniftyfeaturemergingmain-file-1$hglog5feature-B:anotherfeature(childofba0ec09b1bab)-test4feature-A:aniftyfeature-test0:base-testTestcommit-ooptions$hgup-r"desc('a nifty feature')"2filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgrevert-r"desc('another feature')"--allrevertingmain-file-1addingfile-from-B$sed-i''-es/Zwei/deux/main-file-1$hgcommit-m'another feature that rox'-o5creatednewhead$hglog6feature-B:anotherfeaturethatrox-test4feature-A:aniftyfeature-test0:base-testphasechangeturningobsoletechangesetpublicissuesaphasedivergencewarning$hgphase--hidden--public99833d22b0c61newphase-divergentchangesetsallsolvingphase-divergent$glog@6:47d52a103155@default(draft)anotherfeaturethatrox||o5:99833d22b0c6@default(public)anotherfeature(childofba0ec09b1bab)|/o4:ba0ec09b1bab@default(public)aniftyfeature|o0:e55e0562ee93@default(public)base$hgevolve--any--traceback--phase-divergentrecreate:[6]anotherfeaturethatroxatop:[5]anotherfeature(childofba0ec09b1bab)committedasaca219761afbworkingdirectoryisnowataca219761afb$glog@7:aca219761afb@default(draft)phase-divergentupdateto99833d22b0c6:|o5:99833d22b0c6@default(public)anotherfeature(childofba0ec09b1bab)|o4:ba0ec09b1bab@default(public)aniftyfeature|o0:e55e0562ee93@default(public)base$hgdiff--hidden-raca219761afb-r47d52a103155$hgdiff-raca219761afb^-raca219761afbdiff--gita/main-file-1b/main-file-1---a/main-file-1+++b/main-file-1@@-3,1+3,1@@-Zwei+deux$hglog-r'phasedivergent()'#nomorephase-divergenttestevolve--all$sed-i''-es/deux/to/main-file-1$hgcommit-m'dansk 2!'$sed-i''-es/Three/tre/main-file-1$hgcommit-m'dansk 3!'$hgupdateaca219761afb1filesupdated,0filesmerged,0filesremoved,0filesunresolved$sed-i''-es/Un/Én/main-file-1$hgcommit--amend-m'dansk!'2neworphanchangesets(ninjatestforthe{trouble}template:$hglog-G--template'{rev}{instabilities}\n'@10||*9orphan|||*8orphan|||x7|/o5|o4|o0(/ninja)$hgevolve--all--tracebackmove:[8]dansk2!atop:[10]dansk!mergingmain-file-1move:[9]dansk3!mergingmain-file-1$hglog-Go12:dansk3!-test|o11:dansk2!-test|@10feature-B:dansk!-test|o5:anotherfeature(childofba0ec09b1bab)-test|o4feature-A:aniftyfeature-test|o0:base-test$cd..enablegeneraldelta$cat<<EOF>>$HGRCPATH>[format]>generaldelta=1>EOF$hginitalpha$cdalpha$echo'base'>firstfile$hgaddfirstfile$hgci-m'base'$cd..$hgclone-Ur0alphabetaaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1filesnewchangesets702e4d0a6d86(1drafts)$cdalpha$cat<<EOF>A>We>need>some>kind>of>file>big>enough>to>prevent>snapshot>.>yes>new>lines>are>useless>.>EOF$hgaddA$hgcommit-m'adding A'$hgmvAB$echo'.'>>B$hgamend-m'add B'$hgverifycheckingchangesetscheckingmanifestscrosscheckingfilesinchangesetsandmanifestscheckingfileschecked3changesetswith3changesto3files$hg--configextensions.hgext.mq=strip'extinct()'abort:emptyrevisionset[255](dosomegarbarecollection)$hg--configextensions.hgext.mq=strip--hidden'extinct()'--configdevel.strip-obsmarkers=nosavedbackupbundleto$TESTTMP/alpha/.hg/strip-backup/e87767087a57-a365b072-backup.hg(glob)$hgverifycheckingchangesetscheckingmanifestscrosscheckingfilesinchangesetsandmanifestscheckingfileschecked2changesetswith2changesto2files$cd..Clonejustthisbranch$cdbeta$hgpull-rtip../alphapullingfrom../alphasearchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1files1newobsolescencemarkersnewchangesetsc6dda801837c(1drafts)(run'hg update'togetaworkingcopy)$hgup2filesupdated,0filesmerged,0filesremoved,0filesunresolved$cd..Normaltesting$hginittest-graft$cdtest-graft$mkcommit0$mkcommit1$mkcommit2$mkcommit3$hgup-qC0$mkcommit4creatednewhead$glog--hidden@4:ce341209337f@default(draft)add4||o3:0e84df4912da@default(draft)add3|||o2:db038628b9e5@default(draft)add2|||o1:73d38bb17fd7@default(draft)add1|/o0:8685c6d34325@default(draft)add0$hgpick-r3picking3:0e84df4912da"add 3"$hggraft-r1grafting1:73d38bb17fd7"add 1"$hgprune-r2--successor.1changesetspruned$glog--hidden@6:417185465d2c@default(draft)add1|o5:fa455b5098e0@default(draft)add3|o4:ce341209337f@default(draft)add4||x3:0e84df4912da@default(draft)add3|||x2:db038628b9e5@default(draft)add2|||o1:73d38bb17fd7@default(draft)add1|/o0:8685c6d34325@default(draft)add0$hgdebugobsolete0e84df4912da4c7cad22a3b4fcfd58ddfb7c8ae9fa455b5098e0ce8c1871edf6369f32be7d8b4d1c0(ThuJan0100:00:001970+0000){'ef1':'4','operation':'pick','user':'test'}db038628b9e56f51a454c0da0c508df247b41748417185465d2c68e575cff4cd6ed8a4047505ef240(ThuJan0100:00:001970+0000){'ef1':'13','operation':'prune','user':'test'}Testgrab--continue$hgup-qC0$echo2>1$hgci-Amconflict1creatednewhead$hgup-qC6$hgpick-r7picking7:a5bfd90a2f29"conflict"merging1warning:conflictswhilemerging1!(edit,thenuse'hg resolve --mark')unresolvedmergeconflicts(seehghelpresolve)[1]$hglog-r7--template'{rev}:{node|short}{obsolete}\n'7:a5bfd90a2f29$echo3>1$hgresolve-m1(nomoreunresolvedfiles)continue:hgpick--continue$hgpick--continue$glog--hidden@8:fb2c0f0a0c54@default(draft)conflict||x7:a5bfd90a2f29@default(draft)conflict||o|6:417185465d2c@default(draft)add1||o|5:fa455b5098e0@default(draft)add3||o|4:ce341209337f@default(draft)add4|/|x3:0e84df4912da@default(draft)add3|||x2:db038628b9e5@default(draft)add2|||o1:73d38bb17fd7@default(draft)add1|/o0:8685c6d34325@default(draft)add0$hgdebugobsolete0e84df4912da4c7cad22a3b4fcfd58ddfb7c8ae9fa455b5098e0ce8c1871edf6369f32be7d8b4d1c0(ThuJan0100:00:001970+0000){'ef1':'4','operation':'pick','user':'test'}db038628b9e56f51a454c0da0c508df247b41748417185465d2c68e575cff4cd6ed8a4047505ef240(ThuJan0100:00:001970+0000){'ef1':'13','operation':'prune','user':'test'}a5bfd90a2f29c7ccb8f917ff4e5013a9053d0a04fb2c0f0a0c54be4367988521bad2cbd33a5409690(ThuJan0100:00:001970+0000){'ef1':'12','operation':'pick','user':'test'}Testtouch$glog@8:fb2c0f0a0c54@default(draft)conflict|o6:417185465d2c@default(draft)add1|o5:fa455b5098e0@default(draft)add3|o4:ce341209337f@default(draft)add4||o1:73d38bb17fd7@default(draft)add1|/o0:8685c6d34325@default(draft)add0$hgtouch$glog@9:*@default(draft)conflict(glob)|o6:417185465d2c@default(draft)add1|o5:fa455b5098e0@default(draft)add3|o4:ce341209337f@default(draft)add4||o1:73d38bb17fd7@default(draft)add1|/o0:8685c6d34325@default(draft)add0$hgtouch.$glog@10:*@default(draft)conflict(glob)|o6:417185465d2c@default(draft)add1|o5:fa455b5098e0@default(draft)add3|o4:ce341209337f@default(draft)add4||o1:73d38bb17fd7@default(draft)add1|/o0:8685c6d34325@default(draft)add0Testfold(mostofthetestinghavebeenmovedtotest-fold$rm*.orig$hgphase--public0$hgfold--from-r53changesetsfolded1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hglog-r11--template'{desc}\n'add3add1conflict$hgdebugrebuildstate$hgstTestfoldwithwcparentisnottheheadofthefoldedrevision$hgup40filesupdated,0filesmerged,2filesremoved,0filesunresolved$hgfold--rev4::11--uservictor--exact2changesetsfolded2filesupdated,0filesmerged,0filesremoved,0filesunresolved$glog@12:d26d339c513f@default(draft)add4||o1:73d38bb17fd7@default(draft)add1|/o0:8685c6d34325@default(public)add0$hglog--template'{rev}: {author}\n'12:victor1:test0:test$hglog-r12--template'{desc}\n'add4add3add1conflict$hgdebugrebuildstate$hgstTestolog$hgolog|head-n10#hgtouchmakestheoutputunstable(fixitwithdeveloptionformorestabletouch)@d26d339c513f(12)add4|\x|ce341209337f(4)add4/rewritten(description,user,content)asd26d339c513fusingfoldbytest(ThuJan0100:00:001970+0000)|xcf0c3904643c(11)add3|\ rewritten(description,user,parent,content)asd26d339c513fusingfoldbytest(ThuJan0100:00:001970+0000)||| \||\Testobsstorestat$hgdebugobsstorestatmarkerstotal:10forknownprecursors:10(10/13obsoletechangesets)withparentsdata:0markerswithnosuccessors:01successors:102successors:0morethan2successors:0availablekeys:ef1:10operation:10user:10markersize:formatv1:smallestlength:90longerlength:92medianlength:91meanlength:90formatv0:smallestlength:*(glob)longerlength:*(glob)medianlength:*(glob)meanlength:*(glob)disconnectedclusters:1anyknownnode:1smallestlength:10longerlength:10medianlength:10meanlength:10usingparentsdata:1anyknownnode:1smallestlength:10longerlength:10medianlength:10meanlength:10Testevolvingrenames$hgupnull0filesupdated,0filesmerged,4filesremoved,0filesunresolved$echoa>a$hgci-Amaaddingacreatednewhead$echob>b$hgci-Ambaddingb$hgmvac$hgci-mc$hgprune.^1changesetspruned1neworphanchangesets$hgstab--anymove:[15]catop:[13]aworkingdirectoryisnowat3742bde73477$hgst-C--change=tipAcaRaTestfoldwithcommitmessages$cd../work$hgup1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgfold--from.^--message"Folding with custom commit message"2changesetsfolded1filesupdated,0filesmerged,0filesremoved,0filesunresolved$glog@13:284c0d45770d@default(draft)Foldingwithcustomcommitmessage|o10:9975c016fe7b@default(draft)dansk!|o5:99833d22b0c6@default(public)anotherfeature(childofba0ec09b1bab)|o4:ba0ec09b1bab@default(public)aniftyfeature|o0:e55e0562ee93@default(public)base$cat>commit-message<<EOF>Alonger>commitmessage>EOF$hgfold--from.^--logfilecommit-message2changesetsfolded1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgqlog14-8693d0f277b8Alongercommitmessage(draft)5-99833d22b0c6anotherfeature(childofba0ec09b1bab)(public)4-ba0ec09b1babaniftyfeature(public)0-e55e0562ee93base(public)$cd..Testbranchpreservation:===========================$hginitevolving-branch$cdevolving-branch$toucha$hgadda$hgci-m'a0'$echo1>a$hgci-m'a1'$echo2>a$hgci-m'a2'$echo3>a$hgci-m'a3'$hglog-G--template'{rev} [{branch}] {desc|firstline}\n'@3[default]a3|o2[default]a2|o1[default]a1|o0[default]a0branchchangepropagated$hgup'desc(a2)'1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgbranchmybranchmarkedworkingdirectoryasbranchmybranch(branchesarepermanentandglobal,didyouwantabookmark?)$hgamend1neworphanchangesets$hgevolvemove:[3]a3atop:[4]a2$hglog-G--template'{rev} [{branch}] {desc|firstline}\n'o5[mybranch]a3|@4[mybranch]a2|o1[default]a1|o0[default]a0branchchangepreserved$hgup'desc(a1)'1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgamend-m'a1_'2neworphanchangesets$hgevolve--rev'first(orphan())'move:[4]a2atop:[6]a1_$hgevolvemove:[5]a3atop:[7]a2$hglog-G--template'{rev} [{branch}] {desc|firstline}\n'o8[mybranch]a3|o7[mybranch]a2|@6[default]a1_|o0[default]a0Evolvefromthemiddleofastackpicktherightchangesets.$hgci--amend-m'a1__'2neworphanchangesets$hgup-r"desc('a2')"1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hglog-G--template'{rev} [{branch}] {desc|firstline}\n'o9[default]a1__||*8[mybranch]a3|||@7[mybranch]a2|||x6[default]a1_|/o0[default]a0$hgevolvenothingtoevolveoncurrentworkingcopyparent(2otherorphanintherepository,doyouwant--anyor--rev)[2]Evolvedisablesactivebookmarks.$hgup-r"desc('a1__')"1filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgbookmarktestbookmark$ls.hg/bookmarks*.hg/bookmarks.hg/bookmarks.*(glob)$hgevolve--rev'first(orphan())'move:[7]a2atop:[9]a1__(leavingbookmarktestbookmark)$ls.hg/bookmarks*.hg/bookmarks$glogo10:d952e93add6f@mybranch(draft)a2|@9:9f8b83c2e7f3@default(draft)a1__||*8:777c26ca5e78@mybranch(draft)a3|||x7:eb07e22a0e63@mybranch(draft)a2|||x6:faafc6cea0ba@default(draft)a1_|/o0:07c1c36d9ef0@default(draft)a0Possibilitytoselectwhatinstabilitytosolvefirst,askingforphase-divergentbeforecontent-divergent$hgrevert-rd952e93add6f--allrevertinga$hglog-G--template'{rev} [{branch}] {desc|firstline}\n'o10[mybranch]a2|@9[default]a1__||*8[mybranch]a3|||x7[mybranch]a2|||x6[default]a1_|/o0[default]a0$echo"hello world">newfile$hgaddnewfile$hgcommit-m"add new file bumped"-o10$hgphase--public--hiddend952e93add6f1newphase-divergentchangesets$hglog-G@11:addnewfilebumped-test||o10:a2-test|/o9testbookmark:a1__-test||*8:a3-test|||x7:a2-test|||x6:a1_-test|/o0:a0-testNowwehaveaphase-divergentandanorphanchangeset,wesolvethephase-divergentfirst.Normallytheorphanchangesetwouldbesolvedfirst$hglog-G@11:addnewfilebumped-test||o10:a2-test|/o9testbookmark:a1__-test||*8:a3-test|||x7:a2-test|||x6:a1_-test|/o0:a0-test$hgevolve-r"desc('add new file bumped')"--phase-divergentrecreate:[11]addnewfilebumpedatop:[10]a2committedasa8bb31d4b7f2workingdirectoryisnowata8bb31d4b7f2$hgevolve--anymove:[8]a3atop:[12]phase-divergentupdatetod952e93add6f:$glogo13:b88539ad24d7@default(draft)a3|@12:a8bb31d4b7f2@default(draft)phase-divergentupdatetod952e93add6f:|o10:d952e93add6f@mybranch(public)a2|o9:9f8b83c2e7f3@default(public)a1__|o0:07c1c36d9ef0@default(public)a0Checkthatwecanresolveinstabilitiesinarevsetwithmorethanonecommit$hgupb88539ad24d7-C1filesupdated,0filesmerged,0filesremoved,0filesunresolved$mkcommitgg$hgupb88539ad24d70filesupdated,0filesmerged,1filesremoved,0filesunresolved$mkcommitghcreatednewhead$hgupb88539ad24d70filesupdated,0filesmerged,1filesremoved,0filesunresolved$printf"newline\nnewline\n">>a$hglog-Go15:addgh-test||o14:addgg-test|/@13:a3-test|o12:phase-divergentupdatetod952e93add6f:-test|o10:a2-test|o9testbookmark:a1__-test|o0:a0-test$hgamend2neworphanchangesets$glog@16:0cf3707e8971@default(draft)a3||*15:daa1ff1c7fbd@default(draft)addgh||||*14:484fb3cfa7f2@default(draft)addgg||/|x13:b88539ad24d7@default(draft)a3|/o12:a8bb31d4b7f2@default(draft)phase-divergentupdatetod952e93add6f:|o10:d952e93add6f@mybranch(public)a2|o9:9f8b83c2e7f3@default(public)a1__|o0:07c1c36d9ef0@default(public)a0Evolvinganemptyrevsetshoulddonothing$hgevolve--rev"daa1ff1c7fbd and 484fb3cfa7f2"setofspecifiedrevisionsisempty[1]$hgevolve--rev"b88539ad24d7::"--phase-divergentnophasedivergentchangesetsinspecifiedrevisions(doyouwanttouse--orphan)[2]$hgevolve--rev"b88539ad24d7::"--orphanmove:[14]addggatop:[16]a3move:[15]addghatop:[16]a3$glogo18:0c049e4e5422@default(draft)addgh||o17:98e171e2f272@default(draft)addgg|/@16:0cf3707e8971@default(draft)a3|o12:a8bb31d4b7f2@default(draft)phase-divergentupdatetod952e93add6f:|o10:d952e93add6f@mybranch(public)a2|o9:9f8b83c2e7f3@default(public)a1__|o0:07c1c36d9ef0@default(public)a0Enablingcommandsselectively,nocommandenabled,nextandfoldandunknown$cat>>$HGRCPATH<<EOF>[experimental]>evolution=createmarkers>EOF$hgnexthg:unknowncommand'next'(use'hg help'foralistofcommands)[255]$hgfoldhg:unknowncommand'fold'(use'hg help'foralistofcommands)[255]Enablingcommandsselectively,onlyfoldenabled,nextisstillunknown$cat>>$HGRCPATH<<EOF>[experimental]>evolution=createmarkers>evolutioncommands=fold>EOF$hgfoldabort:norevisionsspecified[255]$hgnexthg:unknowncommand'next'(use'hg help'foralistofcommands)[255]Shows"use 'hg evolve' to..."hintsifftheevolvecommandisenabled$hg--hiddenup142filesupdated,0filesmerged,0filesremoved,0filesunresolvedupdatedtohiddenchangeset484fb3cfa7f2(hiddenrevision'484fb3cfa7f2'wasrewrittenas:98e171e2f272)workingdirectoryparentisobsolete!(484fb3cfa7f2)$cat>>$HGRCPATH<<EOF>[experimental]>evolutioncommands=evolve>EOF$hg--hiddenup151filesupdated,0filesmerged,1filesremoved,0filesunresolvedupdatedtohiddenchangesetdaa1ff1c7fbd(hiddenrevision'daa1ff1c7fbd'wasrewrittenas:0c049e4e5422)workingdirectoryparentisobsolete!(daa1ff1c7fbd)(use'hg evolve'toupdatetoitssuccessor:0c049e4e5422)Restorealloftheevolutionfeatures$cat>>$HGRCPATH<<EOF>[experimental]>evolution=all>EOFCheckhgevolve--revonsingledoutcommit$hgup98e171e2f272-C2filesupdated,0filesmerged,1filesremoved,0filesunresolved$mkcommitj1$mkcommitj2$mkcommitj3$hgup.^^0filesupdated,0filesmerged,2filesremoved,0filesunresolved$echo"hello">j4$hgaddj4$hgamend2neworphanchangesets$glog-r"0cf3707e8971::"@22:274b6cd0c101@default(draft)addj1||*21:89e4f7e8feb5@default(draft)addj3|||*20:4cd61236beca@default(draft)addj2|||x19:0fd8bfb02de4@default(draft)addj1|/|o18:0c049e4e5422@default(draft)addgh||o|17:98e171e2f272@default(draft)addgg|/o16:0cf3707e8971@default(draft)a3|~$hgevolve--rev89e4f7e8feb5--anyabort:cannotspecifyboth"--rev"and"--any"[255]$hgevolve--rev89e4f7e8feb5cannotsolveinstabilityof89e4f7e8feb5,skippingCheckthatuncommitrespectstheallowunstableoptionWithonlycreatemarkerswecanonlyuncommitonahead$cat>>$HGRCPATH<<EOF>[experimental]>evolution=createmarkers,allnewcommands>EOF$hgup274b6cd0c101^0filesupdated,0filesmerged,2filesremoved,0filesunresolved$hguncommit--allabort:uncommitwillorphan4descendants(see'hg help evolution.instability')[255]$hgup274b6cd0c1012filesupdated,0filesmerged,0filesremoved,0filesunresolved$hguncommit--allnewchangesetisempty(use'hg prune .'toremoveit)$glog-r"0cf3707e8971::"@23:0ef9ff75f8e2@default(draft)addj1||*21:89e4f7e8feb5@default(draft)addj3|||*20:4cd61236beca@default(draft)addj2|||x19:0fd8bfb02de4@default(draft)addj1|/|o18:0c049e4e5422@default(draft)addgh||o|17:98e171e2f272@default(draft)addgg|/o16:0cf3707e8971@default(draft)a3|~Checkthatprunerespectstheallowunstableoption$hgup-C.0filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgup0c049e4e54221filesupdated,0filesmerged,1filesremoved,0filesunresolved$hgevolve--allnothingtoevolveoncurrentworkingcopyparent(2otherorphanintherepository,doyouwant--anyor--rev)[2]$hgevolve--all--anymove:[20]addj2atop:[23]addj1move:[21]addj3$glog-r"0cf3707e8971::"o25:0d9203b74542@default(draft)addj3|o24:f1b85956c48c@default(draft)addj2|o23:0ef9ff75f8e2@default(draft)addj1||@18:0c049e4e5422@default(draft)addgh||o|17:98e171e2f272@default(draft)addgg|/o16:0cf3707e8971@default(draft)a3|~$hgup98e171e2f2721filesupdated,0filesmerged,1filesremoved,0filesunresolved$mkcommitc5_creatednewhead$hgprune'0ef9ff75f8e2 + f1b85956c48c'abort:prunewillorphan1descendants(see'hg help evolution.instability')[255]$hgprune'98e171e2f272::0d9203b74542'abort:prunewillorphan1descendants(see'hg help evolution.instability')[255]$hgprune'0ef9ff75f8e2::'3changesetspruned$glog-r"0cf3707e8971::"@26:4c6f6f6d1976@default(draft)addc5_||o18:0c049e4e5422@default(draft)addgh||o|17:98e171e2f272@default(draft)addgg|/o16:0cf3707e8971@default(draft)a3|~Checkthatfoldrespectstheallowunstableoption(mostofthishasbeenmovedtotest-fold.t)$hgup0cf3707e89710filesupdated,0filesmerged,2filesremoved,0filesunresolved$mkcommitunstableifparentisfoldedcreatednewhead$glog-r"0cf3707e8971::"@27:2d1b55e10be9@default(draft)addunstableifparentisfolded||o26:4c6f6f6d1976@default(draft)addc5_||+---o18:0c049e4e5422@default(draft)addgh|||o17:98e171e2f272@default(draft)addgg|/o16:0cf3707e8971@default(draft)a3|~$hgfold--exact"98e171e2f272::"2changesetsfoldedCheckthatdirstatechangesarekeptatfailureforconflicts(issue4966)----------------------------------------$cat>>$HGRCPATH<<EOF>[experimental]>evolution=all>EOF$echo"will be amended">newfile$hgcommit-m"will be amended"$hgparents29:willbeamended-test$echo"will be evolved safely">>a$hgcommit-m"will be evolved safely"$echo"will cause conflict at evolve">newfile$echo"newly added">newlyadded$hgaddnewlyadded$hgcommit-m"will cause conflict at evolve"$glog-r"0cf3707e8971::"@31:5be050657ca5@default(draft)willcauseconflictatevolve|o30:748126f98ff1@default(draft)willbeevolvedsafely|o29:4548f3a8db2c@default(draft)willbeamended||o28:92ca6f3984de@default(draft)addgg||o|27:2d1b55e10be9@default(draft)addunstableifparentisfolded|/|o18:0c049e4e5422@default(draft)addgh|/o16:0cf3707e8971@default(draft)a3|~$hgupdate-q-r"desc('will be amended')"$echo"amended">newfile$hgamend-m"amended"2neworphanchangesets$hgevolve--rev"desc('will be amended')::"move:[30]willbeevolvedsafelyatop:[32]amendedmove:[31]willcauseconflictatevolvemergingnewfilewarning:conflictswhilemergingnewfile!(edit,thenuse'hg resolve --mark')unresolvedmergeconflicts(see'hg help evolve.interrupted')[1]$glog-r"desc('add unstableifparentisfolded')::"--hidden@33:b9acdb1af6d5@default(draft)willbeevolvedsafely|o32:6ec468e4cb98@default(draft)amended||@31:5be050657ca5@default(draft)willcauseconflictatevolve|||x30:748126f98ff1@default(draft)willbeevolvedsafely|||x29:4548f3a8db2c@default(draft)willbeamended|/o27:2d1b55e10be9@default(draft)addunstableifparentisfolded|~$hgstatusnewlyaddedAnewlyadded$cd..Testingbookmarkmovementwhen`hgevolve`updatestosuccessor(issue5923)$hginitissue5923$cdissue5923$echofoo>a$hgci-Aqm"added a"$hglog-GT"{rev}:{node|short}{desc}{bookmarks}\n"@0:f7ad41964313addeda$echobar>>a$hgamend$hglog-GT"{rev}:{node|short}{desc}{bookmarks}\n"@1:ab832e43dd5aaddeda$hgupf7ad41964313--hidden1filesupdated,0filesmerged,0filesremoved,0filesunresolvedupdatedtohiddenchangesetf7ad41964313(hiddenrevision'f7ad41964313'wasrewrittenas:ab832e43dd5a)workingdirectoryparentisobsolete!(f7ad41964313)(use'hg evolve'toupdatetoitssuccessor:ab832e43dd5a)$hgbookmarkbook$hgevolveupdate:[1]addeda1filesupdated,0filesmerged,0filesremoved,0filesunresolvedworkingdirectoryisnowatab832e43dd5a$hglog-GT"{rev}:{node|short}{desc} ({bookmarks})\n"--hidden@1:ab832e43dd5aaddeda(book)x0:f7ad41964313addeda()$cd..