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