rvs 0.6.0

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

  • soruce/rvs-core/commit
  • see README file

    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 source/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

    hacking

    Again, here is a list of all files when you check out

    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 source/rvs is just a wrapper for them. If you wish to move the directory with the sub-modules after it has been compiled (see variables), all you have to do is update the variablle RVSDIR towards the beginning of source/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
    socket                        
    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 source/rvs-corecommit. 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

    build system

    The build system rvs uses is rather simple. ./configure does 2 things, create a preprocessor in tmp/var.sed, and generate a Makefile with this preprocessor from Makefile.orig. Then, the Makefile (among other things), runs each source file through the preprocessor.

    preprocessor/variables

    You know the configuration variables described in README? Part of the build process involves running all source files through a pre-processor (kept in tmp/var.sed). This preproccessor allows you to reference the configuration variables in any file in source/ or Makefile. Any instance of $$VAR_NAME$$ will be repleced by the value of the variable.

    known bugs

    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!