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

Re: Betr.: RE: Hook help

From: ankush chadha <ankushchadha2003_at_yahoo.com>
Date: Tue, 22 Feb 2011 06:15:12 -0800 (PST)

>

> > I am trying to write a hook to prevent deletion of elements through a
> pre-commit hook.
>
>
> >>If you're not using the bindings you'd want svnlook, probably svnlook
> diff.
>
> >>But, do you really want such a hook? If a user has permission to add
> stuff they should be allowed to also unwind any mistakes, providing it's
> not a tag or something.
>
>
> Max : What do you mean by bindings?
> And also svnlook seems to give info about already commited stuff..
> Svnlook changed gives me info abt previous commit... (unless I got
> everything wrong .. :-) )
>
> Yes, I want to have deletion control on atleast one repo.
 

> The pre-commit hook will get two input parameters. The first is the repostiory
>path, the second is the
>
> transaciton ID.
> You need to pass this to svnlook:
> svnlook diff c:\somerepository --transaction sometransactionId
> This will allow you to watch the commit that's begin executed.
> Have a look at the manual: http://svnbook.red-bean.com/nightly/en/index.htmlIn
>this case you
>need http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.tk.svnlook but
> if > you have not yet read the entire manual, you really should, it will save
>you a lot of time and headaches!

A different approach to solve the problem of tracking deletes

What we do is during the post-commit event, we identify the operation.

If the revision consists of a delete operation, we add buzz words such as
delete in the subject of the post-commit email.

In this way, developers have freedom to delete trivial stuff and at the same
time managers can track of deletes.

Ankush

      
Received on 2011-02-22 15:15:52 CET

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.