KVS
This page is about KVS, a simple, single-user version control
library.
Introduction
One day, I decided I should keep a revision history of my web-site. The
main criteria I was looking for in the version-control system were
simplicity, and the ability to view files
without having to check them out from the archive.
I also use Darcs (and, to a much lesser degree these days, TLA), which I
very much enjoy, but I have no need for all the complicated and strange
filenames, and—more importantly—don't want to have to navigate
through long directory structures to find my files in the archive. So, I
decided, like any good geek, why not write my own version control
system?! ‘KVS’ is the name I used for the joke versioning system that I
used as an undergrad (it basically involved manually using ‘mkdir’ and
‘cp’), so I decided to call my new system this. It is implemented as a
domain-specific embedded language in O'Caml. Running KVS usually involves
using a custom top-level interpreter.
I've been using KVS for my web-site and numerous work and personal
projects. I can honestly recommend it over other version control systems:
It's faster, easier, and more flexible. KVS is
not
a system for collaboration, though—it's a single-user-only tool. I
have, however, used successfully it in collaboration with other tools
(SVN, CVS, PerForce): I used KVS to maintain small, local edits, then
pushed these changes through the other concurrent versioning software.
Because KVS is implemented as a library, it is easy to interact with
archives, etc. from OCaml code. I've used this to implement a simple
library for visualising changes to the archive over time (e.g., graphing
file sizes in bytes / LOC over time, for filtering out the files that
have been most actively edited).
If you use KVS, if you try KVS (whether you love or despise it), please
send me an e-mail! I'd love to hear thoughts about what's useful or
lacking.
News
- 2009-07-03–I've uploaded a minor (functionality-wise) change to KVS,
that I have been working on for some time; it is the fourth iteration
of KVS, and, thus, it is named KVS2d. Despite only small additions
(mostly ‘derived’ functionality), there has been a complete
rewrite—KVS is now implemented in CamlTrax. Additionally,
the names of the KVS functions have been changed to ‘Camel case’, and
the documentation has been updated accordingly. I am planning to begin
work on a self-contained interface for KVS; if I write this, it will
probably be a Curses-based ‘GUI’.
- 2008-09-01–I've uploaded a new version of KVS that incorporates a
number of changes / additional functions that I added during the past
several months. The largest change is the ‘quick_restore’ family of
functions: They allow to restore a version, copying only the files
that have changed, which tends to be quite a bit quicker on
decently-large projects. N.b., I had some trouble with the gzipping
under Cygwin, so you may need to disable compression (by commenting
that out) if you're using Windows.
- 2008-01-15–I've uploaded a bug-fix version of KVS; the big
problem with the last upload was that I forgot to include the
line-wrapping code used by several functions. The new version requires
CamlTrax to compile, which can be found on
the academe page.
- 2007-10-26–I've finally made the new version available. Besides
using gzip to keep archives smaller, it has some new regexp filtering
facilities (e.g., for filenames) and a super-fantastic utility to test
whether a version compiles given a particular command (e.g., ‘make
all’). The latter is vaguely like ‘trackdown’ in Darcs, and I'm finding
it very useful.
- 2007-06-05–I've implemented an extension to KVS2 that keeps the
pool / archived files gzipped (unless doing so results in a
larger
file size). It's still experimental, but it looks like it saves about
25% of disc space for my case study (i.e., for my web site, which is
approximately 180Mb, counting the active version, archive, and
bookkeeping files). Archive validation is vastly faster, but actual
imports suffer a bit (because of the compression time). The extension
is backward-compatible with KVS2 archives, but only newly-added files
will be compressed; I'm sure I've written a converter, but I've no
earthly idea where it is.
- 2006-08-07–I've made some minor changes to KVS2 and uploaded it.
Original KVS is no longer available, and I've removed all information
pertaining to it from this site.
- 2006-07-18–I've been using KVS2 with quite a bit of success; I'm
not finding bugs like crazy anymore, and the ‘unexpected behaviours’ I
am
finding are simply unforseen—but acceptable—consequences of my
design decisions. KVS2 has
dreadful
performance, largely (I think) because I'm using ‘Unix.system’ for
moving, renaming, etc. files; I did this because I ran into problems
otherwise (i.e., that ‘Sys.rename’ doesn't do the same thing as ‘mv’).
- 2006-06-28–KVS2 is almost ready for a release. It's fairly nice
to work with, and the tutorial is done. Using the KVS and KVS2 codes,
I've cobbled together a converter taking a KVS archive and creating an
equivalent KVS2 archive. I'm still finding bugs too frequently to
release the code yet, though—mostly corner cases I didn't
consider.
Intended Uses
KVS is intended to be used for small projects that take place over a short
period of time—projects for which the effort involved in setting up a
‘proper’ archive would be more costly than the benefit of maintaining the
version history. It is also usable for projects that are essentially a
collection of files—where one wishes to view changes at the
file level
rather than from a finer-grained view (e.g., line- or character-based
changes). One case where someone might wish to do something like this
would be when the archive consists largely of binary files.
Download
KVS is open-source; the only available
download is the OCaml / CamlTrax
sources. |
Screenshot
KVS in action, starting up and
demonstrating adding a file to the
repository (an older version of the
present HTML page, in fact!). |
More Information
Well, there's really no more information available for the time being,
sorry! Please check back soon, though, or e-mail me if you have specific
questions.
This page was generated by WebGen on KarmicPhoenix on Sun Nov 15 19:42:28 EST 2009. (W-Links mode.)