info-cvs
[Top][All Lists]
Advanced

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

Re: verifymsg and branches


From: Mark D. Baushke
Subject: Re: verifymsg and branches
Date: Thu, 24 Mar 2005 12:39:31 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Matt,

Matt Doar <address@hidden> writes:

> I understand how verifymsg can be used to check the text in a commit
> message. The problems is that I'd like to have different checks for
> different branches, and there is no "branch name" variable that I can
> see to pass into a script called from verifymsg. 

The general problem is that you would need to send the branch for every
file being committed as they may all be different with the current cvs
implementations.

> So I went to see how scripts such as cvs_acls and activitymail get their
> branch information. cvs_acls seems to parse each directory's CVS/Entries
> file on the client, and activitymail seems to get it from the stdin for
> commitinfo. But I can't pass the %l variable (the name of the file
> containing the commit message) to anything but verifymsg and editinfo,
> and I can't pass the same stdin to verifymsg.

Yes, %l would not be useful to you unless we also passed in all of the
directory and filenames for the entire commit... I suppose a patch like
that might be desirable and would be considered.

> Any suggestions? 

Well, given that verifymsg is run after all of the commitinfo triggers
are run for all directories in the commit...

You could collect the names of the branches for each of the files in the
commit during the commitinfo phase of processing and then utilize that
information in the verifymsg. You may use $CVS_PID as a way to create a
unique instance of your commit in some central location, just be sure to
clean it up in verifymsg when you are through with it.

> ~Matt
> 
> p.s. I suppose a two step process of checking the message and recording
> the results for all possible branches somewhere, and then modifying
> cvs_acls to check for an acceptable message once the branch is known
> might work. Bit hokey though.
> 
> Environment: cvs server 1.12.9, older clients and SmartCVS 4.0

        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFCQyWD3x41pRYZE/gRAoArAJ94H8pi/XmNXot3KWfNV7C8GLJpqQCg4KnR
1tStJr/FWDqKh97o84h/qOQ=
=n10P
-----END PGP SIGNATURE-----




reply via email to

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