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

Re: Problem on a post-commit hook to change the current author (windows batch)

From: Branko Čibej <brane_at_wandisco.com>
Date: Thu, 24 Jan 2013 14:43:46 +0100

On 24.01.2013 14:38, Manuel Ferrero wrote:
> Thorsten Schöning wrote:
>
>>> The commit is done, but the author isn't changed.
>>> It seems top me that the batch file hangs when try to lookup the
>>> current
>>> user:
>>> for /f "delims=" %%a in ('svn propget svn:author --revprop -r %REV%
>>> http://my_server_address') do @set myAuthor=%%a
>>
>> May it be that the client is just waiting for a password? You don't
>> seem to provide auth credentials.
>
> Which client?
> I use TortoiseSVN to commit changes on the server.
> I suppose that the server gets the commit, do the commit and then
> execute the post-commit hook.
> Who and where needs to authorize?
> And how can I authorize?

You are running the svn command-line client from your post-commit hook.
If 'svn propget' requires authorization, your hook script will hang
waiting for input.

Since the hook script will always have access to the repository, it
would be better to use "svnlook propget --revprop" and "svnadmin
setrevprop" -- incidentally, the latter does not need any special
pre-revprop-change hook in order to work.

-- Brane

-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Received on 2013-01-24 14:44:27 CET

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.