[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: <kmradke_at_rockwellcollins.com>
Date: Wed, 16 Jul 2008 09:29:21 -0500

dglasser_at_gmail.com wrote on 07/15/2008 09:37:16 PM:
> 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)

I'd like to be consistent with other hooks (but none pass all revprop
names/values).
pre-revprop-change gets the value as part of stdin, since I assume it is
to
allow for large values (possibly larger than the command line length
size).
It only has to deal with one revprop at a time though.

Anyone feel passing all the revprops in stdin as key/value pairs is wrong?

name1=value1
name2=value2
name3=value3
is multi-line and
contains embedded special '=$@!%' chars
name4=value4

Need to deal with multi-line values very carefully...

I just thought of this, but at what point does pre-revprop-change get
called? After pre-commit or before the actual txn is sent?

It is *the place* where revprops should really be
validated, and since the commit log is just a revprop, maybe
this is a better place for me to do my BugID validation?
(The whole reason I wanted the comment in start-commit)

Kevin R.

---------------------------------------------------------------------
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 16:29:40 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.