2023/12/16: Last commit in a cvs repository

As cvs is basically a wrapper aroud rcs (at least from the data-structure point of view), old versions as well as change logs, etc, are attached to the individual files. Still, well-defined source checkouts can be achieved by the export command specifying a fixed date and time (in the past). This is, e.g., used when importing cvs repositories as "git tree" repositories in just. In order to update such an import of a cvs repository, it is necessary to find out the date and time of the last commit. As the actual commit information is attached to the individual rcs files, that information cannot be used directly without inspecting each file. However, to answere these kind of quesitons, cvs also keeps a central history file in the CVSROOT that keeps track of all transactions. There is also a subcommand to access the information stored there, cvs history. To get the date of the last modification (i.e., the last transaction that affects an export) one can look at the last line of a command like the following.


cvs -d :ext:user@cvs.example.org:/var/cvs/project history -x ARM -a -p modulename

The format is also easy enough to parse programatically.