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

Re: Difference between pre-commit and start-commit

From: Ryan Schmidt <subversion-2012c_at_ryandesign.com>
Date: Sat, 13 Apr 2013 12:28:26 -0500

On Apr 13, 2013, at 09:43, Richard Cavell wrote:

> I apologize in advance for not being able to figure this out. What exactly is the difference between the pre-commit hook and the start-commit hook?

The start-commit hook is executed before the client has transmitted the revision content to the server. The pre-commit hook is executed after the client has transmitted the revision content to the server but before it has been accepted by the server. The post-commit hook is executed after the revision has been accepted by the server.

So, if you just want to reject a commit based on user credentials, use start-commit. If you want to reject a commit based on the contents of the incoming revision, use pre-commit. And if you want to notify people of a successful commit, use post-commit.

> Also, am I right in thinking that all I have to do to "install" such a hook is to write a script, or modify the existing template, and then rename it as the same name without the ".tmpl"?

And make sure it has the execute bit.

> (Or on Windows, add ".bat" or ".exe")
Received on 2013-04-13 19:29:02 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.