|
|
Re: How can I make Eclipse ignore EOL type in compares? [message #640280 is a reply to message #640276] |
Fri, 19 November 2010 21:25 |
|
On 2010.11.19 14:12, Peter Steele wrote:
> Judging from the lack of response to this, I assume there is no way to
> configure Eclipse to make it ignore the end-of-line character during
> comparisons. This would definitely be a useful feature to have.
> Basically a variant of the ignore whitespace option, just a little more
> specific.
....or no one who has been afflicted with the problem and found a way
around it happens to have visited the newsgroup in the last few days.
|
|
|
|
|
|
Re: How can I make Eclipse ignore EOL type in compares? [message #714469 is a reply to message #640331] |
Wed, 10 August 2011 15:13 |
M8R-fqo0di Messages: 1 Registered: August 2011 |
Junior Member |
|
|
I have the exact same problem described by the original poster using CVS, and I'm also hoping it gets fixed in the foreseeable future, or a workaround is found for this.
A couple of comments to add to what was said above:
1. From what I've noticed, the files are saved from Eclipse (running on the Windows machine) through the samba drive on the Linux machine without the CR (e.g. only LF), which is the behavior I expect/want. However, when you try to compare the file to the CVS HEAD version in Eclipse, Eclipse seems to checks out the HEAD version with CR+LF ending each line, which is then compared to the local copy on the Windows having CRs only. This obviously produces diffs on all lines due to the extra CRs.
As the original poster noted, the only way to turn off this behavior seems to be to have the compare ignore whitespaces globally, which is not the desired behavior. The behavior I'd like to see is Eclipse being able to ignore only the CRs when it checks out a version from CVS for comparison.
2. Another related problem: in the project explorer, Eclipse shows differences on these files compared with the CVS repository (i.e. it preceeds their names with a ">" character), making it impossible to distinguish visually which files have actually been locally modified without checking each file independently. Checking these files manually using "Compare with -> Latest from HEAD" confirms that the differences are only in the extra CRs. The desired behavior is to have the Project Explorer automatically disregard CR-related differences when marking files as locally modified.
3. The files under the CVS directory (CVS/Root, CVS/Repository and CVS/Entries) are overwritten by Eclipse. The problem is they are written to the Linux filesystem through the samba mount using the originating OS's newline conventions, which is CRLF on Windows. This breaks down the command line CVS on the Linux since it can't handle the extra CRs, and requires their removal to work. I've written an alias to do just that, and have noticed many others on the web have done the same. I wonder whether there's a way to instruct Eclipse to never add these CRs, or to format the newlines according to the target platform where the CVS server resides rather than the source platform on which the Eclipse CVS client is run.
Thanks,
Ben
EDIT:
I seem to have found an option that resolves issue #1 above, by turning off the whitespace ignoring in compare and turning on instead:
Team -> CVS -> Files and Folders -> Uncheck "Convert text files to use platform line ending"
This worked for me (required restart of Eclipse to update).
I still don't have any solutions for issues #2 and #3. Any suggestion are welcome.
[Updated on: Thu, 11 August 2011 09:46] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.07238 seconds