info-cvs
[Top][All Lists]
Advanced

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

Re: Have CVS perform actions on all files before checking in?


From: Noel Yap
Subject: Re: Have CVS perform actions on all files before checking in?
Date: Wed, 23 Oct 2002 17:49:15 -0700 (PDT)

--- "Schoep, Grant @ STORM" <address@hidden>
wrote:
> Is it possible to have CVS perform some type of
> action on types of files
> before checking it in? I'd like to configure our
> server for all java and C++
> code to do some nicetys, like strip out ^M's and
> replace bloody tabs with
> spaces where people put them in. Both actions I can
> manually do from the
> command line fairly simply, but it would be great to
> have CVS just do it for
> me(and everyone else).
> 
> For this I would definatly want to be able to
> specify what files it does it
> to, as makefiles would get messed up if the tabs
> were gone.

Although this is possible through the commit info
hook, it is highly recommended that it NOT be done
since doing so will confuse the client that did the
checkin.

Specifically, the client "knows" it has checked in
version, say, 1.5 of a file and that it looks a
certain way.  At the same time, the server (eg
repository) knows that version 1.5 of a file has just
been checked in and that it looks another way.  Mass
confusion will occur.

So, what to do?  Rather than having the commitinfo
hook modify the files, just have it reject the checkin
until the files fit the coding standard.

The only version control tool I know that's able to
handle properly file modification upon checkin is
ClearCase.

HTH,
Noel

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/




reply via email to

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