Discussion:
issue with .png, .so, and .jar files...
Sameer Oak
2009-03-06 14:02:41 UTC
Permalink
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

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

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.
Todd Denniston
2009-03-06 16:38:43 UTC
Permalink
Post by Sameer Oak
Hello ALL,
I had a few .gif and .jpg files to be committed into CVS.
$ 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.
$ 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.
$ 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
Post by Sameer Oak
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
$ 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.
Post by Sameer Oak
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
Spiro Trikaliotis
2009-03-06 16:40:15 UTC
Permalink
Hello,
Post by Sameer Oak
$ cvs commit -kb project2/images/1.png project2/lib/C/2.so
project2/libJava/test.jar
You must use -kb on "cvs add", not on "cvs commit".
Post by Sameer Oak
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
$ cvs admin -kb project2/images/1.png project2/lib/C/2.so
project2/libJava/test.jar
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.
Did you do the checkin on Windows? In this case, the files are broken,
and you cannot repair them. You must rebuild them and check them in
again.

You might also want to generate a cvswrappers file (cf.
http://ximbiot.com/cvs/manual/cvs-1.11.23/cvs_18.html#SEC177). This way,
you can ensure that whenever a file with a specific ending is added, -kb
is assumed automatically.

HTH,
Spiro.
--
Spiro R. Trikaliotis http://opencbm.sf.net/
http://www.trikaliotis.net/ http://www.viceteam.org/
Loading...