info-cvs
[Top][All Lists]
Advanced

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

Re: access rights to branches


From: Laird Nelson
Subject: Re: access rights to branches
Date: Tue, 31 Oct 2000 07:42:49 -0500

Shem Mazur wrote:
> I have a CVS user who continues to checkout modules or update files from
> the wrong branches.  Can I restrict her ability to update from
> particular branches or main trunk?

What the various other replies were trying (somewhat unhelpfully :-)) to
tell you is no, not with CVS out of the box.  With its commitinfo
mechanism you can't get access to either (a) the new revision number
prior to the commit taking place (a feature that sure would be nice to
have) or (b) whether or not the user supplied a -r switch to the commit
command.  If you could get either (a) or (b) then you could reliably
block commits onto a branch.

That said, if you know that your user will never try to force a commit
using the -r switch (don't know how you'd know this, but most users
don't use this flag), then you can write a commitinfo script that will
check the old revision number and reject access based on it, making the
assumption that the new revision number will be the old one with the
rightmost number incremented by one.  You could also check the tag.

I've got a project going that lets you do this with an XML file
declaring who can do what.  Branch commits (with the assumption made
above) can be blocked based on any combination of filename pattern,
revision pattern and/or tag pattern.  Look at the cvs archives at
http://sourceforge.net/projects/cvssupport/.

Hope that helps,
Cheers,
Laird

--
W: address@hidden / P: address@hidden
http://www.amherst.edu/~ljnelson/
Good, cheap, fast: pick two.



reply via email to

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