On Tuesday 22 May 2007 15:31, Larry Martell wrote:
> On 5/21/07, Hari Kodungallur <hkodungallur@gmail.com> wrote:
> > On 5/21/07, Larry Martell <larry.martell@gmail.com> wrote:
> > > We have a situation where we need to keep a template version of
> > > a file under SVN control, and allow users to checkout this template
> > > into their working copy. We want them to be able to modify this
> > > file in their working copy, but we do not want them to be able to
> > > check their changes to this file back in. Is there any way to
> > > achieve this with SVN? (We can't set svn:needs-lock and then
> > > lock the file because then it gets checked out read-only).
> >
> > You can do this in a the pre-commit hook. If the template file is in
> > /trunk/mytemplates/file.tmpl, then you can reject a check-in if the
> > incoming file list has the path /trunk/mytemplates/file.tmpl.
> >
> > You could possibly also include a check to see if the 'author' of the
> > transaction is a certain user who is 'privileged. And that user may be
> > able to check-in the file. Without this check, if the user who controls
> > the template file has to check-in a modification, that will be rejected
> > as well.
>
> Thanks. That is what we ended up doing.
>
> -larry
Similar to the solution in the FAQ:
http://subversion.tigris.org/faq.html#ignore-commit
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue May 22 14:58:27 2007