# through the patch correctly :(
#
+use Term::ANSIColor qw(:constants);
+
my $base_id = "";
my $line;
my $firstline = "true";
system "mv $new_file ~/linux/stable/";
#print "moved $new_file to ~/linux/stable/\n";
-print "cd ~/linux/stable && ./apply_it $new_file @ARGV\n";
+my @queued_in=`cd /home/gregkh/linux/stable/stable-queue/ && grep -l -r ${base_id} queue-* | sort -Vr`;
+foreach $queued_in (@queued_in) {
+ chomp($queued_in);
+ print " queued in: ", MAGENTA, "$queued_in\n", RESET;
+}
+
+my @lines=`git show ${base_id} | grep -i "fixes:" | sed -e 's/^[ \t]*//' | cut -f 2 -d ':' | sed -e 's/^[ \t]*//' | cut -f 1 -d ' '`;
+foreach $fix (@lines) {
+ chomp ($fix);
+ my $fix_id=`git log -1 --format="%H" "$fix"`;
+ if ($fix_id ne "") {
+ #print "fix_id=$fix_id";
+ my $release=`/home/gregkh/linux/vulns/tools/verhaal/id_found_in $fix_id`;
+ chomp($release);
+ my @r = split /\s+/, $release;
+ foreach $r (@r) {
+ chomp($r);
+ print " fixed in: ", GREEN, "$r\n", RESET;
+ }
+ }
+}
+print "--------------------------------\n";
+
+#print "cd ~/linux/stable && ./apply_it $new_file @ARGV\n";
system "cd ~/linux/stable && ./apply_it $new_file @ARGV";
#system "cp ~/linux/stable/$new_file ~/linux/longterm";
#system "cd ~/linux/longterm && ./apply_it $new_file";