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

RE: using custom hooks

From: Reedick, Andrew <jr9445_at_ATT.COM>
Date: Tue, 15 Jan 2008 09:07:21 -0600

> -----Original Message-----
> From: Floris van der Ploeg [mailto:fvdploeg_at_xs4all.nl]
> Sent: Tuesday, January 15, 2008 6:17 AM
> To: users_at_subversion.tigris.org
> Subject: using custom hooks
>
> Is there a way to use PowerShell Scripts as Hook Scripts?
>
> Changing the Filetype Association for .ps1 files didn't do the job.
> Currently, I've create a workaround by kicking off a cmd script which,
> in
> turn, runs the PowerShell.exe command and passes the arguments. This,
> however, doesn't return the correct exit code from my PowerShell
> script.
>
> So there could be 2 possible solutions:
>
> 1. enabling powershell support for hook scripts
> 2. passing the exit code from the powershell script to the cmd script
> (but
> does anybody know how to do this??)
>

Google knows everything. A search on "powershell exit code" came back
with:
http://blogs.msdn.com/powershell/archive/2006/10/14/Windows-PowerShell-E
xit-Codes.aspx

Although it's odd that you're having a problem in the first place since
the cmd.exe should already receive the exit code. The 'if errorlevel'
has been around since the early days of DOS, but it's always been
exceeding clumsy:

        some.exe
        rem errorlevel 1 will catch 1 or higher
        If errorlevel 1 goto FAILED
        rem errorlevel 0 will catch 0 or higher
        If errorlevel 0 goto SUCCESS

        :FAILED
        exit 1

        :SUCCESS
        exit 0

*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA623

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-15 16:08:05 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.