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

Re: how to detect action of deletion?

From: Ulrich Eckhardt <eckhardt_at_satorlaser.com>
Date: Tue, 24 Nov 2009 10:27:24 +0100

On Tuesday 24 November 2009, Wei Chen wrote:
> i'm a new manager of svn ,i'm ordered to prevent users from deleting
> things in the repository , I should use a pre-commit hook to solve this
> issues but i don't konw how to program.

One thing up front: TortoiseSVN is an SVN client. Your question rather
concerns the server side, so you would be better off asking on the Subversion
mailing list.

Anyway, there is no way to ever delete anything from the repository. You can
only add a new revision which does not reference a file. The file is still
referenced in older revisions then, all of which are still stored in the
repository.

This has two important implications:
1. No data is lost. If you want to prevent data loss, this doesn't give you
anything, so your whole motivation for this might be moot already.
2. In order to move a file, SVN deletes it in one place and adds it in
another. That means that you would effectively also prevent renaming or
moving files!

> I think I should konw "how to detect action of deletion" first,so is
> there someone can give me some

One simple suggestion: google for "SVN hook prevent delete". Not all hits are
relevant, but others already asked your question. ;)

Good luck!

Uli

-- 
ML: http://tortoisesvn.tigris.org/list_etiquette.html
FAQ: http://tortoisesvn.net/faq
Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2423743
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-11-24 10:27:43 CET

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

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