rcsfixup #1

  • //
  • guest/
  • ashish_melanta/
  • perforce/
  • utils/
  • cvs2p4/
  • bin/
  • rcsfixup
  • View
  • Commits
  • Open Download .zip Download (753 B)
#!/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;
# Change User Description Committed
#1 5974 Ashish Melanta Pulling in the Perforce utils into my guest branch
//guest/perforce_software/utils/cvs2p4/bin/rcsfixup
#2 5649 Richard Geiger Integrate 3.0b5, b6 changes...
#1 4354 Richard Geiger Integrate 2.4 changes.
//guest/richard_geiger/utils/cvs2p4/bin/rcsfixup
#1 4279 Richard Geiger Add rcsfixup to strip RCS lines that Perforce won't like...