Skip to content

Simple Source Code Control with the TSVN Toolkit from Viewpoint Systems

by Nancy on August 1, 2013

In the last six months I have conducted LabVIEW proficiency surveys with well over 100 programmers.  One of the last questions that I ask is “What else do you need to be more successful on your projects?”  What do think the number one response is?  Time.  Everyone needs more time. And this is one of the primary benefits of integrating the  TSVN Toolkit from Viewpoint Systems into your workflow.  This valuable third-party toolkit is currently available at www.ni.com/toolsnetwork.

In this post I hope to save you a little more time by introducing you to the toolkit, answering some common questions, and referencing useful links from the community for those who are new to source code control (SCC).

Did I mention that this valuable toolkit is free (and the game-plan moving forward is for it to continue to be free)!

Background

The importance of implementing a SCC or version control system for LabVIEW has been talked about for several years now.  Many of us in the community have read the Software Configuration whitepaper and worked through the Software Engineering Exercises for LabVIEW.  Many are also familiar with Subversion and the TortoiseSVN client as these open source tools have become prevalent in the LabVIEW community.  Through trial and error, and with the assistance of  LabVIEW community members who have blogged on TortoiseSVN  and on integrating merge, we have managed to establish a process that works for us and our teams.  However, TortoiseSVN is not integrated into the LabVIEW IDE like Perforce is.  Rather it integrates into the Windows explorer such that regular commits and updates are conducted from Windows, not LabVIEW.

Basic Commit from Windows

For much of our daily workflow, performing updates and commits outside of LabVIEW is not problematic.  We are comfortable with executing these operations from Windows.  However it can become a little problematic when seemingly trivial processes are not so simple.

Renaming a VI

In LabVIEW, every VI maintains the file path to all of its subVIs.  Renaming a VI must happen in the LabVIEW environment so that the LabVIEW linker can update associated file paths.  As such, we are all in the habit of renaming VIs from LabVIEW, often from within the Project.  However, if we rename a VI from the Project, Tortoise SVN has no way of knowing about the rename.

new rename1

 

New - Rename 2

So the workflow requires that we go to Windows, add the renamed VI to the repository and then commit the VI.  Additionally, when committing the working copy, we must confirm that the previous file is not missing but rather no longer part of the repository.  Simplifying this process would require that TortoiseSVN be integrated into the LabVIEW environment, preferably into the Project Explorer.

The TSVN Toolkit from Viewpoint Systems Inc. – Simplifying SCC!!!

Viewpoint gives us this integration with their free TSVN Toolkit available from www.ni.com/toolsnetwork.  All we need is the Toolkit and TortoiseSVN (Note:  as of this posting, the .64 version of the TSVN toolkit, downloadable from the tools network, supports TortoiseSVN 1.7.x.  Within days of this blog post, a new post-.64 version of the TSVN Toolkit that supports 1.8 will be available on the Viewpoint System website.  Shortly following, a release that supports both 1.7.x and 1.8 will be available on the tools network.)

With the integration of the icon overlays into the project, we now have full visibility into the SCC status of our VIs.

Basic for Intro to tool

Moreover, we can right-click and access commonly used SVN functions.

Basic for Intro to tool part 2

 

Very Useful Features

For those of you who are new to LabVIEW and new to the Project Explorer, we need to know that the *.lvproj is simply an xml file that organizes items in the project. As such, the icon overlay for the project reflects the status of the *.lvproj file, not the items that are part of the project. So the project may be at the current version, even if a file in the project has been modified, thus requiring a commit.

Basic showing project green

If we want to see the SCC status or our entire folder,  we can view the files from Windows. If a modified .vi is buried in the nested folders, it  requires a commit we can observe that from windows.

Observe from windows

However we don’t have to check this from Windows.  The VSI VI Dashboard (see below) provides visibility into this and much more.  Moreover, Viewpoint also integrated the the ability to commit the entire folder that contains the *.lvproj, the project folder,  as well as perform other  common actions for the project folder.

Commit Project folder

Note that this commits the  folder that contains the *.lvproj.  So this is our “commit everything I’m currently working on in my Project in LabVIEW” button.  Keep in mind that we might be working on a project that is a subset of the working copy that resides on our local machine.  In the .64 version of  the TSVN Toolkit, we can hit the “shift” key as we select Commit Project Folder.  This will commit the entire working copy, not just the project folder that contains the *.lvproj.

Finding the VSI VI Dashboard

I did notice that the button for finding the VSI VI Dashboard is no longer on the toolbar (adding this back to the tool bar is a feature request from the author of this post).  However I was directed to find it from the files menu. And even better, we can activate it from QuickDrop! (see below)

Find VSI Dashboard

 

The VSI VI Dashboard provides excellent visibility into the project and allows us to perform various operations on a group of VIs

VSI VI Dashboard

And one more note for the Quick Drop Enthusiasts, we can Commit, Update, Lock, and activate VSI VI Dashboard.  (ctl + first letter). [Note:  Viewpoint’s wish list includes adding Diff]

Easily Renaming a VI with the TSVN Toolkit

Now we will revisit the issue of renaming a VI.  With the TSVN Toolkit this process is easily accomplished within the LabVIEW environment. To access the TSVN rename, we open the VI and go to the Files menu.

Easy Rename

[Note:  moving the “rename” to the project right-click menu is high on Viewpoint’s list of future features]

Once we’ve renamed, we simply commit from within the project and then commit the project folder (toolbar button mentioned above).

Easy Rename  - good

Note that the scope of the rename is not simply to another location within the project folder, rather the file can be renamed to any location in the working copy.

Final Notes

There are some SCC operations that are not as simple as a button press or right-click selection.  Therefore, for a large, multi-developer project, it is important for the development team to plan ahead, perhaps selecting an SCC lead, thus ensuring an efficient workflow.  For instance, adding a new folder will require performing SCC operations from Windows and then migrating back to LabVIEW to move VIs.  Larger operations such as this should be conducted before the daily update to the team or after the daily commit.  Additionally, the tool does not yet (wish list!) have the ability to rename or move groups of files.

One other item to note is that the icon overlay refresh is on a 5 second loop.  As such, after some operations, the icon refresh may lag by a few seconds.

Get Started Today

I fully acknowledge that this blog post only scratches the surface of the many features and benefits of the TSVN Toolkit.  Most importantly, I can now see the SCC status of my VIs from within the LabVIEW project when I am using TortoiseSVN!!!

I’m extremely excited by the eagerness of the TSVN Toolkit development team to answer detailed questions and garner feedback.  Viewpoint is actively developing this toolkit, so send your ideas and questions to: [email protected] (and special thanks to EM for answering oodles of questions for this post!)

Installing and becoming familiar with the SVN Toolkit was very quick and easy.  Save yourself time and headaches and integrate the TSVN Toolkit into your workflow today!  Download TortoiseSVN 1.7.x and then grab the TSVNToolkit.

… And Congratulations to Viewpoint Systems…

The TSVN toolkit is a finalist for the community (free add-on) category of the LabVIEW Tools Network Awards.  Winners will be announced at the award ceremony during lunch on Alliance Day. 

One Comment Leave one →
  1. Eric M., Product Manager of this toolkit, is a fantastic engineer; congrats to his team at Viewpoint Systems for being nominated for the LabVIEW Tools Network Awards! Working in the same arena of LabVIEW Tools Development, I view the technical accomplishments of this tool as nothing short of phenomenal. If you’re using SVN and LabVIEW, highest recommendations for this toolkit from Viewpoint.

Leave a Reply

Note: HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS

This site uses Akismet to reduce spam. Learn how your comment data is processed.