Reputation: 3119
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?
Upvotes: 2
Views: 6275
Reputation: 1403
None of the suggestions here helped me but this worked
note: file type is specified with the -k switch followed by file type
Upvotes: 0
Reputation: 9439
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 -kt
followed by cvs commit -f
recent 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]
Upvotes: 4
Reputation: 13357
Firstly, I'd recommend using TortoiseCVS as it has better CVSNT
support. Whie CVS
and CVSNT
are very similar, CVSNT
is not CVS
.
TortoiseCVS Add
dialog will show the file types as it guesses they are and you can override the filetype there.
For the existing situation, assuming that you don't want to keep the history of the Unicode files, you may try the following.
OK, first the warning:
THOU SHALT NOT EDIT THE CVS REPOSITORY BY HAND (unless thou art truly desperate)
Now for the instructions to break said rule, at your own risk.
Attic
directory,v
extensions of them.cvs add
the files againUpvotes: 0