[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using dos2unix on commit???

From: Frederic Brehm
Subject: Re: Using dos2unix on commit???
Date: Fri, 13 Jun 2003 13:38:07 -0400

At 11:47 AM 6/13/2003, Andy Kriger wrote:
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

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.


Frederic W. Brehm, Sarnoff Corporation,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]