zjwang zjwang - 1 month ago 12
Git Question

How to config Mercurial HG to auto ignore line ending changes?

I'm transfer a hg repo from a Windows environment to 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.

In git one can do the following to resolve this but what is the equivalent solution for mercurial hg?

git config --global core.autocrlf true

Answer

Maybe this extension does the work. Check out EolExtension

Enable Eol extension (in your .hgrc file):

[extensions]
eol =

And then override the OS default carriage return:

[eol]
native = CRLF
only-consistent = False
Comments