aesvt(1)

NAME
aesvt - simple version tool

SYNOPSIS
aesvt -CHeck_Out -HIstory file -File output-file [ -e edit ]
aesvt -CHeck_In -HIstory file -File input-file [ -e edit ] [ name=value ...]
aesvt -List -HIstory file
aesvt -Query -HIstory file
aesvt -Version

DESCRIPTION
The aesvt program may be used to manage history version files. This is a minimalist history tool, which makes no provision for managing a work area.

It is able to cope with binary files, and with reasonable efficiently if they are not too large.

It has good end-to-end properties because it keeps a checksum for each file version, and a checksum for the whole history file.

There is no provision for keyword substitution of any kind. A check-out will exactly reproduce the input file. A check-in will never alter the input file.

OPTIONS
The following options are understood:

-History history-file
    This option is used to specify the name of the history file.

-File file-name
    This option is used to specify the name of the input or output file. On check-out, the file name "-" is understood to mean the standard output. There is no equivalent for check-in.

-Edit edit-number
    This option is used to specify the edit number (version number). On check-out, if no version number is specified, the most recent version is given. On check-in, if no version number is specifiued (and it usually isn't), the previous version will have one added to it, or version 1 will be used if this is the first check-in.

-CHeck_In
    This option is used to check a file into the history.

-CHeck_Out
    This option is used to check-out a file from the history.

-List
    This option is used to list the file's history.

-Query
    This option is used to query edit number of most recent check-in.

-Version
    This option is used to print version number.

All other options will produce a diagnostic error.

FILE FORMAT
Each version in the history file consists of an RFC822 header, plus the file contents. The header includes (at least) the Content-Length, used to remember the length of the file data in bytes; the Checksum, used to remember the Adler32 checksum of the file data; and Version, used to remember the version number. The file data can be text or binary, because its length is determined by the header. There is no quoting mechanism of any kind for the data. Except for the mandatory fields, additional user-defined us-ascii meta-data may also be stored in the header. There is no diff or delta of any kind for any version.

This combination of header and data has good end-to-end behaviour, because there is a checksum to validate the file data against. Bad blocks in the data will be detected then next time a check-in or check-out is attempted.

The format of the history file consists of one or more file versions with the above layout, joined head-to-tail with no separators or boundary indicators of any kind. The versions are in descending order, from most recent (greatest edit number) to least recent (version number one). To determine where one version stops and the next version starts, use the Content-Length field in the header. The entire history file is then compressed using the bunzip2 algorithm (via libbz2). There is no diff or delta of any kind in the history file.

The advantage of compressing the file is that there is usually a very high redundancy between file versions. For example, if two identical versions are checked in (not necessarily sequentially) the second copy will compress to only a few bytes. Unlike diff(1) style deltas, this also copes very will with moving blocks of data within the file. The use of bunzip2 formatting means there is also a checksum for the whole history file, which allows you to detect bad blocks in the header portions; it also means there is a simple way to extract the data from a history file even without the aesvt program, or for testing, or because you are curious.

You can actually choose from a number of compression algorithms, including GNU Zip and bunzip2, via the -compression-algorithm option. More copmpresison algoritthms may be added in the future. The best available comression is used, because this results in the most compact history files. Future versions will always be able to access the compression used by earlier versions.

  End-To-End Issues
See also Saltzer, J.H. et al (1981) End-to-end arguments in system design, http://web.mit.edu/Saltzer/www/publications/endtoend/endtoend.pdf

  Xdelta
This style of history file was inspired by RFC 3284 - The VCDIFF Generic Differencing and Compression Data Format. While the aesvt format does not use RFC3284 internally, the arguments for compression across file versions are just as relevant.