Jump to content
Sign in to follow this  
Noxy

Reading SVN Revision from File

Recommended Posts

Noxy

Heya, new user to auto it, been working away happily at it all day.

Basically what im doing is a bug submission Utility, it fills out a webform based on user input, one of the things I would like to submit (automatically)would be the

SVN Revision of a particular file , hopefully I can do this without asking our programmers to change the compiler.

Ive been trying FileGetVersion , however theres no SVN info on that tab

The svn info is on its own tab called "subversion".

If theres a way to read this without having to ask programmers to change something just for QA dept, that would be great :mellow:.

Any help would be great

In the mean time I have used the "last modified" date, however thats not ideal since the person reading the bug would then have to look up the dates to find the revision number.

Share this post


Link to post
Share on other sites
tschneider

Does anyone have a solution to this?

I'm facing a similar problem and I'm stumped (though I have to admit I am new to AutoIt). I'm working on automating testing routines for our software and I need the logfiles for the test runs to include the tested revision number. We are using SVN with Tortoise. I tried googling but there are so many pages about using SVN for version controlling AutoIt source code, it's impossible to find anything about AutoIt accessing SVN's data.

Any ideas? Help would be highly appreciated.

Share this post


Link to post
Share on other sites
bo8ster

Noxy

Using the Auto Info tool, are you able to get a control handle to a text box that contains the rev number?

Auto It can read the contents of text boxes.

In general, getting the rev # is not easy. I'm interested in this too so I'll see if I can't get something working.

I found this on Google - http://research.tannerpages.com/Blog/Good-...totools-project

Edited by bo8ster

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites
bo8ster

Ok, I can get a version number from a folder. Since each folder can have different versions, you can manage your checkouts/updates

#include <file.au3>
#include <array.au3>
#include <Constants.au3>

Global $rev = ""
Local $pid = Run(@ComSpec & " /c svnversion", 'C:\foo\bar\trunk\', @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
While 1

    $rev = StdoutRead($pid)
    If @error Then ExitLoop
    Local $result_array = StringSplit($rev, @LF)
    If NOT ($result_array[1] == "") Then
        $rev = $result_array[1]
        ExitLoop
    EndIf   
Wend

StdioClose($pid)
MsgBox(0, "STDOUT read:", $rev)

You can also use Command Line Parameters like $CmdLine[0] to pass the path to AutoIT

Hope that helps


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.