subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko Čibej <br...@wandisco.com>
Subject Re: Commit bot without password
Date Wed, 03 Sep 2014 20:08:19 GMT
On 03.09.2014 21:45, Kim Gräsman wrote:
> Hi Brane,
>
> On Wed, Sep 3, 2014 at 9:37 PM, Branko Čibej <brane@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?

Yes, that's the whole point of doing this in the pre-commit hook.

-- Brane


Mime
View raw message