stablesort: record previous segment size in the jump
That was, we can skip over a full jump without walking it. We'll make use of
this in the next changeset.
====================================Testingheadcheckingcode:CaseD-5====================================Mercurialchecksfortheintroductionofnewheadsonpush.Evolutioncomesintoplaytodetectifexistingbranchesontheserverarebeingreplacedbysomeofthenewonewepush.Thiscaseispartofaseriesoftestscheckingthisbehavior.CategoryD:remoteheadis"obs-affected"locally,butresultisnotpartofthepushTestCase5:multi-changesetbranch,splitonmultipleother,(headonitsownnewbranch)..old-state:....*2branch(1changeset,and2changesets)....new-state:....*1newbranchsuperceedingtheheadoftheold-2-changesets-branch,..*1newchangesetsontheold-1-changeset-branchsuperceedingthebaseoftheother....expected-result:....*pushthenewbranchonly->pushdenied..*pushtheexistingbranchonly->pushallowed../!\ Thispushcreateunstability/orphaningontheotherhandandweshould..probablydetect/warnagainsthat.....graph-summary:....Bø⇠◔B'.. | |.. A'◔⇢ø|..||/..C●|.. \|..●$.$TESTDIR/testlib/push-checkheads-util.shTestsetup----------$mkdirD5$cdD5$setupreposcreatingbasicserverandclientrepoupdatingtobranchdefault2filesupdated,0filesmerged,0filesremoved,0filesunresolved$cdserver$mkcommitB0$hgup00filesupdated,0filesmerged,2filesremoved,0filesunresolved$mkcommitC0creatednewhead$cd../client$hgpullpullingfrom$TESTTMP/D5/server(glob)searchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded2changesetswith2changesto2files(+1heads)newchangesetsd73caddc5533:0f88766e02d6(run'hg heads'toseeheads,'hg merge'tomerge)$hgup'desc(C0)'1filesupdated,0filesmerged,1filesremoved,0filesunresolved$mkcommitA1$hgup00filesupdated,0filesmerged,2filesremoved,0filesunresolved$mkcommitB1creatednewhead$hgdebugobsolete`getid"desc(A0)"``getid"desc(A1)"`obsoleted1changesets$hgdebugobsolete`getid"desc(B0)"``getid"desc(B1)"`obsoleted1changesets$hglog-G--hidden@25c56d33e4c4(draft):B1||oa0802eb7fc1b(draft):A1|||o0f88766e02d6(draft):C0|/|xd73caddc5533(draft):B0|||x8aaa48160adc(draft):A0|/o1e4be0697311(public):rootActualtesting--------------$hgpush--rev'desc(B1)'pushingto$TESTTMP/D5/server(glob)searchingforchangesabort:pushcreatesnewremotehead25c56d33e4c4!(mergeorsee'hg help push'fordetailsaboutpushingnewheads)[255]$hgpush--rev'desc(A1)'pushingto$TESTTMP/D5/server(glob)searchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1files1newobsolescencemarkersobsoleted1changesets$cd../..