I am using WinCVS as client and CVSNT as my source control server. Some of the files I wanted to add to my CVS repo, were added as Unicode files. Now, I want to recommit the same as ANSI (aka ASCII) files. However, despite deleting the old files from the repo, every time I add the file with the same name, it automatically assigns Unicode encoding to the file.
Is there a way out? Or in other words, can I change the encoding of a file, once it is added to CVS?
There’s a couple of things that (might) come into play here:
you can disable automatic file type detection in WinCvs itself: go to Admin|Preferences|Globals, the option named ‘Supply control when adding files’ – in theory you should be able to use the regular Add command from the toolbar after you have done this
make sure you don’t have any entries in your cvswrappers (both client- and server-side) that define the file types you’re adding as unicode
recent versions of WinCvs come bundled with a macro for adding files with a specific k-mode for the cases not covered by the WinCvs UI (look for Macros|Add|Extended Add Selection… – you should probably explicitly force it to use ‘Text’ (aka -kt) to make sure the server performs no file type auto-detection either
CVSNT supports versioning of file type changes. The command sequence for this in your case would be
cvs update -ktfollowed bycvs commit -frecent versions of WinCvs also come bundled with a macro for performing the latter, it’s under Macros|CVS|Change File Options
[I am the author of both of the macros quoted here so feel free to contact me if they’re giving you any trouble – you can find my contact information inside the macros themselves]