Show More
@@ -1,23 +1,23 | |||||
1 | Check whether size of generaldelta revlog is not bigger than its |
|
1 | Check whether size of generaldelta revlog is not bigger than its | |
2 | regular equivalent. Test would fail if generaldelta was naive |
|
2 | regular equivalent. Test would fail if generaldelta was naive | |
3 | implementation of parentdelta: third manifest revision would be fully |
|
3 | implementation of parentdelta: third manifest revision would be fully | |
4 | inserted due to big distance from its paren revision (zero). |
|
4 | inserted due to big distance from its paren revision (zero). | |
5 |
|
5 | |||
6 | $ hg init repo |
|
6 | $ hg init repo | |
7 | $ cd repo |
|
7 | $ cd repo | |
8 | $ echo foo > foo |
|
8 | $ echo foo > foo | |
9 | $ echo bar > bar |
|
9 | $ echo bar > bar | |
10 | $ hg commit -q -Am boo |
|
10 | $ hg commit -q -Am boo | |
11 | $ hg clone --pull . ../gdrepo -q --config format.generaldelta=yes |
|
11 | $ hg clone --pull . ../gdrepo -q --config format.generaldelta=yes | |
12 | $ for r in 1 2 3; do |
|
12 | $ for r in 1 2 3; do | |
13 | > echo $r > foo |
|
13 | > echo $r > foo | |
14 | > hg commit -q -m $r |
|
14 | > hg commit -q -m $r | |
15 | > hg up -q -r 0 |
|
15 | > hg up -q -r 0 | |
16 | > hg pull . -q -r $r -R ../gdrepo |
|
16 | > hg pull . -q -r $r -R ../gdrepo | |
17 | > done |
|
17 | > done | |
18 | $ cd .. |
|
18 | $ cd .. | |
19 | $ regsize=`du -s -b repo/.hg/store/00manifest.i | cut -f 1` |
|
19 | $ regsize=`du -s -b repo/.hg/store/00manifest.i | cut -f 1` | |
20 | $ gdsize=`du -s -b gdrepo/.hg/store/00manifest.i | cut -f 1` |
|
20 | $ gdsize=`du -s -b gdrepo/.hg/store/00manifest.i | cut -f 1` | |
21 |
$ if |
|
21 | $ if [ $regsize -gt $gdsize ]; then | |
22 | > echo 'generaldelta increased size of a revlog!' |
|
22 | > echo 'generaldelta increased size of a revlog!' | |
23 | > fi |
|
23 | > fi |
General Comments 0
You need to be logged in to leave comments.
Login now