Re: issue with .png, .so, and .jar files...

Todd Denniston <[email protected]>
Newsgroups gmane.comp.version-control.cvs.general
Message-ID <[email protected]>
Sameer Oak wrote, On 03/06/2009 09:02 AM:
> Hello ALL,
> 
> 
> I had a few .gif and .jpg files to be committed into CVS.
> Initially, by mistake I did the following:
> 
> $ cvs commit project1/images/1.gif project1/images/2.jpg
> 
> Later, when I checked out the sources on the Windows XP-SP2 machine, I found
> that the images were garbled and couldn't be opened.
> However, when I checked them out on my Linux FC-8, I could open them with no
> hassles.
> 
> I could fix this problem by doing the following:
> $ cvs admin -kb project1/images/1.gif project1/images/2.jpg
> $ cd /tmp
> $ cvs co project1
> 
> I could very well open the images files.
> 
> Now I am facing the same problem with .png, .so, and .jar files on, both,
> windows XP-2 and Linux FC-8 machines. However, Debian 4.0 didn't have any
> problems.
> 
> I used following command to do that:
> $ cvs commit -kb project2/images/1.png project2/lib/C/2.so
> project2/libJava/test.jar
> 

First a question:
Are the .so & .jar files produced by building the rest of the code?
If yes, then why are you checking them in?

The solution however is to use -kb when you use the ADD command, so that when 
the commit is done it is done correctly.

http://ximbiot.com/cvs/manual/cvs-1.11.23/cvs_9.html#SEC79
http://ximbiot.com/cvs/manual/cvs-1.11.23/cvs_9.html#SEC81

If your users insist on checking random binary files into CVS, then you should 
probably investigate the cvswrappers file
http://ximbiot.com/cvs/manual/cvs-1.11.23/cvs_18.html#SEC177

> It didn't solve my problem. So I resorted to the former way. I first
> committed without -kb switches. Later, I checked out the sources and issued
> following command:
> $ cvs admin -kb project2/images/1.png project2/lib/C/2.so
> project2/libJava/test.jar
> 

Was the initial commit of this file from a Microsoft box?
If so that is why you cant solve it by your old methods.

(Assuming the first checkin was from an MS box) You MIGHT be able to check it 
out on a Microsoft box, and then re-add it from there to get the correct data 
into CVS.

> But still, it didn't solve my problem.
> 
> I am fighting to solve this problem for last 24 hours but no success till
> this far.
> Kindly help me find the solution.
> 
> Regards,
> - sameer oak.
> 

Good luck.
-- 
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.