Hi appp, It's really not that simple.
Over at the CVSNT project (GPL/Free Software, runs on Unix/Linux as well as Windows etc) we struggled with this sort of thing when we created the failsafe audit plugin for CVSNT. Thankfully CVSNT has a 3GL trigger interface as well as the script trigger interface - but we still had to radically alter the core code, I'll explain why. Not only are scripts called per-directory - CVS processing behaves the same way. So you can successfully commit half your files, and then some failure occurs (eg: deadlock, revision not up to date because someone else committed a new revision while your process was processing some other module) the server process exits. Now these 'exits' happen all over the place - whilst some are easy to spot, others take a lot of digging. In short to ensure that some 'postcommand' process gets ran EVERY time (end of commit) required a lot of work. CVSNT is ported from CVS 1.11 codeline - so there is a chance that the 1.12 codeline has addressed this - but I'm sceptical. So in short: you can use precommand/postcommand (I'm not sure which version of CVS has these triggers - all I know is we've got them in CVSNT) and build up a list of what to handle in postcommit and handle the case where postcommand is never called. If your implementation requires these sorts of functions then I personally recommend CVSNT instead of CVS (but I would wouldn't I - after spending the last 6 years working on it...). Regards, Arthur Barrett -----Original Message----- From: [email protected] on behalf of App Penetrator Sent: Sat 21/08/2010 7:41 AM To: [email protected] Cc: Subject: Question about CVS Trigger Scripts I've been using the documentation and configuration file comments to come up with pre-commit and post-commit hooks for CVS that have been working very well, but there is a caveat: These scripts are run for each different directory that is committed. This means, when I commit multiple updated directories in one commit command, my trigger scripts are called more than once. Precisely once for each different directory in the commit. This is fine for most cases, but I would like to be able to determine when the _entire_ commit has begun and when it has ended. Is it possible? How can I do it? Thanks, appp
