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

Re: Commit bot without password

From: Andreas Stieger <andreas.stieger_at_gmx.de>
Date: Wed, 03 Sep 2014 21:30:14 +0100

Hi,

On 03/09/14 21:21, Kim Gräsman wrote:
> 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?

Example for manipulating the revision properties of the incoming
transaction:
http://svn.apache.org/viewvc/subversion/trunk/tools/hook-scripts/persist-ephemeral-txnprops.py?view=markup

Andreas
Received on 2014-09-03 22:30:46 CEST

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

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