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-2====================================Mercurialchecksfortheintroductionofnewheadsonpush.Evolutioncomesintoplaytodetectifexistingbranchesontheserverarebeingreplacedbysomeofthenewonewepush.Thiscaseispartofaseriesoftestscheckingthisbehavior.CategoryD:remoteheadis"obs-affected"locally,butresultisnotpartofthepushTestCase1:remotebranchhas2changes,headispruned,otherisrewrittenbutresultisnotpushed..old-state:....*1changesetbranch....new-state:....*oldheadispruned..*1newbranchsucceedingtotheotherchangesetintheoldbranch..*1newunrelatedbranch....expected-result:....*pushallowed..*pushingonlytheunrelatedbranch:denied....graph-summary:....B⊗..|..Aø⇠○A'.. |/.. | ◔ C.. |/.. ● $ . $TESTDIR/testlib/push-checkheads-util.shTest setup---------- $ mkdir D2 $ cd D2 $ setuprepos creating basic server and client repo updating to branch default 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd server $ mkcommit B0 $ cd ../client $ hg pull pulling from $TESTTMP/D2/server (glob) searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files new changesets d73caddc5533 (run 'hgupdate' to get a working copy) $ hg up 0 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ mkcommit A1 created new head $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` obsoleted 1 changesets $ hg debugobsolete --record-parents `getid "desc(B0)"` obsoleted 1 changesets $ hg up 0 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ mkcommit C0 created new head $ hg log -G --hidden @ 0f88766e02d6 (draft): C0 | | o f6082bc4ffef (draft): A1 |/ | x d73caddc5533 (draft): B0 | | | x 8aaa48160adc (draft): A0 |/ o 1e4be0697311 (public): rootActual testing-------------- $ hg push --rev 'desc(C0)' pushing to $TESTTMP/D2/server (glob) searching for changes abort: push creates new remote head 0f88766e02d6! (merge or see 'hghelppush' for details about pushing new heads) [255] $ cd ../..