[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: Kim Gräsman <kim.grasman_at_gmail.com>
Date: Wed, 3 Sep 2014 21:45:14 +0200

Hi Brane,

On Wed, Sep 3, 2014 at 9:37 PM, Branko Čibej <brane_at_wandisco.com> wrote:
> On 03.09.2014 21:21, Kim Gräsman wrote:
>>
>> Is there some way to convince Subversion to commit on a user's behalf?
>> We'd like to designate one SVN account as the commit bot account and
>> let it impersonate users at will.
>
> 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?

Thanks,
- Kim
Received on 2014-09-03 21:45:50 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.