You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ed Mangual <my...@gmail.com> on 2007/07/24 01:23:44 UTC

How do I prevent users from deleting files from repository.

Hello,

I am new to svn and I am trying to figure out how to write a hook to prevent
users from deleting anything from my svn repostory. Today to my surprise I
found out you could delete an entire branch using the repo browser in the
tortoise svn client. I have been reading the svn book and searching google
for some answers on how to prevent this via a hook or any other method but
have not been able to find anything.

Your help would greatly be appreciated.

Ed

Re: How do I prevent users from deleting files from repository.

Posted by Eric Hanchrow <of...@blarg.net>.
>>>>> "Me" == Eric Hanchrow <of...@blarg.net> writes:

    Me> 2) realize that if a user deletes something, it's gone forever

Gaah.  Of course I meant to say "it's NOT gone forever".

-- 
A DRE voting system is one of the simplest computer
applications you could imagine.  It just adds by one.
        -- Brit Williams, emeritus professor of computer science

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How do I prevent users from deleting files from repository.

Posted by Eric Hanchrow <of...@blarg.net>.
>>>>> "Ed" == Ed Mangual <my...@gmail.com> writes:

    Ed> ... how to write a hook to prevent users from deleting
    Ed> anything from my svn repostory.  

Two things:

1) check out the "svnlook changed" command -- I'm 80% sure it'll tell
you if the pending commit contains deletions.  You can return a
failure code if that's the case.

2) realize that if a user deletes something, it's gone forever -- you
can just undo the deletion.  See
http://svnbook.red-bean.com/nightly/en/svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.undo

-- 
Native Americans used every part of the buffalo, including
the wings.
        -- Darren New

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How do I prevent users from deleting files from repository.

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 23, 2007, at 20:23, Ed Mangual wrote:

> I am new to svn and I am trying to figure out how to write a hook  
> to prevent users from deleting anything from my svn repostory.  
> Today to my surprise I found out you could delete an entire branch  
> using the repo browser in the tortoise svn client. I have been  
> reading the svn book and searching google for some answers on how  
> to prevent this via a hook or any other method but have not been  
> able to find anything.

You can prevent such things in the pre-commit hook. You may wish to  
use the svnperms.py script.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org