This area is an archive and is no longer actively maintained. Information found on this page is likely to be extremely out of date and therefore highly inaccurate. We recommend the Ximbiot - CVS Wiki for up-to-date information about CVS and its associtated tools.

If you do find anything useful on this page that is not yet in the Ximbiot - CVS Wiki and you have the time, please add it!

Date Formats in CVS

Date Formats in CVS

The general future direction, insofar as one has been set, is to reduce the number of date formats in CVS to a smaller set. For absolute dates, the preferred formats are ISO8601 (e.g. "1972-09-24 20:05") and Internet (e.g. "24 Sep 1972 20:05"). For relative dates, there is no documented/preferred format(s). I don't know of any standards for relative dates other than VMS. Which I suppose we could adopt, but codifying some of the legacy CVS formats ("2 days ago", &c), might be a better approach. The formats which include "last" and "next" are probably best avoided because CVS's handling of their meaning is off by one compared with other programs like fileutils-4.0.

So my (Kingdon's) idea about what to do once we have a standard set of formats (probably with more discussion about which formats), is to write a new parser which is very simple, non-yacc-based, and which is fairly picky about which formats is accepts. The parser in RCS 5.7 is the kind of thing I'm thinking of, but somewhat more picky about some details like whitespace and definately more picky about limiting the number of date formats accepted. Then have Make_Date run the old parser if the new one fails. If only the old one works, use the date from the old one but with a warning.

Another project is to make CVS's output use one of the preferred formats. Here is a patch which addresses one aspect of the problem, by using ISO8601 dates in "cvs log". Just changing the format, like this, might be OK, or fancier mechanisms could provide more compatibility with the traditional output. Another, semi-related, issue is tagging dates in the remote protocol, so that clients can display/process the dates without having to guess what is a date and what isn't.

For additional discussion, see the comments in cvs.texinfo (because these are comments, one must look at cvs.texinfo itself rather than one of the formatted versions of the manual)

Some cleanups to do: make the "cvs log" client use Internet dates in the protocol (per cvsclient.texi), and make years in the protocol always 4 digits (also per cvsclient.texi).

[Cyclic Home]

Derek Price, CVS developer and technical editor of Essential CVS (Essentials line from O'Reilly Press) , and others offer consulting services and training through Ximbiot.