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

Re: Should start-commit hook include log message parameter?

From: David Glasser <glasser_at_davidglasser.net>
Date: Tue, 15 Jul 2008 19:37:16 -0700

On Tue, Jul 15, 2008 at 11:50 AM, Karl Fogel <kfogel_at_red-bean.com> wrote:
> The log message is just one of many revision properties (revprops, i.e.,
> unversioned properties attached to revision numbers) that might be
> transmitted. Specifically, it's the "svn:log" property.
>
> I don't think the repository has those properties yet at start-commit
> time, because they're attached to the subversion txn that is not created
> until after start-commit runs.

The "repository" on disk doesn't, but libsvn_repos sure does:

  svn_string_t *author = apr_hash_get(revprop_table, SVN_PROP_REVISION_AUTHOR,
                                      APR_HASH_KEY_STRING);
  apr_array_header_t *revprops;

  /* Run start-commit hooks. */
  SVN_ERR(svn_repos__hooks_start_commit(repos, author ? author->data : NULL,
                                        repos->client_capabilities, pool));

Just make svn_repos__hooks_start_commit take all of revprop_table, and
then do something or other with it. I'd argue that you should make it
be something like

 REPOS AUTHOR CAPABILITIES REVPROP-NAME REVPROP-VAL REVPROP-NAME REVPROP-VAL ...

(leaving out svn:author from the list, perhaps)

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-16 04:37:31 CEST

This is an archived mail posted to the Subversion Dev mailing list.

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