Paul Chilton electronics, programming, server administration

6May/100

Converting CVSNT to Linux CVS

cvs-logo

Today at work we swapped from using CVSNT on a Windows server machine to using CVS for linux on a QNAP NAS storage box. All appeared to be working fine until I checked out a file that was committed as a binary file. I quickly realised that half of the repository was corrupt (i.e. all binary files). After a little bit of research it was clear that CVSNT and CVS for linux are not directly compatible any more as they store the fact that a file is binary in a different format.

In each repository file there are entries that specify file formats, cvs comments, versions, etc. In amongst these is a flag that specifies the file type.

A file specified as binary in CVSNT has a line reading (where the space is actually a tab):
kopt b;

A file specified as binary in CVS has a line reading (where the space is actually a tab):
expand @b@;

Once I realised this was the case it was a fairly simple matter of converting these line in all files in the repository. To do this I used a usefull little application I have used before called 'TextCrawler'. This is a free download and is useful for performing find/replace actions on multiple files in a directory.

Before I performed the correction I ensured that all files were marked as writable (ie unchecked read-only flag for this directory and applied to all sub files and folders).

Download text crawler and set the options shown in the image below:

Clicking 'Replace' will now search through all files in your repository (my test location here is c:\CVSDATA\).

Once the operation is complete the files are ready to be used in the linux CVS repository.

Posted by Paul

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.