diff options
author | Qt by Nokia <qt-info@nokia.com> | 2011-04-27 12:34:00 +0200 |
---|---|---|
committer | axis <qt-info@nokia.com> | 2011-04-27 12:34:00 +0200 |
commit | 92351a70e0b9193a1def156a470d9156beb8528b (patch) | |
tree | bbd040ad01c7a01d13939f45ad68c7d84d21b955 /fix-webkit |
Long live the qt5 Qt repository
Diffstat (limited to 'fix-webkit')
-rw-r--r-- | fix-webkit | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/fix-webkit b/fix-webkit new file mode 100644 index 00000000..813b203e --- /dev/null +++ b/fix-webkit @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +use Cwd; +use Cwd 'abs_path'; +use File::Basename; +use File::Path; + + +# Find SHA1 of commit before $subject, else empty string +sub findWebKitSHA1 +{ + my ($subject) = @_; + my @commits = `git rev-list --grep="$subject" HEAD~300..HEAD`; + if (@commits) { + my $commit = $commits[0]; + chomp $commit; + $commit = `git rev-parse $commit~`; + chomp $commit; + return $commit; + } + return ""; +} + +my $current = dirname(abs_path($0)); +$current =~ s,\\,/,g; +chdir("$current/qtwebkit"); + +if (!findWebKitSHA1("Removed modular references after support for the flag was removed")) { + if (system("git am --ignore-whitespace $current/patches/qtwebkit/*.patch")) { + print("Applying webkit patches failed, retrying...\n"); + system("git am --abort"); + system("git am --ignore-whitespace $current/patches/qtwebkit/*.patch") and die("Could not apply patches"); + } + chdir(".."); + system("git commit -a -m \"Committed Qt Modularization patches to QtWebKit.\" --author \"axis <qt-info\@nokia.com>\"") and die("Could not commit to qt5 repository"); +} |