简体   繁体   English

如何配置Mercurial HG以自动忽略行尾更改?

[英]How to config Mercurial HG to auto ignore line ending changes?

I'm transfer a hg repo from a Windows environment to Unix. 我正在将hg存储库从Windows环境转移到Unix。 When I perform hg status it seems many files are marked as modified due to the change in line ending resulted from the Windows to Unix migration. 当我执行hg status ,由于Windows到Unix迁移导致的行尾更改,似乎许多文件被标记为已修改。

In git one can do the following to resolve this but what is the equivalent solution for mercurial hg? 在git中,可以执行以下操作来解决此问题,但是汞汞的等效解决方案是什么?

git config --global core.autocrlf true 

Maybe this extension does the work. 也许此扩展程序可以工作。 Check out EolExtension EolExtension

Enable Eol extension (in your .hgrc file): 启用Eol扩展名(在您的.hgrc文件中):

[extensions]
eol =

And then override the OS default carriage return: 然后覆盖操作系统默认的回车符:

[eol]
native = CRLF
only-consistent = False

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

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