06-02-2011 10:22 AM
Thomas,
Ok, I have finally got a machine up and running as required. What are the exact steps to reproduce this? This is what I am currently planning on doing:
1) Create a sub-vi, use it in a couple VIs, all checked into SCC.
2) Check out and change 2 of the top-level VIs.
3) Make a change to the sub-vi
4) Save the sub-vi, and use find and replace to update the main VIs
5) Check into SCC
6) See if the changes from step 2 are lost without warning.
I'll post back when I have the results of this.
06-02-2011 12:07 PM
OK TJ:
I think all you need is 2 vis, one a sub-vi of the other.
Notice that if you try to edit one in LabVIEW it asks to check it out in perforce.
Notice also that if the files is not synced to the latest version, it asks if you want to get latest before it checks it out.
Now change the connector pane of the sub-vi such that you have to relink in the other one.
If you were to right click relink from the block diagram of the calling vi it would ask you to check it out and get latest version if applicable.
If however, instead you search for all instances of the subvi and replace with the sub vi (a way of relinking all instances of it without having to right click relink in each calling vi) it will give you a dialog box saying "the following files need to be checked out" or something like that with a list of vis (note when I did this, there were approximately 100 vis, so, I can only assume you'll see such a dialog when there's just one calling vi).
The bug is, that if one of the vi's it's going to check out (the calling vi in your case) is not synced to the latest version, it will NOT ask you if you want to get the latest version of the file before it checks it out.
Thus when you check the files back in, you will unknowingly overwrite someone elses changes (whatever you hadn't synced to)
06-03-2011 06:19 PM
Hi Thomas,
I just tried to verifiy this behavior on a machine with LV 2010 SP1 and Perforce 2010 (not your version, I know). After performing the steps as specified, it did actually ask me to check out the VI. I have included a screenshot. This suggests to me that it is an error with the version of Perforce, not LabVIEW. What are your thoughts?
06-06-2011 04:53 PM
It could be a version issues, or it could be that the dialog for checking out multiple vis at a time only activates if there's several. I just changed the connector pane of a popular vi and then searched for it and replaced all and got this dialog. That's where I wasn't prompted to get the latest of every file that was out of date.
06-07-2011 03:59 PM
Thomas,
hmmm... could be, but my test only included one item. Maybe it's a combination of the two. Maybe your version works fine with multiple files but fails on a single check out.