Mark Balla Posted September 8, 2014 Report Share Posted September 8, 2014 We been using Tortoise SVN for a while and I am familiar with the process but now need to do some simple automation. I am trying to create a simple tool that reads the SVN version of a folder and matches it to a number in a document. Does anyone have experience finding the SVN version number or know of a good resource link. Mark Quote Link to comment
hooovahh Posted September 8, 2014 Report Share Posted September 8, 2014 Well using the command line is the way to go, but I've never done it, I've just used tools that do it. Here is a quick link where you can get the revision with the command line. http://forums.ni.com/t5/LabVIEW/How-can-I-get-the-SVN-repository-version-in-my-VI/td-p/803586 I have yet to get the command to work for some reason not quite sure what I'm missing. Quote Link to comment
ThomasGutzler Posted September 9, 2014 Report Share Posted September 9, 2014 You mean something like this? The trouble with svn and versions is that when you use svn info on a FILE it only returns the revision of your file. To get the most recent revision on the server, you need to point it to the svn URL. The snippet can do both. Just be careful with that because if your repository needs authentication it will not work unless you've saved your credentials in the tortoise svn password manager by ticking the "remember password" box. The --non-interactive switch disables password prompts, which you wouldn't be able to see anyway, because it's hidden away by System Exec. I guess, as a workaround, you can pop up your own password dialog if you need one. 2 Quote Link to comment
Mark Balla Posted September 9, 2014 Author Report Share Posted September 9, 2014 I was having problems also but I figured it out. I needed to install the command line client tools that are unchecked by default. Quote Link to comment
Mark Balla Posted September 9, 2014 Author Report Share Posted September 9, 2014 Thanks Thomas, Could you post the vi to this thread I'm not able to get the VI Snipit to work Mark Quote Link to comment
ThomasGutzler Posted September 11, 2014 Report Share Posted September 11, 2014 This post has been promoted to an articleTortoiseSVN_GetInfo.vi 1 Quote Link to comment
Popular Post Shaun Hayward Posted September 11, 2014 Popular Post Report Share Posted September 11, 2014 (edited) Alternatively, if you dont have the command line tools installed (or don't want to use them ), you cou could use TortoiseSVN's COM interface (http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev-com-interface.html) Edited September 11, 2014 by Shaun Hayward 3 Quote Link to comment
shoneill Posted September 15, 2014 Report Share Posted September 15, 2014 You can also check out a specific file at a specific revision by using the svn cat command and redirecting into a file: svn cat -r revision URL > Filename I use this to investigate files, detect files marked as modified or conflicting, check out the base file and compare using LVCompare. I use this to detect "false" changes due to RT deploys or conditional disable changes in compiled code and so on. Files which are marked as modified or conflicting but which have no LVCompare changes versus their base reference URL can be reverted without danger and this makes commits much easier to handle when working on RT projects. Quote Link to comment
Leif Posted March 3, 2017 Report Share Posted March 3, 2017 Shaun, I really liked your solution, so I made an implementation; attached VI (LabVIEW 2016). Get SVN info.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.