-
Subversion Migration — Binary File Difficulties
2006-11-25 14:10 in /tech
By now, I’ve switched most of my version control working copies over to subversion. The one major exception has been my websites. The obstacle was that when I compared a new subversion working copy to an old CVS working copy, I found that all my binary files had been corrupted.
The explanation seems to be that while SVN does have a binary file detection heuristic, somehow cvs2svn bypasses it. Supposedly if you have ‘-kb’ set on your binary files it does the right thing, but I’m usually too lazy to bother. The reason this causes problems in SVN is that in addition to keyword expansion, subversion also does end-of-line translation, which CVS doesn’t. Clearly, this will cause badness if applied to binary files.
It seems like I might have been able to avoid this with appropriate config file voodoo for cvs2svn, but it’s not really documented. Alternatively, had I known, I could have set the binary flag in CVS before I did the conversion. Alas, at this point, short of running the conversion again from scratch, I was stuck fixing things up somewhat by hand. In essense, this is just a matter of running something like:
for f (**/*.jpg) ; do svn propdel svn:keywords $f svn propdel svn:eol-style $f svn propset svn:mime-type image/jpeg $f cp ~/old_cvs/$f $f done
but, in practice, I had a bunch of other media types that also needed to be dealt with, and also I had to deal with some pain related to case-insensitivity on my old (Mac) server vs case-sensitivity on the new (Linux) server. Overall, not a fun couple of hours. But, now it’s done, and I can declare the migration complete.
Comments
Ben Collins-Sussman wrote:
Michael Haggerty wrote:
Kevin wrote:
Leave a comment
Please use plain text only. No HTML tags are allowed.
Comments are closed for this story.
Trackbacks are closed for this story.