[cvsnt] using commitinfo within CVSNT

Suresh Venkateswaran suresh.venkateswaran at us.ibm.com
Tue Nov 11 17:49:33 GMT 2003


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.





That works like a charm! Thanks for your help and god bless open source :-)

Regards,
Suresh Venkateswaran.



                                                                                                                                       
                      "Czarnowski,                                                                                                     
                      Aric"                    To:       Suresh Venkateswaran/San Jose/IBM at IBMUS, "Glen Starrett" <grstarrett at cox.net> 
                      <aczarnowski at unim        cc:       <cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook>                                                             
                      ax.com>                  Subject:  RE: [cvsnt] using commitinfo within CVSNT                                     
                                                                                                                                       
                      11/11/2003 09:40                                                                                                 
                      AM                                                                                                               
                                                                                                                                       
                                                                                                                                       




> Glen, it looks like I am still not picking it up
> right. Here is the code and output:

my $file = <STDIN>;

will only pull the first entry off the filehandle because your calling
<STDIN> in scalar context.  This is what I use at our site in
commitinfo.pl to handle both older and newer CVSNT:

--BEGIN PERL SNIP--

# After testing it looks like CVS sends in the module and file stuff
# automatically
#
$commitUser = shift(@ARGV);
$module = shift(@ARGV);

# Unlike loginfo, commitinfo *does not* quote the files names so they
look like
# one big argument to perl.  So, we can just take the remainder of @ARGV
as the
# file listing instead of working to split that back up.
#
@files = @ARGV;         # Older versions of CVSNT pipe files on the cmd
line
push(@files, <STDIN>);  # Newer versions of CVSNT pipe files across
STDIN

foreach my $file (@files) {
             chomp($file);

             ## YOUR CODE HERE ##
}

--END PERL SNIP--

The commitinfo.pl script is called with the following line from
commitinfo.  Note that I do call Perl explicitly and perl.exe is in the
system PATH:

ALL perl $CVSROOT/CVSROOT/commitinfo.pl $USER

You will want to chomp() each filename in @files after this to be safe.
Hope it helps,

Aric

Aric Czarnowski
Unimax Systems Corporation
612-204-3634





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