You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Giulio T <gi...@uk.linedata.com> on 2009/04/29 12:53:18 UTC

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&dsMessageId=1979541

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


RE: Windows Powershell

Posted by Nicholas Curry <Ni...@cofunds.co.uk>.
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@uk.linedata.com] 
Sent: 29 April 2009 13:53
To: users@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@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@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@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@subversion.tigris.org].


Re: Windows Powershell

Posted by Andrey Repin <an...@freemail.ru>.
Greetings, Giulio T!

> 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.

Almost any scripting language will do.
php, perl, python... I myself prefer 4NT (standard CMD clone) or PHP. Depends
on the task.


--
WBR,
 Andrey Repin (anrdaemon@freemail.ru) 29.04.2009, <23:41>

Sorry for my terrible english...

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

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

Re: Windows Powershell

Posted by Andy Levy <an...@gmail.com>.
On Wed, Apr 29, 2009 at 08:53, Giulio T <gi...@uk.linedata.com> wrote:
> 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.

I haven't used PS but I've done a little bit with WSH for generating
changelogs, and yesterday I got my first cut at an auto-update
post-commit hook running on my desktop.

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

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