LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I programmat​ically generate report from LVCompare tool?

Hello,

 

I'm currently using TortoiseSVN for change control management of code. A rare, but too common, issue we face is that someone has uncommitted code on their machine.

 

We've developed some code to email notify the CORE team when uncommitted code is detected on a machine. We're able to identify which files have modifications, but we're looking to take it a little further and determine what the differences are; preferably between the repository version and local version if you are familiar with SVN.

 

I'm familiar with FileDiffer.exe, and have it linked easily to diff files in the TortoiseSVN GUI, but I'm looking for a way to do this and generate a dif report progammatically.

 

Does anyone know of a way to launch and programmatically generate a comparison report without use of aGUI? Or if there is another tool or method out there capable of diffing LabVIEW files, please give suggestions.

 

-----------------

 

I've come up with the following options but have not identified a concrete way to generate a comparison report so far.

 

  • LabVIEW Compare Tool
    • Requires visual (GUI) rep of diff files
  • LabVIEW SCC Compare Palet
    • Allows for direct Labview connection to SVN but requires PushOK installation or similar client.
  • LabVIEW procmphier.llb -> CMP Compare two Vis.vi
    • Cannot access the SVN repository, so will need to determine way to create app reference to the repository VIs
0 Kudos
Message 1 of 3
(2,853 Views)

Maybe not a full solution, but here is a discussion on LAVA about using the compare programatically and getting text generated describing the changes.

 

https://lavag.org/topic/18941-compare-two-vi-s-without-human-interraction/

0 Kudos
Message 2 of 3
(2,789 Views)

Going to TortoiseSVN saved me (mostly) from LabVIEW VI "Version Hell", once I learned to discipline myself to "Always Commit at the End of the Day (or Work Session), and Always Update before starting work".  [At worst, this wastes a few seconds while Subversion says "Nothing was changed", but when there are changes, it really saves you].

 

Once you are faced with two VIs with the same name but (unknown) internal differences (for example, when doing an Update, Subversion signals conflicts), you then have to (mainly manually) compare the two LabVIEW Versions, see where they differ, then decide which Version you want to keep.

 

In the case of Subversion Conflicts, here is a trick that I use that saves a lot of time:  Suppose MySubVI is the one with a Conflict on Updating.  You will have three VIs with Conflict symbols:  MySubVI.vi, MySubVI.vi.r2345, and MySubVI.vi.r2358 (the last extensions are just examples, but they represent the Revisions from which the VIs come).  As you probably know, the Compare Tool in LabVIEW requires its two arguments to have different names.  So I proceed as follows:

  1. I rename MySubVI.vi.r2345 to MySubVI.vi.r2345.vi by simply adding the .vi extension.  Windows will ask "Are you sure?", and I say "Yes".
  2. I rename MySubVI.vi.r2358 to MySubVI.vi.42358.vi.
  3. I now can compare MySubVI(.vi) to MySubVI.vi.r2345, MySubVI to MySubVI.vi.r2358, and MySubVI to MySubVI.vi.2358.
  4. Based on the comparison, I decide which one I want to keep.  For this example, suppose I decide that MySubVI.vi.2358 is the one to keep.  I delete the other two, then remove the "extra extension", usually by deleting .vi.2358 (and leaving the final .vi).
  5. Before doing anything else, I do a Commit, just to be safe.

Hope this is helpful.

 

Bob Schor

0 Kudos
Message 3 of 3
(2,785 Views)