I just did hg pull on a repository and brought in some changesets. It said to run hg update, so I did. Unfortunately, when I did that, it failed with the following error message:
abort: integrity check failed on 00manifest.i:173!
When I run hg verify, it tells me there are a number of issues with things not in the manifest (with some slight path obscuring):
>hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
somewhere1/file1.aspx@172: in changeset but not in manifest
somewhere2/file1.pdf@170: in changeset but not in manifest checking files
file3.csproj@172: ee005cae8058 not in manifests
somewhere2/file1.pdf@171: 00371c8b9d95 not in manifests
somewhere3/file1.ascx@170: 5c921d9bf620 not in manifests
somewhere4/file1.ascx@172: 23acbd0efd3a not in manifests
somewhere5/file1.aspx@170: ce48ed795067 not in manifests
somewhere5/file2.aspx@171: 15d13df4206f not in manifests
1328 files, 174 changesets, 3182 total revisions
8 integrity errors encountered!
(first damaged changeset appears to be 170)
The source repository passes hg verify just fine.
Is there any way to recover from an integrity check failure or do I need to re-clone the repository completely from the source (not a huge issue in this case)? What could I have done to cause this, so I don’t do it again?
Well, since the first damaged changeset is 170, you could clone your local repository to 169 and then pull from the source. That means only pulling 5 changesets.
And then:
As for manual recovery of repository corruption, this page expounds on that better than I can. See section 4:
If the simple fix of a partial local clone and pulling from the server doesn’t fix it, you’re down to 2 options after backing up your changes (if any) to a bundle or patches: