#!/usr/bin/perl
my $path = shift;
open(FO, "<$path") || die "open(\"<$path\"): $!";
open(FN, ">$path.new") || die "open(\">$path.new\"): $!";
# Hmmm. Should we be more discrimiating about where we are in the RCS
# file when we clobber these, so as to avoid inadvertantly whacking
# revision content!?
#
while (<FO>)
{
if (/^mergepoint\d+\s+.*;$/) { next; }
if (/^filename\s+.*;$/) { next; }
if (/^permissions\s+\d+;$/) { next; }
if (/^commitid\s+[a-f\d]+;$/) { next; }
if (/^kopt\s+[a-z]+;$/) { next; }
if (/^deltatype\s+[a-z]+;$/) { next; }
print FN;
if (/^desc$/) { last; }
}
while (<FO>)
{ print FN; }
rename($path, "$path.old") || die;
rename("$path.new", "$path") || die;
exit 0;