Next: Verifying the commit log
Up: Subversion API
Previous: Subversion API
Contents
The hook scripts are a convenient and flexible way to start some
action when a given event happens. The event can be a new commit, a
change in an existing property, etc.
The following events can trigger a hook script:
- commit
- lock
- unlock
- property change
Each of these events can have two actions associated with it: before
the execution of the event and after the execution of the event. The
commit event can have a third action hooked to it, because of the way
Subversion handles new revisions. When a commit starts, it first
creates a transaction that can be rolled back in case of failure. If
the transaction succeeds, a new revision is created from it and a
number is assigned to it. So the commit event can start the following
action:
- start-commit - before the transaction is created
- pre-commit - after the transaction is created, but before it is
stored as a revision
- post-commit - after the transaction is successfully stored as a
revision
Subsections
Next: Verifying the commit log
Up: Subversion API
Previous: Subversion API
Contents
Ivan Ivanov
2008-04-21