1

I'm working with mercurial+mq, on Win+OSX, and the EOL issues are killing me. I've activated EOL extension, added .hgeol as shown below:

[patterns]
**.sln = CRLF
**.vcproj = CRLF
**.vcxproj = CRLF
**.vcproj.filters = CRLF
**.vcxproj.filters = CRLF
**autoexp.dat = CRLF
**Makefile = LF
** = native

and everything seemed to work fine .. on Windows (well, I had a few files with line ending issues, I fixed them in the first patch, the one that includes .hgeol too).

Then I moved to Mac, assuming it would work there too, right? Well, wrong. When I qpush the first patch (the one with the ".hgeol" file + the line-ending changes), it works but I see a set of "modified" files (it's the exact same files that I "fixed" on windows, so that they no longer show as modified!). Whatever, I try to "hg qrefresh" in order to get the line changes (thinking I'll figure it out later)... but no luck: how if I go on to qpush my other patches, I start geting rejects :(

Any idea how to fix this/what is causing it? It's driving me crazy....

Martin Geisler
  • 72,968
  • 25
  • 171
  • 229
Virgil
  • 3,022
  • 2
  • 19
  • 36

1 Answers1

0

Let's agree that the compilers know how to deal with any new line format and even a mix. So, my suggestion would be:

  1. Leave windows specific files (the .sln, .vcproj, etc.) to be set up as you already did
  2. Ensure ALL text editors (of all OSs) agree on the SAME ONE new line convention.
  3. Convert all the files you touch with text editors to that new line convention (with dos2unix like tool)
  4. Commit that change
  5. All your existing patches should also adhere that

    a. you may need to apply them one by one, and clean up the files again and refresh those patches so the newlines are also fixed

After this you should be good as long as you:

  1. do not edit the same storage with different uncomplying editors
  2. are not accessing the same repo via share from different OSs and somehow use a bad editor...

Hope this helps ;)

Regards.

Max K.
  • 151
  • 1
  • 3