Wednesday, June 3, 2009

CVSNT to Linux CVS

Converting a cvsnt repository to native linux cvs was a simple copy of the repository except for the fact that cvsnt handles binary files differently.

Found this blog entry http://firefang.net/english/converting-cvsnt-repository-format-to-cvs-repository-format which described the difference in handling binary files. It resulted in running the commandline script below in the cvsroot directory after making sure all files/folders where writable by whoever is running the command. This is a one time operation, the back up scripts can easily be removed once the repository is verified.

Careful with the quotes this is to be a single line command. I had to work with the one from the blog above a bit, this worked notice the single quotes around expand:



find . -not -name "*,v.bak" -exec grep -q "kopt.*b" {} \; -not -exec grep -q "expand. *@b@;" {} \; -print0 | xargs -0 -i sh -c "echo conv {} ; cp {} {}.bak ; cat {}.bak | sed 2a\ 'expand @b@;' > {} "

No comments:

Post a Comment