SemanticMerge for Mac is here

Wednesday, February 19, 2014 0 Comments

Finally! We are ready to share the Mac version with you!

If you’re eager to put your hands on it, sign up here and we’ll contact you ASAP. The beta is not yet 100% public, that’s why we’re asking you to sign up, so we can create a group of people willing to send us valuable usability feedback (among other).

Check how the new version looks like here:

As you can see the Mac version includes the “visual merge” which is the piece which really simplifies understanding the complex merges.

Supported languages - .Net, Java and C

The Mac version supports semantic merging for C# and Vb.net, Java and also C, which is the new language we have just added to the list.

The C language support took a while since there are many situations where it is not trivial to parse the code without considering the include files. We tried to avoid using the include files because it would make the configuration of the tool more complex and time consuming and project dependent. We don’t discard adding this configuration capabilities in the near future but so far we were able to correctly parse good amounts of code without extra config needs (99.32% of the Linux kernel code).

We rely on the libclang library to do the parsing and it is the same library we will be using for Objective-C and hopefully C++.

Supported platforms

Now we support Windows, Linux and Mac.

Starting up the tool

Once you get the binaries (sign up first - (http://www.semanticmerge.com/merge-diff-tool-mac.html)) you’ll install it as a regular Mac application. Remember to unzip it first.

Then you’ll be able to start the app from Finder and by default you’ll see something as follows:

From this window you can launch a merge choosing the contributors or explore the examples to get more familiar with the tool. Here you have a screenshot of the examples browser:

My favorite is the”Socket_Deeper” simple in C# and Java, but we’ve added more samples in C.

This way of launching Semantic won’t be the usual one as soon as you integrate it with your favorite version control: normally you’ll invoke it from the command line, in fact, it will be invoked by your version control to resolve a given conflict. Notes on how to set it up on different version controls here.

Up and running

Here is the aspect of the Mac version running:

And now here goes the “Socket_Deeper” simple, rendered by “visual merge” in Mac :-) As you can see the “Listen()” method has been refactored and moved and modified concurrently to two different subclasses… something crazy for other tools but easy for Semantic.

Configuring an external diff tool

SemanticMerge i sable to solve conflicts by parsing the code. But when a given method conflicts you have to merge the bodies of the methods and Semantic relies on an external 3-way text-based merge tool. On Windows we include our own Xmerge tool but on Mac we still don’t have a native one, so you’ll have to setup your current diff tool to deal with the conflicts within text blocks.

In my case I’ll be configuring Kdiff3. In order to do that I’ll create a $HOME/.semanticmerge/semanticmergetool.conf with the following content:

-edt=/Applications/kdiff3.app/Contents/MacOS/kdiff3 \
   "#sourcefile" "#destinationfile""

-emt=/Applications/kdiff3.app/Contents/MacOS/kdiff3 \
  -b "#basefile" "#sourcefile" "#destinationfile" \
  --L1 "#basesymbolic" --L2 "#sourcesymbolic" \ 
  --L3 "#destinationsymbolic" -o "#output"

Note:I split the lines for readability but remember everything should go on two lines, one for -emt, one for -edt, and removing the \ I used to split lines.

And now you’ll have support to merge method body conflicts with KDiff3. Check the user guide to find more help (like how to configure KDiff3 to solve 2-way merge conflicts inside semantic blocks) or to configure other tools.

What is next?

Well, we’ve a lot of work to do:

  • Develop the diff tool (right now only merge tool, which is like the difficult part but SemanticDiff is very useful too, like the one we have for Windows).
  • Objective-C support – which is like a must for Mac coders.
  • Improve usability and “mac flavor” – by listening to you! SO please send us all the feedback to sm@codicesoftware.com.

Please do not forget to sign up and thanks for your help!

We develop Plastic SCM, a version control that excels in branching and merging, can deal with huge projects and big binary assets natively, and it comes with GUIs and tools to make everything simpler.

If you want to give it a try, download it from here.

We are also the developers of SemanticMerge, and the gmaster Git client.

0 comments: