[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to only checkout files (not being able to commit)?
From: |
Dusan Juhas |
Subject: |
Re: How to only checkout files (not being able to commit)? |
Date: |
Thu, 6 Jun 2002 14:32:02 +0200 (CEST) |
Hi,
> I have a CVS folder which I don't want to be checkoutable (this has been
> achieved simply by chmod the appropriate rights). However, it has a
> subfolder which I do want people to be able to checkout/update from BUT
> not
> being able to commit to. Is this possible to do?
That's quite strange but possible, perhaps.
You can add a line to the $CVSROOT/CVSROOT/commitinfo like this:
<pattern> $CVSROOT/CVSROOT/<commitscript>
If <pattern> matches your checkout-only subfolder, <commitscript> is
invoked. If the script returns non-zero value, commit is cancelled.
Sample script:
#!/bin/sh
echo "You are not allowed to commit changes to this directory"
exit 1
Developers/users should see:
cvs commit: Examining ...
You are not allowed to commit changes to this directory
cvs commit: Pre-commit check failed
cvs [commit aborted]: correct above errors first!
>
> I've tried using LockDir in CVSROOT but to no avail. I would like to be
> able
> to set permission per-user and per-file.
Best regards,
Dusan Juhas