Using new LabVIEW Merge Tool LVMerge With TortoiseSVN
LabVIEW 8.5 includes a new visual merge tool LVMerge that can be called from external source code control program for three-way VI merging. I’ll go trough the steps required to integrate LVMerge with popular TortoiseSVN source code control client.
If you have edited a VI that is under source code control, occasionally someone else may have edited the same VI after you have checked it out. As a result the two versions of the same VI are likely differ from each other. In three-way merging, these two different versions of the VI are compared agains a common base version of the VI. This way the merge tool can identify which of the changes have occured in both of the modified version since the VI was last checked out. LVMerge is a three-way merge tool and allows developers to visually compare all three versions of the VI. For each modification in either of the two modified version of the VI developer can choose if the modification should be ignored or included.
Setting up TortoiseSVN
To set up LVMerge with TortoiseSVN, right click on a directory under souce code control and select
from the right-click menu and and then
from the appearing submenu. TortoiseSVN Settings screen will open.
Select Merge Tool from the tree menu on the left and press Advanced… button on the right to open the advanced merge tool settings.
![]()
No, let’s define that files with extension .vi shall be merged with LVMerge. Tio do this, click Add… button. A dialog window with two fields Extension and External Program will appear.
For the Extension field fill in
.vi
For the External Program field fill in
“C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe” “C:\Program Files\National Instruments\LabVIEW 8.5\LabVIEW.exe” %base %theirs %mine %merged
If your LabVIEW installation directory is not under C:\Program Files\National Instruments, mofify the path respectively.
Press Ok for all the open windows and you are done setting things up.
Accessing LVMerge to Resolve Conflicts
Now we are ready to resolve conflicted VIs. When TortoiseSVN encounters a conflict, it layouts a exclamation point on top of the file icon on windows explorer. The exclamation point indicates that the file is conflicted and that you need to manually resolve the conflicts.

To resolve the conflicts, right click on the conflicted file and select
and
from the appearing context menu. Now TortoiseSVN will call LVMerge to allow you to resolve the conflicts. LVMerge is a rather intuitive tool and I’ll not go into detail how to use it. You’ll come along.
After you are done with resolving conflicts, save the file with the proposed name and quit LVMerge. TortoiseSVN doesn’t automatically know that the conflicts are now resolved but you still need to thell this to TortoiseSVN. You can tell TortoiseSVN that all conflicts are now resolved by selecting
and
from the right click menu of the conflicted file. After you have resolved all conflicts in your project, you can commit your changes to the repository.
Note! When resolving conflicts this way, the merged version gets saved on top of your own version of the VI. If you make mistakes in the merge process, you may accidentally loose your own changes to the VI. This is a feature of TortoiseSVN.
Don’t forget to read Jim Kring’s recent post Using Beyond Compare as your TortoiseSVN Diff Program for ZIP Archives at Thinking in G.
Print This Post

(5 votes, average: 4 out of 5)

