Mercurial > hg
annotate tests/test-transaction-rollback-on-revlog-split.t @ 48669:7ee07e1a25c0
share-safe: enable by default (BC)
The feature have been around for a year (4 version) and is quite important.
Lets make it enabled by default.
Differential Revision: https://phab.mercurial-scm.org/D11997
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 11 Jan 2022 21:40:08 +0100 |
parents | 0fb328bb2459 |
children | f38ae2d7390e |
rev | line source |
---|---|
47284
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
1 Test correctness of revlog inline -> non-inline transition |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
2 ---------------------------------------------------------- |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
3 |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
4 Helper extension to intercept renames. |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
5 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
6 $ cat > $TESTTMP/intercept_rename.py << EOF |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
7 > import os |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
8 > import sys |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
9 > from mercurial import extensions, util |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
10 > |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
11 > def extsetup(ui): |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
12 > def close(orig, *args, **kwargs): |
47561
8e9295912573
compat: normalise path before comparison in revlog splitting test
Raphaël Gomès <rgomes@octobus.net>
parents:
47314
diff
changeset
|
13 > path = util.normpath(args[0]._atomictempfile__name) |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
14 > if path.endswith(b'/.hg/store/data/file.i'): |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
15 > os._exit(80) |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
16 > return orig(*args, **kwargs) |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
17 > extensions.wrapfunction(util.atomictempfile, 'close', close) |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
18 > EOF |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
19 |
47284
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
20 Test offset computation to correctly factor in the index entries themselve. |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
21 Also test that the new data size has the correct size if the transaction is aborted |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
22 after the index has been replaced. |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
23 |
47284
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
24 Test repo has one small, one moderate and one big change. The clone has |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
25 the small and moderate change and will transition to non-inline storage when |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
26 adding the big change. |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
27 |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
28 $ hg init troffset-computation --config format.revlog-compression=none |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
29 $ cd troffset-computation |
47314
93fc0a13b7e8
tests: partially fix test-transaction-rollback-on-revlog-split.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
47286
diff
changeset
|
30 $ printf '%20d' '1' > file |
47284
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
31 $ hg commit -Aqm_ |
47314
93fc0a13b7e8
tests: partially fix test-transaction-rollback-on-revlog-split.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
47286
diff
changeset
|
32 $ printf '%1024d' '1' > file |
47284
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
33 $ hg commit -Aqm_ |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
34 $ dd if=/dev/zero of=file bs=1k count=128 > /dev/null 2>&1 |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
35 $ hg commit -Aqm_ |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
36 $ cd .. |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
37 |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
38 $ hg clone -r 1 troffset-computation troffset-computation-copy --config format.revlog-compression=none -q |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
39 $ cd troffset-computation-copy |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
40 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
41 Reference size: |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
42 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
43 $ f -s .hg/store/data/file* |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
44 .hg/store/data/file.i: size=1174 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
45 |
47284
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
46 $ cat > .hg/hgrc <<EOF |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
47 > [hooks] |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
48 > pretxnchangegroup = python:$TESTDIR/helper-killhook.py:killme |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
49 > EOF |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
50 #if chg |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
51 $ hg pull ../troffset-computation |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
52 pulling from ../troffset-computation |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
53 [255] |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
54 #else |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
55 $ hg pull ../troffset-computation |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
56 pulling from ../troffset-computation |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
57 [80] |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
58 #endif |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
59 $ cat .hg/store/journal | tr -s '\000' ' ' | grep data/file | tail -1 |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
60 data/file.i 128 |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
61 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
62 The first file.i entry should match the size above. |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
63 The first file.d entry is the temporary record during the split, |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
64 the second entry after the split happened. The sum of the second file.d |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
65 and the second file.i entry should match the first file.i entry. |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
66 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
67 $ cat .hg/store/journal | tr -s '\000' ' ' | grep data/file |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
68 data/file.i 1174 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
69 data/file.d 0 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
70 data/file.d 1046 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
71 data/file.i 128 |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
72 $ hg recover |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
73 rolling back interrupted transaction |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
74 (verify step skipped, run `hg verify` to check your repository content) |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
75 $ f -s .hg/store/data/file* |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
76 .hg/store/data/file.d: size=1046 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
77 .hg/store/data/file.i: size=128 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
78 $ hg tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
79 changeset: 1:3ce491143aec |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
80 tag: tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
81 user: test |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
82 date: Thu Jan 01 00:00:00 1970 +0000 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
83 summary: _ |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
84 |
47874
308e843f24b1
test: reduce noise, so the important bits stand out
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
47561
diff
changeset
|
85 $ hg verify -q |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
86 warning: revlog 'data/file.d' not in fncache! |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
87 1 warnings encountered! |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
88 hint: run "hg debugrebuildfncache" to recover from corrupt fncache |
47875
0fb328bb2459
debugrebuildfncache: add a cheaper option to rebuild the fncache
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
47874
diff
changeset
|
89 $ hg debugrebuildfncache --only-data |
0fb328bb2459
debugrebuildfncache: add a cheaper option to rebuild the fncache
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
47874
diff
changeset
|
90 adding data/file.d |
0fb328bb2459
debugrebuildfncache: add a cheaper option to rebuild the fncache
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
47874
diff
changeset
|
91 1 items added, 0 removed from fncache |
0fb328bb2459
debugrebuildfncache: add a cheaper option to rebuild the fncache
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
47874
diff
changeset
|
92 $ hg verify -q |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
93 $ cd .. |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
94 |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
95 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
96 Now retry the procedure but intercept the rename of the index and check that |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
97 the journal does not contain the new index size. This demonstrates the edge case |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
98 where the data file is left as garbage. |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
99 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
100 $ hg clone -r 1 troffset-computation troffset-computation-copy2 --config format.revlog-compression=none -q |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
101 $ cd troffset-computation-copy2 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
102 $ cat > .hg/hgrc <<EOF |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
103 > [extensions] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
104 > intercept_rename = $TESTTMP/intercept_rename.py |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
105 > [hooks] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
106 > pretxnchangegroup = python:$TESTDIR/helper-killhook.py:killme |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
107 > EOF |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
108 #if chg |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
109 $ hg pull ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
110 pulling from ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
111 [255] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
112 #else |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
113 $ hg pull ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
114 pulling from ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
115 [80] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
116 #endif |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
117 $ cat .hg/store/journal | tr -s '\000' ' ' | grep data/file |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
118 data/file.i 1174 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
119 data/file.d 0 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
120 data/file.d 1046 |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
121 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
122 $ hg recover |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
123 rolling back interrupted transaction |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
124 (verify step skipped, run `hg verify` to check your repository content) |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
125 $ f -s .hg/store/data/file* |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
126 .hg/store/data/file.d: size=1046 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
127 .hg/store/data/file.i: size=1174 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
128 $ hg tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
129 changeset: 1:3ce491143aec |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
130 tag: tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
131 user: test |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
132 date: Thu Jan 01 00:00:00 1970 +0000 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
133 summary: _ |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
134 |
47874
308e843f24b1
test: reduce noise, so the important bits stand out
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
47561
diff
changeset
|
135 $ hg verify -q |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
136 $ cd .. |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
137 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
138 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
139 Repeat the original test but let hg rollback the transaction. |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
140 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
141 $ hg clone -r 1 troffset-computation troffset-computation-copy-rb --config format.revlog-compression=none -q |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
142 $ cd troffset-computation-copy-rb |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
143 $ cat > .hg/hgrc <<EOF |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
144 > [hooks] |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
145 > pretxnchangegroup = false |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
146 > EOF |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
147 $ hg pull ../troffset-computation |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
148 pulling from ../troffset-computation |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
149 searching for changes |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
150 adding changesets |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
151 adding manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
152 adding file changes |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
153 transaction abort! |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
154 rollback completed |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
155 abort: pretxnchangegroup hook exited with status 1 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
156 [40] |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
157 $ f -s .hg/store/data/file* |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
158 .hg/store/data/file.d: size=1046 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
159 .hg/store/data/file.i: size=128 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
160 $ hg tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
161 changeset: 1:3ce491143aec |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
162 tag: tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
163 user: test |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
164 date: Thu Jan 01 00:00:00 1970 +0000 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
165 summary: _ |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
166 |
47874
308e843f24b1
test: reduce noise, so the important bits stand out
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
47561
diff
changeset
|
167 $ hg verify -q |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
168 warning: revlog 'data/file.d' not in fncache! |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
169 1 warnings encountered! |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
170 hint: run "hg debugrebuildfncache" to recover from corrupt fncache |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
171 $ cd .. |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
172 |