Mercurial > hg
comparison mercurial/localrepo.py @ 1493:1a216cb4ee64
verify: add check for mismatch of index and data length
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 02 Nov 2005 19:26:23 -0800 |
parents | 5f0522d31967 |
children | 1e265c2bec94 |
comparison
equal
deleted
inserted
replaced
1492:5f0522d31967 | 1493:1a216cb4ee64 |
---|---|
1600 self.ui.warn(msg + "\n") | 1600 self.ui.warn(msg + "\n") |
1601 errors[0] += 1 | 1601 errors[0] += 1 |
1602 | 1602 |
1603 seen = {} | 1603 seen = {} |
1604 self.ui.status(_("checking changesets\n")) | 1604 self.ui.status(_("checking changesets\n")) |
1605 d = self.changelog.checksize() | |
1606 if d: | |
1607 err(_("changeset data short %d bytes") % d) | |
1605 for i in range(self.changelog.count()): | 1608 for i in range(self.changelog.count()): |
1606 changesets += 1 | 1609 changesets += 1 |
1607 n = self.changelog.node(i) | 1610 n = self.changelog.node(i) |
1608 l = self.changelog.linkrev(n) | 1611 l = self.changelog.linkrev(n) |
1609 if l != i: | 1612 if l != i: |
1629 for f in changes[3]: | 1632 for f in changes[3]: |
1630 filelinkrevs.setdefault(f, []).append(i) | 1633 filelinkrevs.setdefault(f, []).append(i) |
1631 | 1634 |
1632 seen = {} | 1635 seen = {} |
1633 self.ui.status(_("checking manifests\n")) | 1636 self.ui.status(_("checking manifests\n")) |
1637 d = self.manifest.checksize() | |
1638 if d: | |
1639 err(_("manifest data short %d bytes") % d) | |
1634 for i in range(self.manifest.count()): | 1640 for i in range(self.manifest.count()): |
1635 n = self.manifest.node(i) | 1641 n = self.manifest.node(i) |
1636 l = self.manifest.linkrev(n) | 1642 l = self.manifest.linkrev(n) |
1637 | 1643 |
1638 if l < 0 or l >= self.changelog.count(): | 1644 if l < 0 or l >= self.changelog.count(): |
1683 ff.sort() | 1689 ff.sort() |
1684 for f in ff: | 1690 for f in ff: |
1685 if f == "/dev/null": continue | 1691 if f == "/dev/null": continue |
1686 files += 1 | 1692 files += 1 |
1687 fl = self.file(f) | 1693 fl = self.file(f) |
1694 d = fl.checksize() | |
1695 if d: | |
1696 err(_("%s file data short %d bytes") % (f, d)) | |
1697 | |
1688 nodes = { nullid: 1 } | 1698 nodes = { nullid: 1 } |
1689 seen = {} | 1699 seen = {} |
1690 for i in range(fl.count()): | 1700 for i in range(fl.count()): |
1691 revisions += 1 | 1701 revisions += 1 |
1692 n = fl.node(i) | 1702 n = fl.node(i) |