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

RE: Re: using custom hooks

From: Thompson, Graeme (GE Infra, Aviation) <Graeme.Thompson_at_ge.com>
Date: Tue, 15 Jan 2008 11:02:25 -0500

If powershell returns an exit code via the standard errorlevel mechanism
then something like:

EXIT %errorlevel%

would exit the command interpreter with the error level returned from
the powershell and should get back to subversion.

It works at the command prompt but I have not tried this with SVN though
as I have subversion running on SUSE Linux.....

HTH,

Graeme

-----Original Message-----
From: Andy Levy [mailto:andy.levy_at_gmail.com]
Sent: 15 January 2008 12:03
To: fvdploeg_at_xs4all.nl
Cc: users_at_subversion.tigris.org
Subject: Re: using custom hooks

On Jan 15, 2008 6:17 AM, Floris van der Ploeg <fvdploeg_at_xs4all.nl>
wrote:
> 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

I poked around at this about a year ago with a couple SVN devs, though
it was for WSH scripts (.WSH extension), not PowerShell. Ultimately we
came to the conclusion that it wasn't practical; because an interpreter
was required, we had to specify the full path to that interpreter, and
that can vary from system to system. Went back to the solution you're
using now.

> 2. passing the exit code from the powershell script to the cmd script
> (but does anybody know how to do this??)

That's a CMD.exe or maybe batch question I think. I'm sure MS has it
documented but TechNet doesn't seem to like Safari.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org

______________________________________________________________________
CAUTION: This message was sent via the Public Internet and its
authenticity cannot be guaranteed.

______________________________________________________

---------------------------------------------------------------------
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 17:04:07 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.