Perl-Repository-APC

 view release on metacpan or  search on metacpan

scripts/perlpatch2svn  view on Meta::CPAN

my %patchlog = ();	# log messages for p4 patches
my %patches = ();	# the patches
my %deleted = ();	# files deleted in given patch
my %added = ();		# files added in given patch
my %edited = ();	# files modified in given patch
my %binary = ();	# binary files in given patch

# SKIP: we do not need and cannot make any use of 1710. 1710 is only
# about CR in djgpp/configure.bat, but as we injected configure.bat
# ourselves into the trunk, we do not have CRs to remove, so we do not
# need the patch.
my $SKIP = {
            1710 => {"//depot/maint-5.005/perl/djgpp/configure.bat#2"=>1},
           };

my $BINARY = {
    "repo" => {
 "//depot/maint-5.004/perl/eg/cgi/dna.small.gif#1" => "320121fcbc1e56e7896a9d9a2aa8b224",
 "//depot/maint-5.004/perl/lib/Bundle/CPAN.pm#1" => "0e9ee464c7f8b482d6e69675c25f84c6",
 "//depot/maint-5.004/perl/lib/Bundle/CPAN.pm#2" => "06a29746372c4db21290d6862c2d34d4",
 "//depot/maint-5.004/perl/plan9/perlplan9.doc#1" => "1376e74adbdc55b6ca5957dc3dc2431c",
 "//depot/maint-5.6/perl/lib/CGI/eg/wilogo.gif#1" => "e33fd60f091548a70e06f37822709906",
 "//depot/perl/NetWare/interface.cpp#1" => "7da1a3fbb8a68b99d7361da526386ad3",
 "//depot/perl/djgpp/configure.bat#1" => "78c1c88ec5bc65d4bb129e17dad74582",
 "//depot/perl/djgpp/configure.bat#4" => "95759703a993847eb9291cdb3bbc4bcc",
 "//depot/perl/djgpp/configure.bat#5" => "dff1fb5aebb9691da97ffa45a01341f7",
 "//depot/perl/djgpp/configure.bat#6" => "dff1fb5aebb9691da97ffa45a01341f7",
 "//depot/perl/jpl/bin/jpl#1" => "symlinks not supported",
 "//depot/perl/wince/perl.ico#1" => "81c654bdff08d71f76df8e341b95d3e8",
 "//depot/perl/ext/Encode/Encode/iso8859-10.enc#1" => "162e76bd187cb54a5c9f0b72a082c668",
 "//depot/perl/ext/Encode/Encode/iso8859-10.enc#2" => "162e76bd187cb54a5c9f0b72a082c668",
 "//depot/perl/ext/Encode/Encode/iso8859-13.enc#1" => "bf3993877a45ac7091cfc81cfd4a4d43",
 "//depot/perl/ext/Encode/Encode/iso8859-13.enc#2" => "bf3993877a45ac7091cfc81cfd4a4d43",
 "//depot/perl/ext/Encode/Encode/iso8859-14.enc#1" => "3be4986264587bec738cc46ebb43d698",
 "//depot/perl/ext/Encode/Encode/iso8859-14.enc#2" => "3be4986264587bec738cc46ebb43d698",
 "//depot/perl/ext/Encode/Encode/iso8859-15.enc#1" => "6ae49f4e916b02eb7edb160f88b5a27f",
 "//depot/perl/ext/Encode/Encode/iso8859-15.enc#2" => "6ae49f4e916b02eb7edb160f88b5a27f",
 "//depot/perl/ext/Encode/t/jisx0208.euc#1" => "b09849cb3f09256a66f7f303b93e6efd",
 "//depot/perl/ext/Encode/t/jisx0208.ref#1" => "26995436d3695441e180f161c7c014a7",
 "//depot/perl/ext/Encode/t/jisx0212.euc#1" => "f07b6eea8c8e76eb45715c122bda46c0",
 "//depot/perl/ext/Encode/t/jisx0212.ref#1" => "f032a907282fe0ada83180813a4cd2f8",
 "//depot/perl/lib/Bundle/CPAN.pm#1" => "0e9ee464c7f8b482d6e69675c25f84c6",
 "//depot/perl/lib/Bundle/CPAN.pm#3" => "06a29746372c4db21290d6862c2d34d4",
 "//depot/perl/lib/CGI/eg/wilogo.gif#1" => "e33fd60f091548a70e06f37822709906",
 "//depot/perl/lib/PerlIO/Via/t/QuotedPrint.t#1" => "2412c9ffd3421129f6edcd764432fb66",
 "//depot/perl/lib/warnings/utf8#1" => "ef2d3179a1b49dd6bd0ae27cbc23c143",
 "//depot/perl/plan9/perlplan9.doc#1" => "1376e74adbdc55b6ca5957dc3dc2431c",
 "//depot/perl/t/lib/locale/latin1#1" => "7b8a06f55ee33eed6c876179744c51eb",
 "//depot/perl/t/lib/locale/utf8#1" => "8e865b8444df7b0b73d1c9b169fb035d",
 "//depot/perl/t/lib/mimeqp.t#1" => "db3197537f8b27c3115112c72955c6d9",
 "//depot/perl/t/lib/warnings/utf8#1" => "ef2d3179a1b49dd6bd0ae27cbc23c143",
 "//depot/perl/t/op/utf8decode.t#1" => "cf55072c234b9ed7257f8372b0fda6a6",
 "//depot/perl/t/op/utf8decode.t#2" => "edad1419a54681a3017f012039cbbe3e",
 "//depot/perl/t/pragma/locale/latin1#1" => "7b8a06f55ee33eed6c876179744c51eb",
 "//depot/perl/t/pragma/locale/utf8#1" => "8e865b8444df7b0b73d1c9b169fb035d",
              },
    "content" => {
 "symlinks not supported" => "",
 "06a29746372c4db21290d6862c2d34d4" => "package Bundle::CPAN;\n\n\$VERSION = '0.03';\n\n1;\n\n__END__\n\n=head1 NAME\n\nBundle::CPAN - A bundle to play with all the other modules on CPAN\n\n=head1 SYNOPSIS\n\nC<perl -MCPAN -e 'install Bundle::CPAN'>\...
 "0e9ee464c7f8b482d6e69675c25f84c6" => "package Bundle::CPAN;\n\n\$VERSION = '0.02';\n\n1;\n\n__END__\n\n=head1 NAME\n\nBundle::CPAN - A bundle to play with all the other modules on CPAN\n\n=head1 SYNOPSIS\n\nC<perl -MCPAN -e 'install Bundle::CPAN'>\...
 "1376e74adbdc55b6ca5957dc3dc2431c" => "\n     PLAN9/PERLPLAN9(1)   (perl 5.003, patch 05)    PLAN9/PERLPLAN9(1)\n\n     N\bN\bN\bNA\bA\bA\bAM\bM\bM\bME\bE\bE\bE\n          perlplan9 - Plan 9-specific documentation for Perl\n\n     D\bD\bD\bDE\bE\bE\...
 "162e76bd187cb54a5c9f0b72a082c668" => "# Encoding file: iso8859-10, single-byte\nS\n003F 0 1\n00\n0000000100020003000400050006000700080009000A000B000C000D000E000F\n0010001100120013001400150016001700180019001A001B001C001D001E001F\n0020002100220023002...
 "2412c9ffd3421129f6edcd764432fb66" => "my \$file = 'test.qp';\n\nBEGIN {\n    if (\$ENV{PERL_CORE}) {\t\n\tchdir 't' if -d 't';\n\t\@INC = '../lib';\n    }\n}\n\nuse Test::More tests => 11;\n\nBEGIN { use_ok('PerlIO::Via::QuotedPrint') }\n\nmy \$dec...
 "26995436d3695441e180f161c7c014a7" => "0x0020:    ! \" # \$ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = >\n0x0040:  \@ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ] ^\n0x0060:  ` a b c d e f g h i j k l m n o p q r s t u v w x y z...
 "320121fcbc1e56e7896a9d9a2aa8b224" => "GIF87a%\0*\0\347\0\0\266E\e\2272B\327&\36\231<0\27\20\\W'E\254\34C\20!K\0200l+\31>\301\0320%\30B\345B\e+\27iK\$CC'EE;^*,J%\37O\304),'\17&,Nf\271\20?6\27c\306V\23\257 !\257\21++\32N\3047\e\e\37H5\37e\350?\32\21?...
 "3be4986264587bec738cc46ebb43d698" => "# Encoding file: iso8859-14, single-byte\nS\n003F 0 1\n00\n0000000100020003000400050006000700080009000A000B000C000D000E000F\n0010001100120013001400150016001700180019001A001B001C001D001E001F\n0020002100220023002...
 "6ae49f4e916b02eb7edb160f88b5a27f" => "# Encoding file: iso8859-15, single-byte\nS\n003F 0 1\n00\n0000000100020003000400050006000700080009000A000B000C000D000E000F\n0010001100120013001400150016001700180019001A001B001C001D001E001F\n0020002100220023002...
 "78c1c88ec5bc65d4bb129e17dad74582" => "\@echo off\nset CONFIG=\nset PATH_SEPARATOR=;\nset PATH_EXPAND=y\nsh -c 'if test \$PATH_SEPARATOR = \";\"; then exit 1; fi'\nif ERRORLEVEL 1 goto path_sep_ok\necho Error:\a\necho Make sure the environment varia...
 "7b8a06f55ee33eed6c876179744c51eb" => "\$locales .= <<EOF;\nCatal\340 Catalan:ca:es:1 15\nFran\347ais French:fr:be ca ch fr lu:1 15\nG\341idhlig Gaelic:gd:gb uk:1 14 15\nF\370royskt Faroese:fo:fo:1 15\n\315slensku Icelandic:is:is:1 15\nS\341mi Lappi...
 "7da1a3fbb8a68b99d7361da526386ad3" => "\n/*\n * Copyright \251 2001 Novell, Inc. All Rights Reserved.\n *\n * You may distribute under the terms of either the GNU General Public\n * License or the Artistic License, as specified in the README file.\n...
 "81c654bdff08d71f76df8e341b95d3e8" => "\0\0\1\0\2\0\20\20\20\0\0\0\0\0(\1\0\0&\0\0\0  \20\0\0\0\0\0\350\2\0\0N\1\0\0(\0\0\0\20\0\0\0 \0\0\0\1\0\4\0\0\0\0\0\300\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\0\200\0\0\0\200\200\0\200\0\0\0\2...
 "8e865b8444df7b0b73d1c9b169fb035d" => "\$locales .= <<EOF;\nCatal\303\240 Catalan:ca:es:1 15\nFran\303\247ais French:fr:be ca ch fr lu:1 15\nG\303\241idhlig Gaelic:gd:gb uk:1 14 15\nF\303\270royskt Faroese:fo:fo:1 15\n\303\215slensku Icelandic:is:is...
 "95759703a993847eb9291cdb3bbc4bcc" => "\@echo off\nset CONFIG=\nset PATH_SEPARATOR=;\nset PATH_EXPAND=y\nsh -c 'if test \$PATH_SEPARATOR = \";\"; then exit 1; fi'\nif ERRORLEVEL 1 goto path_sep_ok\necho Error:\a\necho Make sure the environment varia...
 "b09849cb3f09256a66f7f303b93e6efd" => "0x0020:    ! \" # \$ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = >\n0x0040:  \@ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ] ^\n0x0060:  ` a b c d e f g h i j k l m n o p q r s t u v w x y z...
 "bf3993877a45ac7091cfc81cfd4a4d43" => "# Encoding file: iso8859-13, single-byte\nS\n003F 0 1\n00\n0000000100020003000400050006000700080009000A000B000C000D000E000F\n0010001100120013001400150016001700180019001A001B001C001D001E001F\n0020002100220023002...
 "cf55072c234b9ed7257f8372b0fda6a6" => "#!./perl\n\nBEGIN {\n    chdir 't' if -d 't';\n    \@INC = '../lib';\n}\n\nprint \"1..78\\n\";\n\nmy \$test = 1;\n\n# This table is based on Markus Kuhn's UTF-8 Decode Stress Tester,\n# http://www.cl.cam.ac.uk/...
 "db3197537f8b27c3115112c72955c6d9" => "BEGIN {\n        chdir 't' if -d 't';\n        \@INC = '../lib';\n}\n\nuse MIME::QuotedPrint;\n\n\$x70 = \"x\" x 70;\n\n\@tests =\n  (\n   # plain ascii should not be encoded\n   [\"quoted printable\"  =>\n    ...
 "dff1fb5aebb9691da97ffa45a01341f7" => "\@echo off\nset CONFIG=\nset PATH_SEPARATOR=;\nset PATH_EXPAND=y\nsh -c 'if test \$PATH_SEPARATOR = \";\"; then exit 1; fi'\nif ERRORLEVEL 1 goto path_sep_ok\necho Error:\a\necho Make sure the environment varia...
 "e33fd60f091548a70e06f37822709906" => "GIF87a^\0D\0\200\0\0~\22\231\377\377\377,\0\0\0\0^\0D\0\0\2\376D\216\251\300\355\256bz\324\310S3\273\357\"\235y\37\330Ed%\241\334I\211,4\275\345\250\256\262e\277\361\275\355\241\307\303\245t\276\333\2\344\n\2\2...
 "edad1419a54681a3017f012039cbbe3e" => "#!./perl\n\nBEGIN {\n    chdir 't' if -d 't';\n    \@INC = '../lib';\n}\n\nprint \"1..78\\n\";\n\nmy \$test = 1;\n\n# This table is based on Markus Kuhn's UTF-8 Decode Stress Tester,\n# http://www.cl.cam.ac.uk/...
 "ef2d3179a1b49dd6bd0ae27cbc23c143" => "\n  utf8.c AOK\n\n     [utf8_to_uv]\n     Malformed UTF-8 character\n\tmy \$a = ord \"\\x80\" ;\n\n     Malformed UTF-8 character\n\tmy \$a = ord \"\\xf080\" ;\n     <<<<<< this warning can't be easily triggere...
 "f032a907282fe0ada83180813a4cd2f8" => "0x8fa0a0:                                                               \n0x8fa0c0:                                                               \n0x8fa0e0:                                                     ...
 "f07b6eea8c8e76eb45715c122bda46c0" => "0x8fa0a0:                                                               \n0x8fa0c0:                                                               \n0x8fa0e0:                                                     ...

    }
};

sub mysystem (@);

LINE0: while (<>) {
    if (/^End of Patch\.$/) { $curpatch = $skip = 0 ; next }
    if (!$curpatch) {
	if (/^Change (\d+) by /) { # a new patch begins
	    if ($1 > $lastpatch) {
		$patchlog{$curpatch = $1} = $_;
	    } else {
		warn "Skipping patch #$1, already applied\n";
		next LINE0;
	    }
	} else {
            next LINE0;
        }
      LINE1: while (<>) { # Read log message and list of affected files
	    last if (/^Differences/);
	    $patchlog{$curpatch} .= $_;
	    if (m[
                  ^\.\.\.+\s//depot/
                  (
                   (?:maint-[^/]+/)?
                   perl
                   (?:-[^/]+)?              # sp.case "maint-5.6/perl-5.6.2"
                  )
                  /
                  (.*?)
                  \#\d+\s
                  (\w+)
                 ]x) {
                my $currentbranch = $1;
                my $localpath = $2;
                my $action = $3;
                next LINE1



( run in 1.491 second using v1.01-cache-2.11-cpan-71847e10f99 )