view tests/test-generaldelta.t @ 22362:c9b32c6a2944

localrepo: make it possible to pass multiple path elements to join and wjoin This makes join and wjoin behave in the same way as os.path.join. That is, it makes it possible to pass more than one path element to them. Note that the first path element is still required, as it was before this patch, and as is the case for os.path.join.
author Angel Ezquerra <angel.ezquerra@gmail.com>
date Thu, 28 Aug 2014 17:23:05 +0200
parents 2c886dedd902
children cc0ff93d0c0c
line wrap: on
line source

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 ..
  >>> import os
  >>> regsize = os.stat("repo/.hg/store/00manifest.i").st_size
  >>> gdsize = os.stat("gdrepo/.hg/store/00manifest.i").st_size
  >>> if regsize < gdsize:
  ...     print 'generaldata increased size of manifest'