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

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

From: Manuel Ferrero <mferrero_at_reer.it>
Date: Thu, 24 Jan 2013 13:46:17 +0100

In this discussion a user suggested how to change the commit author
using a post-commit hook: http://goo.gl/7dJ4l
I'd like to do exacly that, so I wrote a pre-revprop-change hook that
checks that allows the change under certain circumstances.
I tested and it's working.
My problem is that I can't make the post-commit hoow to work.
My SVN server is CollabNet's SubversionEdge on a Windows 7 machine, so
my hooks are written in MS-DOS batch language.
My post-commit hook is here: http://pastebin.com/MpjCYAsE
In it I first send an email to a bunch of people and then I want to
extract the current author, change it to a new one and then write the
svn:author property.
When I make a commit on TortoiseSVN from my computer I get the window
telling me that the information are sent, but it never exits:
http://img14.imageshack.us/img14/4922/commitloop.png

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

What I'm doing wrong?

Reer SpA
Tel. +39 011 2482215
Fax. +39 011 859867

L'utilizzo non autorizzato del presente messaggio e' vietato e potrebbe costituire reato.
Se il presente messaggio non e' a Lei indirizzato, il suo contenuto non deve essere considerato
come trasmesso o autorizzato dalla Reer SpA; in tale caso Le saremmo grati se, via e-mail,
ce ne comunicasse l'errata ricezione.

The unauthorized use of this e-mail is prohibited and could constitute an offence.
If you are not the intended recipient of this message its contents shall be understood as neither
given nor endorsed by Reer SpA. Please notify Reer SpA by e-mail immediately in that case.
Received on 2013-01-24 15:06:34 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.