Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/src/cmd/hg/tests/test-generaldelta.t

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Check whether size of generaldelta revlog is not bigger than its
regular equivalent. Test would fail if generaldelta was naive
implementation of parentdelta: third manifest revision would be fully
inserted due to big distance from its paren revision (zero).

  $ hg init repo
  $ cd repo
  $ echo foo > foo
  $ echo bar > bar
  $ hg commit -q -Am boo
  $ hg clone --pull . ../gdrepo -q --config format.generaldelta=yes
  $ for r in 1 2 3; do
  >   echo $r > foo
  >   hg commit -q -m $r
  >   hg up -q -r 0
  >   hg pull . -q -r $r -R ../gdrepo
  > done
  $ cd ..
  $ regsize=`du -s -b repo/.hg/store/00manifest.i | cut -f 1`
  $ gdsize=`du -s -b gdrepo/.hg/store/00manifest.i | cut -f 1`
  $ if [ $regsize -lt $gdsize ]; then
  >   echo 'generaldelta increased size of a revlog!'
  > fi

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.