mju
mju

Reputation: 723

Is there any graphical diff tool for git, that can be used with LabVIEW?

My employer wants to switch our version control system to git. I tried it, read a manual and so far I am quite happy with that, but I encountered one problem, that seems quite hard to solve. We do not only use textual languages, but also LabVIEW 2014 (a graphical programming language). Since git stores data in binary snapshots compatibility is not a problem, but viewing changes and merging seems pretty impossible. I have been looking for diff-alternatives for hours now, but I did not find anything that fits our needs well.

Actually LabVIEW has a built in tool to compare source files and one for merging. These tools are locked inside the program and it seems impossible to start them without having the IDE running, since they are only available for users of the professional license. Although we own this version, it seems that we can only start them from the source editor menu.

Starting just LVCompare.exe - from the command line - causes the following error (we run windows 10, this is just the git bash) in a separate window (not in bash):

$ ./LVCompare.exe ~/PATH_TO_PROJECT/Current_Test.vi ~/PATH_TO_PROJECT/Forecast_Test.vi


An error occurred while running LVCompare.

Open VI Reference in LVCompare.vi<APPEND>
VI Path: <b>C:\/Users/PATH_TO_PROJECT/Current_Test.vi</b>

The only workaround I can imagine - because you can not have two VIs (the source files) with identical names open at a time - is extremly inconvenient. If I need to compare two versions of a file, I have to checkout version one, copy the file out of the working directory under a different name, checkout version two, open the file in LabVIEW, open the compare tool and select the first file. As you may guess this is a pretty bad option and I do not think, that anyone of the other developers may feel comfortable with that.

What I need is a graphical, windows-ready tool, that can show me the differences. Command line solutions drop out at all here, because that would just make it more complicated to locate the changes.

I checked dozens of webpages and there are in deed few developers who state to have written own tools, but most of the time you have to install a lot of auxiliary software and they produce similar errors or do not work at all.

So finally my question: Is there any possibility to display the differences between two git-versioned LabVIEW source files withouth going through all that struggle?

Upvotes: 4

Views: 3493

Answers (2)

mju
mju

Reputation: 723

For all of you having the same trouble: If you want to use LVCompare.exe or LVMerge.exe, you have to link them correctly to these file-extensions:

  • .vi
  • .vit
  • .ctl
  • .ctt

In TortoiseGit, go to [Settings > Diff Viewer > Advanced] and [Settings > Merge Tool > Advanced] and create list entries for them. Use commands in this Format:

LVCompare.exe:

"C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare\LVCompare.exe" %mine %base -nobdcosm -nobdpos

LVMerge.exe:

"C:\Program Files (x86)\National Instruments\Shared\LabVIEW Merge\LVMerge.exe" %base %theirs %mine %merged

Thanks to kosist for this link.

Upvotes: 3

Joe Friedrichsen
Joe Friedrichsen

Reputation: 1986

On LVCompare

Starting just LVCompare.exe - from the command line - causes the following error (we run windows 10, this is just the git bash) in a separate window (not in bash):

$ ./LVCompare.exe ~/PATH_TO_PROJECT/Current_Test.vi ~/PATH_TO_PROJECT/Forecast_Test.vi


An error occurred while running LVCompare.

Open VI Reference in LVCompare.vi<APPEND>
VI Path: <b>C:\/Users/PATH_TO_PROJECT/Current_Test.vi</b>

Even in git-bash, use the Windows directory separator for interfacing with LabVIEW: \

On diffing VIs from git

Is there any possibility to display the differences between two git-versioned LabVIEW source files withouth going through all that struggle?

See this GitHub project: https://github.com/joerg/LabViewGitEnv

mkdir -p /c/repos/other && cd /c/repos/other
git clone -b windows git://github.com/joerg/LabViewGitEnv.git
cd LabViewGitEnv
bin/LVBootstrap.sh --system

Upvotes: 1

Related Questions