Hacker News new | ask | show | jobs
by rdpintqogeogsaa 1949 days ago
I just wanted to say thank you for believing in the SCCS weave when making BitKeeper. It is an incredibly elegant design (though I've failed to properly implement it myself yet).
1 comments

The SCCS weave was our secret sauce. Tichy did the world a huge disservice in his PhD about RCS (like that was worth a PhD, come on) where he bad mouthed SCCS's weave (without understanding it, or maybe he was spreading misinformation on purpose, he implied that SCCS was forward deltas where RCS is backwards deltas, see below for what that means).

When we were still in business, each new SCM that came out, we'd hold our breath until we looked at it and said "No weave!"

For those who don't know, the SCCS weave is how your data is stored. Most people are used to something like RCS which is patch based. For the RCS trunk, the head is stored as plain text, the previous delta is a reverse patch against the head, lather, rinse, repeat. Branches are forward deltas, so if you want to get something on a branch, you start with the head, apply reverse deltas until you get to the branch point and then forward deltas until you get to the branch tip. Ask Dave Miller how much he loved working on a branch of gcc, spoiler, he hated it. With good reason.

SCCS has a weave that is not aware of branches at all, it only knows about deltas. So you can get 1.1 in exactly the same amount of time as it takes to get head, it is one read through all the data. bk annotate (git blame) is astonishingly fast.

And merges are by reference, no data is copied across a merge. Try that in a patch based system. How many of you have been burned because you merged in a branch full of code that someone else wrote, and on the trunk all the new data from the branch looks like you wrote it, so you get blamed when there is a bug in that code? That's because your brain dead system copied code from the branch to the trunk (Git does this as well, that's what the repack code is trying to "fix", it is deduping the copies).

Weaves are the schnizzle, any SCM system that doesn't use them today is so 1980.

How does dcfs weave compare or relate to what pijul.org is doing?

Some recent discussion of pijul on HN:

https://news.ycombinator.com/item?id=24592568

It's based on patches. I'm perhaps not going to win any friends, but I think that is ill-advised. Patches are great for emailing around, they are a horrible idea for an SCM.

Perhaps I need to write up how weaves work in more detail. Once you get that, you won't want an SCM based on anything else.

By all means, please do. There's a severe lack of material.
Yes, please do! The SCM space is horrible right now. I would love to see prior art.