summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-05-12 16:46:19 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-12 16:46:19 +0200
commit2feb3a9f8fcfc2771e63e4bbc9d0a5a384248980 (patch)
treee995d4150e6c474f0fc0dfe46d51de46f200688e
parent013de324e1a159a955960d7034b5c0e4c0903671 (diff)
Script i used to cherry-pick the changesmaster_merged_with_qtquick2
-rw-r--r--checkappliedcommits78
1 files changed, 78 insertions, 0 deletions
diff --git a/checkappliedcommits b/checkappliedcommits
new file mode 100644
index 0000000..37bf7fd
--- /dev/null
+++ b/checkappliedcommits
@@ -0,0 +1,78 @@
+#!/usr/bin/perl
+
+
+use Cwd;
+use Cwd 'abs_path';
+use strict;
+
+sub showUsage {
+ my $prg = basename($0);
+ print "Usage: $prg <path to Qt history>:\n";
+}
+
+
+my $history_location
+
+while ( @ARGV ) {
+ my $arg = shift @ARGV;
+ if ($arg eq "-?" || $arg eq "-h" || $arg eq "-help" || $arg eq "?") {
+ showUsage();
+ exit 0;
+ } elsif (!$history_location) {
+ $history_location = $arg;
+ } else {
+ print "Unknown option: $arg\n\n";
+ showUsage();
+ exit 1;
+ }
+}
+
+# validate path for history repo
+if (!$history_location || !-e $history_location) {
+ print "You need to provide a path to the monolithic Qt repo!\n";
+ exit 1;
+}
+
+
+
+my $modularized_sha1="bcbe1779ec39db954e25279c5a5b3a97e3f5b928";
+
+my $qt5dir = getcwd();
+
+#print "COMPUTING BLACKLIST";
+my @blacklist = `git submodule foreach -q 'git log --no-merges --grep="cherry picked" | grep "cherry picked" | grep -o -E [a-f0-9]{40} || true '`;
+#print "DONE";
+
+my %blacklist_hash;
+foreach my $cherry_picked (@blacklist) {
+ $blacklist_hash{$cherry_picked} = 1;
+}
+
+chdir($history_location);
+my @list = `git rev-list --reverse --no-merges ^$modularized_sha1 ^v4.7.3 HEAD`;
+
+chdir("$qt5dir/qtbase");
+
+my $num = 0;
+foreach my $commit (@list) {
+ if ($blacklist_hash{$commit}) {
+ #print "$commit ALREADY THERE";
+ ;
+ } else {
+ my $line = `git log -1 --pretty=format:"%h %an: %s" $commit`;
+ print "$line\n";
+ }
+
+
+# system("git cherry-pick -x $commit");
+# my $ret = $?;
+# if ($ret) {
+# print "FAILED!!!!!! ($ret) $commit";
+# system("git reset --hard");
+# }# else {
+# # print "$commit DONE";
+ #}
+}
+
+
+