Changeset 172728 in webkit
- Timestamp:
- Aug 18, 2014, 2:44:24 PM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Tools/ChangeLog ¶
r172726 r172728 1 2014-08-18 Dan Bernstein <mitz@apple.com> 2 3 Added an update-webkit option to override the ../Internal check. 4 Part of https://bugs.webkit.org/show_bug.cgi?id=135815 5 6 Reviewed by Tim Horton. 7 8 * Scripts/update-webkit: 9 Added an explicit --internal option to control updating ../Internal, defaulting to whether 10 ../Internal exists. 11 (runSvnUpdate): Moved to webkitdirs.pm. 12 (runGitUpdate): Ditto. 13 * Scripts/webkitdirs.pm: 14 (runSvnUpdateAndResolveChangeLogs): Moved runSvnUpdate from update-webkit and renamed to this. 15 (runGitUpdate): Moved from update-webkit. 16 1 17 2014-08-18 Pratik Solanki <psolanki@apple.com> 2 18 -
TabularUnified trunk/Tools/Scripts/update-webkit ¶
r172726 r172728 1 1 #!/usr/bin/perl -w 2 2 3 # Copyright (C) 2005 , 2006, 2007, 2008, 2009, 2013Apple Inc. All rights reserved.3 # Copyright (C) 2005-2009, 2013, 2014 Apple Inc. All rights reserved. 4 4 # Copyright (C) 2009 Google Inc. All rights reserved. 5 5 # Copyright (C) 2011 Brent Fulgham. All rights reserved. … … 40 40 use webkitdirs; 41 41 42 sub runSvnUpdate();43 sub runGitUpdate();44 45 42 # Handle options 46 43 my $quiet = ''; … … 53 50 # FIXME: Remove the check for ../Internal once Apple-internal users of this script pass --no-auxiliary-libs 54 51 my $auxiliaryLibs = ! -d "../Internal"; 52 # FIXME: http://webkit.org/b/135815 update-webkit should not check for the presence of Apple's Internal directory 53 my $internal = -d "../Internal"; 55 54 56 55 my $getOptionsResult = GetOptions( … … 58 57 'q|quiet' => \$quiet, 59 58 'auxiliary-libs!' => \$auxiliaryLibs, 60 ); 59 'internal!' => \$internal, 60 ); 61 61 62 62 if (!$getOptionsResult || $showHelp) { … … 66 66 -q|--quiet pass -q to svn update for quiet updates 67 67 --[no-]auxiliary-libs [don\'t] update the auxiliary libraries for Windows (default: update) 68 -- wincairo also update dependencies of the WinCairo port68 --[no-]internal [don\'t] update ../Internal (default: update if it exists) 69 69 __END__ 70 70 exit 1; … … 78 78 79 79 print "Updating OpenSource\n" unless $quiet; 80 runSvnUpdate () if isSVN();80 runSvnUpdateAndResolveChangeLogs(@svnOptions) if isSVN(); 81 81 runGitUpdate() if isGit(); 82 82 83 if ( -d "../Internal") {83 if ($internal) { 84 84 chdir("../Internal"); 85 85 print "Updating Internal\n" unless $quiet; 86 runSvnUpdate () if isSVNDirectory(".");86 runSvnUpdateAndResolveChangeLogs(@svnOptions) if isSVNDirectory("."); 87 87 runGitUpdate() if isGitDirectory("."); 88 88 } … … 99 99 100 100 exit 0; 101 102 sub runSvnUpdate()103 {104 open UPDATE, "-|", "svn", "update", @svnOptions or die;105 my @conflictedChangeLogs;106 while (my $line = <UPDATE>) {107 print $line;108 $line =~ m/^C\s+(.+?)[\r\n]*$/;109 if ($1) {110 my $filename = normalizePath($1);111 push @conflictedChangeLogs, $filename if basename($filename) eq "ChangeLog";112 }113 }114 close UPDATE or die;115 116 if (@conflictedChangeLogs) {117 print "Attempting to merge conflicted ChangeLogs.\n";118 my $resolveChangeLogsPath = File::Spec->catfile(dirname($0), "resolve-ChangeLogs");119 (system($resolveChangeLogsPath, "--no-warnings", @conflictedChangeLogs) == 0)120 or die "Could not open resolve-ChangeLogs script: $!.\n";121 }122 }123 124 sub runGitUpdate()125 {126 # Doing a git fetch first allows setups with svn-remote.svn.fetch = trunk:refs/remotes/origin/master127 # to perform the rebase much much faster.128 system("git", "fetch");129 if (isGitSVN()) {130 system("git", "svn", "rebase") == 0 or die;131 } else {132 # This will die if branch.$BRANCHNAME.merge isn't set, which is133 # almost certainly what we want.134 system("git", "pull") == 0 or die;135 }136 } -
TabularUnified trunk/Tools/Scripts/webkitdirs.pm ¶
r172174 r172728 2521 2521 } 2522 2522 2523 sub runSvnUpdateAndResolveChangeLogs(@) 2524 { 2525 my @svnOptions = @_; 2526 open UPDATE, "-|", "svn", "update", @svnOptions or die; 2527 my @conflictedChangeLogs; 2528 while (my $line = <UPDATE>) { 2529 print $line; 2530 $line =~ m/^C\s+(.+?)[\r\n]*$/; 2531 if ($1) { 2532 my $filename = normalizePath($1); 2533 push @conflictedChangeLogs, $filename if basename($filename) eq "ChangeLog"; 2534 } 2535 } 2536 close UPDATE or die; 2537 2538 if (@conflictedChangeLogs) { 2539 print "Attempting to merge conflicted ChangeLogs.\n"; 2540 my $resolveChangeLogsPath = File::Spec->catfile(dirname($0), "resolve-ChangeLogs"); 2541 (system($resolveChangeLogsPath, "--no-warnings", @conflictedChangeLogs) == 0) 2542 or die "Could not open resolve-ChangeLogs script: $!.\n"; 2543 } 2544 } 2545 2546 sub runGitUpdate() 2547 { 2548 # Doing a git fetch first allows setups with svn-remote.svn.fetch = trunk:refs/remotes/origin/master 2549 # to perform the rebase much much faster. 2550 system("git", "fetch"); 2551 if (isGitSVN()) { 2552 system("git", "svn", "rebase") == 0 or die; 2553 } else { 2554 # This will die if branch.$BRANCHNAME.merge isn't set, which is 2555 # almost certainly what we want. 2556 system("git", "pull") == 0 or die; 2557 } 2558 } 2559 2523 2560 1;
Note:
See TracChangeset
for help on using the changeset viewer.