[Top][All Lists]

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

Re: is it possible to close a development branch?

From: chaitu
Subject: Re: is it possible to close a development branch?
Date: Thu, 16 Oct 2008 23:48:59 -0700 (PDT)
User-agent: G2/1.0

Hi Sam,

In the commitinfo script at the CVS server, you could check for the
branch on which the commit is being requested and reject it. This is
how I did it.

# cd <path to CVSROOT>
# ls
cas           commitinfo  CVS        cvswrappers
loginfo  notify   readonly_branch_list  taginfo              verifymsg
checkoutlist  config      cvsignore  editinfo
modules  rcsinfo  readonly_check
# cat readonly_branch_list
# cat readonly_check


# simple check to prevent check ins to "closed" branches


if [ ! -f $READONLY_BRANCH_LIST ] ; then
         exit 0

BRANCHES=`cat CVS/Entries | cut -d'/' -f6 | sed -e "s/^T//g" | sed -e

for branch in $BRANCHES ; do
         READONLY=`grep -e $branch $READONLY_BRANCH_LIST`
         if [ "" != "$READONLY" ] ; then
                  echo -e "\n\n **** Branch $branch is read only *** \n
                  exit 1

exit 0

# cat commitinfo

# The "commitinfo" file is used to control pre-commit checks.
# The filter on the right is invoked with the repository and a list
# of files to check.  A non-zero exit of the filter program will
# cause the commit to be aborted.
# The first entry on a line is a regular expression which is tested
# against the directory that the change is being committed to,
# to the $CVSROOT.  For the first match that is found, then the
# of the line is the name of the filter to run.
# If the repository name does not match any of the regular expressions
in this
# file, the "DEFAULT" line is used, if it is specified.
# If the name "ALL" appears as a regular expression it is always used
# in addition to the first matching regex or "DEFAULT".
ALL /src/CVSROOT/readonly_check %r
ALL /src/CVSROOT/ %r/%p %s
ALL sh $CVSROOT/CVSROOT/cas/bin/replock/ $USER %r/%p

That's pretty much it. It works for me. You could try and let us know!


reply via email to

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