![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 Specs![]() |
| | #3 (permalink) |
| | 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 Specs![]() |
![]() |
| 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 | |||