Mercurial > hg
annotate tests/test-transaction-rollback-on-revlog-split.t @ 47364:80c690bf4953
verify: use some intermediate variables instead of a multi-liner
This is shorter and easier to read as the indentation remains the same.
Differential Revision: https://phab.mercurial-scm.org/D10816
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 01 Jun 2021 09:11:01 +0200 |
parents | 93fc0a13b7e8 |
children | 8e9295912573 |
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): |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
13 > path = args[0]._atomictempfile__name |
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 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
20 |
47284
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
21 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
|
22 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
|
23 after the index has been replaced. |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
24 |
47284
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
25 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
|
26 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
|
27 adding the big change. |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
28 |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
29 $ 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
|
30 $ 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
|
31 $ printf '%20d' '1' > file |
47284
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
32 $ 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
|
33 $ printf '%1024d' '1' > file |
47284
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
34 $ hg commit -Aqm_ |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
35 $ 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
|
36 $ hg commit -Aqm_ |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
37 $ cd .. |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
38 |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
39 $ 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
|
40 $ cd troffset-computation-copy |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
41 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
42 Reference size: |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
43 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
44 $ f -s .hg/store/data/file* |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
45 .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
|
46 |
47284
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
47 $ cat > .hg/hgrc <<EOF |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
48 > [hooks] |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
49 > 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
|
50 > EOF |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
51 #if chg |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
52 $ hg pull ../troffset-computation |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
53 pulling from ../troffset-computation |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
54 [255] |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
55 #else |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
56 $ hg pull ../troffset-computation |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
57 pulling from ../troffset-computation |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
58 [80] |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
59 #endif |
21ed126bab53
revlog: fix index computation during inline->non-inline transition
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
60 $ 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
|
61 data/file.i 128 |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
62 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
63 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
|
64 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
|
65 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
|
66 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
|
67 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
68 $ 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
|
69 data/file.i 1174 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
70 data/file.d 0 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
71 data/file.d 1046 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
72 data/file.i 128 |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
73 $ hg recover |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
74 rolling back interrupted transaction |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
75 (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
|
76 $ 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
|
77 .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
|
78 .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
|
79 $ hg tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
80 changeset: 1:3ce491143aec |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
81 tag: tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
82 user: test |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
83 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
|
84 summary: _ |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
85 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
86 $ hg verify |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
87 checking changesets |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
88 checking manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
89 crosschecking files in changesets and manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
90 checking files |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
91 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
|
92 checked 2 changesets with 2 changes to 1 files |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
93 1 warnings encountered! |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
94 hint: run "hg debugrebuildfncache" to recover from corrupt fncache |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
95 $ cd .. |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
96 |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
97 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
98 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
|
99 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
|
100 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
|
101 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
102 $ 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
|
103 $ cd troffset-computation-copy2 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
104 $ cat > .hg/hgrc <<EOF |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
105 > [extensions] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
106 > intercept_rename = $TESTTMP/intercept_rename.py |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
107 > [hooks] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
108 > 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
|
109 > EOF |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
110 #if chg |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
111 $ hg pull ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
112 pulling from ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
113 [255] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
114 #else |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
115 $ hg pull ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
116 pulling from ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
117 [80] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
118 #endif |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
119 $ 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
|
120 data/file.i 1174 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
121 data/file.d 0 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
122 data/file.d 1046 |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
123 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
124 $ hg recover |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
125 rolling back interrupted transaction |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
126 (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
|
127 $ 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
|
128 .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
|
129 .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
|
130 $ hg tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
131 changeset: 1:3ce491143aec |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
132 tag: tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
133 user: test |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
134 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
|
135 summary: _ |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
136 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
137 $ hg verify |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
138 checking changesets |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
139 checking manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
140 crosschecking files in changesets and manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
141 checking files |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
142 checked 2 changesets with 2 changes to 1 files |
47285
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
143 $ cd .. |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
144 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
145 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
146 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
|
147 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
148 $ 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
|
149 $ cd troffset-computation-copy-rb |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
150 $ cat > .hg/hgrc <<EOF |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
151 > [hooks] |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
152 > pretxnchangegroup = false |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
153 > EOF |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
154 $ hg pull ../troffset-computation |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
155 pulling from ../troffset-computation |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
156 searching for changes |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
157 adding changesets |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
158 adding manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
159 adding file changes |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
160 transaction abort! |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
161 rollback completed |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
162 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
|
163 [40] |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
164 $ 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
|
165 .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
|
166 .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
|
167 $ hg tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
168 changeset: 1:3ce491143aec |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
169 tag: tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
170 user: test |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
171 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
|
172 summary: _ |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
173 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
174 $ hg verify |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
175 checking changesets |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
176 checking manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
177 crosschecking files in changesets and manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
178 checking files |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
179 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
|
180 checked 2 changesets with 2 changes to 1 files |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
181 1 warnings encountered! |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
182 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
|
183 $ cd .. |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
184 |