##// END OF EJS Templates
merge with -stable
Benoit Boissinot -
r8017:685ce2f7 merge default
parent child Browse files
Show More
@@ -460,7 +460,10 b' class revlog(object):'
460 if self.version == REVLOGV0:
460 if self.version == REVLOGV0:
461 self._io = revlogoldio()
461 self._io = revlogoldio()
462 if i:
462 if i:
463 try:
463 d = self._io.parseindex(f, self._inline)
464 d = self._io.parseindex(f, self._inline)
465 except (ValueError, IndexError), e:
466 raise RevlogError(_("index %s is corrupted") % (self.indexfile))
464 self.index, self.nodemap, self._chunkcache = d
467 self.index, self.nodemap, self._chunkcache = d
465
468
466 # add the magic null revision at -1 (if it hasn't been done already)
469 # add the magic null revision at -1 (if it hasn't been done already)
@@ -1,7 +1,8 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 echo % prepare repo
3 echo % prepare repo
4 hg init
4 hg init a
5 cd a
5 echo "some text" > FOO.txt
6 echo "some text" > FOO.txt
6 echo "another text" > bar.txt
7 echo "another text" > bar.txt
7 echo "more text" > QUICK.txt
8 echo "more text" > QUICK.txt
@@ -23,4 +24,22 b' echo'
23 echo % verify
24 echo % verify
24 hg verify
25 hg verify
25
26
27 cd ..
28
29 echo % test revlog corruption
30 hg init b
31 cd b
32
33 touch a
34 hg add a
35 hg ci -m a
36
37 echo 'corrupted' > b
38 head -c 20 .hg/store/data/a.i > start
39 cat start b > .hg/store/data/a.i
40
41 echo
42 echo % verify
43 hg verify
44
26 exit 0
45 exit 0
@@ -29,3 +29,16 b' checking files'
29 3 files, 1 changesets, 0 total revisions
29 3 files, 1 changesets, 0 total revisions
30 9 integrity errors encountered!
30 9 integrity errors encountered!
31 (first damaged changeset appears to be 0)
31 (first damaged changeset appears to be 0)
32 % test revlog corruption
33
34 % verify
35 checking changesets
36 checking manifests
37 crosschecking files in changesets and manifests
38 checking files
39 a@0: broken revlog! (index data/a.i is corrupted)
40 warning: orphan revlog 'data/a.i'
41 1 files, 1 changesets, 0 total revisions
42 1 warnings encountered!
43 1 integrity errors encountered!
44 (first damaged changeset appears to be 0)
General Comments 0
You need to be logged in to leave comments. Login now