info-cvs
[Top][All Lists]
Advanced

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

RE: how to check contents of file running commitinfo script


From: Shubhabrata Sengupta
Subject: RE: how to check contents of file running commitinfo script
Date: Sat, 23 Mar 2002 19:56:32 +0530

No, the script is run in the /tmp (or whatever is the tmp directory)
directory. You can do a pwd in the commitinfo script and check It out.

Shubho

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf
Of Thomas S. Urban
Sent: Saturday, March 23, 2002 7:59 AM
To: brianpdoyle
Cc: address@hidden
Subject: Re: how to check contents of file running commitinfo script

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.

_______________________________________________
Info-cvs mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/info-cvs




reply via email to

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