[Insight-developers] IMPORTANT: pre-commit checking for cvs

Stephen R. Aylward aylward@unc.edu
Mon, 26 Mar 2001 16:02:39 -0500


Hi,

If you want - via anonymous ftp, there is a 91K zip file at
	ftp.rad.unc.edu/pub/users/aylward
called
	tofrodos.zip

The zip archive contains source and executable for linux, unix, win, and
dos for converting files to/from dos/unix.

I tested - it will handle the case of only a few lines having ctrl-m's
on the end.

A good set of options is

	todos -fodp <filename>
	
		-f force overwrite
		-o overwrite original
		-d convert dos to unix
		-p preserve file owner and time (important for CVS)


Stephen

"Lorensen, William E (CRD)" wrote:
> 
> Folks,
>         I've added pre-commit check scripts to the cvs repository. Currently there are two pre-commit
> checks.
> Both operate on txx, cxx, h, htm and html files.
> 
> pre-commit check #1 scans the file for lines with a trailing ctrl-M. These are probably being
> inserted by Micorsoft
> editors. They are easliy removed with emacs. I'm not sure how to remove them otherwise.
> 
> pre-commit check #2 checks the last line in a file for a newline. This is easliy fixed with any
> editor. Go to the end of the file and hit enter.
> 
> If either pre-commit check fails, the entire cvs commit wiill be stopped.
> 
> I hope this will help folks.
> 
> I'm not sure about the robustness of these scripts. Please send me e-mail if you try to commit a file
> and the checkers incorrectly block the commit.
> 
> Bill
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers

-- 
===============================================
Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://www.cs.unc.edu/~aylward
aylward@unc.edu
(919) 966-9695