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-*-
# (I'm a Emacsian Fundamentalist)
# $Id: //guest/perforce_software/archived/utils/cvs2p4/MANIFEST#1 $
#
# Copyright (c) 1996 Network Appliance, Inc.
#
# You may distribute under the terms of the Artistic License, as
# specified in the README file included in the cvs2p4
# distribution.
#
# Original Author: Richard Geiger for Network Appliance, Inc.
#
# $Id: //guest/perforce_software/archived/utils/cvs2p4/MANIFEST#1 $
# Here is the manifest.
# You can update the checksums with "-gen"
#
require 5.000;
use Carp;
$| = 1;
($Myname = $0) =~ s%^.*/%%;
$Mydirname = &dirname($0);
chdir $Mydirname || die;
#path sum1 sum2 opts
$manifest = <<'MANIFEST';
MANIFEST:-:-
README:30847:27:mode=444
NEWS:00726:37:mode=444
config.tmpl:34067:9:mode=444
bin/cvs2p4:24229:1:mode=555
bin/genmetadata:10458:35:mode=555
bin/genchanges:44347:7:mode=555
bin/dochanges:05979:28:mode=555
bin/dolabels:44684:10:mode=555
bin/revmap:29340:2:mode=555
bin/srcdiff:11403:16:mode=555
bin/cvs2p4:24229:1:mode=555
lib/util.pl:04500:7:mode=444
src/rcs-5.7/src/rlog.c.patch:23939:1:mode=444
test/file,v:57384:4:mode=444
test/phone.gif,v:59723:1:mode=444
test/dollar$file,v:32426:1:mode=444
test/space file,v:32426:1:mode=444
test/pound#file,v:32426:1:mode=444
test/percent_%file,v:32426:1:mode=444
test/at@file,v:32426:1:mode=444
test/star*file,v:32426:1:mode=444
test/datefile_readd,v:30938:1:mode=444
test/Attic/datefile,v:02632:1:mode=444
test/config.test:48570:9:mode=444
test/runtest:33250:6:mode=555
test/norm:36105:1:mode=555
test/metadata.good:51804:2:mode=444
test/lines.good:07185:1:mode=444
test/changes.good:61654:3:mode=444
test/p4_changes_-l.good:26500:4:mode=444
test/p4_describe.good:17487:10:mode=444
test/p4_describe-new.good:29344:10:mode=444
test/p4_filesat.good:18838:1:mode=444
test/p4_labels.good:63997:1:mode=444
test/brmap.pl:58666:1:mode=444
test/exclude_branches:07345:1:mode=444
test/exclude_tags:27386:1:mode=444
MANIFEST
@manifest = split(/\n/, $manifest);
$Usage = <<LIT;
$Myname: usage: $Myname [-gen|-tar <vers>]
LIT
sub x
{
my ($cmd) = @_;
print "$Myname: $cmd\n";
if (! $noexec)
{
$status = system $cmd;
if ($status)
{ printf "$Myname: *** exit status %d\n", $status / 256; exit 1; }
}
}
sub dirname
{
my ($dir) = @_;
$dir =~ s%^$%.%; $dir = "$dir/";
if ($dir =~ m%^/[^/]*//*$%) { return "/"; }
if ($dir =~ m%^.*[^/]//*[^/][^/]*//*$%)
{ $dir =~ s%^(.*[^/])//*[^/][^/]*//*$%$1%; { return $dir; } }
return ".";
}
sub usage
{
print STDERR $Usage;
exit 1;
}
sub help
{
print STDERR <<LIT;
$Usage
$Myname is used to help verify the completeness of the cvs2p4
distribution kit.
LIT
exit 1;
}
$uname = `/bin/uname -a`; chop $uname;
($u_os, $u_host, $u_osrel) = split(/\s+/, $uname);
if ($u_os eq "SunOS" && $u_osrel =~ /^5\./)
{ $sum = "/usr/ucb/sum"; }
elsif ($u_os eq "SunOS" && $u_osrel =~ /^4\./)
{ $sum = "/bin/sum"; }
elsif ($u_os eq "OSF1" && $u_osrel =~ /^V[34]\./)
{ $sum = "/bin/sum" }
elsif ($u_os eq "FreeBSD" && $u_osrel =~ /^2\.\./)
{ $sum = "NONE" }
elsif ($u_os eq "Linux" && $u_osrel =~ /^2\./)
{ $sum = "/usr/bin/sum" }
else
{ print STDERR "\n$Myname: warning: not tested for \"$u_os $u_osrel\".\n\n"; }
# Take our chances with $PATH
#
if (! defined($sum)) { $sum = "sum"; }
if (! defined($tar)) { $tar = "tar"; }
$op = "check";
while ($#ARGV >= 0)
{
if ($ARGV[0] eq "-gen") { $op = "gen"; shift; next; }
elsif ($ARGV[0] eq "-tar")
{
$op = "tar"; shift;
if ($#ARGV < 0) { usage; }
$vers = $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 != -1) { &usage; }
if ($op eq "gen")
{
@mestat = stat($Myname);
if (! open(ME, "<$Myname"))
{
print "Can't open myself for modification: $!\n";
exit 1;
}
if (! open(NEWME, ">$Myname.gen"))
{
print "Can't open myself for modification: $!\n";
exit 1;
}
while (<ME>) { print NEWME; if (/^\$manifest = <<'MANIFEST';$/) { last; } }
}
elsif ($op eq "tar")
{ $tarcmd = "$tar cvf cvs2p4-$vers.tar"; }
if ($op eq "check" && $sum eq "NONE")
{ print "\n[Checksums will not be checked on this $u_os system.]\n\n"; }
$status = 0;
foreach $ent (@manifest)
{
($path, $sum1, $sum2, $opts) = split(/:/, $ent);
if ($op eq "check" || $op eq "gen")
{
if (! lstat($path))
{ print "? $path... not found (couldn't stat)\n"; $status |= 1; }
else
{
$linktarg = "";
if ($opts =~ /\bsymlink=([^,\s]+)\b/)
{ $linktarg = $1; }
else
{
if ($sum ne "NONE")
{
$sums = `$sum '$path'`; chop $sums;
($csum1, $csum2) = split(/\s+/, $sums);
}
}
if ($op eq "check")
{
if ($linktarg ne "")
{
if (! -l $path)
{ print "? $path... symlink not found\n"; $status |= 1; }
else
{
$link = readlink $path;
if ($link ne $linktarg)
{ print "? $path... symlink should be \"$linktarg\"\n"; $status |= 2; }
else
{ print " $path\n"; }
}
}
else
{
if ($path =~ /(\/){0,1}$Myname$/)
{ print " $path\n"; next; }
if ($sum ne "NONE" && ($csum1 != $sum1 || $csum2 != $sum2))
{ print "M $path... modified (checksums mismatch)\n"; $status |= 2; }
else
{ print " $path\n"; }
}
}
elsif ($op eq "gen")
{
if ($path =~ /(\/){0,1}$Myname$/)
{
print NEWME "$path:-:-\n";
print "$path\n"; next;
}
if ($linktarg ne "")
{
$_ = "$path:-:-:$opts\n";
print NEWME;
print "$path\n";
}
else
{
$_ = "$path:$csum1:$csum2:$opts\n";
print NEWME;
print "$path - checksum generated\n";
}
}
}
next;
}
elsif ($op eq "tar")
{
if ($opts =~ /\bmode=([0-9]+)\b/)
{
$mode = $1;
&x("/bin/chmod $mode '$path'");
}
@modes = lstat("$path");
$owners{$path} = $modes[4];
$groups{$path} = $modes[5];
chown(0, 0, "$path")
|| print STDERR "WARNING: can't \"chown 0, 0, cvs2p4-$vers/$path\": $!\n";
$tarcmd .= " 'cvs2p4-$vers/$path'";
}
}
if ($op eq "gen")
{
while (<ME>) { if (/^MANIFEST$/) { print NEWME; last; }}
while (<ME>) { print NEWME; } close NEWME;
unlink "$Myname.old";
rename "$Myname", "$Myname.old" || die;
rename "$Myname.gen", "$Myname" || die;
chmod $mestat[2], "$Myname" || die;
}
elsif ($op eq "tar")
{
$Here = `/bin/pwd`; chop $Here;
($Herename = $Here) =~ s%^.*/%%;
$Parent = &dirname($Here);
&x("/bin/mv $Parent/$Herename $Parent/cvs2p4-$vers");
chdir $Parent || die;
&x("$tarcmd")
&x("/bin/mv $Parent/cvs2p4-$vers $Parent/$Herename");
&x("/bin/mv $Parent/cvs2p4-$vers.tar $Parent/$Herename/cvs2p4-$vers.tar");
chdir $Here || die;
foreach $path (keys(%owners))
{
$own = $owners{$path}; $grp = $groups{$path};
chown ($own, $grp, "$path") ||
print STDERR "WARNING: can't \"chown $own, $grp, $path\": $!\n";
}
}
print "\n";
if ($status == 0) { print "All ok\n"; }
if ($status & 1) { print "*** some files are missing\n"; }
if ($status & 2) { print "*** some files have been modified\n"; }
exit $status;
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #1 | 8160 | michael |
Archive obsolete CVS to Perforce converter. See the Perforce KB and website for an updated CVS to Perforce converter. |
||
| //guest/perforce_software/utils/cvs2p4/MANIFEST | |||||
| #46 | 7274 | Richard Geiger | Integrate dev changes to become 3.1 | ||
| #45 | 5650 | Richard Geiger | Publish 3.0b6 | ||
| #44 | 5620 | Richard Geiger | Publish 3.0b4 | ||
| #43 | 5614 | Richard Geiger | 3.0 beta 2, fix for broken Depotmap{} | ||
| #42 | 5613 | Richard Geiger | prep for 3.0b2 | ||
| #41 | 5607 | Richard Geiger |
Publish 3.0b1... Geronimo! |
||
| #40 | 5606 | Richard Geiger | Final 3.0b1 tweaks prior to publishing. | ||
| #39 | 5602 | Richard Geiger | Add test/brmap.pl | ||
| #38 | 5601 | Richard Geiger | Integrate 3.0 changes, preparing to publish. | ||
| #37 | 5146 | Richard Geiger |
I always get this wrong... sigh. |
||
| #36 | 5145 | Richard Geiger | Publish 2.5.5 | ||
| #35 | 4985 | Richard Geiger |
Long live 2.5.4. (Adds bni/srcdiff) |
||
| #34 | 4926 | Richard Geiger | Add corrected .good file! | ||
| #33 | 4924 | Richard Geiger | publish 2.5.3 | ||
| #32 | 4735 | Richard Geiger |
This is release 2.5, which handles those four extra special characters Perforce 2004.2 kind-of allows :-) |
||
| #31 | 4354 | Richard Geiger | Integrate 2.4 changes. | ||
| #30 | 4274 | Richard Geiger | Publish 2.3.8 | ||
| #29 | 3711 | Richard Geiger | release 2.3.7 | ||
| #28 | 3600 | Richard Geiger | publish 2.3.5. | ||
| #27 | 2449 | rmg | Public 2.3.4 | ||
| #26 | 2285 | rmg | Publish 2.3.3 | ||
| #25 | 2063 | rmg | Publish 2.3.2 | ||
| #24 | 1989 | Richard Geiger | Public 2.3.1 | ||
| #23 | 1971 | rmg | Publish 2.2 | ||
| #22 | 1946 | rmg | Publish 2.1 | ||
| #21 | 1786 | rmg | Publish 2.0 | ||
| #20 | 1439 | rmg | Publish 1.3.3 | ||
| #19 | 1410 | rmg | Publish 1.3.2 | ||
| #18 | 1205 | Richard Geiger | Publish 1.3.1 | ||
| #17 | 1187 | Richard Geiger |
1.3. Mainly, support for labels! |
||
| #16 | 1033 | Richard Geiger | publish 1.2.17 | ||
| #15 | 796 | Richard Geiger | Release 1.2.16 update | ||
| #14 | 476 | Richard Geiger | publish cvs2p4 1.2.15 | ||
| #13 | 462 | Richard Geiger | publish 1.2.14 to the public site. | ||
| #12 | 436 | Richard Geiger | Publish 1.2.13 | ||
| #11 | 418 | Richard Geiger | Publish 1.2.12 | ||
| #10 | 400 | Richard Geiger | Publish 1.2.11 | ||
| #9 | 395 | Richard Geiger | 1.2.10 | ||
| #8 | 344 | Richard Geiger | 1.2.9 | ||
| #7 | 333 | Richard Geiger |
Publish 1.2.8 (Not usre why test/file,v was included in this integration; am guessing it was a missed integrations left over from 1.2.7, perhaps) |
||
| #6 | 321 | Richard Geiger | Ah, also update these for 1.2.7 | ||
| #5 | 285 | Richard Geiger |
Fix MANIFEST so that it (and the distribution archive) contains itself. |
||
| #4 | 256 | james | push cvs2p4 1.2.6 to public area | ||
| #3 | 242 | james |
Pull cvs2p4 into //public so latest version (1.2.5) gets synced onto the Perforce FTP area. Note the cvs2p4-latest.tar symlink - I'll update loadsupp to point to that. |
||
| #2 | 230 | Laura Wingerd |
Pull cvs2p4 into //public so latest version (1.2.4) gets synced onto the Perforce FTP area. |
||
| #1 | 152 | Laura Wingerd | cvs2p4 goes public. | ||
| //guest/richard_geiger/utils/cvs2p4/MANIFEST | |||||
| #1 | 130 | Richard Geiger |
CVS-to-Perforce converter. This is release 1.2.2 (first submit to the Perforce Public Depot) |
||