annotate tests/test-sidedata.t @ 47220:4039cad0d8ff

config: drop the `format.exp-revlogv2.2` option It is oddly named and not used at all. The one used by the code is still `experimental.revlogv2`. So we drop that one option for consistency. We move associate documentation to the actual option. Differential Revision: https://phab.mercurial-scm.org/D10611
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:28:47 +0200
parents cc3ad5c3af3b
children 0dedd3d063b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43031
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
1 ==========================================================
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
2 Test file dedicated to checking side-data related behavior
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
3 ==========================================================
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
4
43040
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
5 Check data can be written/read from sidedata
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
6 ============================================
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
7
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
8 $ cat << EOF >> $HGRCPATH
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
9 > [extensions]
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
10 > testsidedata=$TESTDIR/testlib/ext-sidedata.py
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
11 > EOF
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
12
43167
bca9d1a6c4c5 sidedata: rename the configuration option to `exp-use-side-data`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43138
diff changeset
13 $ hg init test-sidedata --config format.exp-use-side-data=yes
43040
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
14 $ cd test-sidedata
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
15 $ echo aaa > a
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
16 $ hg add a
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
17 $ hg commit -m a --traceback
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
18 $ echo aaa > b
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
19 $ hg add b
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
20 $ hg commit -m b
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
21 $ echo xxx >> a
ba4072c0a911 sidedata: test we can successfully write sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43031
diff changeset
22 $ hg commit -m aa
43031
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
23
43041
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
24 $ hg debugsidedata -c 0
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
25 2 sidedata entries
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
26 entry-0001 size 4
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
27 entry-0002 size 32
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
28 $ hg debugsidedata -c 1 -v
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
29 2 sidedata entries
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
30 entry-0001 size 4
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
31 '\x00\x00\x006'
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
32 entry-0002 size 32
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
33 '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde'
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
34 $ hg debugsidedata -m 2
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
35 2 sidedata entries
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
36 entry-0001 size 4
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
37 entry-0002 size 32
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
38 $ hg debugsidedata a 1
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
39 2 sidedata entries
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
40 entry-0001 size 4
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
41 entry-0002 size 32
559ac8411f12 sidedata: add a debugsidedata command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43040
diff changeset
42
43031
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
43 Check upgrade behavior
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
44 ======================
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
45
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
46 Right now, sidedata has not upgrade support
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
47
43134
75ad8af9c95e upgrade: allow upgrade to repository using sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43041
diff changeset
48 Check that we can upgrade to sidedata
75ad8af9c95e upgrade: allow upgrade to repository using sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43041
diff changeset
49 -------------------------------------
43031
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
50
43167
bca9d1a6c4c5 sidedata: rename the configuration option to `exp-use-side-data`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43138
diff changeset
51 $ hg init up-no-side-data --config format.exp-use-side-data=no
43031
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
52 $ hg debugformat -v -R up-no-side-data
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
53 format-variant repo config default
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
54 fncache: yes yes yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
55 dotencode: yes yes yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
56 generaldelta: yes yes yes
46334
4b0192f592cf share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46002
diff changeset
57 share-safe: no no no
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
58 sparserevlog: yes yes yes
46884
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
59 persistent-nodemap: no no no (no-rust !)
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
60 persistent-nodemap: yes yes no (rust !)
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
61 copies-sdc: no no no
46705
fd55a9eb1507 revlogv2: allow upgrading to v2
Raphaël Gomès <rgomes@octobus.net>
parents: 46334
diff changeset
62 revlog-v2: no no no
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
63 plain-cl-delta: yes yes yes
46874
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46706
diff changeset
64 compression: zlib zlib zlib (no-zstd !)
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46706
diff changeset
65 compression: zstd zstd zstd (zstd !)
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
66 compression-level: default default default
43167
bca9d1a6c4c5 sidedata: rename the configuration option to `exp-use-side-data`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43138
diff changeset
67 $ hg debugformat -v -R up-no-side-data --config format.exp-use-side-data=yes
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
68 format-variant repo config default
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
69 fncache: yes yes yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
70 dotencode: yes yes yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
71 generaldelta: yes yes yes
46334
4b0192f592cf share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46002
diff changeset
72 share-safe: no no no
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
73 sparserevlog: yes yes yes
46884
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
74 persistent-nodemap: no no no (no-rust !)
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
75 persistent-nodemap: yes yes no (rust !)
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
76 copies-sdc: no no no
46705
fd55a9eb1507 revlogv2: allow upgrading to v2
Raphaël Gomès <rgomes@octobus.net>
parents: 46334
diff changeset
77 revlog-v2: no yes no
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
78 plain-cl-delta: yes yes yes
46874
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46706
diff changeset
79 compression: zlib zlib zlib (no-zstd !)
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46706
diff changeset
80 compression: zstd zstd zstd (zstd !)
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
81 compression-level: default default default
43167
bca9d1a6c4c5 sidedata: rename the configuration option to `exp-use-side-data`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43138
diff changeset
82 $ hg debugupgraderepo -R up-no-side-data --config format.exp-use-side-data=yes > /dev/null
43031
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
83
43135
6e3dc1eff5c7 upgrade: allow for `sidedata` removal
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43134
diff changeset
84 Check that we can downgrade from sidedata
6e3dc1eff5c7 upgrade: allow for `sidedata` removal
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43134
diff changeset
85 -----------------------------------------
43031
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
86
43167
bca9d1a6c4c5 sidedata: rename the configuration option to `exp-use-side-data`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43138
diff changeset
87 $ hg init up-side-data --config format.exp-use-side-data=yes
43031
e16ca9fde7aa upgrade: detect the side-data format variants
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
88 $ hg debugformat -v -R up-side-data
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
89 format-variant repo config default
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
90 fncache: yes yes yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
91 dotencode: yes yes yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
92 generaldelta: yes yes yes
46334
4b0192f592cf share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46002
diff changeset
93 share-safe: no no no
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
94 sparserevlog: yes yes yes
46884
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
95 persistent-nodemap: no no no (no-rust !)
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
96 persistent-nodemap: yes yes no (rust !)
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
97 copies-sdc: no no no
46705
fd55a9eb1507 revlogv2: allow upgrading to v2
Raphaël Gomès <rgomes@octobus.net>
parents: 46334
diff changeset
98 revlog-v2: yes no no
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
99 plain-cl-delta: yes yes yes
46874
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46706
diff changeset
100 compression: zlib zlib zlib (no-zstd !)
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46706
diff changeset
101 compression: zstd zstd zstd (zstd !)
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
102 compression-level: default default default
43167
bca9d1a6c4c5 sidedata: rename the configuration option to `exp-use-side-data`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43138
diff changeset
103 $ hg debugformat -v -R up-side-data --config format.exp-use-side-data=no
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
104 format-variant repo config default
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
105 fncache: yes yes yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
106 dotencode: yes yes yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
107 generaldelta: yes yes yes
46334
4b0192f592cf share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46002
diff changeset
108 share-safe: no no no
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
109 sparserevlog: yes yes yes
46884
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
110 persistent-nodemap: no no no (no-rust !)
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
111 persistent-nodemap: yes yes no (rust !)
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
112 copies-sdc: no no no
46705
fd55a9eb1507 revlogv2: allow upgrading to v2
Raphaël Gomès <rgomes@octobus.net>
parents: 46334
diff changeset
113 revlog-v2: yes no no
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
114 plain-cl-delta: yes yes yes
46874
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46706
diff changeset
115 compression: zlib zlib zlib (no-zstd !)
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46706
diff changeset
116 compression: zstd zstd zstd (zstd !)
44799
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
117 compression-level: default default default
43167
bca9d1a6c4c5 sidedata: rename the configuration option to `exp-use-side-data`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43138
diff changeset
118 $ hg debugupgraderepo -R up-side-data --config format.exp-use-side-data=no > /dev/null