1N/A# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 1N/A# Use is subject to license terms. 1N/A#ident "%Z%%M% %I% %E% SMI" 1N/A# for an example), a perl build directory and a ON workspace and reports files 1N/A# that are different in the build and ON directories. This show up any manual 1N/A# edits that have been made during the integration process, useful for 1N/A# identifying files that need to be preserved during future reintegrations. 1N/A# Run with the '-d' option to produce a diff file suitable for applying with 1N/A# Compare two files, return 0 for different, 1 for the same. 1N/A # Quick check - they must exist and be the same size. 1N/A# Basic sanity checks. 1N/A die("Usage is $0 [ -d ] <mapping file> <perl build dir> <workspace>\n");
1N/Adie("$ws is not a workspace\n") if (! -d "$ws/Codemgr_wsdata");
1N/A# Work out perl version. 1N/A ($line =~ /#define\s+PERL_REVISION\s+(\S+)/) && ($r = $1); 1N/A ($line =~ /#define\s+PERL_VERSION\s+(\S+)/) && ($v = $1); 1N/A ($line =~ /#define\s+PERL_SUBVERSION\s+(\S+)/) && ($s = $1); 1N/Adie("Can't find perl version\n") 1N/A# Work out directory locations. 1N/A# Read in the mapping file. 1N/A m{["']([^"'\\]*(?:\\.[^"'\\]*)*)["'],?|([^,]+),?|,}g; 1N/A push(@field, undef) if (substr($line, -1, 1) eq ','); 1N/A my $p = shift(@field); 1N/A my $f = shift(@field); 1N/A # We just want the s10 column. 1N/A# Process the mappings. 1N/Aforeach my $p (sort(keys(%file))) { 1N/A foreach my $f (sort(keys(%{$file{$p}}))) { 1N/A my $pf = ($p ne '' ? "$p/" : $p) . $f; 1N/A my $cpf = ($p ne '' ? "$p/" : $p) . ",$f"; 1N/A # If it has gone into the distrib directory. 1N/A if ($d eq 'distrib') { 1N/A # If it has gone into the arch directory. 1N/A } elsif ($d eq 'arch') { 1N/A # If it is to be copied forwards from the last version. 1N/A } elsif ($d eq 'fwd') { 1N/A # Short forms of the filenames. 1N/A "-e 's!$dst!$sdst!g'");