Files used by fsvs
[Compatibility and interfaces]

FSVS uses various files to store its configuration and informations about the system it is running on. More...

Per working copy

These are stored in a subdirectory of the WAA, named by the MD5-sum of the WC-path.



#define WAA__DIR_EXT   "dir"
#define WAA__IGNORE_EXT   "Ign"
#define WAA__URLLIST_EXT   "Urls"
#define WAA__URL_REVS   "revs"
#define WAA__COPYFROM_EXT   "Copy"

Per file/directory

The cached informations (per-file) are located in the cache subdirectory of the WAA; two subdirectory levels are created below that.



#define WAA__FILE_MD5s_EXT   "md5s"
#define WAA__PROP_EXT   "prop"
#define WAA__CONFLICT_EXT   "cflct"

Temporary copy/move detection database

Entries are addressed by name.



#define WAA__FILE_INODE_EXT   "fino"
 For files.
#define WAA__DIR_INODE_EXT   "dino"
 For directories.
#define WAA__FILE_NAME_EXT   "fname"
 For files.
#define WAA__DIR_NAME_EXT   "dname"
 For directories.

Short names for the open modes.



#define WAA__WRITE   (O_WRONLY | O_CREAT | O_TRUNC)
#define WAA__READ   (O_RDONLY)
#define WAA__APPEND   (O_APPEND | O_CREAT)

Detailed Description

FSVS uses various files to store its configuration and informations about the system it is running on.

Two file trees are used:

Generally a path can be of (nearly) arbitrary length, and have every character (except NUL [\0]) in it.

So wherever pathnames or similar things are stored (eg. patterns), they are NUL -terminated; for addressing specific files the MD5 hash over the filename is used.

The written data sets normally have linefeeds (\n) in them, to ease inspection in an editor.

Please see waa.c for more details.


Define Documentation

#define WAA__APPEND   (O_APPEND | O_CREAT)

Definition at line 184 of file waa.h.

Referenced by res__mark_conflict().

#define WAA__CONFLICT_EXT   "cflct"

List of other conflict files. Defined as filename\0\nfilename\0\n...

Definition at line 157 of file waa.h.

Referenced by res__mark_conflict(), and res__remove_aux_files().

#define WAA__COPYFROM_EXT   "Copy"

Hash of copyfrom relations. The key is the destination-, the value is the source-path; they are stored relative to the wc root, without the leading "./", ie. as "dir/test". The \0 is included in the data.

Definition at line 131 of file waa.h.

Referenced by cm___dump_list(), cm___get_base_source(), cm___make_copy(), and sync__work().

#define WAA__DIR_EXT   "dir"

List of files/subdirs/devices/symlinks in and below this working copy directory.

The filelists remember the last committed state of entries. That includes the ctime, mtime, unix-mode (with flags for directory/device/symlink/file), MD5 sum, size in bytes, inode, tree relation, number of child nodes, user and group, and filename. The path can be recreated from the tree-structure and the filenames.

The header includes fields such as header version, header length, number of entries, needed space for the filenames, and the length of the longest path - most of that for memory allocation.

See also waa__output_tree().

Definition at line 111 of file waa.h.

Referenced by delay__work(), and waa__open_dir().

#define WAA__DIR_INODE_EXT   "dino"

For directories.

Definition at line 167 of file waa.h.

#define WAA__DIR_NAME_EXT   "dname"

For directories.

Definition at line 177 of file waa.h.

#define WAA__FILE_INODE_EXT   "fino"

For files.

Definition at line 165 of file waa.h.

#define WAA__FILE_MD5s_EXT   "md5s"

List of MD5s of the manber blocks of a file.

To speed up comparing and committing large files, these files hold a list of MD5 hashes for the manber blocks.
This way big files don't have to be hashed in full to check whether they've changed; and the manber blocks can be used for the delta algorithm.

Maybe the parameters for manber hashing should be stored there, too - currently they're hardcoded.

Furthermore in the WAA directory of the working copy we store a (temporary) file as an index for all entries' MD5 checksums.

Definition at line 151 of file waa.h.

Referenced by cs___update_manber(), cs__read_manber_hashes(), rev__install_file(), sync__progress(), and up__unlink().

#define WAA__FILE_NAME_EXT   "fname"

For files.

Definition at line 175 of file waa.h.

#define WAA__IGNORE_EXT   "Ign"

List of groupings ("Identification Groups for New entries", formally "Ignore patterns"). They consist of a header with the number of patterns, followed by the group, a whitespace, and the pattern (as, string with options); NUL -terminated, LF -separated.

Definition at line 117 of file waa.h.

Referenced by ign__load_list(), and ign__save_ignorelist().

#define WAA__PROP_EXT   "prop"

List of other properties. These are properties not converted to meta-data.

Definition at line 154 of file waa.h.

Referenced by prp__open_byname(), prp__unlink_db_for_estat(), sync__progress(), and up__unlink().

#define WAA__READ   (O_RDONLY)
#define WAA__URL_REVS   "revs"

Current revisions of the URLs. Very similar to WAA__URLLIST_EXT (see url__load_list()). These are split into a separate file, so that no data in /etc is changed after a commit.

Definition at line 126 of file waa.h.

Referenced by url__load_list(), and url__output_list().

#define WAA__URLLIST_EXT   "Urls"

List of URLs. They consist of a header with the number of URLs, followed by the URLs themselves; NUL -terminated, LF -separated.

Definition at line 121 of file waa.h.

Referenced by delay__work(), url__load_list(), and url__output_list().

#define WAA__WRITE   (O_WRONLY | O_CREAT | O_TRUNC)

Generated for fsvs by  doxygen 1.6.1