##// END OF EJS Templates
persistent-nodemap: test that is it present after a clone...
marmoute -
r46865:7488067b default
parent child Browse files
Show More
@@ -1,577 +1,602 b''
1 ===================================
1 ===================================
2 Test the persistent on-disk nodemap
2 Test the persistent on-disk nodemap
3 ===================================
3 ===================================
4
4
5 $ cat << EOF >> $HGRCPATH
5 $ cat << EOF >> $HGRCPATH
6 > [format]
6 > [format]
7 > use-persistent-nodemap=yes
7 > use-persistent-nodemap=yes
8 > [devel]
8 > [devel]
9 > persistent-nodemap=yes
9 > persistent-nodemap=yes
10 > EOF
10 > EOF
11 $ hg init test-repo
11 $ hg init test-repo
12 $ cd test-repo
12 $ cd test-repo
13 $ hg debugformat
13 $ hg debugformat
14 format-variant repo
14 format-variant repo
15 fncache: yes
15 fncache: yes
16 dotencode: yes
16 dotencode: yes
17 generaldelta: yes
17 generaldelta: yes
18 exp-sharesafe: no
18 exp-sharesafe: no
19 sparserevlog: yes
19 sparserevlog: yes
20 sidedata: no
20 sidedata: no
21 persistent-nodemap: yes
21 persistent-nodemap: yes
22 copies-sdc: no
22 copies-sdc: no
23 plain-cl-delta: yes
23 plain-cl-delta: yes
24 compression: zlib
24 compression: zlib
25 compression-level: default
25 compression-level: default
26 $ hg debugbuilddag .+5000 --new-file --config "storage.revlog.nodemap.mode=warn"
26 $ hg debugbuilddag .+5000 --new-file --config "storage.revlog.nodemap.mode=warn"
27 persistent nodemap in strict mode without efficient method (no-rust no-pure !)
27 persistent nodemap in strict mode without efficient method (no-rust no-pure !)
28 persistent nodemap in strict mode without efficient method (no-rust no-pure !)
28 persistent nodemap in strict mode without efficient method (no-rust no-pure !)
29 $ hg debugnodemap --metadata
29 $ hg debugnodemap --metadata
30 uid: ???????????????? (glob)
30 uid: ???????????????? (glob)
31 tip-rev: 5000
31 tip-rev: 5000
32 tip-node: 6b02b8c7b96654c25e86ba69eda198d7e6ad8b3c
32 tip-node: 6b02b8c7b96654c25e86ba69eda198d7e6ad8b3c
33 data-length: 121088
33 data-length: 121088
34 data-unused: 0
34 data-unused: 0
35 data-unused: 0.000%
35 data-unused: 0.000%
36 $ f --size .hg/store/00changelog.n
36 $ f --size .hg/store/00changelog.n
37 .hg/store/00changelog.n: size=70
37 .hg/store/00changelog.n: size=70
38
38
39 Simple lookup works
39 Simple lookup works
40
40
41 $ ANYNODE=`hg log --template '{node|short}\n' --rev tip`
41 $ ANYNODE=`hg log --template '{node|short}\n' --rev tip`
42 $ hg log -r "$ANYNODE" --template '{rev}\n'
42 $ hg log -r "$ANYNODE" --template '{rev}\n'
43 5000
43 5000
44
44
45
45
46 #if rust
46 #if rust
47
47
48 $ f --sha256 .hg/store/00changelog-*.nd
48 $ f --sha256 .hg/store/00changelog-*.nd
49 .hg/store/00changelog-????????????????.nd: sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd (glob)
49 .hg/store/00changelog-????????????????.nd: sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd (glob)
50
50
51 $ f --sha256 .hg/store/00manifest-*.nd
51 $ f --sha256 .hg/store/00manifest-*.nd
52 .hg/store/00manifest-????????????????.nd: sha256=97117b1c064ea2f86664a124589e47db0e254e8d34739b5c5cc5bf31c9da2b51 (glob)
52 .hg/store/00manifest-????????????????.nd: sha256=97117b1c064ea2f86664a124589e47db0e254e8d34739b5c5cc5bf31c9da2b51 (glob)
53 $ hg debugnodemap --dump-new | f --sha256 --size
53 $ hg debugnodemap --dump-new | f --sha256 --size
54 size=121088, sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd
54 size=121088, sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd
55 $ hg debugnodemap --dump-disk | f --sha256 --bytes=256 --hexdump --size
55 $ hg debugnodemap --dump-disk | f --sha256 --bytes=256 --hexdump --size
56 size=121088, sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd
56 size=121088, sha256=2e029d3200bd1a986b32784fc2ef1a3bd60dc331f025718bcf5ff44d93f026fd
57 0000: 00 00 00 91 00 00 00 20 00 00 00 bb 00 00 00 e7 |....... ........|
57 0000: 00 00 00 91 00 00 00 20 00 00 00 bb 00 00 00 e7 |....... ........|
58 0010: 00 00 00 66 00 00 00 a1 00 00 01 13 00 00 01 22 |...f..........."|
58 0010: 00 00 00 66 00 00 00 a1 00 00 01 13 00 00 01 22 |...f..........."|
59 0020: 00 00 00 23 00 00 00 fc 00 00 00 ba 00 00 00 5e |...#...........^|
59 0020: 00 00 00 23 00 00 00 fc 00 00 00 ba 00 00 00 5e |...#...........^|
60 0030: 00 00 00 df 00 00 01 4e 00 00 01 65 00 00 00 ab |.......N...e....|
60 0030: 00 00 00 df 00 00 01 4e 00 00 01 65 00 00 00 ab |.......N...e....|
61 0040: 00 00 00 a9 00 00 00 95 00 00 00 73 00 00 00 38 |...........s...8|
61 0040: 00 00 00 a9 00 00 00 95 00 00 00 73 00 00 00 38 |...........s...8|
62 0050: 00 00 00 cc 00 00 00 92 00 00 00 90 00 00 00 69 |...............i|
62 0050: 00 00 00 cc 00 00 00 92 00 00 00 90 00 00 00 69 |...............i|
63 0060: 00 00 00 ec 00 00 00 8d 00 00 01 4f 00 00 00 12 |...........O....|
63 0060: 00 00 00 ec 00 00 00 8d 00 00 01 4f 00 00 00 12 |...........O....|
64 0070: 00 00 02 0c 00 00 00 77 00 00 00 9c 00 00 00 8f |.......w........|
64 0070: 00 00 02 0c 00 00 00 77 00 00 00 9c 00 00 00 8f |.......w........|
65 0080: 00 00 00 d5 00 00 00 6b 00 00 00 48 00 00 00 b3 |.......k...H....|
65 0080: 00 00 00 d5 00 00 00 6b 00 00 00 48 00 00 00 b3 |.......k...H....|
66 0090: 00 00 00 e5 00 00 00 b5 00 00 00 8e 00 00 00 ad |................|
66 0090: 00 00 00 e5 00 00 00 b5 00 00 00 8e 00 00 00 ad |................|
67 00a0: 00 00 00 7b 00 00 00 7c 00 00 00 0b 00 00 00 2b |...{...|.......+|
67 00a0: 00 00 00 7b 00 00 00 7c 00 00 00 0b 00 00 00 2b |...{...|.......+|
68 00b0: 00 00 00 c6 00 00 00 1e 00 00 01 08 00 00 00 11 |................|
68 00b0: 00 00 00 c6 00 00 00 1e 00 00 01 08 00 00 00 11 |................|
69 00c0: 00 00 01 30 00 00 00 26 00 00 01 9c 00 00 00 35 |...0...&.......5|
69 00c0: 00 00 01 30 00 00 00 26 00 00 01 9c 00 00 00 35 |...0...&.......5|
70 00d0: 00 00 00 b8 00 00 01 31 00 00 00 2c 00 00 00 55 |.......1...,...U|
70 00d0: 00 00 00 b8 00 00 01 31 00 00 00 2c 00 00 00 55 |.......1...,...U|
71 00e0: 00 00 00 8a 00 00 00 9a 00 00 00 0c 00 00 01 1e |................|
71 00e0: 00 00 00 8a 00 00 00 9a 00 00 00 0c 00 00 01 1e |................|
72 00f0: 00 00 00 a4 00 00 00 83 00 00 00 c9 00 00 00 8c |................|
72 00f0: 00 00 00 a4 00 00 00 83 00 00 00 c9 00 00 00 8c |................|
73
73
74
74
75 #else
75 #else
76
76
77 $ f --sha256 .hg/store/00changelog-*.nd
77 $ f --sha256 .hg/store/00changelog-*.nd
78 .hg/store/00changelog-????????????????.nd: sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79 (glob)
78 .hg/store/00changelog-????????????????.nd: sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79 (glob)
79 $ hg debugnodemap --dump-new | f --sha256 --size
79 $ hg debugnodemap --dump-new | f --sha256 --size
80 size=121088, sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79
80 size=121088, sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79
81 $ hg debugnodemap --dump-disk | f --sha256 --bytes=256 --hexdump --size
81 $ hg debugnodemap --dump-disk | f --sha256 --bytes=256 --hexdump --size
82 size=121088, sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79
82 size=121088, sha256=f544f5462ff46097432caf6d764091f6d8c46d6121be315ead8576d548c9dd79
83 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
83 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
84 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
84 0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
85 0020: ff ff ff ff ff ff f5 06 ff ff ff ff ff ff f3 e7 |................|
85 0020: ff ff ff ff ff ff f5 06 ff ff ff ff ff ff f3 e7 |................|
86 0030: ff ff ef ca ff ff ff ff ff ff ff ff ff ff ff ff |................|
86 0030: ff ff ef ca ff ff ff ff ff ff ff ff ff ff ff ff |................|
87 0040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
87 0040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
88 0050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ed 08 |................|
88 0050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ed 08 |................|
89 0060: ff ff ed 66 ff ff ff ff ff ff ff ff ff ff ff ff |...f............|
89 0060: ff ff ed 66 ff ff ff ff ff ff ff ff ff ff ff ff |...f............|
90 0070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
90 0070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
91 0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
91 0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
92 0090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff f6 ed |................|
92 0090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff f6 ed |................|
93 00a0: ff ff ff ff ff ff fe 61 ff ff ff ff ff ff ff ff |.......a........|
93 00a0: ff ff ff ff ff ff fe 61 ff ff ff ff ff ff ff ff |.......a........|
94 00b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
94 00b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
95 00c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
95 00c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
96 00d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
96 00d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
97 00e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff f1 02 |................|
97 00e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff f1 02 |................|
98 00f0: ff ff ff ff ff ff ed 1b ff ff ff ff ff ff ff ff |................|
98 00f0: ff ff ff ff ff ff ed 1b ff ff ff ff ff ff ff ff |................|
99
99
100 #endif
100 #endif
101
101
102 $ hg debugnodemap --check
102 $ hg debugnodemap --check
103 revision in index: 5001
103 revision in index: 5001
104 revision in nodemap: 5001
104 revision in nodemap: 5001
105
105
106 add a new commit
106 add a new commit
107
107
108 $ hg up
108 $ hg up
109 5001 files updated, 0 files merged, 0 files removed, 0 files unresolved
109 5001 files updated, 0 files merged, 0 files removed, 0 files unresolved
110 $ echo foo > foo
110 $ echo foo > foo
111 $ hg add foo
111 $ hg add foo
112
112
113 #if no-pure no-rust
113 #if no-pure no-rust
114
114
115 $ hg ci -m 'foo' --config "storage.revlog.nodemap.mode=strict"
115 $ hg ci -m 'foo' --config "storage.revlog.nodemap.mode=strict"
116 transaction abort!
116 transaction abort!
117 rollback completed
117 rollback completed
118 abort: persistent nodemap in strict mode without efficient method
118 abort: persistent nodemap in strict mode without efficient method
119 [255]
119 [255]
120
120
121 #endif
121 #endif
122
122
123 $ hg ci -m 'foo'
123 $ hg ci -m 'foo'
124
124
125 #if no-pure no-rust
125 #if no-pure no-rust
126 $ hg debugnodemap --metadata
126 $ hg debugnodemap --metadata
127 uid: ???????????????? (glob)
127 uid: ???????????????? (glob)
128 tip-rev: 5001
128 tip-rev: 5001
129 tip-node: 16395c3cf7e231394735e6b1717823ada303fb0c
129 tip-node: 16395c3cf7e231394735e6b1717823ada303fb0c
130 data-length: 121088
130 data-length: 121088
131 data-unused: 0
131 data-unused: 0
132 data-unused: 0.000%
132 data-unused: 0.000%
133 #else
133 #else
134 $ hg debugnodemap --metadata
134 $ hg debugnodemap --metadata
135 uid: ???????????????? (glob)
135 uid: ???????????????? (glob)
136 tip-rev: 5001
136 tip-rev: 5001
137 tip-node: 16395c3cf7e231394735e6b1717823ada303fb0c
137 tip-node: 16395c3cf7e231394735e6b1717823ada303fb0c
138 data-length: 121344
138 data-length: 121344
139 data-unused: 256
139 data-unused: 256
140 data-unused: 0.211%
140 data-unused: 0.211%
141 #endif
141 #endif
142
142
143 $ f --size .hg/store/00changelog.n
143 $ f --size .hg/store/00changelog.n
144 .hg/store/00changelog.n: size=70
144 .hg/store/00changelog.n: size=70
145
145
146 (The pure code use the debug code that perform incremental update, the C code reencode from scratch)
146 (The pure code use the debug code that perform incremental update, the C code reencode from scratch)
147
147
148 #if pure
148 #if pure
149 $ f --sha256 .hg/store/00changelog-*.nd --size
149 $ f --sha256 .hg/store/00changelog-*.nd --size
150 .hg/store/00changelog-????????????????.nd: size=121344, sha256=cce54c5da5bde3ad72a4938673ed4064c86231b9c64376b082b163fdb20f8f66 (glob)
150 .hg/store/00changelog-????????????????.nd: size=121344, sha256=cce54c5da5bde3ad72a4938673ed4064c86231b9c64376b082b163fdb20f8f66 (glob)
151 #endif
151 #endif
152
152
153 #if rust
153 #if rust
154 $ f --sha256 .hg/store/00changelog-*.nd --size
154 $ f --sha256 .hg/store/00changelog-*.nd --size
155 .hg/store/00changelog-????????????????.nd: size=121344, sha256=952b042fcf614ceb37b542b1b723e04f18f83efe99bee4e0f5ccd232ef470e58 (glob)
155 .hg/store/00changelog-????????????????.nd: size=121344, sha256=952b042fcf614ceb37b542b1b723e04f18f83efe99bee4e0f5ccd232ef470e58 (glob)
156 #endif
156 #endif
157
157
158 #if no-pure no-rust
158 #if no-pure no-rust
159 $ f --sha256 .hg/store/00changelog-*.nd --size
159 $ f --sha256 .hg/store/00changelog-*.nd --size
160 .hg/store/00changelog-????????????????.nd: size=121088, sha256=df7c06a035b96cb28c7287d349d603baef43240be7736fe34eea419a49702e17 (glob)
160 .hg/store/00changelog-????????????????.nd: size=121088, sha256=df7c06a035b96cb28c7287d349d603baef43240be7736fe34eea419a49702e17 (glob)
161 #endif
161 #endif
162
162
163 $ hg debugnodemap --check
163 $ hg debugnodemap --check
164 revision in index: 5002
164 revision in index: 5002
165 revision in nodemap: 5002
165 revision in nodemap: 5002
166
166
167 Test code path without mmap
167 Test code path without mmap
168 ---------------------------
168 ---------------------------
169
169
170 $ echo bar > bar
170 $ echo bar > bar
171 $ hg add bar
171 $ hg add bar
172 $ hg ci -m 'bar' --config storage.revlog.nodemap.mmap=no
172 $ hg ci -m 'bar' --config storage.revlog.nodemap.mmap=no
173
173
174 $ hg debugnodemap --check --config storage.revlog.nodemap.mmap=yes
174 $ hg debugnodemap --check --config storage.revlog.nodemap.mmap=yes
175 revision in index: 5003
175 revision in index: 5003
176 revision in nodemap: 5003
176 revision in nodemap: 5003
177 $ hg debugnodemap --check --config storage.revlog.nodemap.mmap=no
177 $ hg debugnodemap --check --config storage.revlog.nodemap.mmap=no
178 revision in index: 5003
178 revision in index: 5003
179 revision in nodemap: 5003
179 revision in nodemap: 5003
180
180
181
181
182 #if pure
182 #if pure
183 $ hg debugnodemap --metadata
183 $ hg debugnodemap --metadata
184 uid: ???????????????? (glob)
184 uid: ???????????????? (glob)
185 tip-rev: 5002
185 tip-rev: 5002
186 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
186 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
187 data-length: 121600
187 data-length: 121600
188 data-unused: 512
188 data-unused: 512
189 data-unused: 0.421%
189 data-unused: 0.421%
190 $ f --sha256 .hg/store/00changelog-*.nd --size
190 $ f --sha256 .hg/store/00changelog-*.nd --size
191 .hg/store/00changelog-????????????????.nd: size=121600, sha256=def52503d049ccb823974af313a98a935319ba61f40f3aa06a8be4d35c215054 (glob)
191 .hg/store/00changelog-????????????????.nd: size=121600, sha256=def52503d049ccb823974af313a98a935319ba61f40f3aa06a8be4d35c215054 (glob)
192 #endif
192 #endif
193 #if rust
193 #if rust
194 $ hg debugnodemap --metadata
194 $ hg debugnodemap --metadata
195 uid: ???????????????? (glob)
195 uid: ???????????????? (glob)
196 tip-rev: 5002
196 tip-rev: 5002
197 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
197 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
198 data-length: 121600
198 data-length: 121600
199 data-unused: 512
199 data-unused: 512
200 data-unused: 0.421%
200 data-unused: 0.421%
201 $ f --sha256 .hg/store/00changelog-*.nd --size
201 $ f --sha256 .hg/store/00changelog-*.nd --size
202 .hg/store/00changelog-????????????????.nd: size=121600, sha256=dacf5b5f1d4585fee7527d0e67cad5b1ba0930e6a0928f650f779aefb04ce3fb (glob)
202 .hg/store/00changelog-????????????????.nd: size=121600, sha256=dacf5b5f1d4585fee7527d0e67cad5b1ba0930e6a0928f650f779aefb04ce3fb (glob)
203 #endif
203 #endif
204 #if no-pure no-rust
204 #if no-pure no-rust
205 $ hg debugnodemap --metadata
205 $ hg debugnodemap --metadata
206 uid: ???????????????? (glob)
206 uid: ???????????????? (glob)
207 tip-rev: 5002
207 tip-rev: 5002
208 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
208 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
209 data-length: 121088
209 data-length: 121088
210 data-unused: 0
210 data-unused: 0
211 data-unused: 0.000%
211 data-unused: 0.000%
212 $ f --sha256 .hg/store/00changelog-*.nd --size
212 $ f --sha256 .hg/store/00changelog-*.nd --size
213 .hg/store/00changelog-????????????????.nd: size=121088, sha256=59fcede3e3cc587755916ceed29e3c33748cd1aa7d2f91828ac83e7979d935e8 (glob)
213 .hg/store/00changelog-????????????????.nd: size=121088, sha256=59fcede3e3cc587755916ceed29e3c33748cd1aa7d2f91828ac83e7979d935e8 (glob)
214 #endif
214 #endif
215
215
216 Test force warming the cache
216 Test force warming the cache
217
217
218 $ rm .hg/store/00changelog.n
218 $ rm .hg/store/00changelog.n
219 $ hg debugnodemap --metadata
219 $ hg debugnodemap --metadata
220 $ hg debugupdatecache
220 $ hg debugupdatecache
221 #if pure
221 #if pure
222 $ hg debugnodemap --metadata
222 $ hg debugnodemap --metadata
223 uid: ???????????????? (glob)
223 uid: ???????????????? (glob)
224 tip-rev: 5002
224 tip-rev: 5002
225 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
225 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
226 data-length: 121088
226 data-length: 121088
227 data-unused: 0
227 data-unused: 0
228 data-unused: 0.000%
228 data-unused: 0.000%
229 #else
229 #else
230 $ hg debugnodemap --metadata
230 $ hg debugnodemap --metadata
231 uid: ???????????????? (glob)
231 uid: ???????????????? (glob)
232 tip-rev: 5002
232 tip-rev: 5002
233 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
233 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
234 data-length: 121088
234 data-length: 121088
235 data-unused: 0
235 data-unused: 0
236 data-unused: 0.000%
236 data-unused: 0.000%
237 #endif
237 #endif
238
238
239 Check out of sync nodemap
239 Check out of sync nodemap
240 =========================
240 =========================
241
241
242 First copy old data on the side.
242 First copy old data on the side.
243
243
244 $ mkdir ../tmp-copies
244 $ mkdir ../tmp-copies
245 $ cp .hg/store/00changelog-????????????????.nd .hg/store/00changelog.n ../tmp-copies
245 $ cp .hg/store/00changelog-????????????????.nd .hg/store/00changelog.n ../tmp-copies
246
246
247 Nodemap lagging behind
247 Nodemap lagging behind
248 ----------------------
248 ----------------------
249
249
250 make a new commit
250 make a new commit
251
251
252 $ echo bar2 > bar
252 $ echo bar2 > bar
253 $ hg ci -m 'bar2'
253 $ hg ci -m 'bar2'
254 $ NODE=`hg log -r tip -T '{node}\n'`
254 $ NODE=`hg log -r tip -T '{node}\n'`
255 $ hg log -r "$NODE" -T '{rev}\n'
255 $ hg log -r "$NODE" -T '{rev}\n'
256 5003
256 5003
257
257
258 If the nodemap is lagging behind, it can catch up fine
258 If the nodemap is lagging behind, it can catch up fine
259
259
260 $ hg debugnodemap --metadata
260 $ hg debugnodemap --metadata
261 uid: ???????????????? (glob)
261 uid: ???????????????? (glob)
262 tip-rev: 5003
262 tip-rev: 5003
263 tip-node: c9329770f979ade2d16912267c38ba5f82fd37b3
263 tip-node: c9329770f979ade2d16912267c38ba5f82fd37b3
264 data-length: 121344 (pure !)
264 data-length: 121344 (pure !)
265 data-length: 121344 (rust !)
265 data-length: 121344 (rust !)
266 data-length: 121152 (no-rust no-pure !)
266 data-length: 121152 (no-rust no-pure !)
267 data-unused: 192 (pure !)
267 data-unused: 192 (pure !)
268 data-unused: 192 (rust !)
268 data-unused: 192 (rust !)
269 data-unused: 0 (no-rust no-pure !)
269 data-unused: 0 (no-rust no-pure !)
270 data-unused: 0.158% (pure !)
270 data-unused: 0.158% (pure !)
271 data-unused: 0.158% (rust !)
271 data-unused: 0.158% (rust !)
272 data-unused: 0.000% (no-rust no-pure !)
272 data-unused: 0.000% (no-rust no-pure !)
273 $ cp -f ../tmp-copies/* .hg/store/
273 $ cp -f ../tmp-copies/* .hg/store/
274 $ hg debugnodemap --metadata
274 $ hg debugnodemap --metadata
275 uid: ???????????????? (glob)
275 uid: ???????????????? (glob)
276 tip-rev: 5002
276 tip-rev: 5002
277 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
277 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
278 data-length: 121088
278 data-length: 121088
279 data-unused: 0
279 data-unused: 0
280 data-unused: 0.000%
280 data-unused: 0.000%
281 $ hg log -r "$NODE" -T '{rev}\n'
281 $ hg log -r "$NODE" -T '{rev}\n'
282 5003
282 5003
283
283
284 changelog altered
284 changelog altered
285 -----------------
285 -----------------
286
286
287 If the nodemap is not gated behind a requirements, an unaware client can alter
287 If the nodemap is not gated behind a requirements, an unaware client can alter
288 the repository so the revlog used to generate the nodemap is not longer
288 the repository so the revlog used to generate the nodemap is not longer
289 compatible with the persistent nodemap. We need to detect that.
289 compatible with the persistent nodemap. We need to detect that.
290
290
291 $ hg up "$NODE~5"
291 $ hg up "$NODE~5"
292 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
292 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
293 $ echo bar > babar
293 $ echo bar > babar
294 $ hg add babar
294 $ hg add babar
295 $ hg ci -m 'babar'
295 $ hg ci -m 'babar'
296 created new head
296 created new head
297 $ OTHERNODE=`hg log -r tip -T '{node}\n'`
297 $ OTHERNODE=`hg log -r tip -T '{node}\n'`
298 $ hg log -r "$OTHERNODE" -T '{rev}\n'
298 $ hg log -r "$OTHERNODE" -T '{rev}\n'
299 5004
299 5004
300
300
301 $ hg --config extensions.strip= strip --rev "$NODE~1" --no-backup
301 $ hg --config extensions.strip= strip --rev "$NODE~1" --no-backup
302
302
303 the nodemap should detect the changelog have been tampered with and recover.
303 the nodemap should detect the changelog have been tampered with and recover.
304
304
305 $ hg debugnodemap --metadata
305 $ hg debugnodemap --metadata
306 uid: ???????????????? (glob)
306 uid: ???????????????? (glob)
307 tip-rev: 5002
307 tip-rev: 5002
308 tip-node: b355ef8adce0949b8bdf6afc72ca853740d65944
308 tip-node: b355ef8adce0949b8bdf6afc72ca853740d65944
309 data-length: 121536 (pure !)
309 data-length: 121536 (pure !)
310 data-length: 121088 (rust !)
310 data-length: 121088 (rust !)
311 data-length: 121088 (no-pure no-rust !)
311 data-length: 121088 (no-pure no-rust !)
312 data-unused: 448 (pure !)
312 data-unused: 448 (pure !)
313 data-unused: 0 (rust !)
313 data-unused: 0 (rust !)
314 data-unused: 0 (no-pure no-rust !)
314 data-unused: 0 (no-pure no-rust !)
315 data-unused: 0.000% (rust !)
315 data-unused: 0.000% (rust !)
316 data-unused: 0.369% (pure !)
316 data-unused: 0.369% (pure !)
317 data-unused: 0.000% (no-pure no-rust !)
317 data-unused: 0.000% (no-pure no-rust !)
318
318
319 $ cp -f ../tmp-copies/* .hg/store/
319 $ cp -f ../tmp-copies/* .hg/store/
320 $ hg debugnodemap --metadata
320 $ hg debugnodemap --metadata
321 uid: ???????????????? (glob)
321 uid: ???????????????? (glob)
322 tip-rev: 5002
322 tip-rev: 5002
323 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
323 tip-node: 880b18d239dfa9f632413a2071bfdbcc4806a4fd
324 data-length: 121088
324 data-length: 121088
325 data-unused: 0
325 data-unused: 0
326 data-unused: 0.000%
326 data-unused: 0.000%
327 $ hg log -r "$OTHERNODE" -T '{rev}\n'
327 $ hg log -r "$OTHERNODE" -T '{rev}\n'
328 5002
328 5002
329
329
330 Check transaction related property
330 Check transaction related property
331 ==================================
331 ==================================
332
332
333 An up to date nodemap should be available to shell hooks,
333 An up to date nodemap should be available to shell hooks,
334
334
335 $ echo dsljfl > a
335 $ echo dsljfl > a
336 $ hg add a
336 $ hg add a
337 $ hg ci -m a
337 $ hg ci -m a
338 $ hg debugnodemap --metadata
338 $ hg debugnodemap --metadata
339 uid: ???????????????? (glob)
339 uid: ???????????????? (glob)
340 tip-rev: 5003
340 tip-rev: 5003
341 tip-node: a52c5079765b5865d97b993b303a18740113bbb2
341 tip-node: a52c5079765b5865d97b993b303a18740113bbb2
342 data-length: 121088
342 data-length: 121088
343 data-unused: 0
343 data-unused: 0
344 data-unused: 0.000%
344 data-unused: 0.000%
345 $ echo babar2 > babar
345 $ echo babar2 > babar
346 $ hg ci -m 'babar2' --config "hooks.pretxnclose.nodemap-test=hg debugnodemap --metadata"
346 $ hg ci -m 'babar2' --config "hooks.pretxnclose.nodemap-test=hg debugnodemap --metadata"
347 uid: ???????????????? (glob)
347 uid: ???????????????? (glob)
348 tip-rev: 5004
348 tip-rev: 5004
349 tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984
349 tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984
350 data-length: 121280 (pure !)
350 data-length: 121280 (pure !)
351 data-length: 121280 (rust !)
351 data-length: 121280 (rust !)
352 data-length: 121088 (no-pure no-rust !)
352 data-length: 121088 (no-pure no-rust !)
353 data-unused: 192 (pure !)
353 data-unused: 192 (pure !)
354 data-unused: 192 (rust !)
354 data-unused: 192 (rust !)
355 data-unused: 0 (no-pure no-rust !)
355 data-unused: 0 (no-pure no-rust !)
356 data-unused: 0.158% (pure !)
356 data-unused: 0.158% (pure !)
357 data-unused: 0.158% (rust !)
357 data-unused: 0.158% (rust !)
358 data-unused: 0.000% (no-pure no-rust !)
358 data-unused: 0.000% (no-pure no-rust !)
359 $ hg debugnodemap --metadata
359 $ hg debugnodemap --metadata
360 uid: ???????????????? (glob)
360 uid: ???????????????? (glob)
361 tip-rev: 5004
361 tip-rev: 5004
362 tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984
362 tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984
363 data-length: 121280 (pure !)
363 data-length: 121280 (pure !)
364 data-length: 121280 (rust !)
364 data-length: 121280 (rust !)
365 data-length: 121088 (no-pure no-rust !)
365 data-length: 121088 (no-pure no-rust !)
366 data-unused: 192 (pure !)
366 data-unused: 192 (pure !)
367 data-unused: 192 (rust !)
367 data-unused: 192 (rust !)
368 data-unused: 0 (no-pure no-rust !)
368 data-unused: 0 (no-pure no-rust !)
369 data-unused: 0.158% (pure !)
369 data-unused: 0.158% (pure !)
370 data-unused: 0.158% (rust !)
370 data-unused: 0.158% (rust !)
371 data-unused: 0.000% (no-pure no-rust !)
371 data-unused: 0.000% (no-pure no-rust !)
372
372
373 Another process does not see the pending nodemap content during run.
373 Another process does not see the pending nodemap content during run.
374
374
375 $ PATH=$RUNTESTDIR/testlib/:$PATH
375 $ PATH=$RUNTESTDIR/testlib/:$PATH
376 $ echo qpoasp > a
376 $ echo qpoasp > a
377 $ hg ci -m a2 \
377 $ hg ci -m a2 \
378 > --config "hooks.pretxnclose=wait-on-file 20 sync-repo-read sync-txn-pending" \
378 > --config "hooks.pretxnclose=wait-on-file 20 sync-repo-read sync-txn-pending" \
379 > --config "hooks.txnclose=touch sync-txn-close" > output.txt 2>&1 &
379 > --config "hooks.txnclose=touch sync-txn-close" > output.txt 2>&1 &
380
380
381 (read the repository while the commit transaction is pending)
381 (read the repository while the commit transaction is pending)
382
382
383 $ wait-on-file 20 sync-txn-pending && \
383 $ wait-on-file 20 sync-txn-pending && \
384 > hg debugnodemap --metadata && \
384 > hg debugnodemap --metadata && \
385 > wait-on-file 20 sync-txn-close sync-repo-read
385 > wait-on-file 20 sync-txn-close sync-repo-read
386 uid: ???????????????? (glob)
386 uid: ???????????????? (glob)
387 tip-rev: 5004
387 tip-rev: 5004
388 tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984
388 tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984
389 data-length: 121280 (pure !)
389 data-length: 121280 (pure !)
390 data-length: 121280 (rust !)
390 data-length: 121280 (rust !)
391 data-length: 121088 (no-pure no-rust !)
391 data-length: 121088 (no-pure no-rust !)
392 data-unused: 192 (pure !)
392 data-unused: 192 (pure !)
393 data-unused: 192 (rust !)
393 data-unused: 192 (rust !)
394 data-unused: 0 (no-pure no-rust !)
394 data-unused: 0 (no-pure no-rust !)
395 data-unused: 0.158% (pure !)
395 data-unused: 0.158% (pure !)
396 data-unused: 0.158% (rust !)
396 data-unused: 0.158% (rust !)
397 data-unused: 0.000% (no-pure no-rust !)
397 data-unused: 0.000% (no-pure no-rust !)
398 $ hg debugnodemap --metadata
398 $ hg debugnodemap --metadata
399 uid: ???????????????? (glob)
399 uid: ???????????????? (glob)
400 tip-rev: 5005
400 tip-rev: 5005
401 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
401 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
402 data-length: 121536 (pure !)
402 data-length: 121536 (pure !)
403 data-length: 121536 (rust !)
403 data-length: 121536 (rust !)
404 data-length: 121088 (no-pure no-rust !)
404 data-length: 121088 (no-pure no-rust !)
405 data-unused: 448 (pure !)
405 data-unused: 448 (pure !)
406 data-unused: 448 (rust !)
406 data-unused: 448 (rust !)
407 data-unused: 0 (no-pure no-rust !)
407 data-unused: 0 (no-pure no-rust !)
408 data-unused: 0.369% (pure !)
408 data-unused: 0.369% (pure !)
409 data-unused: 0.369% (rust !)
409 data-unused: 0.369% (rust !)
410 data-unused: 0.000% (no-pure no-rust !)
410 data-unused: 0.000% (no-pure no-rust !)
411
411
412 $ cat output.txt
412 $ cat output.txt
413
413
414 Check that a failing transaction will properly revert the data
414 Check that a failing transaction will properly revert the data
415
415
416 $ echo plakfe > a
416 $ echo plakfe > a
417 $ f --size --sha256 .hg/store/00changelog-*.nd
417 $ f --size --sha256 .hg/store/00changelog-*.nd
418 .hg/store/00changelog-????????????????.nd: size=121536, sha256=bb414468d225cf52d69132e1237afba34d4346ee2eb81b505027e6197b107f03 (glob) (pure !)
418 .hg/store/00changelog-????????????????.nd: size=121536, sha256=bb414468d225cf52d69132e1237afba34d4346ee2eb81b505027e6197b107f03 (glob) (pure !)
419 .hg/store/00changelog-????????????????.nd: size=121536, sha256=909ac727bc4d1c0fda5f7bff3c620c98bd4a2967c143405a1503439e33b377da (glob) (rust !)
419 .hg/store/00changelog-????????????????.nd: size=121536, sha256=909ac727bc4d1c0fda5f7bff3c620c98bd4a2967c143405a1503439e33b377da (glob) (rust !)
420 .hg/store/00changelog-????????????????.nd: size=121088, sha256=342d36d30d86dde67d3cb6c002606c4a75bcad665595d941493845066d9c8ee0 (glob) (no-pure no-rust !)
420 .hg/store/00changelog-????????????????.nd: size=121088, sha256=342d36d30d86dde67d3cb6c002606c4a75bcad665595d941493845066d9c8ee0 (glob) (no-pure no-rust !)
421 $ hg ci -m a3 --config "extensions.abort=$RUNTESTDIR/testlib/crash_transaction_late.py"
421 $ hg ci -m a3 --config "extensions.abort=$RUNTESTDIR/testlib/crash_transaction_late.py"
422 transaction abort!
422 transaction abort!
423 rollback completed
423 rollback completed
424 abort: This is a late abort
424 abort: This is a late abort
425 [255]
425 [255]
426 $ hg debugnodemap --metadata
426 $ hg debugnodemap --metadata
427 uid: ???????????????? (glob)
427 uid: ???????????????? (glob)
428 tip-rev: 5005
428 tip-rev: 5005
429 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
429 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
430 data-length: 121536 (pure !)
430 data-length: 121536 (pure !)
431 data-length: 121536 (rust !)
431 data-length: 121536 (rust !)
432 data-length: 121088 (no-pure no-rust !)
432 data-length: 121088 (no-pure no-rust !)
433 data-unused: 448 (pure !)
433 data-unused: 448 (pure !)
434 data-unused: 448 (rust !)
434 data-unused: 448 (rust !)
435 data-unused: 0 (no-pure no-rust !)
435 data-unused: 0 (no-pure no-rust !)
436 data-unused: 0.369% (pure !)
436 data-unused: 0.369% (pure !)
437 data-unused: 0.369% (rust !)
437 data-unused: 0.369% (rust !)
438 data-unused: 0.000% (no-pure no-rust !)
438 data-unused: 0.000% (no-pure no-rust !)
439 $ f --size --sha256 .hg/store/00changelog-*.nd
439 $ f --size --sha256 .hg/store/00changelog-*.nd
440 .hg/store/00changelog-????????????????.nd: size=121536, sha256=bb414468d225cf52d69132e1237afba34d4346ee2eb81b505027e6197b107f03 (glob) (pure !)
440 .hg/store/00changelog-????????????????.nd: size=121536, sha256=bb414468d225cf52d69132e1237afba34d4346ee2eb81b505027e6197b107f03 (glob) (pure !)
441 .hg/store/00changelog-????????????????.nd: size=121536, sha256=909ac727bc4d1c0fda5f7bff3c620c98bd4a2967c143405a1503439e33b377da (glob) (rust !)
441 .hg/store/00changelog-????????????????.nd: size=121536, sha256=909ac727bc4d1c0fda5f7bff3c620c98bd4a2967c143405a1503439e33b377da (glob) (rust !)
442 .hg/store/00changelog-????????????????.nd: size=121088, sha256=342d36d30d86dde67d3cb6c002606c4a75bcad665595d941493845066d9c8ee0 (glob) (no-pure no-rust !)
442 .hg/store/00changelog-????????????????.nd: size=121088, sha256=342d36d30d86dde67d3cb6c002606c4a75bcad665595d941493845066d9c8ee0 (glob) (no-pure no-rust !)
443
443
444 Check that removing content does not confuse the nodemap
444 Check that removing content does not confuse the nodemap
445 --------------------------------------------------------
445 --------------------------------------------------------
446
446
447 removing data with rollback
447 removing data with rollback
448
448
449 $ echo aso > a
449 $ echo aso > a
450 $ hg ci -m a4
450 $ hg ci -m a4
451 $ hg rollback
451 $ hg rollback
452 repository tip rolled back to revision 5005 (undo commit)
452 repository tip rolled back to revision 5005 (undo commit)
453 working directory now based on revision 5005
453 working directory now based on revision 5005
454 $ hg id -r .
454 $ hg id -r .
455 90d5d3ba2fc4 tip
455 90d5d3ba2fc4 tip
456
456
457 roming data with strip
457 roming data with strip
458
458
459 $ echo aso > a
459 $ echo aso > a
460 $ hg ci -m a4
460 $ hg ci -m a4
461 $ hg --config extensions.strip= strip -r . --no-backup
461 $ hg --config extensions.strip= strip -r . --no-backup
462 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
462 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
463 $ hg id -r . --traceback
463 $ hg id -r . --traceback
464 90d5d3ba2fc4 tip
464 90d5d3ba2fc4 tip
465
465
466 Test upgrade / downgrade
466 Test upgrade / downgrade
467 ========================
467 ========================
468
468
469 downgrading
469 downgrading
470
470
471 $ cat << EOF >> .hg/hgrc
471 $ cat << EOF >> .hg/hgrc
472 > [format]
472 > [format]
473 > use-persistent-nodemap=no
473 > use-persistent-nodemap=no
474 > EOF
474 > EOF
475 $ hg debugformat -v
475 $ hg debugformat -v
476 format-variant repo config default
476 format-variant repo config default
477 fncache: yes yes yes
477 fncache: yes yes yes
478 dotencode: yes yes yes
478 dotencode: yes yes yes
479 generaldelta: yes yes yes
479 generaldelta: yes yes yes
480 exp-sharesafe: no no no
480 exp-sharesafe: no no no
481 sparserevlog: yes yes yes
481 sparserevlog: yes yes yes
482 sidedata: no no no
482 sidedata: no no no
483 persistent-nodemap: yes no no
483 persistent-nodemap: yes no no
484 copies-sdc: no no no
484 copies-sdc: no no no
485 plain-cl-delta: yes yes yes
485 plain-cl-delta: yes yes yes
486 compression: zlib zlib zlib
486 compression: zlib zlib zlib
487 compression-level: default default default
487 compression-level: default default default
488 $ hg debugupgraderepo --run --no-backup --quiet
488 $ hg debugupgraderepo --run --no-backup --quiet
489 upgrade will perform the following actions:
489 upgrade will perform the following actions:
490
490
491 requirements
491 requirements
492 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
492 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
493 removed: persistent-nodemap
493 removed: persistent-nodemap
494
494
495 processed revlogs:
495 processed revlogs:
496 - all-filelogs
496 - all-filelogs
497 - changelog
497 - changelog
498 - manifest
498 - manifest
499
499
500 $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
500 $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
501 [1]
501 [1]
502 $ hg debugnodemap --metadata
502 $ hg debugnodemap --metadata
503
503
504
504
505 upgrading
505 upgrading
506
506
507 $ cat << EOF >> .hg/hgrc
507 $ cat << EOF >> .hg/hgrc
508 > [format]
508 > [format]
509 > use-persistent-nodemap=yes
509 > use-persistent-nodemap=yes
510 > EOF
510 > EOF
511 $ hg debugformat -v
511 $ hg debugformat -v
512 format-variant repo config default
512 format-variant repo config default
513 fncache: yes yes yes
513 fncache: yes yes yes
514 dotencode: yes yes yes
514 dotencode: yes yes yes
515 generaldelta: yes yes yes
515 generaldelta: yes yes yes
516 exp-sharesafe: no no no
516 exp-sharesafe: no no no
517 sparserevlog: yes yes yes
517 sparserevlog: yes yes yes
518 sidedata: no no no
518 sidedata: no no no
519 persistent-nodemap: no yes no
519 persistent-nodemap: no yes no
520 copies-sdc: no no no
520 copies-sdc: no no no
521 plain-cl-delta: yes yes yes
521 plain-cl-delta: yes yes yes
522 compression: zlib zlib zlib
522 compression: zlib zlib zlib
523 compression-level: default default default
523 compression-level: default default default
524 $ hg debugupgraderepo --run --no-backup --quiet
524 $ hg debugupgraderepo --run --no-backup --quiet
525 upgrade will perform the following actions:
525 upgrade will perform the following actions:
526
526
527 requirements
527 requirements
528 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
528 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
529 added: persistent-nodemap
529 added: persistent-nodemap
530
530
531 processed revlogs:
531 processed revlogs:
532 - all-filelogs
532 - all-filelogs
533 - changelog
533 - changelog
534 - manifest
534 - manifest
535
535
536 $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
536 $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
537 00changelog-*.nd (glob)
537 00changelog-*.nd (glob)
538 00changelog.n
538 00changelog.n
539 00manifest-*.nd (glob)
539 00manifest-*.nd (glob)
540 00manifest.n
540 00manifest.n
541
541
542 $ hg debugnodemap --metadata
542 $ hg debugnodemap --metadata
543 uid: * (glob)
543 uid: * (glob)
544 tip-rev: 5005
544 tip-rev: 5005
545 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
545 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
546 data-length: 121088
546 data-length: 121088
547 data-unused: 0
547 data-unused: 0
548 data-unused: 0.000%
548 data-unused: 0.000%
549
549
550 Running unrelated upgrade
550 Running unrelated upgrade
551
551
552 $ hg debugupgraderepo --run --no-backup --quiet --optimize re-delta-all
552 $ hg debugupgraderepo --run --no-backup --quiet --optimize re-delta-all
553 upgrade will perform the following actions:
553 upgrade will perform the following actions:
554
554
555 requirements
555 requirements
556 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store
556 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store
557
557
558 optimisations: re-delta-all
558 optimisations: re-delta-all
559
559
560 processed revlogs:
560 processed revlogs:
561 - all-filelogs
561 - all-filelogs
562 - changelog
562 - changelog
563 - manifest
563 - manifest
564
564
565 $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
565 $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
566 00changelog-*.nd (glob)
566 00changelog-*.nd (glob)
567 00changelog.n
567 00changelog.n
568 00manifest-*.nd (glob)
568 00manifest-*.nd (glob)
569 00manifest.n
569 00manifest.n
570
570
571 $ hg debugnodemap --metadata
571 $ hg debugnodemap --metadata
572 uid: * (glob)
572 uid: * (glob)
573 tip-rev: 5005
573 tip-rev: 5005
574 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
574 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
575 data-length: 121088
575 data-length: 121088
576 data-unused: 0
576 data-unused: 0
577 data-unused: 0.000%
577 data-unused: 0.000%
578
579 Persistent nodemap and local/streaming clone
580 ============================================
581
582 $ cd ..
583
584 standard clone
585 --------------
586
587 The persistent nodemap should exist after a streaming clone
588
589 $ hg clone --pull --quiet -U test-repo standard-clone
590 $ ls -1 standard-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
591 00changelog-*.nd (glob)
592 00changelog.n
593 00manifest-*.nd (glob)
594 00manifest.n
595 $ hg -R standard-clone debugnodemap --metadata
596 uid: * (glob)
597 tip-rev: 5005
598 tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
599 data-length: 121088
600 data-unused: 0
601 data-unused: 0.000%
602
General Comments 0
You need to be logged in to leave comments. Login now