The history/story behind transparent scmI'd like to tell the story of how Plastic evolved towards "transparent scm". What you're seeing today in 4.0 is the result of quite an evolution since we first wanted to walk the transparent path.
InspirationBelieve it or not, our original inspiration towards transparent scm was good-ol ClearCase. CC implemented MVFS, a dynamic file system able to show you the full file tree of a given version, capture all IO calls and adjust them to SCM operations.
Sample: cat foo.c@main@4
Would be captured by the CC fs driver and instead of issuing a "file not found" it would be able to get the right version of the file to be dumped by "cat".
Likewise it was able to intercept "move" operations so you didn't need to run "cleartool mv" command. What does it mean? You don't need to tell the SCM that you modified a file or that you moved it: it is intercepting all your IO actions, and making the right ops at the FS level!
So, definitely, we always wanted to have some sort "move interception" to avoid having to "tell" plastic a file or dir was moved... it would simply know.
First attemptsWe code-named "glass" the first version of what we called "plastic made transparent" (hence glass).
Glass was able to use some underlying FS layer (third party FS driver code to simplify FS creation) to intercept all ops and:
Well, writing your own FS is always a cool thing, but there were caveats:
So, while we used glass internally, we never moved it to production mode.
XdiffOk, you might think: what does Xdiff have to do with transparent?? Well, Xdiff implements an algorithm to find moved fragments of text even when they've been modified afterwards. It is able to calculate "similarities".
Xdiff opened up a new door to make Plastic transparent.
The current versionWhen we started the development of 4.0 we knew we wanted a new way to deal with local changes:
And we applied the Xdiff technology. How?
This way the "pending changes view" is now able to figure out what you did on your workspace, including modified and moved files, and directories (remember dvcs like git or mercurial are not able to track directory renames or moves).