File: rcsdiff.pl

package info (click to toggle)
librcs-perl 1.05-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 308 kB
  • ctags: 89
  • sloc: perl: 1,399; makefile: 2
file content (27 lines) | stat: -rwxr-xr-x 604 bytes parent folder | download | duplicates (6)
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
#------------------------------------------
# Use rcsdiff utility.
#------------------------------------------
use strict;
use Rcs;

Rcs->quiet(1);

my $obj = Rcs->new;
$obj->bindir('/usr/bin');
print "Quiet mode set\n" if Rcs->quiet;

$obj->rcsdir("./project/RCS");
$obj->workdir("./project/src");
$obj->file("testfile");

print "Diff of current working file\n";
if ($obj->rcsdiff) {       # scalar context
    print $obj->rcsdiff;   # list context
}
else {
   print "Versions are Equal\n";
}

print "\n\nDiff of revisions 1.2 and 1.1\n";
print $obj->rcsdiff('-r1.2', '-r1.1');