Overview
To use as little memory as possible, KKVCS DOS Version Control is developed as a collection of utilities, rather than one large executable:
Ideally, you should be able to run it on an IBM PC 5150, as long as the system meets the rest of the minimum system requirements.
The names of tracked files and their current revision numbers are stored in file _kkvcs.txt in the top-level directory for your source code (i.e. whatever is the present working directory when you run any of the KKVCS DOS Version Control utilities). Each line in the file has the following format:
cookie.c,2
The revision number is represented by a hexadecimal string. Because the revision data is stored at the file-system level and the revision number is also used as a directory name, due to the eight-character length restriction imposed by DOS on directory names, having the revision number as a hexadecimal string allows for a maximum of 168-1 revisions, or 4,294,967,295 revisions in decimal notation. A revision number of 0 is used to indicate when a file has first been added to be tracked.
All revision data is stored at the file-system level under directory _revs in the top-level directory for your source code. The first revision committed for a file, revision 1, will contain a full copy of that file under _revs\1. For subsequent revisions, the DOS FC utility (introduced in MS-DOS 3.30, hence that minimum system requirement) is used to determine any differences between the current contents of a given file and the previous contents. The output from that utility gets copied into a file that uses the same name as the committed source file and is stored under the appropriate revision directory. For example, the FC output that shows the differences between the first revision of cookie.c and the current (or second) revision of cookie.c will be stored in _revs\2\cookie.c).
When committing a new revision for a file or reverting to a previous revision that is not the first revision of that file, since the first revision is just a stored copy of the original file, KKVCS DOS Version Control will incrementally and temporarily rebuild the contents of subsequent revisions of that file. Continuing with the previous example, when committing new changes to cookie.c, the differences stored in _revs\2\cookie.c will be used by KKVCS DOS Version Control to rebuild cookie.c as it was at revision 2. This temporary file will be stored at _revs\2\kkvcs.tmp, and then the DOS FC utility will be used to determine any differences between the current contents of cookie.c and _revs\2\kkvcs.tmp. That output will be placed at _revs\3\cookie.c, and _revs\2\kkvcs.tmp will be deleted (NOTE: for now, until the first official release, for debugging purposes, kkvcs.tmp is left intact). Now, cookie.c is at revision 3:
C:\> find "cookie.c" _kkvcs.txt ---------- _KKVCS.TXT cookie.c,3
For details on each utility that is part of KKVCS DOS Version Control, please click on the above links.