[cvsnt] Commitinfo: How to get name(s) of file(s) to commit?

Johannes Kilian jok at vitronic.com
Fri Aug 27 08:16:22 BST 2004


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Hi

I'm trying to write a commitinfo filter using a perl-script. I've got no 
idea how to pass the names of the files to be commited as input 
parameter to my perl script.

My commitinfo contains the following line:
----------------
DEFAULT D:/Temp/Commitinfo/CVSRoot/checkfile.pl
----------------

my checkfile.pl-Script:
----------------
#perl
print "* A0: $ARGV[0] * A1: $ARGV[1] * A2: $ARGV[2] * A3: $ARGV[3] *\n";
print "*  0: $0       *  1: $1       *  2: $2       *  3: $3 *\n";
exit(1); # Just for test purposes ...
-----------------

The output produced by my script, commiting a file:
---------------
cvs -q commit -m "Test" t01.xml (in directory 
D:\Temp\Commitinfo\Testdaten_CVS\Subdir1\)
* A0: \Test/Testdaten/Subdir1 * A1:  * A2:  * A3:  *
*  0: D:\Temp\Commitinfo\CVSRoot\checkfile.pl       *  1:        *  
2:        *  3:  *

cvs server: Pre-commit check failed             <<<< For sure, since my 
script exits with value != 0
cvs [server aborted]: correct above errors first!
-----------------

How can I get the name of the file which is trying to be commited?

Any help welcome

Johannes






More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook