[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Re: Allowing checkout of a file, but preventing checking

From: Andrew R Feller <afelle1_at_lsu.edu>
Date: 2007-05-22 14:39:37 CEST

Larry,

Just store the files that fall within this situation in a special
directory and apply read-only permission to it. If you are using Apache
to serve Subversion, then it should deny any request to write to the
directory and any of the files in it.

Otherwise, you will need to either implement the start-commit or
pre-commit hooks to refuse committing changes to a set of files or a
directory.

Hope this helps,
A-

Andrew R Feller, Analyst
Subversion Administrator
University Information Systems
Louisiana State University
afelle1@lsu.edu
(office) 225.578.3737
-----Original Message-----
From: Larry Martell [mailto:larry.martell@gmail.com]
Sent: Tuesday, May 22, 2007 7:33 AM
To: Subversion List
Subject: Re: Allowing checkout of a file, but preventing checking

Please reply to the list and not to me directly.

On 5/21/07, Kevin Grover <kevin@kevingrover.net> 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).
> >
> > Thanks!
> > -larry
> >
>
> The normal way of doing this is to check in a template file and
instruct
> users to copy that to the actual name when they check out for the
first
> time, then ignore that name.
>
> Example
> .../svn/repo/conf/myapp.conf.tmpl
> .../svn/repo/conf[svn:ignore contains 'myapp.conf']
>
> When they first check it out, they manually copy the myapp.conf.tmpl
to
> myapp.conf and modify it all they want. Since it's ignored, it will
not be
> included on check-ins**
>
> ** It can still be checked in/committed if explicitly asked for (on
the
> command line for example). You could prevent this with hook scripts.

If I could get the users to follow directions this would work, but
unfortunately they don't, so this needs to be an automatic solution.

-larry

---------------------------------------------------------------------
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:39:57 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.