"Move" support in xdiff
One of the big things we just released in 3.0 is the new Xdiff. We call it "cross diff" because it can locate code that has been moved, and we used to draw it on paper with "crossing lines".Ok, what is all of this about and why is it so good? Let's go.
Let's start with a piece of code like the following:
Then we move a piece of code a little bit down:
And we slightly modify the moved code as you can see here:
Let's see what Plastic Xdiff can do:
It is able to identify the code as "moved" even when it has been modified. And you can click on the "subdiff" to actually run an independent diff on the moved fragment as you can see below.
Cool, isn't it?
We can do this with any programming language since the algorithm is not based on parsing but in plain text move detection.
Check the following screencast to see it in action.
Don't forget to check the next step too: Xmerge!
Enjoy!
Beautiful!
ReplyDeleteThat is a truly awesome feature.
ReplyDeleteHas Codice given any thought to licensing xdiff independently of PlasticSCM?
Thanks Jeff!! You know we're always pushing hard to bring the best features to plastic! :)
ReplyDeleteWe didn't consider licensing xdiff independently but it is definitely something to consider!
Thanks,
pablo
This comment has been removed by the author.
ReplyDeleteThat is truly awesome. I'm upgrading!
ReplyDeletePerforce offers their merge tool as a free download, no doubt in part as a marketing tool.
ReplyDeleteThere's an interesting follow up with more merge cases here: http://www.scootersoftware.com/vbulletin/showthread.php?p=24868&posted=1#post24868
ReplyDelete