On 08/21/2012 02:02 PM, Bert Huijben wrote: > When is this script run when committing with a non http-v2 dav client? > > Are the txnprops available then? Or just with the other ra layers and > new dav clients?
The script is still run after the txn is created and the initial txnprops set. So, you'll get svn:date and svn:author, but not svn:log or the user-provided custom revprops. (If this is a point of concern, the hook author can simply bounce commits on the grounds that the client isn't new enough for its standards.) >> +svn_error_t * >> +svn_repos__hooks_init_commit(svn_repos_t *repos, >> + const char *txn_name, >> + apr_pool_t *pool) [...] > Should we also pass the user here? > > We pass it for at least some of the other hooks and I'm not sure if it is > guaranteed always to be the same as the one stored in the transaction > properties. It would have *just* been set as the svn:author txnprop, but I strictly speaking there is a race condition between the time the property is set and the time the hook executes. If a program was able to guess the name of the newly created transaction and change svn:author before the hook examined it, that might be a point of concern? -- C. Michael Pilato <cmpil...@collab.net> CollabNet <> www.collab.net <> Enterprise Cloud Development
signature.asc
Description: OpenPGP digital signature