开发者

Problems configuring eol extension in Mercurial

开发者 https://www.devze.com 2023-01-18 06:04 出处:网络
I\'m trying to clone a unix-hosted Mercurial repository to a Windows computer. I\'m hoping to use the eol extension so that my text files with LF endings on the server have CRLF when cloned to a Windo

I'm trying to clone a unix-hosted Mercurial repository to a Windows computer. I'm hoping to use the eol extension so that my text files with LF endings on the server have CRLF when cloned to a Windows computer.

Previously I've used the win32text extension which has worked fine, but since the general consensus seems to be that the eol extension is the way to go, I thought I'd give it a shot.

In my Mercurial.ini I have

[extensions]
eol =

I understood that the default behaviour was to convert LF to CRLF on cloning, but I've clearly missed some开发者_如何学运维thing as whenever I clone something from the Unix server to Windows, the line endings remain as LF.

Any ideas?


Following @Geoffrey's comment, I created a .hgeol file as:

[patterns]
** = native

This does the trick, but I'm left confused. I'd assumed that enabling the eol extension would turn on this pattern handling by default. Doesn't this mean that I can only successfully clone from a Unix server if the repository owner has had the foresight to include a .hgeol file handle Windows clients?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号