-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Inconsistent line ending style created by Arduino IDE on Windows 7 #1552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
At first glance, it sounds to me like the editor simply always introduces LF characters as newlines, even in a file that already has CRLF. If that is the case, you could also drop the svn property and just use LF as newlines everywhere, instead of having SVN mangle your newlines on checkout/commit? |
This only hides the situation. The fix is to use the EOL terminator appropriate for the host OS. Fix in a future version? |
Sorry for the late reply. No, we are not going to fix it. Using a uniform line ending makes it easier to share the sketches |
understand your position, thanks for the update
|
Reopening this, as mixing LF and CRLF inside the same file would indeed be a bug to me (and I think me and @ffissore didn't realize this was the case before). @tico-tico what OS are you running that on? Did you just open up the IDE and save the empty sketch somewhere? I just tried this on Linux, which just uses LF everywhere. |
Win 7 x64 SP1 Home Premium.
i guess i pressed Enter once)) here is screenshot of the unchanged empty sketch. Yes, I just saved it . The same result, actually. I don't know if it matters, anyway, screenshot of the cpp file: |
Interesting that some |
Another piece of information. I just realize that there is NO new line at the end of the code if I use Arduino IDE, addition new line (CRLF) appears only in the SAVED file. I mean number_of_lines_in_IDE == number_of_lines_in_file - 1 Some uses println() for saving 😄 A joke and a hint.)) |
Closing as duplicate of #6736, due to that one having received better attention. This should be fixed in the beta build. |
Using the Arduino IDE 1.0.5 to edit sketches, I find that the editor, when saving a sketch to disk, mixes the line-ending styles. This is observed on a Windows 7 machine, when editing code that is managed by subversion with the property::
The problem is described when trying to commit changes back to subversion, the commit fails with a report of::
I regularly fix this situation by going to a tool that will make all the end-of-line characters consistent for my OS and then try committing again.
The Arduino IDE requires a fix since it is the generator of the inconsistent line endings. This is easy to demonstrate on a sketch that has several blank lines.
Step 5 here consistently produces this error for me when using Tortoise SVN as my subversion client.
Note that the same 5-step procedure on Linux Mint 15 and Arduino IDE 1.0.3 with the same project did not produce an error at step 5.
The text was updated successfully, but these errors were encountered: