/usr/share/doc/librcs-perl/examples/revdate.pl is in librcs-perl 1.05-4.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #!/usr/local/bin/perl -w
#------------------------------------------
# Get revision date
#------------------------------------------
use strict;
use Rcs;
Rcs->bindir('/usr/bin');
my $obj = Rcs->new;
$obj->rcsdir("./project/RCS");
$obj->workdir("./project/src");
$obj->file("testfile");
my $revision = shift || $obj->head;
die "Revision $revision does not exist\n"
unless grep /^$revision$/, $obj->revisions;
# scalar mode
my $date_num = $obj->revdate($revision);
print "Revision : Date number = $revision : $date_num\n";
my $date_str = localtime($date_num);
print "Revision : Date string = $revision : $date_str\n";
# list mode
my @list_date = $obj->revdate($revision);
print "Revision : Date array = $revision : @list_date\n";
|