Mercurial > hg
comparison tests/test-manifest.t @ 42376:89c0c8edc9d4 stable
tests: demonstrate broken manifest generation with the pure module
This will be fixed next. But I don't fully understand how 'b.txt' is actually
removed properly in the second test, given what's broken. Also, I'm not sure
why 'bb.txt' is flagged as not being in the manifest, when it clearly appears
to be.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 23 May 2019 21:39:19 -0400 |
parents | d121823072b8 |
children | 0546ead39a7e |
comparison
equal
deleted
inserted
replaced
42324:2338bdea4474 | 42376:89c0c8edc9d4 |
---|---|
199 id: 26b8653b67af8c1a0a0317c4ee8dac50a41fdb65, size 133 bytes | 199 id: 26b8653b67af8c1a0a0317c4ee8dac50a41fdb65, size 133 bytes |
200 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes | 200 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes |
201 total cache data size 425 bytes, on-disk 425 bytes | 201 total cache data size 425 bytes, on-disk 425 bytes |
202 $ hg log -r '0' --debug | grep 'manifest:' | 202 $ hg log -r '0' --debug | grep 'manifest:' |
203 manifest: 0:fce2a30dedad1eef4da95ca1dc0004157aa527cf | 203 manifest: 0:fce2a30dedad1eef4da95ca1dc0004157aa527cf |
204 | |
205 Test file removal (especially with pure). The tests are crafted such that there | |
206 will be contiguous spans of existing entries to ensure that is handled properly. | |
207 (In this case, a.txt, aa.txt and c.txt, cc.txt, and ccc.txt) | |
208 | |
209 $ cat > $TESTTMP/manifest.py <<EOF | |
210 > from mercurial import ( | |
211 > extensions, | |
212 > manifest, | |
213 > ) | |
214 > def extsetup(ui): | |
215 > manifest.FASTDELTA_TEXTDIFF_THRESHOLD = 0 | |
216 > EOF | |
217 $ cat >> $HGRCPATH <<EOF | |
218 > [extensions] | |
219 > manifest = $TESTTMP/manifest.py | |
220 > EOF | |
221 | |
222 BROKEN: Pure removes should actually remove all dropped entries | |
223 | |
224 $ hg init repo | |
225 $ cd repo | |
226 $ echo a > a.txt | |
227 $ echo aa > aa.txt | |
228 $ echo b > b.txt | |
229 $ echo c > c.txt | |
230 $ echo c > cc.txt | |
231 $ echo c > ccc.txt | |
232 $ echo b > d.txt | |
233 $ echo c > e.txt | |
234 $ hg ci -Aqm 'a-e' | |
235 | |
236 $ hg rm b.txt d.txt | |
237 $ hg ci -m 'remove b and d' | |
238 | |
239 $ hg debugdata -m 1 | |
240 a.txt\x00b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (esc) | |
241 aa.txt\x00a4bdc161c8fbb523c9a60409603f8710ff49a571 (esc) | |
242 \x00.txt\x001e88685f5ddec574a34c70af492f95b6debc8741 (esc) (pure !) | |
243 c.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
244 cc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
245 ccc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
246 \x00.txt\x001e88685f5ddec574a34c70af492f95b6debc8741 (esc) (pure !) | |
247 e.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
248 | |
249 $ hg up -C . 2>&1 | grep ValueError || true | |
250 raise ValueError("Manifest lines not in sorted order.") (pure !) | |
251 ValueError: Manifest lines not in sorted order. (pure !) | |
252 | |
253 $ hg verify || true | |
254 checking changesets | |
255 checking manifests | |
256 manifest@1: reading delta c1f6b2f803ac: Non-hexadecimal digit found (pure !) | |
257 crosschecking files in changesets and manifests | |
258 checking files | |
259 checked 2 changesets with 8 changes to 8 files | |
260 1 integrity errors encountered! (pure !) | |
261 (first damaged changeset appears to be 1) (pure !) | |
262 | |
263 $ hg rollback -q --config ui.rollback=True | |
264 $ hg rm b.txt d.txt | |
265 $ echo bb > bb.txt | |
266 | |
267 BROKEN: A mix of adds and removes should remove all dropped entries. | |
268 | |
269 $ hg ci -Aqm 'remove b and d; add bb' | |
270 | |
271 $ hg debugdata -m 1 | |
272 a.txt\x00b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (esc) | |
273 aa.txt\x00a4bdc161c8fbb523c9a60409603f8710ff49a571 (esc) | |
274 bb.txt\x0004c6faf8a9fdd848a5304dfc1704749a374dff44 (esc) | |
275 c.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
276 cc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
277 ccc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
278 \x00.txt\x001e88685f5ddec574a34c70af492f95b6debc8741 (esc) (pure !) | |
279 e.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
280 | |
281 $ hg up -C . 2>&1 | grep ValueError || true | |
282 raise ValueError("Manifest lines not in sorted order.") (pure !) | |
283 ValueError: Manifest lines not in sorted order. (pure !) | |
284 | |
285 $ hg verify || true | |
286 checking changesets | |
287 checking manifests | |
288 manifest@1: reading delta 0a0385480090: Manifest lines not in sorted order. (pure !) | |
289 crosschecking files in changesets and manifests | |
290 bb.txt@1: in changeset but not in manifest (pure !) | |
291 checking files | |
292 checked 2 changesets with 9 changes to 9 files | |
293 2 integrity errors encountered! (pure !) | |
294 (first damaged changeset appears to be 1) (pure !) |