[cvsnt] Start application after commiting a file

Gabriel Genellina gagsl-cvsnt at yahoo.com.ar
Sun May 27 17:35:07 BST 2007


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.


En Fri, 25 May 2007 12:14:27 -0300, Nuno Rocha <nuno.a.rocha at gmail.com>  
escribió:

> I've been reading the CVSNT manual but could not understand (I'm a noob  
> in
> this CVS script things...) how to start an application after commiting a
> file so a little help would be welcome...
>
> For what I've read, this is accomplished through a "notify" file with  
> some
> options on it...

Yes; depending on what you want to do exactly, you may use the loginfo  
file, or postcommand... See  
<http://www.cvsnt.org/manual/html/commit-files.html> for the common file  
syntax. The preinstalled files come with some examples.

>   1 - I want to analyse (parse, for example) the file that was commited.  
> To
> do this, I thought of launching a Java application that will pass the
> filename for a webservice running in my web application server. After  
> that,
> a cvs checkout command will be run so that I download the just commited  
> file
> and process it. I want every commit to trigger this behaviour, no matter
> what user commited the file, after the command is completed. Do you think
> this is possible with this approach?

Sure. If you want to allow/deny the commit operation depending on some  
criteria, use the commitinfo file. If you only want to process the file  
once the operation is complete, use the loginfo or postcommit file.

>  2 - Where is the "notify" file supposed to be put? I want to "monitor"  
> only
> a specific module (and its sub-modules), so the file is going to  
> CVSNTROOT
> or to the module I want to watch?

See  
<http://www.cvsnt.org/manual/html/Intro-administrative-files.html#id2532964>  
and  
<http://www.cvsnt.org/manual/html/Repository-storage.html#CVSROOT-storage>  
for info on how to checkout and edit the files. Basically you have to  
checkout the CVSROOT module, edit the commitinfo file (or whatever file  
you want to use) and commit it again. There is only one set of files per  
repository; you can have different actions for different modules  
(depending on the filter specified on each line).

-- 
Gabriel Genellina


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