The mixed directory/unrelated files VCS problem

December 2, 2009

To follow up an earlier entry, one might sensibly ask what the problem is with using a modern, whole-directory version control system on a directory full of unrelated files, the classical example being /etc.

What you effectively have in this situation is a directory with multiple 'modules' (files and groups of files) that are logically separate and independent from each other. As they're separate modules, these files usually evolve and are developed at least somewhat independently. Putting all of these files into a single repository creates a mess in the same way that developing several different bugfixes at the same time in the same source code repository does.

As with source code, what you wind up with is a repository that can give you time-based snapshots of the state of your directory, but doesn't tell you very much about the logic of development of various things, at least not in a straightforward way. (You can sort of reconstruct it by restricting various repository operations to just a subset of the files, but you are working outside of things.)

This mess gets worse if you need to synchronize changes across multiple machines. Here, you really have the classic entangled changesets problem, especially since not all 'modules' may apply to a particular system. Updating a system to the current state of, say, your overall NTP configuration becomes a non-trivial operation because you're fighting how the VCS wants you to work.

With some VCSes (eg, git) I think you could cheat madly and sort of make this work, but I also think that you'd wind up with a lot of heartburn. With others, I don't see how to make this work short of having completely separate repositories for each machine and just shipping patches around by hand.

(Okay, I suppose there are various cherry-picking and transplanting extensions for various VCSes, but I suspect that significant use of them will wind up with an increasingly horribly tangled repository history.)

Written on 02 December 2009.
« Using content hashing to avoid the double post problem
The problem with the OpenSolaris source repository »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Wed Dec 2 01:48:00 2009
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.