LabVIEW Development Best Practices Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Using SVN (and probably also P4) Locks with LabVIEW

Quick aside: Is it not possible to search within a specific Group in NI Community? I could only find a Community-scoped search tool, and that returns hits outside this group.

This is a multifaceted post, as I'd like to address several aspects of my workflow.

I'm working on a multi-developer project in LV and need a way to avoid having devs step on each other's toes. Since LV is binary and continuously recompiled, and since even with LVcompare.exe it's still a painfully manual process to review and merge code changes, File Locks seem to be the only valid option. (Shame...I loved working with git on my single-developer projects. ) We've started getting locks for whichever files we need to edit in each assigned task, and we have the "svn:needs-lock" attribute assigned to files that are common across targets and projects. However, even when a file in my working copy has the Read-Only attribute, LV doesn't warn me until I've already edited it for 30 min and try to save. Is there a way to get LV to check for read-only files when they're opened and warn me about them?

And in a more open context, does anyone else use the Lock feature in Subversion or Perforce for their LV projects? What's your workflow like?

Final comment: I tried JKI's TortoiseSVN tool for LV. While it looks reliable and quicker than going to Explorer to perform common functions, it seems to break when I try to get a lock on all files in a selected Virtual Folder. I would ideally use the tool to quickly lock an entire project or folder of files from within LV, especially since these files may live in different physical folders on disk. I wonder whether JKI is still actively developing this tool...

0 Kudos
Message 1 of 9
(7,273 Views)

We are using LV with Tortoise SVN and do all of our lock (we have a similar problem and require users to get locks) and commits through windows explorer.

To get the "can't edit it" problem "resolved" in LabVIEW --- Tools -> options -> Environment -> Saving VIs -> set "Treat Read-only VIs as locked".  Might need to restart LabVIEW.

You can still get around this by changing the vi edit mode (Operate -> change to edit mode), but you at least need to make a concious decision to modify a read-only file.

Message 2 of 9
(5,074 Views)

Another TSVN tool you can try for LabVIEW is the Viewpoint TSVN Toolkit. It allows for pretty much all TSVN actions from within a project or individual VI window as well as TSVN icon overlays in Project Explorer. There is also a feature called VI Dashboard that will let you sort VIs in memory and do things like only getting a lock on VIs that are modified from, for example, a lower level VI or typedef change. You can download it from the link below.

http://www.viewpointusa.com/prod_tsvn.php

The latest version is technically in beta, but very stable (we use it here every day). It will require TSVN 1.7 or greater and VIPM. If you have any questions on using it, you can contact me directly or email TSVNTbar.support@viewpointusa.com.

Message 3 of 9
(5,074 Views)

Wow, this is really nice! I love the SVN icon overlays in the project and the right-click provider.

0 Kudos
Message 4 of 9
(5,073 Views)

Yeah, we're using the beta at VIE and quite like it. Eric and his team have done a nice job.





Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
0 Kudos
Message 5 of 9
(5,073 Views)

Can you see if a vi are been lock by other in a same project?

0 Kudos
Message 6 of 9
(5,073 Views)

cynt, I assume you're asking whether it's possible to see which project files are locked in another workspace? Yes: you see a grey lock if they're locked by another workspace or if the "needs-lock" property is set, and you see a gold lock if you have them locked for edit in your workspace.

0 Kudos
Message 7 of 9
(5,073 Views)

I want to know if is working a bit like visual source safe was working within the labview environement.

In a project, you could see if a vi was lock by you or a another member of your teem working on the same project but on a different computer.

thanks!

0 Kudos
Message 8 of 9
(5,073 Views)

Using the color of the lock glyph, you can tell whether you own the lock or another working copy does. (There can be multiple working copies per user in SVN, so saying that "another user" owns it is inaccurate.) I don't believe you can query which user/WC has the lock using the toolkit; you have to go back to TortoiseSVN to do that.

0 Kudos
Message 9 of 9
(5,073 Views)