Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

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

We also code SemanticMerge, and the gmaster Git client.

Merge code moved across files

Monday, July 22, 2019 Pablo Santos , 0 Comments

Here is something pretty amazing. Plastic can merge methods that were moved across files.

I'm going to move a C# method to a different file in a branch.

In a different branch, I'm going to modify the original method.

Plastic merges this without human interaction and applies the change correctly in the new file.

Ta-da!

Merge scenario

This is an example scenario. I made a change on branch QUAK-104 and meanwhile another change in its parent branch:

Change in QUAK-104: move a method to a different file

This is the change in QUAK-104:

Yes, Plastic shows methods moved across files like this, with a nice visual representation.

Second change: modify the method again

Meanwhile, the change in the main branch (the parent of QUAK-104) is as follows:

Just a small modification to the method in its original location.

Trigger the mergebot

In case you haven't heard about them, mergebots run on the Plastic server, monitoring branches and triggering merges, sending the branches to Jenkins (or any other CI) to be tested, and notifying everything on your Slack, by email, etc. They can check task statuses on Jira too.



How do I trigger the mergebot now? Easy. Just set a given status attribute to the branch:

Automatic merge where any other version control would fail

Here comes the magic. One second later you see this:

Branch merged. Period. No questions asked. No human intervention.

Ta-da! Once again.

Diff the resulting changeset

Here is a diff of the resulting changeset. The change was cleanly applied to the method in its new location.

See how nicely the diffs display, highlighting the line that actually changed during the merge.

Want to test it today?

To enable a mergebot in your Plastic repo (on-premises only), configure this setting in your server.conf:

<EnableMultiFileMerge>true</EnableMultiFileMerge>

How amazing is this?

This is multi-file semantic merge in action. No other version control system comes even close to this. The whole purpose of mergebots is to offer plugin software to your repos to automate the tasks that would otherwise be manual. Turning these types of merges that would certainly require human intervention otherwise into something they solve, is pretty amazing.

We use the same technology that powers our other product, semanticmerge.com. Right now, semantic deals with C#, Java, C and C++, and we recently added PHP support.

Our ultimate goal is to have a plugin for Language Server Protocol (LSP) or even LSIF (https://code.visualstudio.com/blogs/2019/02/19/lsif) to support all possible languages.

Pablo Santos
I'm the CTO and Founder at Códice.
I've been leading Plastic SCM since 2005. My passion is helping teams work better through version control.
I had the opportunity to see teams from many different industries at work while I helped them improving their version control practices.
I really enjoy teaching (I've been a University professor for 6+ years) and sharing my experience in talks and articles.
And I love simple code. You can reach me at @psluaces.

0 comentarios: