Mercurial 将工作目录中未修改的文件标记为已修改且无法恢复
我们的团队在 Windows 上使用 TortoisHg 2.0.5,在刷新工作目录中的文件列表后,有时(至少每天一次 :(( ) 显示已修改的未修改文件列表。手动比较不会显示代码中的任何更改,行恢复这些“fantom”文件也不会导致任何结果,我们有两种方法来处理此问题:
- 关闭 eol 扩展并恢复文件,
- 手动删除文件并从头版本中更新它们。
每天这样做真的很烦人(每天两次...三次...),特别是在大型变更集上,请帮助找到问题的原因。
Our team uses TortoisHg 2.0.5 on Windows and after refreshing file list in working directory it sometimes (at least once a day :(( ) shows a list of unmodified files as modified. Manual comparison doesn't show any changes in code, line breaks are also equal. Reverting of these "fantom" files causes no result. There a two way how we deal with this problem:
- Turning off eol extension and reverting the files,
- Manually removing the files and update them from the head revision.
It's really annoying to do this every day (twice ...three times... per day), especially on large changeset! Please help to find a reason of the problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个问题是,您是否专门在 Windows 上工作,如果是,您确定需要
eol
扩展吗?至于您看到的问题,来自 这一系列电子邮件,看起来
eol
扩展使用LF
作为其默认存储库编码,这可能会让 Mercurial 认为您在 Windows 上创建的、以 CRLF 结尾的文件已更改。要更改此设置,请将以下部分添加到您的.hgeol
文件中:我尝试了以下测试,类似于我的链接中的测试(启用了
eol
扩展):The first question is, are you working exclusively on Windows, and if so, are you sure you need the
eol
extension?As for the problem you're seeing, from this series of emails, it looks like the
eol
extension usesLF
as its default repository encoding, which probably makes Mercurial think your created-on-Windows, CRLF-ending files have changed. To change this, add the following section to your.hgeol
file:I tried the following test, similar to the one in my link (with
eol
extension enabled):