Excerpt of message (sent 27 November 2000) by Larry Jones:
> Anner Adrian writes:
> > how can I get the list of the dates of the tags.
>
> CVS doesn't directly track the date that a tag is applied to a file (and
> note that the dates in separate files might be quite different).
You can get the commit date of the revision corresponding to a tag out
of the cvs log. This date will be earlier than the application of the
tag. To post-process the output of cvs log, put the script below into
a file, say tag-date, make it executable, and run
cvs log my_file | tag-date
Notes:
* Branch tags don't have a checked-in revision associated with them.
* Dates are reordered into dd.mm.yyyy format, as in the example of
Adrian Anner (with email in .ch). Personally, I'd include the time.
* The script expects the cvs log output from a single file. It could
be extended.
Christian Brechb�hler
======================================================================
#!/usr/local/bin/perl -w
# first read the whole log and remember what matters.
while (<>) {
if (/^\t([a-z][-_\w]*): ([\d.]*(\d+)\.\d+)$/) {
$tag_rev{$1} = $2; # build tag -> rev hash
$date{$2} = "(branch)" unless $3; # no date on branch tags
} elsif (/^revision ([\d.]+)$/) {
$rev = $1; # remember revision
} elsif (m"^date: (\d{4})/(\d{2})/(\d{2}) ") {
$date{$rev} = "$3.$2.$1"; # build rev -> date hash
}
}
# now report what we found.
while (($tag, $rev) = each %tag_rev) {
print "$tag $date{$rev}\n"
}
_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs