Re: (no subject)

Larry Jones <[email protected]>
Newsgroups gmane.comp.version-control.cvs.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.