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.
=====================Testworkflowoptions=====================$."$TESTDIR/testlib/topic_setup.sh"$."$TESTDIR/testlib/common.sh"Testsingleheadenforcing-Setup=============================================$hginitsingle-head-server$cdsingle-head-server$cat<<EOF>>.hg/hgrc>[phases]>publish=no>[experimental]>enforce-single-head=yes>evolution=all>EOF$mkcommitROOT$mkcommitc_dA0$cd..$hgclonesingle-head-serverclientupdatingtobranchdefault2filesupdated,0filesmerged,0filesremoved,0filesunresolvedTestsingleheadenforcing-withbranchonly---------------------------------------------$cdclientcontinuingthecurrentdefaultbranch$mkcommitc_dB0$hgpushpushingto$TESTTMP/single-head-serversearchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1filescreatinganewbranch$hgup'desc("ROOT")'0filesupdated,0filesmerged,2filesremoved,0filesunresolved$hgbranchbranch_Amarkedworkingdirectoryasbranchbranch_A(branchesarepermanentandglobal,didyouwantabookmark?)$mkcommitc_aC0$hgpush--new-branchpushingto$TESTTMP/single-head-serversearchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1files(+1heads)Createanewheadonthedefaultbranch$hgup'desc("c_dA0")'1filesupdated,0filesmerged,1filesremoved,0filesunresolved$mkcommitc_dD0creatednewhead$hgpush-fpushingto$TESTTMP/single-head-serversearchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith1changesto1files(+1heads)transactionabort!rollbackcompletedabort:2headson"default"(286d02a6e2a2,9bf953aa81f6)[255]remergethem$hgmerge1filesupdated,0filesmerged,0filesremoved,0filesunresolved(branchmerge,don't forget to commit) $ mkcommit c_dE0 $ hg push pushing to $TESTTMP/single-head-server searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 2 filesTest single head enforcing - with topic---------------------------------------pushing a new topic $ hg topic foo marked working directory as topic: foo $ mkcommit c_dF0 active topic 'foo' grew its first changeset $ hg push pushing to $TESTTMP/single-head-server searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 filespushing a new topo branch (with a topic) $ hg up 'desc("c_dD0")' 0 files updated, 0 files merged, 3 files removed, 0 files unresolved $ hg topic bar marked working directory as topic: bar $ mkcommit c_dG0 active topic 'bar' grew its first changeset $ hg push pushing to $TESTTMP/single-head-server searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads)detect multiple heads on the topic $ mkcommit c_dH0 $ hg push pushing to $TESTTMP/single-head-server searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files $ hg up 'desc("c_dG0")' 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ mkcommit c_dI0 $ hg push -f pushing to $TESTTMP/single-head-server searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) transaction abort! rollback completed abort: 2 heads on "default:bar" (5194f5dcd542, 48a01453c1c5) [255]merge works fine $ hg merge 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don'tforgettocommit)$mkcommitc_dJ0$hgpushpushingto$TESTTMP/single-head-serversearchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded2changesetswith2changesto2filesTestsingleheadenforcing-byphasemove------------------------------------------$hg-R../single-head-serverphase--public'desc("c_dJ0")'abort:2headson"default"(6ed1df20edb1,678bca4de98c)[255]Testsingleheadenforcing-afterrewrite------------------------------------------$hgupfooswitchingtotopicfoo3filesupdated,0filesmerged,4filesremoved,0filesunresolved$hgcommit--amend-mc_dF1$hgpushpushingto$TESTTMP/single-head-serversearchingforchangesaddingchangesetsaddingmanifestsaddingfilechangesadded1changesetswith0changesto1files(+1heads)1newobsolescencemarkersobsoleted1changesets