Changeset 64072 in webkit


Ignore:
Timestamp:
Jul 26, 2010 1:58:03 PM (14 years ago)
Author:
dbates@webkit.org
Message:

2010-07-26 Daniel Bates <dbates@rim.com>

Reviewed by Darin Adler.

svn-unapply warns of uninitialized variable when unapplying
a patch that describes an svn move operation
https://bugs.webkit.org/show_bug.cgi?id=42036

Fixes Perl uninitialized variable warnings when un-applying
a patch that moves a file.

  • Scripts/svn-unapply:
    • Modified patch() so that it initializes $patch to the empty string when we don't have svnConvertedText (such as when reversing a diff that represents a svn copy/move operation).
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r64067 r64072  
     12010-07-26  Daniel Bates  <dbates@rim.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        svn-unapply warns of uninitialized variable when unapplying
     6        a patch that describes an svn move operation
     7        https://bugs.webkit.org/show_bug.cgi?id=42036
     8
     9        Fixes Perl uninitialized variable warnings when un-applying
     10        a patch that moves a file.
     11
     12        * Scripts/svn-unapply:
     13          - Modified patch() so that it initializes $patch to the empty
     14            string when we don't have svnConvertedText (such as when
     15            reversing a diff that represents a svn copy/move operation).
     16
    1172010-07-26  Sam Weinig  <sam@webkit.org>
    218
  • trunk/WebKitTools/Scripts/svn-unapply

    r59048 r64072  
    140140    my ($diffHashRef) = @_;
    141141
    142     my $patch = $diffHashRef->{svnConvertedText};
     142    # Make sure $patch is initialized to some value.  There is no
     143    # svnConvertedText when reversing an svn copy/move.
     144    my $patch = $diffHashRef->{svnConvertedText} || "";
    143145
    144146    my $fullPath = $diffHashRef->{indexPath};
     
    202204            #        code.  In particular, svn-apply's scmRemove() subroutine
    203205            #        should be used here.
    204             unapplyPatch($patch, $fullPath, ["--force"]);
     206            unapplyPatch($patch, $fullPath, ["--force"]) if $patch;
    205207            unlink($fullPath) if -z $fullPath;
    206208            system "svn", "revert", $fullPath;
Note: See TracChangeset for help on using the changeset viewer.