info-cvs
[Top][All Lists]
Advanced

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

Re: Verifymsg on branches?


From: Todd Denniston
Subject: Re: Verifymsg on branches?
Date: Wed, 22 Nov 2000 15:29:54 -0500

> Alex Harper wrote:
> 
> Uwe,
> 
> 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...
> 
<SNIP>
If you want something that is simple, and I mean simple no checking for 
branches,
which makes sure bug ID's are applied, try the verifymsg and rcsinfo combo.

for my setup I use something close the following (please no laughing, it works
well enough) and a reasonable amount of growling when people go around the 
thing. 
It is applied on the server and is executed on the server.

Though it does not check for branches, it does make sure Bug numbers are used
before checking the change into the revision tree, with the exception of "mvc",
"none" and "version_rev" which is where the growling comes in.

CVSROOT/verifymsg
#cut here
PROJ             /CM_scripts/verify_checkin.sh
#cut here

CVSROOT/rcsinfo
#cut here
PROJ             /CM_scripts/rcsinfo_template.txt
#cut here

/CM_scripts/rcsinfo_template.txt
#cut here
PCR#: 
Reviewed(y/n): 
Comments: 

#cut here

/CM_scripts/verify_checkin.sh
#cut here
#! /bin/bash
# this script is for use by CVS for the verifymsg settings.
#
if head -2 < $1 | tail -1 | grep "PCR#:" > /dev/null; then
  #note mvc = my version control...useful for personal revisions
  #    none = no pcr just check it in. (If you don't want to see me, don't use.)
  head -2 < $1 | tail -1 | awk -F: '{ print $2 }'
  if head -2 < $1 | tail -1 | awk -F: '{print $2}' |  grep -e "[[:digit:]]" -e
"[[:digit:]][[:digit:]]" -e "[[:digit:]][[:digit:]][[:digit:]]" -e "mvc" -e 
"none"
-e "version_rev" > /dev/null; then
    if head -3 < $1 | tail -1 | awk -F: '{print $2}' | grep -e y -e Y -e n -e N 
>
/dev/null; then
      #it has a number and it has a review mark
      exit 0
    else
      echo " "
      echo "either it has be reviewed or not, either way let me know which."
      echo " "
      exit 1
    fi
  else
    echo " "
    echo "I need a PCR number, or a mcv or none marker."
    echo " BTW we get to see each other if I see a none used with out 
permission"
    exit 1
  fi
else
  echo " "
  echo "Not using the form I see."
  echo " "
  exit 1
fi

#cut here

Attachment: stddisclamer.h
Description: Binary data


reply via email to

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