Jump to content

Finding a SVN version of a folder or file


Recommended Posts

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 

Link to comment

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.

Link to comment

You mean something like this?

post-28303-0-20125100-1410225434_thumb.p

 

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.

  • Like 2
Link to comment

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.

Link to comment
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.