obshistory: omit duplicate notes of obsolescence operations
When folding changesets, it's possible to provide a --note flag to e.g. fold or
prune, which will store a note for that operation. But since there would be
more than one marker for the fold operation and the provided note would be
stored in all of them, _markersnotes() previously would return the same text
message many times. We don't really want to see the same thing over and over,
so let's make notes a set().
This will also make unrelated operations with the same note show the message
only once, which is probably an improvement too.
====================================Testingheadcheckingcode:CaseD-3====================================Mercurialchecksfortheintroductionofnewheadsonpush.Evolutioncomesintoplaytodetectifexistingbranchesontheserverarebeingreplacedbysomeofthenewonewepush.Thiscaseispartofaseriesoftestscheckingthisbehavior.CategoryD:remoteheadis"obs-affected"locally,butresultisnotpartofthepushTestCase3:multi-changesetbranch,splitonmultiplenewothers,onlyoneofthemispushed..old-state:....*2changesetsbranch....new-state:....*2newbranches,eachsupersedingonechangesetintheoldone.....expected-result:....*pushingonlyoneoftheresultingbranch(eitherofthem)..*pushdenied....graph-summary:....B'◔⇢ø B.. | |.. A | ø⇠◔ A'..||/.. \|..●$.$TESTDIR/testlib/push-checkheads-util.shTestsetup----------$mkdirD3$cdD3$setupreposcreatingbasicserverandclientrepoupdatingtobranchdefault2filesupdated,0filesmerged,0filesremoved,0filesunresolved$cdserver$mkcommitB0$hgup00filesupdated,0filesmerged,2filesremoved,0filesunresolved$cd../client$hgpullpullingfrom$TESTTMP/D3/server(glob)searchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1filesnewchangesetsd73caddc5533(1drafts)(run'hg update'togetaworkingcopy)$hgup00filesupdated,0filesmerged,1filesremoved,0filesunresolved$mkcommitA1creatednewhead$hgup'0'0filesupdated,0filesmerged,1filesremoved,0filesunresolved$mkcommitB1creatednewhead$hgdebugobsolete`getid"desc(A0)"``getid"desc(A1)"`1newobsolescencemarkersobsoleted1changesets1neworphanchangesets$hgdebugobsolete`getid"desc(B0)"``getid"desc(B1)"`1newobsolescencemarkersobsoleted1changesets$hglog-G--hidden@25c56d33e4c4(draft):B1||of6082bc4ffef(draft):A1|/|xd73caddc5533(draft):B0|||x8aaa48160adc(draft):A0|/o1e4be0697311(public):rootActualtesting--------------$hgpush--rev'desc(A1)'pushingto$TESTTMP/D3/server(glob)searchingforchangesabort:pushcreatesnewremoteheadf6082bc4ffef!(mergeorsee'hg help push'fordetailsaboutpushingnewheads)[255]$hgpush--rev'desc(B1)'pushingto$TESTTMP/D3/server(glob)searchingforchangesabort:pushcreatesnewremotehead25c56d33e4c4!(mergeorsee'hg help push'fordetailsaboutpushingnewheads)[255]Extratesting-------------Inthiscase,evenabarepushiscreatingmoreheads$hgpushpushingto$TESTTMP/D3/server(glob)searchingforchangesabort:pushcreatesnewremotehead25c56d33e4c4!(mergeorsee'hg help push'fordetailsaboutpushingnewheads)[255]$cd../..