[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preventing Commits to a Branch
From: |
Mark |
Subject: |
Re: Preventing Commits to a Branch |
Date: |
Wed, 25 Jun 2003 07:03:58 -0700 (PDT) |
--- Kevin Layer <address@hidden> wrote:
> Alexandre Augusto Drummond Barroso <address@hidden> wrote:
>
> >> You may create a program to be called on every commit
> >> operation. Your program must analyze the file names, their
> >> revision numbers (the third part of revision number identifies
> >> the branch - the x in 1.1.x.1 identifies the branch x) and
> >> decide if the commit operation is legal or not. Use program
> >> exit code to tell cvs what to do - exit code 0 to allow commit
> >> operation and exit code > 0 to deny it.
> >>
> >> Read more about this on Cederqvist (CVS Manual - Appendix C),
> >> commitinfo administrative file
>
> The Cederqvist says:
>
> Much of the information about the specific commit request being
> made, including the destination branch, commit message, and command
> line options specified, is not available to the command.
>
> The args I see (with version 1.11.2) are: directory files. ie:
>
> /net/cvs/cvs/CVSROOT/cl_commit_check: /cvs/CVSROOT cl_commit_check
>
> How are you suggesting we find out the version number from this?
commitinfo trigger, parse the Entries file. Reject all commits from someone
that updates/checkouts with branch number (to much work to figure out branch
tag), require that all checkouts/updates, other that MAIN, be via branch tag.
have trigger check each file's Entries file line.
Not that difficult with a decent scripting language. We have branch control now
with CVS that is dynamically configured by a config file.
taginfo ..... defined a format for protected tags and have the script protect
them from unauthorized users.
To see what's info/files are available to use for a giving trigger type, add
this trigger (for unix server) (note script might have issues, typed on the
fly, but you should get the jist of it)
#!/bin/perl
print "ARGV = '@ARGV'\n\n";
@out=`env`;
print "env = \n' @out'\n\n";
@out=`pwd`;
chomp @out;
print "PWD = '$out[0]'\n";
@out=`ls -Rla\n`;
print "LS = \n' @out'\n";
exit 0;
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com