rvs 0.5.10

rvs is a basic versioning system I've been writing. If you don't know what that means, it isn't for you (at least not at this stage in development).

installation

Download the tarball rvs-0.5.10.tar.gz.

To install, simply extract the tarball in the root directory (preferably as root).

Here is a list of all the files in rvs-0.5.10.tar.gz:

system requirements

Pretty much any *nix system should be able to run rvs, provided it has bash, and bash is installed at /bin/bash (e.g.: FreeBSD has it at /usr/bin/bash, so you should set up a symlink). rvs is not designed for Windows, but should be able to run in bash if you have some *nix pack installed.

To my knowledge, this is the absolute requirements (all need to be in your PATH):

usage

create repository in the current directory
rvs init
check in the current directory
rvs commit This will return a commit id. You need this to check the revision back out.
check out to the current directory
rvs get ID This checks out commit ID

The system will bork if you have filenames with spaces or newlines. Why? Because you haven't written a patch to fix it yet.

Feel free to push to the launchpad repository.

hacking

Again, here is a list of all files in rvs-0.5.10.tar.gz:

These are all shell scripts and may be modified directly. I have designed this system to be extremely modular. As you may have figured out, each bit on functionality is in it's own script, and /usr/bin/rvs is just a wrapper for them. If you wish to move the directory with the sub-modules, all you have to do is update the variablle RVSDIR towards the beginning of /usr/bin/rvs.

commit actually does take a parameter. It can commit any file or directory. It works as it does because if no file is given, it defaults to ./. If it is given a directory (as it is by default), it loops through each file in the directory and commits them (by calling itself). In order to actually commit a file or directory it calls rvs commit.type where type is the standard unix file-type code:

block       (buffered) special
b
character (unbuffered) special
c
directory                     
d
named pipe (FIFO)             
p
regular file                  
f
symbolic link                 
l
docket                        
s
door (Solaris only)           
D

As you probably noticed, only directories and regular files have been implemented in this release. get works in much the same way. If you implement any other file types, save the commit and get functions accordingly, and uncomment the line in /etc/abomination/modules/rvs/commit. Any commit function takes a filename as an argument and outputs the according commit id to stdout. Any get function takes the commit id as an argument and uses stdout only if verbose, or to report errors. So the modules communicate via pipes, which is generally considered bad-design, and libraries should be used. I deliberatly broke this because this way:

  1. incompatible licences can be used for different modules
  2. modules can be added/removed on the fly
  3. one can use any lanugage to write new modules, without having to worry about bindings

TODO

I have set up bazaar repository at Launchpad. Only until rvs becomes self-hosting.

If anyone needs any help, let me know.
~ Luke Shumaker <LukeShu@sbcglobal.net>
Happy Hacking!