[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to check contents of file running commitinfo script
From: |
Thomas S. Urban |
Subject: |
Re: how to check contents of file running commitinfo script |
Date: |
Fri, 22 Mar 2002 18:28:54 -0800 |
User-agent: |
Mutt/1.3.21i |
On Sat, Mar 23, 2002 at 00:40:59 -0000, brianpdoyle sent 0.8K bytes:
> I'm sure that I'm missing something obvious here, but I'm wanting to
> make sure that before any Java file has the correct legal header in
> the file before committing the file to the repository. I see how I
> get the name of the file to the script handed off by commitinfo, but
> how do I get the contents of the file that the user is trying to
> submit? The ",v" file is there, but does it contain the user's
> changes to that file, if it hasn't been committed yet? Does CVS
> store this file to a temp directory or something? There's no info
> about getting the contents of the pre-committed file in the
> documentation. Thanks in advance!!!!
Just open the file passed in as the 2nd - nth arguments to the script -
the first argument is the module. I believe the script is run from the
module directory in the repository. If you were using perl, you would
do something like this:
$module_dir = shift @ARGV;
foreach $file (@ARGV)
{
open (FILE, "$file");
....
}
HTH
Scott
--
All most people want is a little more than they'll ever get.