[cvsnt] Re: Any possibility to control branch acl on a per-filelevel using a "cvs chacl" -like command?

Kim Hansen kha at mita-teknik.com
Thu Aug 12 12:24:06 BST 2004


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Very nice advise Glen and John. 

I get it with the script as far as restricting access
to the specific files for anyone else than two priviledged users using a commitinfo script.

However, the access denial also depends on which branch the commit is done on. It is only if
the commit is done on "HEAD" that I need the access restriction. On any other branch than 
HEAD it is OK, that all users commit.

How do I make my script aware of the branch on which the file is committed?

Cheers,

Kim


John Kinson wrote:
>
>You're right Glen, the commitinfo hook could be used for this.  The 
>script is invoked with the first parameter containing 
>"/repository/module[/subdirectory/...]", and a list of files being 
>committed within that directory is supplied on stdin.
>
>Kim, you need to write a commitinfo script as discussed in the cvsnt 
>documentation that checks whether the CVS_USER environment variable 
>matches one of your two authorised users, and if not, checks whether the 
>restricted files are present in the supplied data.  If they are, then 
>your script should return a non-zero value to prevent the commit from 
>proceding, and return 0 otherwise.
>
>Glen Starrett wrote:
>> Kim Hansen wrote:
>> 
>>> Hi,
>>>
>>> I have a case with two files in a directory, where it very crucial 
>>> that commits on the main branch
>>> is restricted to two users, who knows how to handle merging of 
>>> developing branches to HEAD for these
>>> two files.
>>>
>>> I am aware that I can restrict access to making commits on head for 
>>> *all* files in that directory
>>> to these two CVS users using the administrative cvs chacl command. 
>>> However, I have not found a way to accomplish this restriction on a 
>>> per file basis.
>>>
>>> Can it be done with cvsnt?
>> 
>> 
>> I think you could write a script against commitinfo, something like 
>> cvs_acls script but specific to certain files (I'm not sure if it knows 
>> what files are being processed though at that point).
>> 
>> 



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook