I am trying to setup our Unix-based CVS repository to run dos2unix when files are committed, but I'm not having much luck and don't see any solution laid out clearly in the mailing lists.
Don't attempt to use a commitinfo script to change a file being checked in. It won't work.
So I thought that dos2unix would get the path combined with filename as an argument.
man dos2unix
Does anyone have an example of this that does work?
Sorry, no. Here's some suggestions, though.
1. Write a script that greps for CRLF in a file. Print an informative error message telling the user to run dos2unix on the offending files, and then have the script return false (not zero). Use this script in commitinfo. You will have to read the documentation about commitinfo again CAREFULLY because the arguments passed to the script are not what you think. Use "DEFAULT echo" to experiment, and be sure to cvs add a new directory when you experiment.
2. If you are checking in from Windows, then use the correct cvs client. If you are using Cygwin with the default text type of "Unix", then you will have to use a different cvs client.
Fred
_______________________________________________________________ Frederic W. Brehm, Sarnoff Corporation, http://www.sarnoff.com/
_______________________________________________ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
