evolve: drop the "computing new diff message" for phase-divergence
Future code update will remove this message, dropping it early clarify the
future diff.
testofthesplitcommand-----------------------$.$TESTDIR/testlib/common.sh$cat>>$HGRCPATH<<EOF>[alias]>glog=log-G-T"{rev}:{node|short}{desc|firstline} ({phase})\n">[defaults]>amend=-d"0 0">fold=-d"0 0">split=-d"0 0">amend=-d"0 0">[web]>push_ssl=false>allow_push=*>[phases]>publish=False>[diff]>git=1>unified=0>[commands]>commit.interactive.unified=0>[ui]>interactive=true>[extensions]>evolve=>EOF$mkcommit(){>echo"$1">"$1">hgadd"$1">hgci-m"add $1"$2$3>}Basiccase,splitahead$hginittestsplit$cdtestsplit$mkcommit_a$mkcommit_b$mkcommit_c--userother-test-user$mkcommit_d$echo"change to a">>_a$hgamend$hgdebugobsolete1334a80b33c3f9873edab728fbbcf500eab61d2ed2fe56e71366c2c5376c89960c281395062c06190(ThuJan0100:00:001970+0000){'ef1':'8','operation':'amend','user':'test'}Tocreatecommitswiththenumberofsplit$echo0>num$cat>editor.sh<<'__EOF__'>NUM=$(catnum)>NUM=`expr"$NUM"+1`>echo"$NUM">num>echo"split$NUM">"$1">__EOF__$exportHGEDITOR="\"sh\"\"editor.sh\""$hgsplit<<EOF>y>y>y>n>Y>y>y>EOF1filesupdated,0filesmerged,1filesremoved,0filesunresolvedreverting_aadding_ddiff--gita/_ab/_a1hunks,1lineschangedexaminechangesto'_a'?[Ynesfdaq?]y@@-1,0+2,1@@+changetoarecordchange1/2to'_a'?[Ynesfdaq?]ydiff--gita/_db/_dnewfilemode100644examinechangesto'_d'?[Ynesfdaq?]y@@-0,0+1,1@@+_drecordchange2/2to'_d'?[Ynesfdaq?]ncreatednewheadcontinuesplitting?[Ycdq?]Ydiff--gita/_db/_dnewfilemode100644examinechangesto'_d'?[Ynesfdaq?]y@@-0,0+1,1@@+_drecordthischangeto'_d'?[Ynesfdaq?]ynomorechangetosplit$hgdebugobsolete1334a80b33c3f9873edab728fbbcf500eab61d2ed2fe56e71366c2c5376c89960c281395062c06190(ThuJan0100:00:001970+0000){'ef1':'8','operation':'amend','user':'test'}d2fe56e71366c2c5376c89960c281395062c06192d8abdb827cdf71ca477ef6985d7ceb257c53c1b033b3f5ae73db67c10de938fb6f26b949aaef1720(ThuJan0100:00:001970+0000){'ef1':'13','operation':'split','user':'test'}$hglog-G@changeset:6:033b3f5ae73d|tag:tip|user:test|date:ThuJan0100:00:001970+0000|summary:split2|ochangeset:5:2d8abdb827cd|parent:2:52149352b372|user:test|date:ThuJan0100:00:001970+0000|summary:split1|ochangeset:2:52149352b372|user:other-test-user|date:ThuJan0100:00:001970+0000|summary:add_c|ochangeset:1:37445b16603b|user:test|date:ThuJan0100:00:001970+0000|summary:add_b|ochangeset:0:135f39f4bd78user:testdate:ThuJan0100:00:001970+0000summary:add_aCannotsplitacommitwithuncommittedchanges$hgup"desc(_c)"1filesupdated,0filesmerged,1filesremoved,0filesunresolved$echo"_cd">_c$hgsplitabort:uncommittedchanges[255]$hgup"desc(_c)"-C1filesupdated,0filesmerged,0filesremoved,0filesunresolvedCannotsplitpublicchangeset$hgphase--rev'desc("_a")'0:draft$hgphase--rev'desc("_a")'--public$hgsplit--rev'desc("_a")'abort:cannotsplitpublicchangesets:135f39f4bd78(see'hg help phases'fordetails)[255]$hgphase--rev'desc("_a")'--draft--forceSplitarevisionspecifiedwith-r$echo"change to b">>_b$hgamend-m"_cprim"2neworphanchangesets$hgevolve--allmove:[5]split1atop:[7]_cprimmove:[6]split2workingdirectoryisnowat*(glob)$hglog-r"desc(_cprim)"-v-pchangeset:7:b434287e665cparent:1:37445b16603buser:other-test-userdate:ThuJan0100:00:001970+0000files:_b_cdescription:_cprimdiff--gita/_bb/_b---a/_b+++b/_b@@-1,0+2,1@@+changetobdiff--gita/_cb/_cnewfilemode100644---/dev/null+++b/_c@@-0,0+1,1@@+_c$hgsplit-r"desc(_cprim)"<<EOF>y>y>y>n>c>EOF2filesupdated,0filesmerged,2filesremoved,0filesunresolvedreverting_badding_cdiff--gita/_bb/_b1hunks,1lineschangedexaminechangesto'_b'?[Ynesfdaq?]y@@-1,0+2,1@@+changetobrecordchange1/2to'_b'?[Ynesfdaq?]ydiff--gita/_cb/_cnewfilemode100644examinechangesto'_c'?[Ynesfdaq?]y@@-0,0+1,1@@+_crecordchange2/2to'_c'?[Ynesfdaq?]ncreatednewheadcontinuesplitting?[Ycdq?]c2neworphanchangesetsStopbeforesplittingthecommitcompletelycreatesacommitwithalltheremainingchanges$hgdebugobsolete1334a80b33c3f9873edab728fbbcf500eab61d2ed2fe56e71366c2c5376c89960c281395062c06190(ThuJan0100:00:001970+0000){'ef1':'8','operation':'amend','user':'test'}d2fe56e71366c2c5376c89960c281395062c06192d8abdb827cdf71ca477ef6985d7ceb257c53c1b033b3f5ae73db67c10de938fb6f26b949aaef1720(ThuJan0100:00:001970+0000){'ef1':'13','operation':'split','user':'test'}52149352b372d39b19127d5bd2d488b1b63f9f85b434287e665ce757ee5463a965cb3d119ca9e8930(ThuJan0100:00:001970+0000){'ef1':'9','operation':'amend','user':'test'}2d8abdb827cdf71ca477ef6985d7ceb257c53c1be2b4afde39803bd42bb1374b230fca1b1e8cc8680(ThuJan0100:00:001970+0000){'ef1':'4','operation':'evolve','user':'test'}033b3f5ae73db67c10de938fb6f26b949aaef172bb5e4f6020c74e7961a51fda635ea9df9b04dda80(ThuJan0100:00:001970+0000){'ef1':'4','operation':'evolve','user':'test'}b434287e665ce757ee5463a965cb3d119ca9e893ead2066d1dbf14833fe1069df1b735e4e9468c401188c4216eba37f18a1de6558564601d00ff21430(ThuJan0100:00:001970+0000){'ef1':'13','operation':'split','user':'test'}$hgevolve--allmove:[8]split1atop:[11]split4move:[9]split2workingdirectoryisnowatd74c6715e706$hglog-G@changeset:13:d74c6715e706|tag:tip|user:test|date:ThuJan0100:00:001970+0000|summary:split2|ochangeset:12:3f134f739075|user:test|date:ThuJan0100:00:001970+0000|summary:split1|ochangeset:11:1188c4216eba|user:other-test-user|date:ThuJan0100:00:001970+0000|summary:split4|ochangeset:10:ead2066d1dbf|parent:1:37445b16603b|user:other-test-user|date:ThuJan0100:00:001970+0000|summary:split3|ochangeset:1:37445b16603b|user:test|date:ThuJan0100:00:001970+0000|summary:add_b|ochangeset:0:135f39f4bd78user:testdate:ThuJan0100:00:001970+0000summary:add_aSplitshouldmovebookmarksonthelastsplitsuccessorandpreservetheactivebookmarkasactive$hgbookbookA$hgbookbookB$echo"changetofilea">_a$hgamend$hgbookbookA14:7a6b35779b85*bookB14:7a6b35779b85$hglog-G-r"3f134f739075::"@changeset:14:7a6b35779b85|bookmark:bookA|bookmark:bookB|tag:tip|parent:12:3f134f739075|user:test|date:ThuJan0100:00:001970+0000|summary:split2|ochangeset:12:3f134f739075|user:test~date:ThuJan0100:00:001970+0000summary:split1$hgsplit--uservictor<<EOF>y>y>n>c>EOF(leavingbookmarkbookB)1filesupdated,0filesmerged,1filesremoved,0filesunresolvedreverting_aadding_ddiff--gita/_ab/_a1hunks,2lineschangedexaminechangesto'_a'?[Ynesfdaq?]y@@-1,2+1,1@@-_a-changetoa+changetofilearecordchange1/2to'_a'?[Ynesfdaq?]ydiff--gita/_db/_dnewfilemode100644examinechangesto'_d'?[Ynesfdaq?]ncreatednewheadcontinuesplitting?[Ycdq?]c$hglog-G-r"3f134f739075::"@changeset:16:452a26648478|bookmark:bookA|bookmark:bookB|tag:tip|user:victor|date:ThuJan0100:00:001970+0000|summary:split6|ochangeset:15:1315679b77dc|parent:12:3f134f739075|user:victor|date:ThuJan0100:00:001970+0000|summary:split5|ochangeset:12:3f134f739075|user:test~date:ThuJan0100:00:001970+0000summary:split1$hgbookbookA16:452a26648478*bookB16:452a26648478Lastestrevisionisselectedifmultiplearegivento-r$hgsplit-r"desc(_a)::"(leavingbookmarkbookB)0filesupdated,0filesmerged,1filesremoved,0filesunresolvedadding_ddiff--gita/_db/_dnewfilemode100644examinechangesto'_d'?[Ynesfdaq?]abort:responseexpected[255]Cannotsplitacommitthatisnotaheadifinstabilityisnotallowed$cat>>$HGRCPATH<<EOF>[experimental]>evolution=createmarkers>evolutioncommands=split>EOF$hgsplit-r"desc(split3)"abort:splitwillorphan4descendants(see'hg help evolution.instability')[255]Changingevolutionleveltocreatemarkers$echo"[experimental]">>$HGRCPATH$echo"evolution=createmarkers">>$HGRCPATHRunningsplitwithoutanyrevisionoperatesontheparentoftheworkingcopy$hgsplit<<EOF>q>EOF0filesupdated,0filesmerged,1filesremoved,0filesunresolvedadding_ddiff--gita/_db/_dnewfilemode100644examinechangesto'_d'?[Ynesfdaq?]qabort:userquit[255]Runningsplitwithtiprevision,specifiedasunnamedargument$hgsplit--rev.<<EOF>q>EOF0filesupdated,0filesmerged,1filesremoved,0filesunresolvedadding_ddiff--gita/_db/_dnewfilemode100644examinechangesto'_d'?[Ynesfdaq?]qabort:userquit[255]Runningsplitwithbothunnamedandnamedrevisionargumentsshowsanerrormsg$hgsplit--rev.--rev.^<<EOF>q>EOFabort:morethanonerevsetisgiven[255]Splitemptycommit(issue5191)$hgbranchnew-branchmarkedworkingdirectoryasbranchnew-branch(branchesarepermanentandglobal,didyouwantabookmark?)$hgcommit-m"empty"$hgsplit0filesupdated,0filesmerged,0filesremoved,0filesunresolvedCheckthatsplitkeepstherighttopic$hgup-rtip0filesupdated,0filesmerged,0filesremoved,0filesunresolvedAddtopictothehgrc$echo"[extensions]">>$HGRCPATH$echo"topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic/">>$HGRCPATH$hgtopicmytopicmarkedworkingdirectoryastopic:mytopic$echobabar>babar$echoceleste>celeste$hgaddbabarceleste$hgcommit-m"Works on mytopic"babarceleste--uservictoractivetopic'mytopic'grewitsfirstchangeset(see'hg help topics'formoreinformation)$hglog-r.changeset:18:26f72cfaf036branch:new-branchtag:tiptopic:mytopicuser:victordate:ThuJan0100:00:001970+0000summary:Worksonmytopic$hgsummaryparent:18:26f72cfaf036tipWorksonmytopicbranch:new-branchcommit:2unknown(clean)update:(current)phases:9drafttopic:mytopicSplitit$hgsplit-U<<EOF>Y>Y>N>c>Y>Y>EOF0filesupdated,0filesmerged,2filesremoved,0filesunresolvedaddingbabaraddingcelestediff--gita/babarb/babarnewfilemode100644examinechangesto'babar'?[Ynesfdaq?]Y@@-0,0+1,1@@+babarrecordchange1/2to'babar'?[Ynesfdaq?]Ydiff--gita/celesteb/celestenewfilemode100644examinechangesto'celeste'?[Ynesfdaq?]Ncontinuesplitting?[Ycdq?]cCheckthatthetopicisstillhere$hglog-r"tip~1::"changeset:19:addcf498f19ebranch:new-branchtopic:mytopicparent:17:fdb403258632user:testdate:ThuJan0100:00:001970+0000summary:split7changeset:20:2532b288af61branch:new-branchtag:tiptopic:mytopicuser:testdate:ThuJan0100:00:001970+0000summary:split8$hgtopic*mytopic(2changesets)Testsplitthefirstcommitonabranch$touchSPLIT1SPLIT2$hgaddSPLIT1SPLIT2$hgbranchanother-branchmarkedworkingdirectoryasbranchanother-branch$hgcommit-m"To be splitted"$hglog-G-l3@changeset:21:8dad923bdb9b|branch:another-branch|tag:tip|topic:mytopic|user:test|date:ThuJan0100:00:001970+0000|summary:Tobesplitted|ochangeset:20:2532b288af61|branch:new-branch|topic:mytopic|user:test|date:ThuJan0100:00:001970+0000|summary:split8|ochangeset:19:addcf498f19e|branch:new-branch~topic:mytopicparent:17:fdb403258632user:testdate:ThuJan0100:00:001970+0000summary:split7$hgexport. # HG changeset patch # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 # Branch another-branch # Node ID 8dad923bdb9bb3b99291caa5baeb03bbc30dfd33 # Parent 2532b288af61bd19239a95ae2a3ecb9b0ad4b8e1 # EXP-Topic mytopicTobesplitteddiff--gita/SPLIT1b/SPLIT1newfilemode100644diff--gita/SPLIT2b/SPLIT2newfilemode100644$hgsplit-r.<<EOF>Y>N>Y>Y>EOF0filesupdated,0filesmerged,2filesremoved,0filesunresolvedaddingSPLIT1addingSPLIT2diff--gita/SPLIT1b/SPLIT1newfilemode100644examinechangesto'SPLIT1'?[Ynesfdaq?]Ydiff--gita/SPLIT2b/SPLIT2newfilemode100644examinechangesto'SPLIT2'?[Ynesfdaq?]Ncontinuesplitting?[Ycdq?]Ydiff--gita/SPLIT2b/SPLIT2newfilemode100644examinechangesto'SPLIT2'?[Ynesfdaq?]YnomorechangetosplitThesplittedchangesetsshouldbeonthe'another-branch'$hglog-G-l3@changeset:23:56a59faa8af7|branch:another-branch|tag:tip|topic:mytopic|user:test|date:ThuJan0100:00:001970+0000|summary:split10|ochangeset:22:75695e3e2300|branch:another-branch|topic:mytopic|parent:20:2532b288af61|user:test|date:ThuJan0100:00:001970+0000|summary:split9|ochangeset:20:2532b288af61|branch:new-branch~topic:mytopicuser:testdate:ThuJan0100:00:001970+0000summary:split8Trysplittingthefirstchangesetofabranchthencancel$hgbranchyet-another-branchmarkedworkingdirectoryasbranchyet-another-branch$touchSPLIT3SPLIT4$hgaddSPLIT3SPLIT4$hgcommit-m"To be splitted again"$hgup"tip~1"0filesupdated,0filesmerged,2filesremoved,0filesunresolved$hglog-G-l2ochangeset:24:b1020d17c364|branch:yet-another-branch|tag:tip|topic:mytopic|user:test|date:ThuJan0100:00:001970+0000|summary:Tobesplittedagain|@changeset:23:56a59faa8af7|branch:another-branch~topic:mytopicuser:testdate:ThuJan0100:00:001970+0000summary:split10$hgbranchanother-branch$hgsplit-rtip<<EOF>Y>q>EOF0filesupdated,0filesmerged,0filesremoved,0filesunresolvedaddingSPLIT3addingSPLIT4diff--gita/SPLIT3b/SPLIT3newfilemode100644examinechangesto'SPLIT3'?[Ynesfdaq?]Ydiff--gita/SPLIT4b/SPLIT4newfilemode100644examinechangesto'SPLIT4'?[Ynesfdaq?]qabort:userquit[255]$hgbranchanother-branch$hglog-G-l2ochangeset:24:b1020d17c364|branch:yet-another-branch|tag:tip|topic:mytopic|user:test|date:ThuJan0100:00:001970+0000|summary:Tobesplittedagain|@changeset:23:56a59faa8af7|branch:another-branch~topic:mytopicuser:testdate:ThuJan0100:00:001970+0000summary:split10Checkpromptoptions--------------------Lookatthehelp(bothrecordandsplithelps)$hgsplit-rtip<<EOF>Y>?>d>?>q>EOF0filesupdated,0filesmerged,0filesremoved,0filesunresolvedaddingSPLIT3addingSPLIT4diff--gita/SPLIT3b/SPLIT3newfilemode100644examinechangesto'SPLIT3'?[Ynesfdaq?]Ydiff--gita/SPLIT4b/SPLIT4newfilemode100644examinechangesto'SPLIT4'?[Ynesfdaq?]?y-yes,recordthischangen-no,skipthischangee-editthischangemanuallys-skipremainingchangestothisfilef-recordremainingchangestothisfiled-done,skipremainingchangesandfilesa-recordallchangestoallremainingfilesq-quit,recordingnochanges?-?(displayhelp)examinechangesto'SPLIT4'?[Ynesfdaq?]dcontinuesplitting?[Ycdq?]?y-yes,continueselectionc-commit,selectallremainingchangesd-discard,discardremainingchangesq-quit,abortthesplit?-?,displayhelpcontinuesplitting?[Ycdq?]qtransactionabort!rollbackcompletedabort:userquit[255]discardsomeofchangesetduringsplit$cat>>$HGRCPATH<<EOF>[experimental]>evolution=all>evolutioncommands=>EOF$hgexport # HG changeset patch # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 # Branch another-branch # Node ID 56a59faa8af70dc104faa905231731ffece5f18a # Parent 75695e3e2300d316cc515c4c25bab8b825ef1433 # EXP-Topic mytopicsplit10diff--gita/SPLIT2b/SPLIT2newfilemode100644$hgaddSPLIT3$hgamend1neworphanchangesets$hgexport # HG changeset patch # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 # Branch another-branch # Node ID 3acb634dc68ddb4dea75a9cee982955bc1f3e8cd # Parent 75695e3e2300d316cc515c4c25bab8b825ef1433 # EXP-Topic mytopicsplit10diff--gita/SPLIT2b/SPLIT2newfilemode100644diff--gita/SPLIT3b/SPLIT3newfilemode100644$hgsplit<<EOF>Y>d>d>EOF0filesupdated,0filesmerged,2filesremoved,0filesunresolvedaddingSPLIT2addingSPLIT3diff--gita/SPLIT2b/SPLIT2newfilemode100644examinechangesto'SPLIT2'?[Ynesfdaq?]Ydiff--gita/SPLIT3b/SPLIT3newfilemode100644examinechangesto'SPLIT3'?[Ynesfdaq?]dcontinuesplitting?[Ycdq?]ddiscardingremainingchangesforgettingSPLIT3$hgexport # HG changeset patch # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 # Branch another-branch # Node ID db690d5566962489d65945c90b468b44e0b1507a # Parent 75695e3e2300d316cc515c4c25bab8b825ef1433 # EXP-Topic mytopicsplit12diff--gita/SPLIT2b/SPLIT2newfilemode100644$hgstatus?SPLIT3?SPLIT4?editor.sh?numTestrestrictingthesplittoasubsetoffiles-----------------------------------------------$hgaddSPLIT3SPLIT4$hgamendOnlyrunon2files(remainingchangesgatheredwithunmatchedone)$hgsplitSPLIT2SPLIT3<<EOF>y>n>c>EOF0filesupdated,0filesmerged,3filesremoved,0filesunresolvedaddingSPLIT2addingSPLIT3addingSPLIT4diff--gita/SPLIT2b/SPLIT2newfilemode100644examinechangesto'SPLIT2'?[Ynesfdaq?]ydiff--gita/SPLIT3b/SPLIT3newfilemode100644examinechangesto'SPLIT3'?[Ynesfdaq?]ncontinuesplitting?[Ycdq?]c$hgstatus--change'.~1'ASPLIT2$hgstatus--change'.'ASPLIT3ASPLIT4$hgfold--from'.~1'2changesetsfolded0filesupdated,0filesmerged,0filesremoved,0filesunresolved(noremainingchanges)$hgsplitSPLIT2SPLIT3<<EOF>y>n>y>y>EOF0filesupdated,0filesmerged,3filesremoved,0filesunresolvedaddingSPLIT2addingSPLIT3addingSPLIT4diff--gita/SPLIT2b/SPLIT2newfilemode100644examinechangesto'SPLIT2'?[Ynesfdaq?]ydiff--gita/SPLIT3b/SPLIT3newfilemode100644examinechangesto'SPLIT3'?[Ynesfdaq?]ncontinuesplitting?[Ycdq?]ydiff--gita/SPLIT3b/SPLIT3newfilemode100644examinechangesto'SPLIT3'?[Ynesfdaq?]ynomorechangetosplit$hgstatus--change'.~2'ASPLIT2$hgstatus--change'.~1'ASPLIT3$hgstatus--change'.'ASPLIT4$hgfold--from'.~2'3changesetsfolded0filesupdated,0filesmerged,0filesremoved,0filesunresolved(onlyallmatchedselected)$hgsplitSPLIT2SPLIT3<<EOF>y>y>EOF0filesupdated,0filesmerged,3filesremoved,0filesunresolvedaddingSPLIT2addingSPLIT3addingSPLIT4diff--gita/SPLIT2b/SPLIT2newfilemode100644examinechangesto'SPLIT2'?[Ynesfdaq?]ydiff--gita/SPLIT3b/SPLIT3newfilemode100644examinechangesto'SPLIT3'?[Ynesfdaq?]ynomorechangetosplit$hgstatus--change'.~1'ASPLIT2ASPLIT3$hgstatus--change'.'ASPLIT4$hgfold--from'.~1'2changesetsfolded0filesupdated,0filesmerged,0filesremoved,0filesunresolvedCheckthatdiscarddoesnotalterunmatchedfiles$hgsplitSPLIT2SPLIT3<<EOF>y>n>d>EOF0filesupdated,0filesmerged,3filesremoved,0filesunresolvedaddingSPLIT2addingSPLIT3addingSPLIT4diff--gita/SPLIT2b/SPLIT2newfilemode100644examinechangesto'SPLIT2'?[Ynesfdaq?]ydiff--gita/SPLIT3b/SPLIT3newfilemode100644examinechangesto'SPLIT3'?[Ynesfdaq?]ncontinuesplitting?[Ycdq?]ddiscardingremainingchangesnomorechangetosplit$hgstatus--change'.~1'ASPLIT2$hgstatus--change'.'ASPLIT4$hgfold--from'.~1'2changesetsfolded0filesupdated,0filesmerged,0filesremoved,0filesunresolved$hgaddSPLIT3$hgamendNoninterractiverun--------------------Nopatterns$hgsplit--no-interactive0filesupdated,0filesmerged,3filesremoved,0filesunresolvedaddingSPLIT2addingSPLIT3addingSPLIT4abort:nofilesofdirectoriesspecified(doyouwant--interactive)[255]Selectingunrelatedfile(shouldweabort?)$hgsplit--no-interactiveSPLIT10filesupdated,0filesmerged,3filesremoved,0filesunresolvedaddingSPLIT2addingSPLIT3addingSPLIT4nomorechangetosplit$hgstatus--change'.'ASPLIT2ASPLIT3ASPLIT4Selectingonefile$hgsplit--no-interactiveSPLIT20filesupdated,0filesmerged,3filesremoved,0filesunresolvedaddingSPLIT2addingSPLIT3addingSPLIT4nomorechangetosplit$hgstatus--change'.~1'ASPLIT2$hgstatus--change'.'ASPLIT3ASPLIT4$hgfold--from'.~1'2changesetsfolded0filesupdated,0filesmerged,0filesremoved,0filesunresolvedSelectingtwofiles$hgsplit--no-interactiveSPLIT2SPLIT30filesupdated,0filesmerged,3filesremoved,0filesunresolvedaddingSPLIT2addingSPLIT3addingSPLIT4nomorechangetosplit$hgstatus--change'.~1'ASPLIT2ASPLIT3$hgstatus--change'.'ASPLIT4$hgfold--from'.~1'2changesetsfolded0filesupdated,0filesmerged,0filesremoved,0filesunresolvedSelectingallfiles(shouldweabort?)$hgsplit--no-interactive.0filesupdated,0filesmerged,3filesremoved,0filesunresolvedaddingSPLIT2addingSPLIT3addingSPLIT4nomorechangetosplit$hgstatus--change'.'ASPLIT2ASPLIT3ASPLIT4$cd..Testingthat`hgevolve`chooserightdestinationaftersplit&&prune(issue5686)--------------------------------------------------------------------------------Preparetherepository:$hginitissue5686$cdissue5686$echop>p$hgci-Ampaddingp$forchinab;doecho$ch>$ch;done;$hgci-Am"added a and b"addingaaddingb$echoc>c$hgci-Amcaddingc$hgglog@2:ab6ca3ebca74c(draft)|o1:79f47e067e66addedaandb(draft)|o0:a5a1faba8d26p(draft)Tocreatecommitswiththenumberofsplit$echo0>num$cat>editor.sh<<'__EOF__'>NUM=$(catnum)>NUM=`expr"$NUM"+1`>echo"$NUM">num>echo"split$NUM">"$1">__EOF__$exportHGEDITOR="\"sh\"\"editor.sh\""Splittingtherevision1toSPLIT1andSPLIT2whichcontainsfileaandbresp:$hgsplit-r1<<EOF>y>y>n>y>y>y>EOF0filesupdated,0filesmerged,3filesremoved,0filesunresolvedaddingaaddingbdiff--gita/ab/anewfilemode100644examinechangesto'a'?[Ynesfdaq?]y@@-0,0+1,1@@+arecordchange1/2to'a'?[Ynesfdaq?]ydiff--gita/bb/bnewfilemode100644examinechangesto'b'?[Ynesfdaq?]ncreatednewhead(considerusingtopicforlightweightbranches.See'hg help topic')continuesplitting?[Ycdq?]ydiff--gita/bb/bnewfilemode100644examinechangesto'b'?[Ynesfdaq?]y@@-0,0+1,1@@+brecordthischangeto'b'?[Ynesfdaq?]ynomorechangetosplit1neworphanchangesets$hgglog-p@4:5cf253fa63fasplit2(draft)|diff--gita/bb/b|newfilemode100644|---/dev/null|+++b/b|@@-0,0+1,1@@|+b|o3:88437e073cd4split1(draft)|diff--gita/ab/a|newfilemode100644|---/dev/null|+++b/a|@@-0,0+1,1@@|+a||*2:ab6ca3ebca74c(draft)||diff--gita/cb/c||newfilemode100644||---/dev/null||+++b/c||@@-0,0+1,1@@||+c|||x1:79f47e067e66addedaandb(draft)|/diff--gita/ab/a|newfilemode100644|---/dev/null|+++b/a|@@-0,0+1,1@@|+a|diff--gita/bb/b|newfilemode100644|---/dev/null|+++b/b|@@-0,0+1,1@@|+b|o0:a5a1faba8d26p(draft)diff--gita/pb/pnewfilemode100644---/dev/null+++b/p@@-0,0+1,1@@+pNowifweprunerevision4theexpecteddestinationoforphancset2is3.Letscheckevolvedoesasexpected:Pruningrevision4(currentone):$hgprune.0filesupdated,0filesmerged,1filesremoved,0filesunresolvedworkingdirectorynowat88437e073cd41changesetspruned$hgevolve-r2move:[2]catop:[3]split1workingdirectoryisnowat21a63bd6ee88$hgglog@5:21a63bd6ee88c(draft)|o3:88437e073cd4split1(draft)|o0:a5a1faba8d26p(draft)$cd..Testingthat`hgsplit`preservethephaseofsplittingcset(issue6048)-----------------------------------------------------------------------Preparetherepository:$hginitissue6048$cdissue6048$echoa>a$hgci-Am"added a"addinga$echob>b$echoc>c$hgaddbc$hgci-m"added b c"--secret$hgglog-l1-p--git@1:12e9cc39ba19addedbc(secret)|diff--gita/bb/b~newfilemode100644---/dev/null+++b/b@@-0,0+1,1@@+bdiff--gita/cb/cnewfilemode100644---/dev/null+++b/c@@-0,0+1,1@@+cTocreatecommitswiththenumberofsplit$echo0>num$cat>editor.sh<<'__EOF__'>NUM=$(catnum)>NUM=`expr"$NUM"+1`>echo"$NUM">num>echo"split$NUM">"$1">__EOF__$exportHGEDITOR="\"sh\"\"editor.sh\""Splitting$hgsplit-r.<<EOF>y>y>n>c>EOF0filesupdated,0filesmerged,2filesremoved,0filesunresolvedaddingbaddingcdiff--gita/bb/bnewfilemode100644examinechangesto'b'?[Ynesfdaq?]y@@-0,0+1,1@@+brecordchange1/2to'b'?[Ynesfdaq?]ydiff--gita/cb/cnewfilemode100644examinechangesto'c'?[Ynesfdaq?]ncreatednewhead(considerusingtopicforlightweightbranches.See'hg help topic')continuesplitting?[Ycdq?]c$hgglog--git-p@3:1f8c09b13fa2split2(secret)|diff--gita/cb/c|newfilemode100644|---/dev/null|+++b/c|@@-0,0+1,1@@|+c|o2:bcba06966846split1(secret)|diff--gita/bb/b|newfilemode100644|---/dev/null|+++b/b|@@-0,0+1,1@@|+b|o0:9092f1db7931addeda(draft)diff--gita/ab/anewfilemode100644---/dev/null+++b/a@@-0,0+1,1@@+a