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