Click here to Skip to main content
15,867,453 members
Articles / All Topics

Merge Smarter with Semantic Merge

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
19 Apr 2014CPOL2 min read 5.6K  
How to merge smarter with semantic merge

Any experienced developer at one time or another has encountered issues when merging their code and has been met with that nasty (typically red) conflict icon. A new product from Plastic SCM called Semantic Merge is hoping to get red of that little red guy once and for all by using a merge that actually attempts to understand the code that it is merging together. It’s built on top of Microsoft’s Roslyn, which if you are unfamiliar with, is going to be a game-changer in the future.

Semantic Merge doesn’t care about the order that your code appears in because it actually understands what is going on within it (to an extent) and rather than focusing on the actual location of your code, it focuses on the structure and can actually determine if a change will actually affect functionality (within reason) and if it might just be an aesthetic change.

Although the product is still within its beta phase, it looks to become a really powerful tool in the future.

Features

Here are a few of the “highlights” that Semantic Merge currently offers:

  • Location Independent MergingThis feature basically ignores the location of your methods, which allows you to easily refactor your code and move things around. It actually merges on a method-by-method basis as opposed to looking at the entire code-base as a text file like a traditional “diff” operation might.
  • Merge and Diff Visualization – Semantic Merge is an incredibly visual tool. This feature allows you to easily see a visual representation of your method at both its pre- and post-merge states which can be great if you are performing a major overhaul or refactoring lots of code.
  • Method-based Conflict Resolution - If two developers try to modify the same method in parallel and there isn’t a collision, that can be a problem. But not with Semantic Merge, which will notify you of a conflict even if the text-block doesn’t explicitly state that one exists.
  • Smarter Refactoring - If Developer A creates a class within an existing class and Developer B then moves the parent class to a different location, Semantic Merge can detect these changes and will ensure all of the code and its relocation resolves properly.
  • Semantic “Diffing” – An aptly named tool called Semantic Diff is included within Semantic Merge as well and it provides a very (once again) visual method of determining exactly what change within a section of code.
  • Language Support - It currently supports Java, Visual Basic and C# (with planned support for Javascript, C, C++, PHP, Python and Ruby).

You can read about more of these features and more detailed explanations (and visualizations) of each of them here.

Go Play With It.

Semantic Merge Logo

Semantic Merge takes a new approach on merging code and attempts to actually understand what is going on.

Since Semantic Merge is still currently in beta, you can head on over to Plastic SCM’s Semantic Merge site and download it:

Filed under: CodeProject, Development

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
An experienced Software Developer and Graphic Designer with an extensive knowledge of object-oriented programming, software architecture, design methodologies and database design principles. Specializing in Microsoft Technologies and focused on leveraging a strong technical background and a creative skill-set to create meaningful and successful applications.

Well versed in all aspects of the software development life-cycle and passionate about embracing emerging development technologies and standards, building intuitive interfaces and providing clean, maintainable solutions for even the most complex of problems.

Comments and Discussions

 
-- There are no messages in this forum --