> This too will fail, because Perl is not "natively" executable by
> Windows. On a Windows SVN server, your hook scripts can only
> be BAT or CMD scripts or full-blown executables. A "plain" Perl
> script will not execute, it must be called from a BAT or CMD file,
> or converted to an EXE.
You can change the way Windows handles various file extensions
including executing files that have a *.pl extension as Perl files.
ActiveState sets this up automatically when you install it.
You can also change the PATHEXT system variable which will allow you
to execute Perl scripts without the need of adding the *.pl suffix.
This will put Perl scripts on the same level as BAT scripts and
executable files. I am not sure if ActiveState does this when it is
installed.
I suspect that Ilan already had this setup when he sent out the
initial email since he didn't complain that his script failed, that it
didn't print out the "Hello World" message he expected it to print.
On Tue, Dec 16, 2008 at 11:52 AM, Andy Levy <andy.levy_at_gmail.com> wrote:
> On Tue, Dec 16, 2008 at 11:47, David Weintraub <qazwart_at_gmail.com> wrote:
>> Is this a server side hook?
>>
>> Try this:
>>
>> #! C:/bin/perl
>>
>> print STDERR "Hello World\n";
>> exit 2;
>>
>> That will display your message back to the client. Of course, it will
>> also fail the commit too.
>
> This too will fail, because Perl is not "natively" executable by
> Windows. On a Windows SVN server, your hook scripts can only be BAT or
> CMD scripts or full-blown executables. A "plain" Perl script will not
> execute, it must be called from a BAT or CMD file, or converted to an
> EXE.
>
>> Server side hooks print nothing to the client unless there's a failure
>> and the commit transaction is rejected. Otherwise, it returns nothing.
>>
>> If you want to send information back to the client, you have to use
>> email or even IMing the user. That's the best you're going to do.
>>
>> On Tue, Dec 16, 2008 at 5:12 AM, Ilan Yaniv <Ilan.Yaniv_at_timetoknow.org> wrote:
>>> Hi
>>>
>>> I wrote a pre-commit.pl simple script that I want to be executed before I am
>>> commiting a file.
>>>
>>> It is simple –
>>>
>>> #!C:\Perl\bin
>>>
>>> print STDERR "Hello World\n";
>>>
>>> or…
>>>
>>> #!C:\Perl\bin
>>>
>>> print "Hello World\n";
>>>
>>> But, when I execute the script I am getting no message when I am doing it
>>> from the command line.
>>>
>>> Please help.
>>>
>>> Ilan Yaniv
>>>
>>> Configuration Management
>>>
>>> Phone: 03-7534333 ext. 5873
>>>
>>> Ilan.Yaniv_at_timetoknow.org
>>
>>
>>
>> --
>> --
>> David Weintraub
>> qazwart_at_gmail.com
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=985092
>>
>> To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
>>
>
--
--
David Weintraub
qazwart_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=985119
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2008-12-16 18:44:57 CET