obshistory: use successorsandmarkers() from obsutil, drop local variant
It's been in core since 4.4 and is identical to the version removed by this
patch, except it returns None if ctx is not obsolete.
===============================================================================Teststheresolutionofpubliccontentdivergence:whenmergingleadstopublic===============================================================================Thisfileintendtocoverallthecasespossiblewhenmergingtheotherdivergentcsetintopubliccsetleadstopubliccsetitself.Possiblevariantsare:parent:same/differentrelocation:[no-]conflictmerging:[no-]conflictSetup=====$cat>>$HGRCPATH<<EOF>[alias]>glog=log-GT"{rev}:{node|short}{desc|firstline}\n{phase}{instabilities}\n\n">[phases]>publish=False>[extensions]>rebase=>EOF$echo"evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/">>$HGRCPATHTestingwhensameparent,noconflict:--------------------------------------$hginitpubdiv1$cdpubdiv1$forchinabc;do>echo$ch>$ch;>hgci-Am"added "$ch;>done;addingaaddingbaddingc$hgup.^0filesupdated,0filesmerged,1filesremoved,0filesunresolved$echoch>ch$hgaddch$hgci-m"added ch"creatednewhead$hgup.^0filesupdated,0filesmerged,1filesremoved,0filesunresolved$echoch>ch$hgaddch$hgci-m"added c"creatednewhead$hgglog@4:f7c1071f1e7caddedc|draft||o3:90522bccf499addedch|/draft||o2:155349b645beaddedc|/draft|o1:5f6d8a4bf34aaddedb|draft|o0:9092f1db7931addedadraft$hgprune2-s31changesetspruned$hgprune2-s4--hidden1changesetspruned2newcontent-divergentchangesets$hgphase--public-r4$hgglog@4:f7c1071f1e7caddedc|public||*3:90522bccf499addedch|/draftcontent-divergent|o1:5f6d8a4bf34aaddedb|public|o0:9092f1db7931addedapublic$hgevolve--content-divergent--anymerge:[4]addedcwith:[3]addedchbase:[2]addedc0filesupdated,0filesmerged,0filesremoved,0filesunresolvedotherdivergentchangeset90522bccf499hassamecontentaslocalf7c1071f1e7canddiffersby"description"only,discarding90522bccf499contentdivergenceresolutionbetweenf7c1071f1e7c(public)and90522bccf499hassamecontentasf7c1071f1e7c,discarding90522bccf499$hgevolve-l$hgparchangeset:4:f7c1071f1e7ctag:tipparent:1:5f6d8a4bf34auser:testdate:ThuJan0100:00:001970+0000summary:addedc$cd..Testingwhendifferentparent,noconflict:-------------------------------------------$hginitpubdiv2$cdpubdiv2$forchinabcd;do>echo$ch>$ch;>hgci-Am"added "$ch;>done;addingaaddingbaddingcaddingd$hgup10filesupdated,0filesmerged,2filesremoved,0filesunresolved$echodh>dh$hgadddh$hgci-m"added dh"creatednewhead$hgup21filesupdated,0filesmerged,1filesremoved,0filesunresolved$echodh>dh$hgadddh$hgci-m"added d"creatednewhead$hgglog@5:e800202333a4addedd|draft||o4:5acd58ef5066addeddh||draft||+---o3:9150fe93bec6addedd||draft||o|2:155349b645beaddedc|/draft|o1:5f6d8a4bf34aaddedb|draft|o0:9092f1db7931addedadraft$hgprune3-s41changesetspruned$hgprune3-s5--hidden1changesetspruned2newcontent-divergentchangesets$hgphase--public-r5$hgglog@5:e800202333a4addedd|public||*4:5acd58ef5066addeddh||draftcontent-divergent||o|2:155349b645beaddedc|/public|o1:5f6d8a4bf34aaddedb|public|o0:9092f1db7931addedapublic$hgevolve--content-divergent--anymerge:[5]addeddwith:[4]addeddhbase:[3]addeddrebasing"other"content-divergentchangeset5acd58ef5066on155349b645be0filesupdated,0filesmerged,0filesremoved,0filesunresolvedotherdivergentchangesetae3429430ef1hassamecontentaslocale800202333a4anddiffersby"description"only,discardingae3429430ef1contentdivergenceresolutionbetweene800202333a4(public)andae3429430ef1hassamecontentase800202333a4,discardingae3429430ef1$hgevolve-l$hgparchangeset:5:e800202333a4tag:tipparent:2:155349b645beuser:testdate:ThuJan0100:00:001970+0000summary:addedd$cd..Testingwhensameparent,mergingconflict:-------------------------------------------$hginitpubdiv3$cdpubdiv3$forchinabc;do>echo$ch>$ch;>hgci-Am"added "$ch;>done;addingaaddingbaddingc$hgup.^0filesupdated,0filesmerged,1filesremoved,0filesunresolved$echochconflict>ch$hgaddch$hgci-m"added ch"creatednewhead$hgup.^0filesupdated,0filesmerged,1filesremoved,0filesunresolved$echoch>ch$hgaddch$hgci-m"added c"creatednewhead$hgglog@4:f7c1071f1e7caddedc|draft||o3:229da2719b19addedch|/draft||o2:155349b645beaddedc|/draft|o1:5f6d8a4bf34aaddedb|draft|o0:9092f1db7931addedadraft$hgprune2-s31changesetspruned$hgprune2-s4--hidden1changesetspruned2newcontent-divergentchangesets$hgphase--public-r4$hgglog@4:f7c1071f1e7caddedc|public||*3:229da2719b19addedch|/draftcontent-divergent|o1:5f6d8a4bf34aaddedb|public|o0:9092f1db7931addedapublic$hgevolve--content-divergent--anymerge:[4]addedcwith:[3]addedchbase:[2]addedcmergingchwarning:conflictswhilemergingch!(edit,thenuse'hg resolve --mark')0filesupdated,0filesmerged,0filesremoved,1filesunresolvedunresolvedmergeconflicts(see'hg help evolve.interrupted')[1]$hgdiffdiff-rf7c1071f1e7cch---a/chThuJan0100:00:001970+0000+++b/chThuJan0100:00:001970+0000@@-1,1+1,5@@+<<<<<<<local:f7c1071f1e7c-test:addedcch+=======+chconflict+>>>>>>>other:229da2719b19-test:addedch$echoch>ch$hgres-m(nomoreunresolvedfiles)continue:hgevolve--continue$hgevolve--continueotherdivergentchangeset229da2719b19hassamecontentaslocalf7c1071f1e7canddiffersby"description"only,discarding229da2719b19workingdirectoryisnowatf7c1071f1e7c$hgevolve-l$hgparchangeset:4:f7c1071f1e7ctag:tipparent:1:5f6d8a4bf34auser:testdate:ThuJan0100:00:001970+0000summary:addedc$cd..Testingwhendifferentparent,relocationconflict:---------------------------------------------------$hginitpubdiv4$cdpubdiv4$forchinabcd;do>echo$ch>$ch;>hgci-Am"added "$ch;>done;addingaaddingbaddingcaddingd$hgup10filesupdated,0filesmerged,2filesremoved,0filesunresolved$echodh>dh$echocc>c$hgadddhc$hgci-m"added dh"creatednewhead$hgup21filesupdated,0filesmerged,1filesremoved,0filesunresolved$echodh>dh$hgadddh$hgci-m"added d"creatednewhead$hgglog@5:e800202333a4addedd|draft||o4:f89a8e2f86acaddeddh||draft||+---o3:9150fe93bec6addedd||draft||o|2:155349b645beaddedc|/draft|o1:5f6d8a4bf34aaddedb|draft|o0:9092f1db7931addedadraft$hgprune3-s41changesetspruned$hgprune3-s5--hidden1changesetspruned2newcontent-divergentchangesets$hgphase--public-r5$hgglog@5:e800202333a4addedd|public||*4:f89a8e2f86acaddeddh||draftcontent-divergent||o|2:155349b645beaddedc|/public|o1:5f6d8a4bf34aaddedb|public|o0:9092f1db7931addedapublic$hgevolve--content-divergent--anymerge:[5]addeddwith:[4]addeddhbase:[3]addeddrebasing"other"content-divergentchangesetf89a8e2f86acon155349b645bemergingcwarning:conflictswhilemergingc!(edit,thenuse'hg resolve --mark')unresolvedmergeconflicts(see'hg help evolve.interrupted')[1]$echoc>c$hgres-m(nomoreunresolvedfiles)continue:hgevolve--continue$hgevolve--continueevolving4:f89a8e2f86ac"added dh"0filesupdated,0filesmerged,0filesremoved,0filesunresolvedotherdivergentchangesetbc309da55b88hassamecontentaslocale800202333a4anddiffersby"description"only,discardingbc309da55b88workingdirectoryisnowate800202333a4$hgevolve-l$hgparchangeset:5:e800202333a4tag:tipparent:2:155349b645beuser:testdate:ThuJan0100:00:001970+0000summary:addedd$cd..Testingwhendifferentparent,mergingconflict:------------------------------------------------$hginitpubdiv5$cdpubdiv5$forchinabcd;do>echo$ch>$ch;>hgci-Am"added "$ch;>done;addingaaddingbaddingcaddingd$hgup10filesupdated,0filesmerged,2filesremoved,0filesunresolved$echodhconflict>dh$hgadddh$hgci-m"added dh"creatednewhead$hgup21filesupdated,0filesmerged,1filesremoved,0filesunresolved$echodh>dh$hgadddh$hgci-m"added d"creatednewhead$hgglog@5:e800202333a4addedd|draft||o4:db0b7bba0aaeaddeddh||draft||+---o3:9150fe93bec6addedd||draft||o|2:155349b645beaddedc|/draft|o1:5f6d8a4bf34aaddedb|draft|o0:9092f1db7931addedadraft$hgprune3-s41changesetspruned$hgprune3-s5--hidden1changesetspruned2newcontent-divergentchangesets$hgphase--public-r5$hgglog@5:e800202333a4addedd|public||*4:db0b7bba0aaeaddeddh||draftcontent-divergent||o|2:155349b645beaddedc|/public|o1:5f6d8a4bf34aaddedb|public|o0:9092f1db7931addedapublic$hgevolve--content-divergent--anymerge:[5]addeddwith:[4]addeddhbase:[3]addeddrebasing"other"content-divergentchangesetdb0b7bba0aaeon155349b645bemergingdhwarning:conflictswhilemergingdh!(edit,thenuse'hg resolve --mark')0filesupdated,0filesmerged,0filesremoved,1filesunresolvedunresolvedmergeconflicts(see'hg help evolve.interrupted')[1]$echodh>dh$hgres-m(nomoreunresolvedfiles)continue:hgevolve--continue$hgevolve--continueotherdivergentchangeseta5bbf2042450hassamecontentaslocale800202333a4anddiffersby"description"only,discardinga5bbf2042450workingdirectoryisnowate800202333a4$hgevolve-l$hgparchangeset:5:e800202333a4tag:tipparent:2:155349b645beuser:testdate:ThuJan0100:00:001970+0000summary:addedd$cd..Testingwhendifferentparent,conflictinrelocationandmerging:------------------------------------------------------------------$hginitpubdiv6$cdpubdiv6$forchinabcd;do>echo$ch>$ch;>hgci-Am"added "$ch;>done;addingaaddingbaddingcaddingd$hgup10filesupdated,0filesmerged,2filesremoved,0filesunresolved$echodhconflict>dh$echocc>c$hgadddhc$hgci-m"added dh"creatednewhead$hgup21filesupdated,0filesmerged,1filesremoved,0filesunresolved$echodh>dh$hgadddh$hgci-m"added d"creatednewhead$hgglog@5:e800202333a4addedd|draft||o4:67b19bbd770faddeddh||draft||+---o3:9150fe93bec6addedd||draft||o|2:155349b645beaddedc|/draft|o1:5f6d8a4bf34aaddedb|draft|o0:9092f1db7931addedadraft$hgprune3-s41changesetspruned$hgprune3-s5--hidden1changesetspruned2newcontent-divergentchangesets$hgphase--public-r5$hgglog@5:e800202333a4addedd|public||*4:67b19bbd770faddeddh||draftcontent-divergent||o|2:155349b645beaddedc|/public|o1:5f6d8a4bf34aaddedb|public|o0:9092f1db7931addedapublic$hgevolve--content-divergent--anymerge:[5]addeddwith:[4]addeddhbase:[3]addeddrebasing"other"content-divergentchangeset67b19bbd770fon155349b645bemergingcwarning:conflictswhilemergingc!(edit,thenuse'hg resolve --mark')unresolvedmergeconflicts(see'hg help evolve.interrupted')[1]$echoc>c$hgres-m(nomoreunresolvedfiles)continue:hgevolve--continue$hgevolve--continueevolving4:67b19bbd770f"added dh"mergingdhwarning:conflictswhilemergingdh!(edit,thenuse'hg resolve --mark')0filesupdated,0filesmerged,0filesremoved,1filesunresolvedunresolvedmergeconflicts(see'hg help evolve.interrupted')[1]$echodh>dh$hgres-m(nomoreunresolvedfiles)continue:hgevolve--continue$hgevolve--continueotherdivergentchangeset09054d1f3c97hassamecontentaslocale800202333a4anddiffersby"description"only,discarding09054d1f3c97workingdirectoryisnowate800202333a4$hgevolve-l$hgparchangeset:5:e800202333a4tag:tipparent:2:155349b645beuser:testdate:ThuJan0100:00:001970+0000summary:addedd$cd..Testingthatwewarntheuserforthemetadatabeinglostindivergenceresolution:-----------------------------------------------------------------------------------$hginitpubdiv7$cdpubdiv7$forchinabcd;do>echo$ch>$ch;>hgci-Am"added "$ch;>done;addingaaddingbaddingcaddingd$echodada>d$hgamend$hgup-r"desc('added c')"0filesupdated,0filesmerged,1filesremoved,0filesunresolved$hgbranchfeaturemarkedworkingdirectoryasbranchfeature(branchesarepermanentandglobal,didyouwantabookmark?)$echodada>d$hgci-Am"added d"addingd$hgprune-r"min(desc('added d'))"-s.--hidden1changesetspruned2newcontent-divergentchangesets(publishoneside)$hgphase--public$hgup-r"draft()"0filesupdated,0filesmerged,0filesremoved,0filesunresolved(makeotherdivergentaclosedbranchhead)$hgci--amend-m"closing feature branch"--close-branch$hgglog@6:af442315d198closingfeaturebranch|draftcontent-divergent||o5:497d0d2b90baaddedd|/public|o2:155349b645beaddedc|public|o1:5f6d8a4bf34aaddedb|public|o0:9092f1db7931addedapublicRunautomaticevolution:$hgevolve--content-divergentmerge:[5]addeddwith:[6]closingfeaturebranchbase:[3]addedd0filesupdated,0filesmerged,0filesremoved,0filesunresolvedotherdivergentchangesetaf442315d198isaclosedbranchheadanddiffersfromlocal497d0d2b90baby"branch, description"only,discardingaf442315d198contentdivergenceresolutionbetween497d0d2b90ba(public)andaf442315d198hassamecontentas497d0d2b90ba,discardingaf442315d198workingdirectoryisnowat497d0d2b90ba