blob: 50fb67c1001af1240721cbf9037c7a99194d3be4 (
plain)
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
28
29
30
31
32
33
34
35
36
37
38
|
#!/usr/local/bin/perl -w
#------------------------------------------
# Parse RCS archive file.
#------------------------------------------
use strict;
use Rcs;
Rcs->bindir('/usr/bin');
my $obj = Rcs->new;
$obj->rcsdir("./project/RCS");
$obj->workdir("./project/src");
$obj->file("testfile");
my $head_rev = $obj->head;
my $locker = $obj->lock;
my $author = $obj->author;
my @access = $obj->access;
my @revisions = $obj->revisions;
my $filename = $obj->file;
if ($locker) {
print "Head revision $head_rev is locked by $locker\n";
}
else {
print "Head revision $head_rev is unlocked\n";
}
if (@access) {
print "\nThe following users are on the access list of file $filename\n";
map { print "User: $_\n"} @access;
}
print "\nList of all revisions of $filename\n";
foreach (@revisions) {
print "Revision: $_\n";
}
|