info-cvs
[Top][All Lists]
Advanced

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

RE: restrict commits of single file


From: Arthur Barrett
Subject: RE: restrict commits of single file
Date: Tue, 9 Oct 2007 06:38:03 +1000

Michael,

> committable. So I tried to put into the commitavail file
> avail | <username>
> unavail | <username> | <file_incl_full_path>

Is this a part of cvsacls or is it some other patch, I've seen the odd
reference to it but I'm not sure.  I usually use CVSNT on linux which
has inbuilt ACLs but this appears to be something else...

> This helps in that sense that the user can't commit the single file  
> alone anymore. yet when the full module in which it is embedded is  
> checked in, the file is committed too. Is there any way to prevent  
> this? I already checked the Cederqvist too, but couldn't find  
> anything in there, so maybe someone here has an idea.
> 

You'd need to write a trigger.  Precommit (CVSNT only?) and Loginfo will
receive the names of all files checked in in the commit.  You'll need to
parse it to see if the "one file" is in the list and if so check that
the "other file(s)" are also in the list.  Precommit will fail the
commit if you return a +ve value but loginfo you'll only be able to send
an e-mail or something warning the user that they should have also
committed "the rest"...

Again - I'd do this in a C/C++ trigger in CVSNT on linux or windows, but
CVS only has script (eg: perl) triggers, but you could achieve the same
results if you know Perl well.  IF you need an example CVSNT C/C++
trigger have a look at the audit or email triggers in the cvsnt source
repo, if you need a sample perl script look at the cvs contrib
directory.

Regards,


Arthur Barrett




reply via email to

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