Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Sleep affecting length of runtime for subversion sync

Reply
 
Old 03-06-2009   #1 (permalink)
babberoo


 
 

Sleep affecting length of runtime for subversion sync

I've got a vbs script that runs through a list of entries in a text
file and runs a subversion sync. My problem is that if I run the
commands called in my script on the command line, they execute
normally. However, if I run them in the script, they take forever to
execute. Can anyone spot why the scripted version takes so long?

The script should output the output from the commands back to the
user, along with a "." progress meter.

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("C:\subversion_backup
\repolist.conf", 1)
Do Until objTextFile.AtEndOfStream
wscript.echo("Starting: " & repo )
repo = objTextFile.Readline
wscript.echo("C:\Program Files\VisualSVN Server\bin
\svnsync.exe init
http://url.com/" & repo & " http://DEV:8080/svn/" &
repo)
Set oWsc = CreateObject("WScript.Shell")
Set oExec = oWsc.Exec("C:\Program Files\VisualSVN Server\bin
\svnsync.exe init http://url.com/" & repo & "
http://DEV:8080/svn/" & repo)
wscript.echo "Initialising..."
Do While oExec.Status <> 1
Wscript.sleep 10000
wscript.stdout.write "."
Loop
wscript.stdout.write(oExec.stdout.ReadAll())
Set oExec = Nothing

Set oExec = oWsc.Exec("C:\Program Files\VisualSVN Server\bin
\svnsync.exe --non-interactive sync http://url.com/"
& repo)
wscript.echo "Syncing..."
Do While oExec.Status <> 1
Wscript.sleep 10000
wscript.stdout.write "."
Loop
wscript.stdout.write(oExec.stdout.ReadAll())
Set oExec = Nothing
wscript.echo("Completed: " & repo)
Loop

My System SpecsSystem Spec
Old 03-06-2009   #2 (permalink)
Csaba Gabor


 
 

Re: Sleep affecting length of runtime for subversion sync

I haven't looked at your code in detail,
but do you realize that you are telling the script
to do nothing for 10 seconds when you call
WScript.Sleep 10000 ? 10000milliseconds = 10seconds
See, for example, http://www.ss64.com/wsh/sleep.html

Csaba Gabor from Vienna

On Mar 6, 10:19 am, "babbe...@xxxxxx"
<babbe...@xxxxxx> wrote:
Quote:

> I've got a vbs script that runs through a list of entries in a text
> file and runs a subversion sync. My problem is that if I run the
> commands called in my script on the command line, they execute
> normally. However, if I run them in the script, they take forever to
> execute. Can anyone spot why the scripted version takes so long?
>
> The script should output the output from the commands back to the
> user, along with a "." progress meter.
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> Set objTextFile = objFSO.OpenTextFile("C:\subversion_backup
> \repolist.conf", 1)
> Do Until objTextFile.AtEndOfStream
> wscript.echo("Starting: " & repo )
> repo = objTextFile.Readline
> wscript.echo("C:\Program Files\VisualSVN Server\bin
> \svnsync.exe inithttp://url.com/" & repo & "http://DEV:8080/svn/" &
> repo)
> Set oWsc = CreateObject("WScript.Shell")
> Set oExec = oWsc.Exec("C:\Program Files\VisualSVN Server\bin
> \svnsync.exe inithttp://url.com/" & repo & "http://DEV:8080/svn/" & repo)
> wscript.echo "Initialising..."
> Do While oExec.Status <> 1
> Wscript.sleep 10000
> wscript.stdout.write "."
> Loop
> wscript.stdout.write(oExec.stdout.ReadAll())
> Set oExec = Nothing
>
> Set oExec = oWsc.Exec("C:\Program Files\VisualSVN Server\bin
> \svnsync.exe --non-interactive synchttp://url.com/"
> & repo)
> wscript.echo "Syncing..."
> Do While oExec.Status <> 1
> Wscript.sleep 10000
> wscript.stdout.write "."
> Loop
> wscript.stdout.write(oExec.stdout.ReadAll())
> Set oExec = Nothing
> wscript.echo("Completed: " & repo)
> Loop
My System SpecsSystem Spec
Old 03-07-2009   #3 (permalink)
gimme_this_gimme_that


 
 

Re: Sleep affecting length of runtime for subversion sync

Try doing an SVN commit on your file instead of a doing a sync on the
entire SVN project.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
new router affecting mail Vista mail
Microsoft VBScript runtime error: Object doesn't support this property or method: 'WScript.Sleep' VB Script
Disk Defrag affecting Sleep Function Vista performance & maintenance
Disk Defrag affecting Sleep Function Vista General
Tortoise for Subversion restarts Windows Explorer Vista installation & setup


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46