.TH LCVS-FILES 5 "Sep 10, 2011" "" "" .SH NAME Specification of the file structure in a lcvs cache directory (typically ~/.lcvs) .SH DESCRIPTION At the designated place (default ~/.lcvs) there are several directories, each is the quoted (see below) name of a cvs root. Inside each of the directories, the subdirectories have the following meaning. \fB#lock\fR .br the global lock directory \fBroot \fR .br the directory with the actual local copy of the cvs-repository \fBroot-old \fR .br an old copy of the cvs repository; it is valid if and only if the directory root does not exist \fBfallback\fR .br If present, it contains a sound state of the root directory before the last successful synchronisation. If a version of lcvs supports the fallback directory (the version this man-page belongs to does), a single synchronisation can never lose data, even if something happened to the original cvs repository. Even though this gives some safety, especially in path confusions or repositories moving unexpectedly, you should not base any backup strategy only on lcvs. lcvs is not a backup tool and only for convenient (offline) read-only access. The fallback subdirectory can be removed at any time (the directory is not locked) to save disk space. To avoid generating a fallback directory the option -nofallback is recommended. \fBtmp\fR .br a directory with arbitrary temporary data \fBtmp-rcv-*\fR .br directories with arbitrary temporary data. The names of these directories may be known to processes on remote machines. Therefore they may only be removed, once it is known that no remote process will still attempt to modify them. Also, the contents of these directories may change even if the global lock is set. \fBcvsroot\fR .br a file containing the name of the cvsroot \fBdate\fR .br a human readable description of when the local copy of the cvs root was made; the protocol must not depend on it, but it should be accurate \fBmirrortarball\fR .br If present, a file containing the (absolute) path to a tar ball, where "lcvs mirror" should take its data from. \fBrecv-hooks\fR .br If present, a directory containing hooks to be executed every time an "lcvs recv" has been carried out successfully. Every regular file in this directory is considered a hook. Directories etc are ignored so that you can have the collection of hooks under version control. Hooks are executed in sequentially in lexicographic order by calling "/bin/sh ", irrespectively of the return value. .SH QUOTING A simple quoting mechanism is used. All but letters (a-zA-Z), digits (0-9), and hyphens (-) are replaced by an underscore, followed by the decimal code of that character followed by another underscore. This way of quoting is a 1-1 function. Note that, in particular, "_" is quoted as "_95_". .SH LOCKS The existence of a directory #lock in ~/.lcvs/ signifies that this directory, and all its subdirectories are locked. To obtain a lock, try to create the directory by an atomic operation; if this fails, wait an try again later. Note: locks are only used for operations that update the local copy. Normal local cvs operations need not obtain a lock. To release a lock remove the directory #lock. Releasing the lock promises the local copy to be in a consistent state. .SH TO UPDATE To update the local copy, first obtain a lock, rename the directory "root" to "old-root". Then create a copy of the repository in directory "tmp". This might happen an by an appropriate call of scp(1); however methods that safe traffic are preferable. E.g., one could copy "old-root" to "tmp" and appropriately call rsync(1). Then rename "tmp" to "root", delete "root-old", and release the lock. Alternatively and recommended (and implemented by the version of lcvs this man page refers to), instead of deleting root-old, delete the "fallback" directory (if present) and then rename "root-old" to "fallback". .SH SEE ALSO .BR lcvs "(1)" .SH AUTHOR Klaus Aehlig