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

Re: How to stop delete files/directory from SVN Repo Browser

From: Blair Zajac <blair_at_orcaware.com>
Date: Tue, 07 Aug 2012 11:50:21 -0700

On 08/07/2012 02:13 AM, Ryan Schmidt wrote:
>
> On Aug 7, 2012, at 04:00, Subodh Singh wrote:
>
>> Ryan Schmidt wrote:
>>
>>> On Aug 6, 2012, at 01:28, Subodh Singh wrote:
>>>
>>>> I am new to SVN Repository. I need help to stop deletion of
>>> files/directory from Repo Browser, so that user can't commit if any delete
>>> operation is occurred. I can get this information using svnlook but after
>>> commit. I need to catch any delete action before commit. I tried it using
>>> svn hooks but not able to do so. Please guide me.
>>>
>>> It should definitely be possible to write a pre-commit hook to do this.
>>
>> Dear Ryan,
>>
>> Thanks for reply. Problem is that I tried it to do with svn pre-commit hook
>> but not able to catch delete action. If you have any script for this then
>> kindly send it to me.
>
> I'm sorry, I don't have time to write this script for you, but it should be easy to write. You'll use "svnlook changed -t" to inspect the incoming transaction, and look for any lines of output starting with "D" meaning "deleted".

Note that by preventing deletes you also prevent moves, because in svn a
'svn mv A B' is the same as 'svn cp A B; svn rm A'.

Blair
Received on 2012-08-07 20:51:06 CEST

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.