简体   繁体   English

Mercurial存储库被.hgignore和.hgtags等隐藏文件损坏

[英]Mercurial repositories corrupted by hidden files like .hgignore and .hgtags

More than one of the HG-repositories we use have recurring corruption issues, and they are always related to hidden (starting with ".") files, such as .hgignore and .hgtags. 我们使用的HG存储库中不止一个存在反复出现的损坏问题,并且它们始终与隐藏的文件(以“。”开头)相关,例如.hgignore和.hgtags。 Both these repositories are shared between Linux users and Windows users, if that matters. 如果重要的话,这两个存储库在Linux用户和Windows用户之间共享。

Suddenly during work with the repository, operations can be halted by messages such as: 在使用存储库的过程中,突然会因诸如以下消息而停止操作:

hg stat
abort: data/.hgtags.i@fa5433cf149c: no match found!

Verification yields: 验证结果:

hg verify
repository uses revlog format 1
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
data/.hgignore.i@1: missing revlog!
1: empty or missing .hgignore
.hgignore@1: ac9811f0a619 in manifests not found
data/.hgtags.i@17: missing revlog!
17: empty or missing .hgtags
.hgtags@17: fa5433cf149c in manifests not found
1129 files, 18 changesets, 1179 total revisions
6 integrity errors encountered!
(first damaged changeset appears to be 1)

In this repo, i just added .hgtags, and the repository locally became immediately corrupted. 在此存储库中,我仅添加了.hgtags,本地存储库立即损坏。 I can always fix the problem temporarily by re-cloning from a central repository, but the issue always resurfaces again and again. 我总是可以通过从中央存储库重新克隆来临时解决问题,但是问题总是一次又一次地浮出水面。

What is going on here? 这里发生了什么? I assume that if I do a recontruction/recovery, as suggested in https://www.mercurial-scm.org/wiki/RepositoryCorruption , I can get i new repo without .hgignore and .hgtags, but then I assume it will just become corrupted again if I add new versions. 我假设如果按照https://www.mercurial-scm.org/wiki/RepositoryCorruption中的建议进行重建/恢复,我可以在没有.hgignore和.hgtags的情况下获得新的存储库,但是我认为它只会如果添加新版本,将再次损坏。

It appears that some cleanup-script for removing files starting with "~" was making itself into .hg every once in a while. 似乎某些用于删除以“〜”开头的文件的清理脚本有时每隔一段时间就会变成.hg。 Since the newer "dotencode" feature of HG encodes "." 由于HG的较新的“ dotencode”功能编码为“”。 as "~2e", the revlog files were being removed... Mystery solved. 作为“〜2e”,revlog文件已被删除...神秘的问题解决了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM