info-cvs
[Top][All Lists]
Advanced

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

Commitinfor and cvswrapper


From: Rez P
Subject: Commitinfor and cvswrapper
Date: Tue, 15 Dec 2009 14:20:56 -0800

Thanks Larry. Sorry for forgetting to add a subject line to my email.  I guess 
I misunderstood the function of cvswrapper file and now I know better.  BTW, is 
there a repository of shell scripts and hooks for CVS somewhere? Thanks again.

 

Rez
 
> Subject: Re: (no subject)
> To: address@hidden
> Date: Tue, 15 Dec 2009 17:12:51 -0500
> CC: address@hidden
> From: address@hidden
> 
> Rez P writes:
> > 
> > Our CVS server is running on Linux and users use CVS.exe or WinCVS on
> > Windows client machines. Is there any way to block users from adding or
> > committing certain files or file patterns to our CVS repository?
> 
> There's no hook for add, but commitinfo is for pre-commit checks. (I
> can't imagine why you thought cvswrappers was applicable -- it's for
> specifying text vs. binary and whether automatic merges are allowed.)
> 
> > I'm reading about the commitinfo file but there aren't ample examples
> > except some vague references in the file using default or all or
> > REGULAR_EXPRESSION [tab] PROGRAM_TO_RUN, whatever that means. 
> 
> All of the trigger scripts use the same basic format, so you can glean a
> lot of information by looking at the examples for the other files. In
> this case, you'll need to write a commitinfo script to check for bad
> names, something like:
> 
> #! /bin/sh
> #
> # commitinfo.sh repos file...
> #
> # Verifies that the file names are all acceptable
> #
> shift
> for file
> do
> case "$file" in
> [Tt][Hh][Uu][Mm][Bb][Ss].[Dd][Bb])
> echo "Disallowed file name: $file"
> exit 1
> ;;
> esac
> done
> exit 0
> 
> Then add a line to your commitinfo administrative file to call it. For
> example, if you want it to apply to all the directories in your
> repository, you could use:
> 
> ALL $CVSROOT/CVSROOT/commitinfo.sh
> -- 
> Larry Jones
> 
> Why is it you always rip your pants on the day everyone has to
> demonstrate a math problem at the chalkboard? -- Calvin
                                          
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/171222986/direct/01/

reply via email to

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