Show More
@@ -56,7 +56,7 b' def _playback(' | |||
|
56 | 56 | unlink=True, |
|
57 | 57 | checkambigfiles=None, |
|
58 | 58 | ): |
|
59 | for f, o in entries: | |
|
59 | for f, o in sorted(dict(entries).items()): | |
|
60 | 60 | if o or not unlink: |
|
61 | 61 | checkambig = checkambigfiles and (f, b'') in checkambigfiles |
|
62 | 62 | try: |
@@ -70,9 +70,32 b' and the second file.i entry should match' | |||
|
70 | 70 | data/file.d 0 |
|
71 | 71 | data/file.d 1046 |
|
72 | 72 | data/file.i 128 |
|
73 | $ hg recover | |
|
74 | rolling back interrupted transaction | |
|
75 | (verify step skipped, run `hg verify` to check your repository content) | |
|
76 | $ f -s .hg/store/data/file* | |
|
77 | .hg/store/data/file.d: size=1046 | |
|
78 | .hg/store/data/file.i: size=128 | |
|
79 | $ hg tip | |
|
80 | changeset: 1:3ce491143aec | |
|
81 | tag: tip | |
|
82 | user: test | |
|
83 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
84 | summary: _ | |
|
85 | ||
|
86 | $ hg verify | |
|
87 | checking changesets | |
|
88 | checking manifests | |
|
89 | crosschecking files in changesets and manifests | |
|
90 | checking files | |
|
91 | warning: revlog 'data/file.d' not in fncache! | |
|
92 | checked 2 changesets with 2 changes to 1 files | |
|
93 | 1 warnings encountered! | |
|
94 | hint: run "hg debugrebuildfncache" to recover from corrupt fncache | |
|
73 | 95 |
$ |
|
74 | 96 | |
|
75 | Now retry the same but intercept the rename of the index and check that | |
|
97 | ||
|
98 | Now retry the procedure but intercept the rename of the index and check that | |
|
76 | 99 | the journal does not contain the new index size. This demonstrates the edge case |
|
77 | 100 | where the data file is left as garbage. |
|
78 | 101 | |
@@ -97,4 +120,65 b' where the data file is left as garbage.' | |||
|
97 | 120 | data/file.i 1174 |
|
98 | 121 | data/file.d 0 |
|
99 | 122 | data/file.d 1046 |
|
123 | ||
|
124 | $ hg recover | |
|
125 | rolling back interrupted transaction | |
|
126 | (verify step skipped, run `hg verify` to check your repository content) | |
|
127 | $ f -s .hg/store/data/file* | |
|
128 | .hg/store/data/file.d: size=1046 | |
|
129 | .hg/store/data/file.i: size=1174 | |
|
130 | $ hg tip | |
|
131 | changeset: 1:3ce491143aec | |
|
132 | tag: tip | |
|
133 | user: test | |
|
134 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
135 | summary: _ | |
|
136 | ||
|
137 | $ hg verify | |
|
138 | checking changesets | |
|
139 | checking manifests | |
|
140 | crosschecking files in changesets and manifests | |
|
141 | checking files | |
|
142 | checked 2 changesets with 2 changes to 1 files | |
|
100 | 143 |
$ |
|
144 | ||
|
145 | ||
|
146 | Repeat the original test but let hg rollback the transaction. | |
|
147 | ||
|
148 | $ hg clone -r 1 troffset-computation troffset-computation-copy-rb --config format.revlog-compression=none -q | |
|
149 | $ cd troffset-computation-copy-rb | |
|
150 | $ cat > .hg/hgrc <<EOF | |
|
151 | > [hooks] | |
|
152 | > pretxnchangegroup = false | |
|
153 | > EOF | |
|
154 | $ hg pull ../troffset-computation | |
|
155 | pulling from ../troffset-computation | |
|
156 | searching for changes | |
|
157 | adding changesets | |
|
158 | adding manifests | |
|
159 | adding file changes | |
|
160 | transaction abort! | |
|
161 | rollback completed | |
|
162 | abort: pretxnchangegroup hook exited with status 1 | |
|
163 | [40] | |
|
164 | $ f -s .hg/store/data/file* | |
|
165 | .hg/store/data/file.d: size=1046 | |
|
166 | .hg/store/data/file.i: size=128 | |
|
167 | $ hg tip | |
|
168 | changeset: 1:3ce491143aec | |
|
169 | tag: tip | |
|
170 | user: test | |
|
171 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
172 | summary: _ | |
|
173 | ||
|
174 | $ hg verify | |
|
175 | checking changesets | |
|
176 | checking manifests | |
|
177 | crosschecking files in changesets and manifests | |
|
178 | checking files | |
|
179 | warning: revlog 'data/file.d' not in fncache! | |
|
180 | checked 2 changesets with 2 changes to 1 files | |
|
181 | 1 warnings encountered! | |
|
182 | hint: run "hg debugrebuildfncache" to recover from corrupt fncache | |
|
183 | $ cd .. | |
|
184 |
General Comments 0
You need to be logged in to leave comments.
Login now