views:

258

answers:

3

I'm using LabVIEW (8.6) for a project with SVN for my revision control and I've come to a point where I need to branch it. I already know I'll need to make changes in the branch that I will want in the trunk. Is there any suggested method or ways to merge binary files from branches in SVN, specifically with respect to LabVIEW?

Or will I be forced to make updates in both the branch and the trunk?

+2  A: 

LabVIEW has support for merging since version 8.5, for setting this up with Tortoise SVN have a look at this blog post from Tomi Maila.
I have never tried this but I heard that it did go relatively smooth, however I would try to keep the differences between the two brances in subVIs as much as possible instead of the main code.

Ton

Ton
Yeah, I ran across the same pages and blogs as I looked around the net. I've never had fantastic luck with the diff and merge in LabVIEW; perhaps I haven't set the options correctly because it constantly points out non-issues in the diffs. I guess I was looking more for a "yes you can and here's a good way to do it" type answer. I can definitely see how keeping the changes in the subVIs would minimize the pain.
dwj
+1  A: 

It seems like there are really two questions in your question:

Will I be able to branch and merge binary files with Subversion? Yes.

Subversion will only do contextual, line-by-line merging if it knows the files are text. That basically means you will have set the svn:mime-type property on the files, either explicitly or by using auto-props. There's absolutely no problem using Subversion with binary files.

Will I be able to get meaningful diffs between versions and handle merge conflicts considering that LabVIEW files are graphical, rather than text? Yes.

As Ton pointed out, LV can do a graphical merge (I have little experience with it). There are also third-party tools, like LVDiff, that will let you do this with earlier LabVIEW versions.

eaolson
If I recall correctly LVDiff will not merge, but only show the differences between sets of code.Ton
Ton
I don't have it on this machine, but you may be right. But nothing stops you from merging a branch to the trunk in Subversion just because the files are binary. At worst, you don't have the ability to do graphical conflict resolution.
eaolson
I didn't have much luck with LVDiff; it looked like it was doing the same thing that the internal diff tool was doing (and I believe it was using the internal tool to create the diffs!).
dwj
+1  A: 

The best solution here is to integrate the LVMerge tool directly into Tortoise SVN. This way you can perform graphical merge operations your different version controlled files in your SVN Repo.

Here's an article on Using LVmerge LabVIEW Merge Tool with TortoiseSVN with all the setup instructions to do this.

It is definitely important to customize the settings a bit within LV merge to make it easier to identify only important differences between version (IE ignore elements that were only repositioned but not modified on the front panel or block diagram etc)

Jesse