Changeset 27112 in webkit


Ignore:
Timestamp:
Oct 26, 2007 8:38:48 AM (16 years ago)
Author:
ddkilzer
Message:

prepare-ChangeLog and update-webkit create needless ChangeLog conflicts
<http://bugs.webkit.org/show_bug.cgi?id=15600>

Reviewed by Darin.

The resolve-ChangeLog script merges conflicted ChangeLogs in svn or git by creating
a patch of the local changes and applying it with a fuzz level of 3 to the new file.
If the patch is successful, it runs 'svn resolved' or 'git add' on the new ChangeLog
file. Note that it may also be used as a stand-alone script.

  • Scripts/prepare-ChangeLog: Call resolve-ChangeLogs for conflicted ChangeLog files.
  • Scripts/resolve-ChangeLogs: Added.
  • Scripts/update-webkit: Call resolve-ChangeLogs for conflicted ChangeLog files.
Location:
trunk/WebKitTools
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r27092 r27112  
     12007-10-26  David Kilzer  <ddkilzer@webkit.org>
     2
     3        prepare-ChangeLog and update-webkit create needless ChangeLog conflicts
     4        <http://bugs.webkit.org/show_bug.cgi?id=15600>
     5
     6        Reviewed by Darin.
     7
     8        The resolve-ChangeLog script merges conflicted ChangeLogs in svn or git by creating
     9        a patch of the local changes and applying it with a fuzz level of 3 to the new file.
     10        If the patch is successful, it runs 'svn resolved' or 'git add' on the new ChangeLog
     11        file.  Note that it may also be used as a stand-alone script.
     12
     13        * Scripts/prepare-ChangeLog: Call resolve-ChangeLogs for conflicted ChangeLog files.
     14        * Scripts/resolve-ChangeLogs: Added.
     15        * Scripts/update-webkit: Call resolve-ChangeLogs for conflicted ChangeLog files.
     16
    1172007-10-26  Mark Rowe  <mrowe@apple.com>
    218
  • trunk/WebKitTools/Scripts/prepare-ChangeLog

    r27090 r27112  
    273273if (@logs && $updateChangeLogs && $isSVN) {
    274274    print STDERR "  Running 'svn update' to update ChangeLog files.\n";
    275     open ERRORS, "-|", $SVN, "update", "-q", @logs
     275    open ERRORS, "-|", $SVN, "update", @logs
    276276        or die "The svn update of ChangeLog files failed: $!.\n";
    277     print STDERR "    $_" while <ERRORS>;
     277    my @conflictedChangeLogs;
     278    while (my $line = <ERRORS>) {
     279        print STDERR "    ", $line;
     280        push @conflictedChangeLogs, $1 if $line =~ m/^C\s+(.+)\s*$/;
     281    }
    278282    close ERRORS;
     283
     284    if (@conflictedChangeLogs) {
     285        print STDERR "  Attempting to merge conflicted ChangeLogs.\n";
     286        my $resolveChangeLogsPath = File::Spec->catfile(dirname($0), "resolve-ChangeLogs");
     287        open RESOLVE, "-|", $resolveChangeLogsPath, "--no-warnings", @conflictedChangeLogs
     288            or die "Could not open resolve-ChangeLogs script: $!.\n";
     289        print STDERR "    $_" while <RESOLVE>;
     290        close RESOLVE;
     291    }
    279292}
    280293
  • trunk/WebKitTools/Scripts/update-webkit

    r27014 r27112  
    3333use lib $FindBin::Bin;
    3434use File::Basename;
     35use File::Spec;
    3536use Getopt::Long;
    3637use webkitdirs;
     38
     39sub runSvnUpdate();
    3740
    3841# Handle options
     
    5962chdirWebKit();
    6063print "Updating OpenSource\n" unless $quiet;
    61 (system("svn", "update", @svnOptions) == 0) or die;
     64runSvnUpdate();
    6265if (isCygwin()) {
    6366    (system("perl", "WebKitTools/Scripts/update-webkit-auxiliary-libs") == 0) or die;
     
    6770    chdir("../Internal");
    6871    print "Updating Internal\n" unless $quiet;
    69     (system("svn", "update", @svnOptions) == 0) or die;
     72    runSvnUpdate();
    7073}
     74
     75exit 0;
     76
     77sub runSvnUpdate()
     78{
     79    open UPDATE, "-|", "svn", "update", @svnOptions or die;
     80    my @conflictedChangeLogs;
     81    while (my $line = <UPDATE>) {
     82        print $line;
     83        push @conflictedChangeLogs, $1 if $line =~ m/^C\s+(.+)\s*$/ && basename($1) eq "ChangeLog";
     84    }
     85    close UPDATE;
     86
     87    if (@conflictedChangeLogs) {
     88        print "Attempting to merge conflicted ChangeLogs.\n";
     89        my $resolveChangeLogsPath = File::Spec->catfile(dirname($0), "resolve-ChangeLogs");
     90        (system($resolveChangeLogsPath, "--no-warnings", @conflictedChangeLogs) == 0)
     91            or die "Could not open resolve-ChangeLogs script: $!.\n";
     92    }
     93}
Note: See TracChangeset for help on using the changeset viewer.