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

RE: svn and wscript

From: Luke Mason <lmason_at_oasisasset.com.au>
Date: Mon, 9 Nov 2009 11:40:18 +1100

-----Original Message-----
From: Ulrich Eckhardt [mailto:eckhardt_at_satorlaser.com]
Sent: Friday, 6 November 2009 10:43 PM
To: users_at_subversion.tigris.org
Subject: Re: svn and wscript

On Friday 06 November 2009, Luke Mason wrote:
> I'm trying to integrate subversion into our build process.
[...]
> runCmd is used to execute the commandline, catching output and shooting
> it through to the log. When this is run, I end up hanging. The
> directory structure is created, including a .svn dir, but no files.
> When I cancel the batch job, all the files are then created (but my
> batch is dead, so no good to me).

I'm guessing: svn.exe is trying to write to stdout, but its output buffer is
full, so it waits. Then, you cancel the batch job, so any pending output is
discarded but at least it allows svn.exe to continue running.

> Function runCmd(cmd, msg)
> debug("Function: runCmd: " & msg)
> Dim objShell
> Dim objExecObject
> Dim strText
> Set objShell = WScript.CreateObject("WScript.Shell")
> Set objExecObject = objShell.Exec(cmd)
>
> ' wait for it to finish
> do while objExecObject.Status = 0
> WScript.Sleep 100
> loop
>
> LogSectionOpen "runCmd"
> do while not objExecObject.StdOut.AtEndOfStream
> strText = objExecObject.StdOut.ReadLine()
> Log strText, "", LOG_NORMAL
> loop

While waiting for the process to finish, you need to pump its output to the
log already.

BTW, you are discarding any output to stderr, I think. Try using

  svn.exe ... 2>&1

for the commandline or mabe use objExecObject.StdErr (if that exists, I don't
actually know wscript).

Good luck!

Uli

I'll try that Uli, thanks

(sorry, the weekend happened, delayed response)

Luke

"This email is intended for the named recipient only. The information contained in this message may be confidential, or commercially sensitive. If you are not the intended recipient you must not reproduce or distribute any part of this email, disclose its contents to any other party, or take any action in reliance on it, or in reference to it. If you have received this email in error, would you please contact the sender immediately and delete/destroy all copies of this message, both electronic and otherwise. It is the recipient's duty to virus scan and otherwise test the enclosed information before using the information or loading attached files onto any computer system. Oasis Asset Management Ltd does not warrant that the information contained in this e-mail is free from viruses, defects, errors, interception or interference. Any views expressed in this message are those of the individual sender, except where that sender specifically states them to be the views of Oasis Asset Management Ltd."

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-11-09 01:41:10 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.