##// END OF EJS Templates
journal: report parsing errors on recover/rollback (issue4172)
Matt Mackall -
r20524:28b8ff84 default
parent child Browse files
Show More
@@ -174,7 +174,10 b' def rollback(opener, file, report):'
174 lines = fp.readlines()
174 lines = fp.readlines()
175 fp.close()
175 fp.close()
176 for l in lines:
176 for l in lines:
177 f, o = l.split('\0')
177 try:
178 entries.append((f, int(o), None))
178 f, o = l.split('\0')
179 entries.append((f, int(o), None))
180 except ValueError:
181 report(_("couldn't read journal entry %r!\n") % l)
179
182
180 _playback(file, report, opener, entries)
183 _playback(file, report, opener, entries)
@@ -184,4 +184,14 b' same again, but emulate an old client th'
184 $ cat a
184 $ cat a
185 a
185 a
186
186
187 $ cd ..
187 corrupt journal test
188 $ echo "foo" > .hg/store/journal
189 $ hg recover
190 rolling back interrupted transaction
191 couldn't read journal entry 'foo\n'!
192 checking changesets
193 checking manifests
194 crosschecking files in changesets and manifests
195 checking files
196 1 files, 2 changesets, 2 total revisions
197
General Comments 0
You need to be logged in to leave comments. Login now