diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2009-07-14 14:44:50 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-06-26 00:30:11 -0600 |
commit | 3a511922b9e6fd25aefedb72e35a4afc1cc024a5 (patch) | |
tree | 3ebfbe2f18739a5b781d658e15e4088c47068447 /HACKING | |
parent | 84432b231e5fe2a28a0a435d4ce34a1214bd6fbc (diff) |
copy-edit HACKING file
Diffstat (limited to 'HACKING')
-rw-r--r-- | HACKING | 87 |
1 files changed, 44 insertions, 43 deletions
@@ -59,58 +59,59 @@ executable, and the file you call when you type `rvs' is just a wrapper for them. ----------------------------------------------------------------------- ------ The rest is copy/pasted, and still needs to be copy-edited.----- ----------------------------------------------------------------------- - - 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: + The wrapper is quite simple in mechanism. It simply checks if + `$$libdir$$/COMMAND_NAME' exists, and if so, runs that file. + + The `rvs commit' command is also quite simple in design. It takes a + single argument; the file to commit. If no target is specified, it + defaults to `./'. It checks which type of file the target is, and + runs `rvs commit.FILE_CODE TARGET'. The file codes are as follows: + + 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 (if you've looked at the blueprints or + source files), only directories and regular files have been + implemented as of rvs 0.6.1. + + After `rvs commit' has done this, it creates a meta-file for that + commit. The meta file contains author, copyright owner, licence + data, file permissions, timestamps, etc. The id of the meta-file + is written to stdout, and used to later check out that commit + + get works in much the same way as commit, only it reads the file + type from the meta-file, then runs `rvs get.FILE_CODE COMMIT_ID'. + + If you implement any other file types, save the commit and get + functions in the propper locations. + + Any commit function should take a filename as an argument and + output the according commit id to stdout. + + Any get function should take the commit id as an argument and + uses stdout only if verbose, or to report errors. + + To summarize, the modules are separate programs and communicate via + pipes, which is generally considered bad-design, and libraries + should be used instead. I deliberatly broke this because: 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 + 3. one can use any language to write new modules, without having to worry about bindings - known bugs - - * borks on files with the newline character. The smart thing - to do would be to escape all speacial characters. - Files to be changed: - * source/rvs-core/commit - * source/rvs-core/commit.d - * source/rvs-core/get.d - I have set up bazaar repository at Launchpad: https://launchpad.net/rvs Only until rvs becomes self-hosting. - If anyone needs any help, let me know. + If anyone needs any help, let me know, either via email, or via + Launchpad, I'll be happy to help! ~ Luke Shumaker <LukeShu@sbcglobal.net> Happy Hacking! |