[Top][All Lists]

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

Re: Need one shot post-commit hook in cvs

From: Mark D. Baushke
Subject: Re: Need one shot post-commit hook in cvs
Date: Tue, 19 Feb 2008 23:04:58 -0800

Hash: SHA1

Arthur Barrett <address@hidden> writes:

> > If you use loginfo in the admin directory to setup
> > a script to be called post commit, it can be
> > called multiple times.  I need a way to have
> > a single commit event only call the post commit
> > hook script just once even if multiple files
> > are being checked in.
> Which version of CVS are you using?  I know CVSNT has had postcommand
> and postcommit for some time, and I think CVS 1.12 now has one or both
> of those as well.

Sadly, neither the 1.11.x (STABLE) nor the 1.12.x (FEATURE) branches of
CVS support the postcommit trigger.

Currently supported triggers are:

Supported in both STABLE and FEATURE:

Supported in FEATURE:

If a 'cvs add directory-name' or a 'cvs import' is
being performed, then the loginfo script is run
once, but you can tell from the arguments 
    '- New directory' 
and '- Imported sources'

respectfully, that this is what is happening.

The typical method to use to get what you want is
to have your commitinfo trigger remember the list
of directories being traversed (especially the
last directory) and then when the loginfo script
is run and gets to that directory, do the task you
need to be done only once.

For examples of how to do this, the CVS
distribution has examples in


which get built as contrib/commit_prep and

        -- Mark

PS: It is anti-social to ask questions of the
address@hidden mailing list without a valid
email address. The original user's use of 

    From: Mark <address@hidden>

is such that I would not have replied to him at
all had not Arthur asked the question of CVS to
the list.

'Free' email addresses are still easy to obtain. I
suggest you may wish to get one if you wish to ask
future questions of this list, so that private
exchanges of clarifying questions may be taken
off-list if that is appropriate.
Version: GnuPG v1.4.6 (FreeBSD)


reply via email to

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