[Top][All Lists]

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

RE: Verifymsg on branches?

From: Alex Harper
Subject: RE: Verifymsg on branches?
Date: Wed, 22 Nov 2000 13:29:27 -0600


I've just finished my first cut at doing per-branch bug number requirements in our CVS repository. Bear in mind I haven't finished testing it yet, so I could be way off base here. It also presumes you are using cvs client/server.

My solution was to parse the server-side Entries and/or Entries.Log in the cvs temp directory during msgverify. Any sticky tag (including branches) for the files committed seems to appear there so you can check the sticky tag against a list of known branches (in my case supplied by Bonsai).

I'm fairly certain this will not work for the commit -r case Laird mentioned, but since 99% of my users are using GUI CVS clients which do not have a commit -r interface anyway I decided this was a hole I could live with (given no other choice).

Loginfo supplies a lot more information than any of the other CVS hooks, the problem for me was that by the time the loginfo runs you can't stop the commit. Its already happened. So while you can warn the user that they didn't include a bug number you can't actually _make_ them do anything at that point.

If someone with more CVS hook experience than I knows of a hole in the above suggestion please let me know...

Otherwise I hope this helps,


> -----Original Message-----
> From: Uwe Fritsch [mailto:address@hidden]
> Sent: Monday, November 20, 2000 7:38 PM
> To: address@hidden
> Cc: address@hidden; Deivanai Meiyappan
> Subject: Re: Verifymsg on branches?
> Laird,
> Thanks for your answer.
> Instead of changing the entered log message after the user has entered
> it, I rather would like to make the user aware that he has to enter a
> Bug ID in the log message.
> My idea was to have a different log template for the trunk as compared
> to the branch. As this seems not possible, I now think it would be
> enough to add the BugID line to the generic template and only do the
> test whether the Bug ID was entered if the commit is done on
> the branch.
> But if you can't check for a tag name at verifymsg this will also not
> work, right? The only possibility would be to check for a "branch
> version number", i.e. 4 digits instead of 2.
> How do others enforce that Bug IDs are entered into the log message?
> Thanks,
> Uwe.
> ----- Original Message -----
> From: "Laird Nelson" <address@hidden>
> To: "Uwe Fritsch" <address@hidden>
> Cc: <address@hidden>
> Sent: Tuesday, November 14, 2000 7:03 AM
> Subject: Re: Verifymsg on branches?
> > Uwe Fritsch wrote:
> > > we used the verifymsg mechanism in the past to check for some
> keywords
> > > for commit messages. As we create a branch for each release, we
> would
> > > like to add an additional keyword for bug numbers, but
> only if a new
> > > version is committed to the branch.
> >
> > Well, you can't really do this (yes, you SHOULD be able
> to).  This is
> > due to two major things:
> >
> > 1. You cannot get the new version number of a file being committed.
> So
> > you'll never know if that file is going onto a branch or not.  The
> best
> > you can do is guess based off the old number of the file. 
> This works
> > for most cases, as most users aren't using the -r switch to cvs
> commit.
> >
> > 2. You can't add anything to the message at commitinfo or verifymsg
> > time.  The message being verified is read only.
> >
> > What you *could* do is do something really clever with loginfo.
> > Basically, since loginfo gives you the old and new version numbers,
> you
> > could invoke cvs admin -m (haven't tried this; don't know if it's
> > supported; rcs -m lets you replace one version's log message with
> > another) if the new revision number contains more than one period in
> it.
> >
> > The other thing to do would be to apply your new keyword as a tag
> > instead.
> >
> > Cheers,
> > Laird
> >
> > --
> > W: address@hidden / P: address@hidden
> >
> > Good, cheap, fast: pick two.
> >
> > _______________________________________________
> > Info-cvs mailing list
> > address@hidden
> >
> >
> _______________________________________________
> Info-cvs mailing list
> address@hidden

reply via email to

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