In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/0d4dc266a3cb1d24871d3b9473281c066d1a1145?hp=2db249d3d6f61a44bb2e6dd90d24085003da650c>

- Log -----------------------------------------------------------------
commit 0d4dc266a3cb1d24871d3b9473281c066d1a1145
Author: Leon Brocard <a...@astray.com>
Date:   Thu Jul 7 10:29:14 2011 +0100

    Remove text from Porting/release_managers_guide.pod now bump-perl-version 
does multiple substitutions per line

M       Porting/release_managers_guide.pod

commit 582c9380b28d7fb3a563d5296d13c8325dd83a06
Author: Leon Brocard <a...@astray.com>
Date:   Thu Jul 7 10:28:29 2011 +0100

    Make Porting/bump-perl-version do multiple substitutions per line

M       Porting/bump-perl-version
-----------------------------------------------------------------------

Summary of changes:
 Porting/bump-perl-version          |   36 ++++++++++++++++++++----------------
 Porting/release_managers_guide.pod |    6 ------
 2 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/Porting/bump-perl-version b/Porting/bump-perl-version
index 63cb5ae..0939b5a 100644
--- a/Porting/bump-perl-version
+++ b/Porting/bump-perl-version
@@ -194,6 +194,14 @@ my @maps =  (
         qr/uconfig/,
     ],
 
+    # rename perl-5^.15^.1.dirperl-5_15_1.dir in README.vms
+    [
+       qr{\sperl-(\d+)_(\d+)_(\d+)\.dir}x,
+       sub { warn "got $& - perl-${1}_${2}_${3}.dir -> 
perl-${newx}_${newy}_${newz}.dir";  " perl-${1}_${2}_${3}.dir", " 
perl-${newx}_${newy}_${newz}.dir" },
+       " perl-${oldx}_${oldy}_{$oldz}.dir",
+       qr/README.vms/,
+    ],
+
 );
 
 
@@ -250,35 +258,31 @@ sub do_scan {
        my $file_changed = 0;
        my $new_contents = '';
 
-       while (<$fh>) {
-           my $line_changed;
+       while (my $line = <$fh>) {
+           my $oldline = $line;
            for my $map (@maps) {
                my ($pat, $sub, $expected, $file_pat) = @$map;
 
                next if defined $file_pat and $file !~ $file_pat;
-               next unless $_ =~ $pat;
+               next unless $line =~ $pat;
                my ($got, $replacement) = $sub->();
 
                if ($opts{c}) {
                    # only report unexpected 
                    next unless defined $expected and $got ne $expected;
                }
-               my $newstr = $_;
-               $newstr =~ s/$pat/$replacement/
+               $line =~ s/$pat/$replacement/
                    or die "Internal error: substitution failed: [$pat]\n";
-               $new_contents .= $newstr if $opts{i};
-               if ($_ ne $newstr) {
-                   $file_changed = 1;
-                   $line_changed = 1;
-                   if ($opts{s}) {
-                       print "\n$file\n" unless $header;
-                       $header=1;
-                       printf "\n%5d: -%s       +%s", $., $_, $newstr;
-                   }
+           }
+           $new_contents .= $line if $opts{i};
+           if ($line ne $oldline) {
+               $file_changed = 1;
+               if ($opts{s}) {
+                   print "\n$file\n" unless $header;
+                   $header=1;
+                   printf "\n%5d: -%s       +%s", $., $oldline, $line;
                }
-               last;
            }
-           $new_contents .= $_ if $opts{i} && !$line_changed ;
        }
        if ($opts{i} && $file_changed) {
            warn "Updating $file inplace\n";
diff --git a/Porting/release_managers_guide.pod 
b/Porting/release_managers_guide.pod
index fe3348b..c92792b 100644
--- a/Porting/release_managers_guide.pod
+++ b/Porting/release_managers_guide.pod
@@ -258,12 +258,6 @@ some of which need to be left unchanged.
 The line in F<INSTALL> about "is binary incompatible with" requires a
 correct choice of earlier version to declare incompatibility with.
 
-Also note that this tool
-currently only detects a single substitution per line: so in particular,
-this line in README.vms needs special handling:
-
-    rename perl-5^.10^.1.dir perl-5_10_1.dir
-
 When doing a BLEAD-POINT or BLEAD-FINAL release, also make sure the
 C<PERL_API_*> constants in F<patchlevel.h> are in sync with the version
 you're releasing, unless you're

--
Perl5 Master Repository

Reply via email to