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

Re: Providing a commit message

From: <kfogel_at_collab.net>
Date: 2005-05-23 06:17:36 CEST

William Ferguson <william.ferguson@hubbub.com.au> writes:
> Is there any way to change the log message provided during
> svn_ra_plugin_t->get_commit_editor?

Note that in Subversion 1.2 (about to be released), you would use
svn_ra_get_commit_editor() to get that editor.

> Ie, I don't really want to provide the log message for the Transaction at
> that point.
> I'd rather provide it when I commit the Transaction
> (svn_delta_editor_t->close_edit).
> Can I provide a dummy message during RA->get_commit_editor and then change
> it before delta_editor->close_edit
> If so, how?

Hmmm. I can't think of a way to do this with the current API.

The only way to make this work (that I can think of) would be to rev
the API and create svn_ra_get_commit_editor2(). This would take a
callback function/baton pair, e.g., log_msg_func/log_msg_baton, and
these would be invoked from close_edit() to produce the log message.
I'm not sure we'd want to do that, though.

Oh, wait. There is a way to do it with the current API. But it's
very, very klugey:

When you implement the svn_commit_callback_t callback to
get_commit_editor(), have the callback go through the RA layer to
propset the svn:log revision property on the newly-created revision.
Obviously a lot of unorthodox state would need to be stored in the
callback's baton for this to work.

I feel obligated to point out how truly awful an idea this is, though.
The original log message would still be set first, possibly resulting
in a (wrong) commit email followed by a (right) propchange email. So
to really do this nicely you'd have to adjust your hook scripts to do
something fancy.

If you try this idea, please don't say you got it from me :-).


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 23 06:54:53 2005

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.