Really Slick Source Control Package

I just came across a project called monotone this afternoon. It’s a source control system like CVS, Vault, etc… but done differently. Where CVS and Vault users connect to a central source code repository monotone is totally decentralized. It basically gives you a single file versioning system you run locally and then it offers features to sync your repository with others over the network using a built-in server mode. It seems to have a fairly rich feature set and my brief tinkering with it this afternoon was rather interesting.

Unlike most revision systems I have used monotone does not stamp file versions with incrementing numbers. Instead if labels each file with the SHA-1 hash of its contents. A point in time in the repository is labeled by the SHA-1 hash of all the SHA-1 hashes of the HEAD files. It doesn’t make for really obvious labels but it’s easy enough to work with due to some features that make this less cumbersome than it sounds.

As far as I can tell each user of monotone will generate a RSA key and use it to sign their changes, comments, etc. Other users will import public keys of users they trust so that those changes will make it into their code. Or something like that. I’m still a little unsure on the details. I think you can even allow trust relationships to form. This key stuff also is used by the authentication mechanisms when syncing to monotone databases. The server must have the client key on file and the client must have the server key on file. This prevents malicious users from impersonating the client or the server. Yay! The authentication is just darn cool. Configuration to monotone is done in a RC file written in LUA (a embedded scripting language). Basically you provide implementations to functions that test if user is allowed to read/write a resource. You can do all sorts of neat stuff doing this.

This software is just cool. It’s a single executable with no dependencies on weird libraries. It uses SQLite for it’s data-store and LUA for config scripting. Both are embedded in the executable. It operates in client mode or server mode too out of the single executable. I love self contained stuff like this. Oh yeah. And to top it all off it runs on all the usual operating systems including Windows and Linux. This is right up there with cvstrac

Anyways. It’s really neat looking. I think I’ll start messing with it more here. It looks like it could work really well for what I do. I’m a little worried it won’t be able to handle large binary files. Usually sqlite imposes a 1M limit per row. I believe the data stored is gzipped in the DB but still I’d be curious if I can add arbitrarily large files to the repository.