[Top][All Lists]

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

Re: cvs verifying log message format per branch

From: Mark D. Baushke
Subject: Re: cvs verifying log message format per branch
Date: Tue, 24 May 2005 09:03:11 -0700

Hash: SHA1

vik <address@hidden> writes:

> I searched for and found a post on exactly this same topic on this
> group, and though it was helpfull, I couldnt figure out the technical
> details. So could someone please help me out?
> I am looking for a way to require a certain cvs log format
> --per branch--, For example, I want to require a format like "Bug Id:
> <digits>" in our production release branch, but not in the main branch.
> Here's what i found in the other post i read:
> "The documentation about the "verifymsg" trigger seems to only allow
> this  kind of restriction per module. I suppose that if I had the
> branch name available in the verifymsg trigger it would be easy to do.
> Is there a way to get at this info ? Like in the commitinfo trigger,
> where you have a list of the files to be committed, and so can ask of
> each file (with "cvs status")
> which branch it is in? ".

The verifymsg script for your module is run once per directory after the
commitinfo script is run. For client/server operations, it is run from
the server-side directory that contains a copy of your files that are
being committed.

So, if you run a 'cvs -n status' command, you should be able to parse the
'Sticky Tag:' lines. (You need the '-n' switch so that you will not run
into lock contention problems in the repository.)

If your verifymsg script runs:

   cvs -qn status | grep '^ *Sticky Tag:' | sort -u

The line will contain the branch information for you to separate out
fairly easily using PERL or sed or awk ... depending on what else your
script needs to do.

        Good luck,
        -- Mark
Version: GnuPG v1.2.3 (FreeBSD)


reply via email to

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