修复Mercurial中完整性检查失败的问题? [英] Fixing a failed integrity check in Mercurial?
问题描述
我只是在存储库上做了hg pull
,并带来了一些变更集.它说运行hg update
,所以我做到了.不幸的是,当我这样做时,它失败并显示以下错误消息:
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!
当我运行hg verify
时,它告诉我清单中未包含的东西有很多问题(有些细微的路径遮盖了):
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)
源存储库通过hg verify
很好.
是否有任何方法可以从完整性检查失败中恢复,还是我需要从源头完全重新克隆存储库(在这种情况下,这不是一个大问题)?我能做些什么导致这种情况,所以我不再做?
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?
推荐答案
好吧,由于第一个损坏的变更集是170,因此您可以将本地存储库克隆到169,然后从源中提取.这意味着只提取5个变更集.
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.
hg clone -r 169 damagedrepo fixedrepo
cd fixedreop
hg verify
然后:
hg pull originalsource
对于手动恢复存储库损坏,此页面对此的解释要比我可以.请参阅第4节.
As for manual recovery of repository corruption, this page expounds on that better than I can. See section 4.
我偶尔发现过损坏,尽管上面的文档说这通常是由于用户错误造成的,但是我的实例位于具有空工作目录的可移动USB驱动器上.有时,事情只是无法正确编写或受到某种方式的干扰:并非总是用户错误.但是我总是可以复制多份副本,因此我可以摆脱基本的固定方法.
如果仅对部分本地克隆进行简单修复并无法从服务器中提取修复,则将更改(如果有)备份到包或补丁后,您将有两个选择:
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:
- 手动入侵Mercurial的文件.
- 从服务器执行新的完整克隆.通常,这两者比较容易和快捷.
这篇关于修复Mercurial中完整性检查失败的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!