07-05-2024 10:03 AM
Hi,
after obtaining a VI with a pull from our Git repository i was try to compare it with the new saved version on my local PC. Obviously the two VIs are in two different paths. But the Compare VI tool, as you can see in the picture below, allows me only to compare VIs that LabVIEW has loaded in memory. But since the two VIs has the same name i can't open them at the same time. So am i missing something or i can manage It? I was hopping to have something like TestStand where there is the TestStand File Diff and Merge Utility which works in that way. Maybe is a stupid question but i can't find the way out!
For sake of precision, I underline that the VIs aren't in any project, so the only file you obtain by the pull is the .vi file and nothing more.
Thank you for the help!
Best Regards,
Zuc
07-05-2024 10:37 AM
You need to rename one of the files in order to compare them. Here is a thread with tools to automate this for some git clients: Set up Fork for GitLab
07-05-2024 03:49 PM
That is annoying, isn't it? This is especially true if you've got a few hundred VIs (and TypeDefs) you want to compare. What you can do is write a routine that traverses the Folder Tree of Project New, looking for matching routines in Project Old. When it finds a match, it (temporarily) renames the Old file (by putting .old before the .vi in the name) and does the compare of "MyVI.vi" and "MyVI.old.vi". When you dismiss the Compare, it goes to the "next" VI in Old. If there is no matching "New", it could give you a message ("Nothing New Under the Sun", for example).
Bob Schor
07-07-2024 02:35 AM
I don't use git, but there are certainly materials online for how to setup working with git and LV (see for example the content from SAS workshops).
For SVN, at least, I have configured my client to use LVDIFF, so that comparing a file from SVN automatically places that file in the temp folder and renames it using the relevant revision number, so you don't have a name collision, although it will sometimes throw path dependency dialogs when loading the new VI (which can usually be ignored).
For the manual option, it's always possible to open two VIs with the same name in different projects and then compare them.