[Top][All Lists]

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

Re: pre-commit converter

From: rad_google
Subject: Re: pre-commit converter
Date: 8 Mar 2006 10:46:18 -0800
User-agent: G2/0.2

>Find out exactly what the configuration is - exactly what version of the
>client and server are being used (if it's a Cygwin CVS client, is Cygwin
>configured for UNIX-style or DOS-style line endings), what connection
>method, whether either the local directory or the server is mounted on a
>network drive, and post that information here. We should be able to help
>you reconfigure your system to eliminate the newline problem.

I know very little about how to do CVS on windows.  (I use linux/unix
99% of the time.)  I would rather not start poking at other people's
setup without knowing more, which in turn would require time investment
on my part that I cannot afford.

>One golden guideline to follow is: the CVS client, the system hosting
>the working directory (whether it's a local drive or network-mounted)
>and the file editor should all belong to the same operating system
>family. Mixing O/S tools is a recipe for trouble.

The problem is exactly that.  However I cannot mandate an other user to
use linux at home on their laptop.

This is in an academic environment.  I was already pushing the envelope
to use version control, since people had to learn something new.  (How
Often people just keep emailing each other with the new versions, or
set up a web page that you can download the files from...

(Of course in a work environment this is not a problem.  There is a
clear chain of command and file formats could be properly enforced.  If
not the business would suffer.)

>I am strongly of the opinion that *nothing* should alter, in any way,
>the source code that I check in (except for RCS keyword expansion). If
>your file gets corrupted, you have *NO WAY* to recover from it.

I hear you and I do not like the solution I ended up having either.
For those who take this dangerous path though here are some pitfalls to

1. Strongly filter the files the conversion applies.  You do not want
binary files to be altered for sure.
2. CVS versions differ in what gets passed to the pre-commit string.
If you do not do 1) at least make sure you are not converting the
directory (instead of the file) that is passed in in older CVS versions
to the pre-commit string.  (This can be very bad indeed.)
3. Print a warning, send email to the user that their repository has to
be forced to update.

I do not disclose my script here, since I do not want to encourage
others doing this.

I hope that I can get the committers to convert the files to unix
format themselves (prior to a commit)  in the near future.  The
pre-commit script then will be slightly modified to only do the
checking and refuse  the commit.

Thanks for the comments.

reply via email to

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