tags:

views:

24

answers:

1

Would like to create a script that runs as a scheduled task in Vista to perodically check the revision number of an SVN repository. Compare the svn revision number to a revision number in a local text file. When the revision number changes do stuff.

Overview: Get the current svn revision number. Store it in a text file. Read a one line text file into an environment variable, trim it to 4digits. svn revision numbers are in the following format: xxxxM

Read one line from a local text file into an environment variable, trim it. Local revision numbers are stored in a text file in the following format:

line1 ... bla.

line2 ... bla, bla.

"hostname text Rev[xxxx]".

near last line.

last line.

compare the revision numbers. If they do not match, run svn update, rewrite the local text file with the current svn revision number.

started on a batch file and began to wonder if this would be better suited to vbs.

A: 

Whether VBScript is a better fit here depends on what you're comfortable with, who needs to maintain that script, what other requirements might be there and perhaps even more things.

From what I see what you describe is fairly easy with both a batch file and a VB Script. The only problem you're going to have is dependency on a particular language of the Subversion output.

Joey