Bug 36382 - [FAQ] Eclipse CVS client corrupting jars on checkout
Summary: [FAQ] Eclipse CVS client corrupting jars on checkout
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-VCM-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: faq
Depends on:
Blocks:
 
Reported: 2003-04-10 16:48 EDT by Daniel CLA
Modified: 2004-06-14 09:55 EDT (History)
1 user (show)

See Also:


Attachments
Good jar (59.88 KB, application/octet-stream)
2003-04-10 16:50 EDT, Daniel CLA
no flags Details
Bad jar (59.88 KB, application/octet-stream)
2003-04-10 16:52 EDT, Daniel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel CLA 2003-04-10 16:48:12 EDT
When checking out a branch from cvs within eclipse (ext or extssh), many of the
jars (and the same jars every time i have tried)  are missing between 1 and 10
bytes making them corrupt.  I have repeated this on both the linux client and
the mac osx client.  Checking out with a comand line cvs works.  I will attach a
jar i checked out with eclipse with one i checked out with a command line
client, both of which our using ssh for a connection.
Comment 1 Daniel CLA 2003-04-10 16:50:11 EDT
Created attachment 4546 [details]
Good jar

Downloaded with command line cvs client on linux
Comment 2 Daniel CLA 2003-04-10 16:52:35 EDT
Created attachment 4548 [details]
Bad jar

this jar was checked out using eclipse
Comment 3 Michael Valenta CLA 2003-04-11 09:06:47 EDT
I suspect the problem is that the files are not marked as binary (-kb) in the 
repository. To verify, select the file in the navigator and open the Properties 
page from the context menu. If the keyword mode is anything but -kb, then it 
needs to be changed using the "cvs admin" command.

This needs to be added to the Eclipse CVS FAQ.
Comment 4 Daniel CLA 2003-04-11 11:23:35 EDT
Your absolutely correct, many of the jars in the repository were not tagged as binary.  Why is eclipse doing this while command line clients seem to get all of the bytes even if binaries are tagged as text files?  This seems odd to me.
Comment 5 Michael Valenta CLA 2003-04-11 11:54:22 EDT
The reason is historic. Eclipse CVS (in Eclipse 1.0) used to store all files as 
binary which added spurious CR to all files that were committed from a CRLF 
platform. Code was added to collapse CRLF to the platform line-ending on 
checkout. This eases Eclipse 1.0 to 2.0 migration. I will check to see if 
Eclipse 1.0 to 2.1 migration is expected and, if not, look into removing this 
behavior.

However, if your project was even checked out on a CRLF platform, the binary 
files run the risk of being corrupted unless they are flagged as binary.
Comment 6 Daniel CLA 2003-04-11 12:43:23 EDT
I see, well we are going through today and doing house keeping on all binary files in cvs to fix this for eclipse users and for cvs compliance (this recent release 2.1 is swooning many of our emacs and jbuilder users over to eclipse, thats the sign of a great IDE) .  Thanks for the update,
Comment 7 Jean-Michel Lemieux CLA 2003-04-14 12:31:16 EDT
Lowering severity and waiting for confirmation that changing file keyword mode
solves the file corruption.
Comment 8 Daniel CLA 2003-04-15 13:34:09 EDT
updating those file to binary (-kb) solved the problem, if this is to be added to a FAQ you should 
also mention a quick way too update a large number of jars in eclipse is to multi select them in the 
Package Explorer window right-click on the highlighted jars and select 'Change ASCII/Binary 
Property' from the team menu.
Comment 9 Daniel CLA 2003-04-15 13:38:02 EDT
Sorry I should have mentioned in the above comment to first copy the known good jars to your 
project (in place of the corrupted ones)  then do the Binary property change.
Comment 10 Michael Valenta CLA 2003-04-15 14:29:52 EDT
I didn't mention the 'Change ASCII/Binary Property" approach in the FAQ for the 
exact point you just mentoned. Using the command-line client does not require 
the user to eplace the corrupt jar with a good one. It would be good to mention 
both approaches though.
Comment 11 Jean-Michel Lemieux CLA 2004-06-11 16:52:11 EDT
Post 3.0
Comment 12 Michael Valenta CLA 2004-06-14 09:55:55 EDT
The Eclipse CVS client was changed during 3.0 such that it will no longer try 
to correct line endings. The behavior will match that of the command line 
client.