eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # THE PRECEEDING STUFF EXECS perl via $PATH # -*-Fundamental-*- # $Id: //guest/hari_krishna_dara/perforce/utils/cvs2p4/bin/revmap#1 $ # # Richard Geiger # require 5.000; use bytes; use Carp; # ...or flounder. (This will fail unless 'perl' is a perl5!) $| = 1; ($Myname = $0) =~ s%^.*/%%; $Usage = <<LIT; $Myname: usage: $Myname [-map <mapfile>] <convdir> LIT sub usage { print STDERR $Usage; exit 1; } sub help { print STDERR <<LIT; $Usage $Myname is... LIT exit 1; } # option switch variables get defaults here... $Boolopt = 0; $Valopt = 0; $Mapfile = "revmap"; while ($#ARGV >= 0) { if ($ARGV[0] eq "-boolopt") { $Boolopt = 1; shift; next; } elsif ($ARGV[0] eq "-map") { shift; if ($ARGV[0] < 0) { &usage; } $Mapfile = $ARGV[0]; shift; next; } elsif ($ARGV[0] eq "-help") { &help; } elsif ($ARGV[0] =~ /^-/) { &usage; } if ($Args ne "") { $Args .= " "; } push(@Args, $ARGV[0]); shift; } if ($#Args ne 0) { &usage; } $Convdir = $Args[0]; chdir $Convdir || die "$Myname: can't chdir \"$Convdir\": $!"; $Convdir = `/bin/pwd`; chop $Convdir; chdir $Here || die "$Myname: can't chdir \"$Here\": $!"; $Revmap = "$Convdir/$Mapfile"; use DB_File; $DBMCLASS="DB_File"; $myhashinfo = new DB_File::HASHINFO; $myhashinfo->{bsize} = 4096; if (! tie(%REVMAP, $DBMCLASS, $Revmap, O_RDONLY, 0444, $myhashinfo)) { print "$Myname: can't tie \"$Revmap\": $!\n"; exit 1; } while (($key,$val) = each %REVMAP) { if ($Mapfile != "rrevmap") { $val =~ s/\001.*//; } print "$key $val\n"; } untie %REVMAP;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 5093 | Hari Krishna Dara |
Populating perforce branch. I will be adding p4admin files to it. |
||
//guest/perforce_software/utils/cvs2p4/bin/revmap | |||||
#6 | 3711 | Richard Geiger | release 2.3.7 | ||
#5 | 2063 | rmg | Publish 2.3.2 | ||
#4 | 1989 | Richard Geiger | Public 2.3.1 | ||
#3 | 1410 | rmg | Publish 1.3.2 | ||
#2 | 1187 | Richard Geiger |
1.3. Mainly, support for labels! |
||
#1 | 152 | Laura Wingerd | cvs2p4 goes public. | ||
//guest/richard_geiger/utils/cvs2p4/bin/revmap | |||||
#1 | 130 | Richard Geiger |
CVS-to-Perforce converter. This is release 1.2.2 (first submit to the Perforce Public Depot) |