info-cvs
[Top][All Lists]
Advanced

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

commit restrict to one file in CVS


From: om
Subject: commit restrict to one file in CVS
Date: 11 Jan 2007 22:56:23 -0800
User-agent: G2/1.0

Hi



I am trying to restrict certain users from committing certain files. My
commitinfo file has this line:



^Test/src   /cvs/Test/CVSROOT/newcommit.sh "new text
document.txt:<user1>:<user2>"



The newcommit.sh script reads the command line argument, splits the
name of file and users and compares with the input file and current
user and decides to allow or deny access. The problem I am facing is
suppose the file name has a space as shown in the above statement; then
the newcommit.sh reads it as two different arguments instead of one. I
have tried single quotes, backslash to escape the space, $* etc.
Nothing works. If I directly call the newcommit.sh file and then pass
the same arguments it gives me the expected result but it doesn't
work when I am using it through the commitinfo file.



I have modified the 'newcommit.sh' script as below to echo the
input values.



#!/bin/bash



for i in "address@hidden"

do

   echo [$i]

done



The output is as below:



"new"

"text"

"document.txt:<user1>:<user2>"



The expected output is:



"new text document.txt:<user1>:<user2>"

 

Your help would be highly appreciated.

 
~Om.



reply via email to

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