[cvsnt] Re: How to convert binary files to text?

Tony Hoyle tmh at nodomain.org
Thu Nov 25 12:45:32 GMT 2004


Bo Berglund wrote:
> We have a number of Delphi form files (*.dfm) that have been originally
> stored in CVS as binary. Now they have been converted to text by Delphi
> but they are still binary in CVS and we want to change this so that the
> files can be diffed etc.
> 
> So the files themselves are OK in the repository as binary representations
> of Windows text files, the line endings inside these files are CRLF and
> this is also stored as such in the RCS files since they are marked binary.
> 
> I tried to issue the following command to tell CVS that the files are text:
> 
> cvs admin -kt <filename>

Ahh so you're using an older CVSNT.

> But when I now check out the file it has CRCRLF line endings even though no
> actual change was done on the file itself (same revision number etc).

Yes, 'cvs admin -k' potentially breaks all the older copies - that's 
partly why I got rid of it.

Depending on the CVS/CVSNT that did the commits of the earlier versions, 
you can get away with the admin command(for a while CVSNT has stored the 
-k option per-revision and that'll preserve the state for any files 
committed with those versions... I think that's around 2.0.14 and later).

> Is there another command to use in order to change the file type?

With the new server, just use update -kt then commit -f.

Tony



More information about the cvsnt mailing list