Changeset 27013 in webkit


Ignore:
Timestamp:
Oct 24, 2007, 8:50:17 PM (17 years ago)
Author:
ddkilzer
Message:

Minor clean-up of prepare-ChangeLog script.

Reviewed by Adam.

  • Scripts/prepare-ChangeLog: Keep list of updated ChangeLog files in an array instead of a string. Use multi-argument versions of open() and system() for flexibility and security.
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/WebKitTools/ChangeLog

    r27005 r27013  
     12007-10-24  David Kilzer  <ddkilzer@webkit.org>
     2
     3        Minor clean-up of prepare-ChangeLog script.
     4
     5        Reviewed by Adam.
     6
     7        * Scripts/prepare-ChangeLog: Keep list of updated ChangeLog files in an array instead
     8        of a string.  Use multi-argument versions of open() and system() for flexibility and
     9        security.
     10
    1112007-10-24  Alice Liu  <alice.liu@apple.com>
    212
  • TabularUnified trunk/WebKitTools/Scripts/prepare-ChangeLog

    r26866 r27013  
    44#
    55#  Copyright (C) 2000, 2001 Eazel, Inc.
    6 #  Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Apple Inc.
     6#  Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Apple Inc.  All rights reserved.
    77#
    88#  prepare-ChangeLog is free software; you can redistribute it and/or
     
    262262
    263263# Get the latest ChangeLog files from svn.
    264 my $logs = "";
     264my @logs = ();
    265265foreach my $prefix (sort keys %files) {
    266     $logs .= " ${prefix}ChangeLog";
    267 }
    268 
    269 if ($logs && $updateChangeLogs && $isSVN) {
     266    push @logs, File::Spec->catfile($prefix, "ChangeLog");
     267}
     268
     269if (@logs && $updateChangeLogs && $isSVN) {
    270270    print STDERR "  Running 'svn update' to update ChangeLog files.\n";
    271     open ERRORS, "$SVN update -q$logs |" or die "The svn update of ChangeLog files failed: $!.\n";
     271    open ERRORS, "-|", $SVN, "update", "-q", @logs
     272        or die "The svn update of ChangeLog files failed: $!.\n";
    272273    print STDERR "    $_" while <ERRORS>;
    273274    close ERRORS;
     
    317318
    318319# Open ChangeLogs.
    319 if ($openChangeLogs && $logs) {
     320if ($openChangeLogs && @logs) {
    320321    print STDERR "  Opening the edited ChangeLog files.\n";
    321322    my $editor = $ENV{"CHANGE_LOG_EDIT_APPLICATION"};
    322323    if ($editor) {
    323         system "open -a '$editor'$logs";
     324        system "open", "-a", $editor, @logs;
    324325    } else {
    325         system "open -e$logs";
     326        system "open", "-e", @logs;
    326327    }
    327328}
Note: See TracChangeset for help on using the changeset viewer.