On Tue, Dec 16, 2008 at 09:21, Ilan Yaniv <Ilan.Yaniv_at_timetoknow.org> wrote:
> Fine, the reason to all those messages is that I got no answer for the
> whole day long, and this is the reason I opened so many questions, sorry
> for the trouble.
This is a mailing list of volunteers. You are not guaranteed a
response in a set amount of time - or at all, for that matter. If no
one has an answer, sending the same question many times will not cause
one to be magically created.
Your posts didn't even appear in my inbox till this morning. If
everyone else on the list had the same experience, they couldn't have
replied. If you're in doubt about whether a post made it to the list,
check the archives a few hours after you send it.
> Next,
> I changed the Perl script to be .exe file. YEEPEE it works.
> Now I want a message to be sent to the committer. Most of the people
> here use Tortoise, but even with command line, I want a message to be
> outputted not only to a log file but also to the standard output and the
> Tortoise window.
>
> What I was trying to do is to use Perl\Tk which is the Perl GUI library,
> and to show the user a message box with the warning. This only got my
> client to get stuck and the commit to fail, and many other problems,
> because there was no message window to the user.
>
> How do I send messages as output of the hook?
Hook scripts are not interactive. Using a GUI library is a waste of
your time and may be counterproductive. Send your message to STDERR
and it will go back to the client AND stop the commit from happening.
You cannot produce a "warning" in the pre-commit hook - if you send
output back to the client, it WILL fail the transaction.
If you need to send a "warning" while allowing the hook to end
successfully, send an email. "How do I send email in a Perl script?"
is outside the scope of this mailing list but there are plenty of Perl
hook scripts you can find via Google which may serve as examples.
> -----Original Message-----
> From: Andy Levy [mailto:andy.levy_at_gmail.com]
> Sent: Tuesday, December 16, 2008 4:15 PM
> To: Ilan Yaniv
> Cc: users_at_subversion.tigris.org
> Subject: Re: perl hooks
>
> On Tue, Dec 16, 2008 at 06:47, Ilan Yaniv <Ilan.Yaniv_at_timetoknow.org>
> wrote:
>> So here is the thing.
>>
>> I have a perl script. It is running OK from command line
>>
>> But when I execute the script from hook (I run in command line svn
>> commit...) nothing happens.
>>
>> Why ?????
>
> Because on a Windows server, your pre-commit script must be
> pre-commit.bat, pre-commit.exe or pre-commit.cmd. IOW, it must be an
> executable, or a Windows batch file/CMD script which then calls your
> Perl script.
>
> BTW, you seem to have posted a large number of messages on this one
> topic today. Please consider carefully before posting, and post your
> complete message all at once. If you must "continue" a topic, please
> reply to your original post, such that it all appears in one
> discussion thread.
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=985032
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2008-12-16 16:16:03 CET