Can I open a file from the SVN Repo Browser?

With SVN, as you may have noticed, you can double-click on a file when viewing the repo-browser, and it may run.  That will work fine if the file is able to stand on its own.  For example, if it is a plain text file, a MS word file, a PDF, etc then it doesn’t depend on any other files and it will open properly in this manner.  When you double-click on the file, it gets downloaded it to a temporary folder somewhere on your computer and the OS tries to open the file. 

However, if you try to do this with a LabVIEW Project, then the project file gets downloaded to the temp folder and opened up.  That works well enough but the files referenced in the project will not open up because they are not downloaded to the temp folder; instead they are still back on the SVN server.

If you have a VI that doesn’t have any subVIs and you double click on it from the browser it should work properly.  However, if this VI depends on any subVIs that are not part of the standard LabVIEW library then these will not be located and your VI will open up broken.  But clicking on the project file, as you should always do instead of opening up individual VIs, will never work on the SVN repo-browser.

You can review your files in the browser and make sure everything is there and up to date.  Notice that all of the files will not have the same revision date.  When you make some updates to your working copy and then commit only the most recently changed files are actually committed.  There isn’t any need to write the other files that haven’t changed.

If you really want to double-check everything you’ve submitted, the way to go is to checkout a second copy of your folder somewhere on your hard disk and test that checked out version.  If all is good then just throw that, second, checked out copy away.

Early on, as you are learning, the use of SVN seems like quite a hassle.  However, it is worth the effort to learn.  First of all, professional programmers will all use some sort of code repository.  A very popular one is called GitHub, which I have to admit I haven’t mastered yet.  I find SVN to be much easier.  Secondly, if you use it religiously it will save your bacon if anything happens to your files on your computer.  I have often royally screwed up a project and just decided to revert back to an older version of the project.  This is easy if you have committed that older version.  So, what I’m saying is make it part of your workflow each time you shut down LabVIEW to commit your latest work to the repository.  It is a 30 second extra step that will backup your work and make sure you don’t have any crises when it comes time to commit the final version for submission.

Print Friendly, PDF & Email