Support large repositories!
Support large repositories!
Posted Apr 6, 2010 20:43 UTC (Tue) by vonbrand (subscriber, #4458)In reply to: Support large repositories! by tialaramex
Parent article: A proposed Subversion vision and roadmap
True, as far as it goes. But note that the diff + patch mechanism used to merge aren't infallible either: Consider a repo containing a function named foo
and several uses of it. Now on one branch rename foo
to bar
, and on another introduce further uses of foo
. When you merge, even if the merge is successful (i.e., no changed chunks intersect), the result is still inconsistent.
What is really happening is that we use text as a representation for source code, which has a rather richer structure than just "lines" (but not so rich that it makes the above completely useless). We saw that with a student who worked (essentially) on VCS for XML files representing projects. The simple line based diff/merge turned out not to be enough, a somewhat smarter set of operations was needed.
That takes us again to the source of the (otherwise unreasonable) success of Unix: Use text files, not random binary formats unless strictly required. Binary formats are much harder to handle, and each of them will require its own set of operations. To add to the fun, many binary formats include their own (rudimentary) VCS...