Debian Codegraph @

tests/test-revlog-delta-info.t

raw
1 ==================================================
2 Tests for "delta-info" specific feature of revlogs
3 ==================================================
4
5
6
7 $ cat >> $HGRCPATH << EOF
8 > [format]
9 > use-delta-info-flags=yes
10 > sparse-revlog = yes
11 > [storage]
12 > revlog-compression=none
13 > revlog.optimize-delta-parent-choice = yes
14 > revlog.reuse-external-delta-parent = no
15 > revlog.reuse-external-delta = no
16 > revlog.reuse-external-delta-compression = no
17 > delta-fold-estimate = always
18 > EOF
19
20
21 Check that we can control delta-quality storage
22 ===============================================
23
24 $ hg init with-quality
25 $ hg -R with-quality debugformat delta-info
26 format-variant repo
27 delta-info-flags: yes
28 $ cat << EOF >> with-quality/.hg/hgrc
29 > [storage]
30 > revlog.record-delta-quality=yes
31 > EOF
32 $ hg init no-quality
33 $ hg -R no-quality debugformat delta-info
34 format-variant repo
35 delta-info-flags: yes
36 $ cat << EOF >> no-quality/.hg/hgrc
37 > [storage]
38 > revlog.record-delta-quality=no
39 > EOF
40
41
42 quality flag should be stored
43
44 $ "$RUNTESTDIR/seq.py" 100 > with-quality/file
45 $ hg -R with-quality add with-quality/file
46 $ hg -R with-quality commit -m 'base'
47 $ echo foo >> with-quality/file
48 $ hg -R with-quality commit -m 'update'
49 $ hg -R with-quality debugindex file -v -T'{rev} {nodeid} {flags}\n'
50 0 5f215a9162b2 1024
51 1 cdf8529500f8 896
52
53 quality flag should not be stored
54
55 $ "$RUNTESTDIR/seq.py" 100 > no-quality/file
56 $ hg -R no-quality add no-quality/file
57 $ hg -R no-quality commit -m 'base'
58 $ echo foo >> no-quality/file
59 $ hg -R no-quality commit -m 'update'
60 $ hg -R no-quality debugindex file -v -T'{rev} {nodeid} {flags}\n'
61 0 5f215a9162b2 1024
62 1 cdf8529500f8 0