On Wed, Sep 3, 2014 at 10:08 PM, Branko Čibej <brane_at_wandisco.com> wrote:
>>> You could try the following trick: on the build machine, with the bot's
>>> credentials, do this:
>>>
>>> $ svn commit -m ... --with-revprop on-behalf-of=username
>>>
>>> then on the server, add a pre-commit hook script that looks at the
>>> revision properties of the transaction (svnlook propget --revprop)
>>> that's about to be committed; and if svn:author is the bot, and the
>>> on-behalf-of property exists, the script would replace the svn:author
>>> value and delete the on-behalf-of property (svnadmin setrevprop).
>>>
>>> This is just a blue-sky idea, I've never actually done that; but I don't
>>> see a reason, offhand, why it wouldn't work.
>> Nice idea, sounds promising!
>>
>> And as for atomicity, this all happens before the commit transaction
>> hits the actual repo, right?
>
> Yes, that's the whole point of doing this in the pre-commit hook.
Makes sense, thanks.
I'm reading about this now, but unfortunately svnadmin seems to work
on revision numbers, not transaction names, so I guess we can't use it
to set revprops. Am I missing something?
Thank you,
- Kim
Received on 2014-09-03 22:22:31 CEST