Mercurial marks unmodified files as modified in working directory and fails to revert

余生长醉 提交于 2019-11-28 01:56:43

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 uses LF 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:

[repository]
native = CRLF

I tried the following test, similar to the one in my link (with eol extension enabled):

> hg init eols
> cd eols
# used notepad++ to save a test file "foo" with Windows line endings (CRLF)
> hg commit -Am "added foo with CRLF"
> hg status
> echo [patterns] > .hgeol
> echo ** = native >> .hgeol
> hg status
  M foo       # spurious difference!
  ? .hgeol
> echo [repository] >> .hgeol
> echo native = CRLF >> .hgeol
> hg status
  ? .hgeol
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!