From 1f75a1dff61a33dea973ebeea64a3bd8bccb715a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 13 Jul 2009 15:46:14 -0400 Subject: add README, HACKING, and other documentation --- docs/README.xhtml | 106 +++++++++++++++++++++++++++++------------------------- 1 file changed, 57 insertions(+), 49 deletions(-) (limited to 'docs/README.xhtml') diff --git a/docs/README.xhtml b/docs/README.xhtml index 3d6c612..ded2de0 100644 --- a/docs/README.xhtml +++ b/docs/README.xhtml @@ -4,48 +4,45 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - rvs $$VER$$ + rvs 0.6.0 + -

rvs $$VER$$

+

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

-

After you have obtained the source code, cd into the directory and run: -
./configure -
make install -

-

instead of using options to ./configure like ./configure --prefix=/usr/bin, all configuration options (that effect the installation, not the build process), are stored in the file Variables. Many of the source files use variables in the form $$VARNAME$$. The ./configure script replaces each instance of this with the value defined in Variables. Variables contains a variable name, tab character, then value on each line.

+

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

    +

    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

    @@ -57,24 +54,22 @@
    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:

    +

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

    +

    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:

    @@ -84,20 +79,33 @@ - +
    named pipe (FIFO)             
    p
    regular file                  
    f
    symbolic link                 
    l
    docket                        
    s
    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 /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:

    +

    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