08-14-2008 01:02 PM
I figured out that lvdiff is a piece of code that will interface the compare engine in LabVIEW (...\CMP compare two VIs.vi). However, there are some interesting things happening when I run a difference from TortoiseSVN. The VIs I am comparing (present and previous version) load up, but the new instances of the VIs can not find their sub VIs. Also, I added some code to save the path names of the two VIs to a text file. The paths are <not a path>.
It almost sounds like I need to have the lvdiff.exe files in my labview project?
08-15-2008 09:21 AM
Update....
I am running into an interesting issue with LabVIEW and the embedded comparison tool. I was able to modify lvdiff.vi, run it as a vi stand alone, and compare two VIs!!! 🙂
When I build the lvdiff.exe application and call it from Tortoise, I get the error that this function is not available in this version of LabVIEW....???? 😞
<Now for my rant>
What's up with that????? Please tell me I am doing something wrong, and that NI did not put code in the comparison application to disable comparisons by third party comparison tools or will not run when called by a user exe?
Attached is my part way modified lvdiff.vi if someone else can confirm in LV 8.6 that they are having the same issue...
08-15-2008 09:23 AM
I'm not sure. Here is some links to other forums where they use TortoiseSVN. Let me know if they help. I'll try to find out about the differencing engine.
http://forums.ni.com/ni/board/message?board.id=170&thread.id=266911&view=by_date_ascending&page=2
http://forums.ni.com/ni/board/message?board.id=170&message.id=220630&requireLogin=False
http://forums.ni.com/ni/board/message?board.id=170&message.id=225775&requireLogin=False
The third one has some links to work done with lvdiff but it is over a year old so I don't know how valid it is.
08-15-2008 11:08 AM
08-15-2008 11:17 AM
Attached are all the files for the VI...
08-15-2008 11:25 AM
I looked at the links, and the SCC and Tortoise I believe are setup correctly.
I changed the lvdiff.vi code so that you don't need the ini file, but limited the execution for the current platform for debug purposes. The ini file that comes with the installation package from meta-diff is missing fields that lvdiff looks for.
Tortoise is neat in that it provides the path to the two VIs you are trying to compare as I added this property the modified version.
Now, I believe, it is just a matter of getting the call to C:\Program Files\National Instruments\LabVIEW 8.6\project\procmphier.llb\CMP compare two VIs.vi in the lvdiff.vi work as an executable...
08-18-2008 05:04 PM
Does the code you attached attempt to call that VI as an executable? What results are you seeing when you try to run that call as an executable?
08-18-2008 07:15 PM
Hey Mark,
Here is what I found out today (remembered how things work from about 5 years ago). When running the executable, the libraries in the development enviornment are not available to the exe. So I tried to incorporate the diff compare vi in with the executable. During compilation, I was asked for the password for a few sub vis associated with the NI difference vi. So I could not compile the code into the exe library.
However, the inclusion of a TortoiseSVN into the difference tool is extremely straight forward, and could be added to the LV SCC Tools...![]()
I did make a work around where I have an executable write the two path names to a text file. Then I run the lvdiff.vi calling the text file to obtain the two paths. The process is clunky, but doable.
Thanks,
Joe
08-18-2008 07:23 PM
04-08-2009 08:07 PM
Following up on the above: I see that the LVdiff project at SourceForge has been updated since JoeC's last post, and the LVdiif VI there seems to be constructed as he suggested as far as retrieving the paths from a .INI file. Further: it pretty much works, at least in my LV 8.6 installation; whether LV is running or not, whether the VI being diff'd is already loaded into memory or not, right clicking in Explorer and selecting SVN Diff gets me to a VI comparision screen showing the right pair of VIs.
If it's not obvious: Tortoise users will want to go into the Tortoise Settings, under Diff Viewer, and set up an 'Advanced' diff-er for .VI files, with the basic command line.
I do consistently get a "OK to discard changes" box after clicking Clear, regarding the temp copy of the older version; and if the diff is run without the current version of the VI already loaded, I'm seeing a box pop up searching for VIs that can be cleared with two or three clicks of "Ignore Item." But the diffs are right, and that's the important thing.
Joe, I assume that's your VI I'm running. Nice work!