[Top][All Lists]

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

Re: Verifymsg on branches?

From: Laird Nelson
Subject: Re: Verifymsg on branches?
Date: Mon, 27 Nov 2000 09:27:34 -0500

Uwe Fritsch wrote:
> 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.

Well, you can look at the <current-directory>/CVS/Entries file in your
script and parse it.  The last or next to last (I forget) field on the
line is the sticky tag the old version of the file has.  Note that this
method breaks the minute anyone uses a cvs commit -r operation.

Finally, you *could* do something really ugly in your loginfo where you
would make your script do something like this (warning: untested;
seat-of-the-pants coding):

  cvs admin -mNEW_REVISION:"INVALID REVISION; DO NOT USE" # or something
like that
  cvs update -p -rOLD_REVISION realfile > tempfile
  mv tempfile realfile
  cvs commit -f -m "Rolled back commit because log message was invalid"

...and then bitch really loudly and graphically to let the user know his
commit was effectively rejected.  I wouldn't really recommend this, but
this would ensure that you could keep non-standardized commits out of
your source tree.  They'd actually be in there, but not very accessible.


W: address@hidden / P: address@hidden
Good, cheap, fast: pick two.

reply via email to

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