Mercurial > hg
annotate tests/test-transaction-rollback-on-revlog-split.t @ 48272:f6b045910d82 stable
pyoxidizer: force pip to not use pep517 in order to be able to install hg
Mercurial is not (yet) a pep517 package, but the presence of a pyproject.toml
file tells newer-ish versions of pip that it should be one.
This is related to 58fe6d127a01, and fixes pyoxidizer builds for the Heptapod
CI.
Differential Revision: https://phab.mercurial-scm.org/D11710
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 20 Oct 2021 16:54:43 +0200 |
parents | 8e9295912573 |
children | 308e843f24b1 |
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 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
85 $ hg verify |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
86 checking changesets |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
87 checking manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
88 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
|
89 checking files |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
90 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
|
91 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
|
92 1 warnings encountered! |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
93 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
|
94 $ cd .. |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
95 |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
96 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
97 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
|
98 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
|
99 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
|
100 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
101 $ 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
|
102 $ cd troffset-computation-copy2 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
103 $ cat > .hg/hgrc <<EOF |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
104 > [extensions] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
105 > intercept_rename = $TESTTMP/intercept_rename.py |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
106 > [hooks] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
107 > 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
|
108 > EOF |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
109 #if chg |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
110 $ hg pull ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
111 pulling from ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
112 [255] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
113 #else |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
114 $ hg pull ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
115 pulling from ../troffset-computation |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
116 [80] |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
117 #endif |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
118 $ 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
|
119 data/file.i 1174 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
120 data/file.d 0 |
46b828b85eb7
revlog: update data file record before index rename
Joerg Sonnenberger <joerg@bec.de>
parents:
47284
diff
changeset
|
121 data/file.d 1046 |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
122 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
123 $ hg recover |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
124 rolling back interrupted transaction |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
125 (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
|
126 $ 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
|
127 .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
|
128 .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
|
129 $ hg tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
130 changeset: 1:3ce491143aec |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
131 tag: tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
132 user: test |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
133 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
|
134 summary: _ |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
135 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
136 $ hg verify |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
137 checking changesets |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
138 checking manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
139 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
|
140 checking files |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
141 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
|
142 $ cd .. |
47286
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
143 |
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 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
|
146 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
147 $ 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
|
148 $ cd troffset-computation-copy-rb |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
149 $ cat > .hg/hgrc <<EOF |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
150 > [hooks] |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
151 > pretxnchangegroup = false |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
152 > EOF |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
153 $ hg pull ../troffset-computation |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
154 pulling from ../troffset-computation |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
155 searching for changes |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
156 adding changesets |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
157 adding manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
158 adding file changes |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
159 transaction abort! |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
160 rollback completed |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
161 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
|
162 [40] |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
163 $ 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
|
164 .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
|
165 .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
|
166 $ hg tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
167 changeset: 1:3ce491143aec |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
168 tag: tip |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
169 user: test |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
170 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
|
171 summary: _ |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
172 |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
173 $ hg verify |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
174 checking changesets |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
175 checking manifests |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
176 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
|
177 checking files |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
178 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
|
179 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
|
180 1 warnings encountered! |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
181 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
|
182 $ cd .. |
18415fc918a1
recover: only apply last journal record per file (issue6423)
Joerg Sonnenberger <joerg@bec.de>
parents:
47285
diff
changeset
|
183 |