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

RE: Windows Powershell

From: Nicholas Curry <Nicholas.Curry_at_cofunds.co.uk>
Date: Thu, 30 Apr 2009 09:25:21 +0100

We use Powershell for the pre/post-commit hooks - it's pretty
straightforward to set up. Our pre-commit.bat file looks like this:

powershell %~dp0\pre-commit.ps1 "%1" "%2"

In powershell, we can then do the following:

$repository=$args[0]
$txn=$args[1]

$commitMessage = svnlook log "$repository" -t "$txn"

This gives us the commit message for the current commit.

Automating the working copy should be easy, could you then capture the
return code of the SVN process if the update fails?

HTH,
Nick

-----Original Message-----
From: Giulio T [mailto:giulio.troccoli_at_uk.linedata.com]
Sent: 29 April 2009 13:53
To: users_at_subversion.tigris.org
Subject: Windows Powershell

I know it's a bit OT but does anybody use PowerSheel to do some
scripting in Windows with Subversion?

I'm trying to automate an update of a working copy and send an email if
something goes wrong and I'm having a very very hard time. It maybe be
easier to use normal batch files but I thought I gave PS a try.

Giulio

Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1
6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageI
d=1979541

To unsubscribe from this discussion, e-mail:
[users-unsubscribe_at_subversion.tigris.org].

********************************************************
This e-mail has been swept for viruses by Cofunds.
For more information on this service, please
contact the IT Service Desk on Ext: 7060 or itservicedesk_at_cofunds.co.uk.
********************************************************

Cofunds Limited, 1st Floor, 1 Minster Court, Mincing Lane,
London EC3R 7AA. Registered in England and Wales
No 3965289. Authorised and regulated by Financial Services Authority. Phone: 0845 604 4001, or visit our website at www.cofunds.co.uk.
Telephone calls may be recorded for monitoring purposes.
**************************************************************************
The information contained in this message may be CONFIDENTIAL and is intended for the addressee only. Any unauthorised use, dissemination of the information, or copying of this message is prohibited. If you are not the addressee, or believe this email to have been sent in error, please notify security_at_cofunds.co.uk immediately and delete this message.
Although this e-mail and any attachments are believed to be free of any virus, or other defect which might affect any computer or system into which they are received and opened, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by Cofunds for any loss or damage from receipt or use thereof.
This email does not create or vary any contractual obligations between Cofunds Limited and the addressee. Any views or opinions are solely those of the author and do not necessarily represent those of Cofunds Limited.
Those communicating with us by electronic mail will be deemed to have accepted the risks associated with interception, amendment, loss and late or incomplete delivery. They will also be deemed to have consented to our monitoring of such communications.
**************************************************************************

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1993167

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-30 10:26:27 CEST

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.