public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Pagano" <mpagano@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/linux-patches:genpatches-misc commit in: scripts/, web/
Date: Tue, 24 Jun 2014 16:47:23 +0000 (UTC)	[thread overview]
Message-ID: <1403628418.3eafe7fb22fbe3f85a32801db33aea94f05de1e7.mpagano@gentoo> (raw)

commit:     3eafe7fb22fbe3f85a32801db33aea94f05de1e7
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 24 16:46:58 2014 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Tue Jun 24 16:46:58 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=3eafe7fb

Add back sending announcement email. Add fixed email perl script.

---
 scripts/gpdorelease       |   2 +-
 web/email-announcement.pl | 112 +++++++++++++++++++++++++++++++---------------
 2 files changed, 78 insertions(+), 36 deletions(-)

diff --git a/scripts/gpdorelease b/scripts/gpdorelease
index 4625190..bec5650 100755
--- a/scripts/gpdorelease
+++ b/scripts/gpdorelease
@@ -117,4 +117,4 @@ scp /tmp/${TARBALL_BASENAME}-$newfullver.* ${USERNAME}@dev.gentoo.org:/space/dis
 #	gpdoweb
 #fi
 
-#[[ ${DO_EMAIL_ANNOUNCEMENT} == "yes" ]] && gpdoemail $newfullver $KERNEL_NAME
+[[ ${DO_EMAIL_ANNOUNCEMENT} == "yes" ]] && gpdoemail $newfullver $KERNEL_NAME

diff --git a/web/email-announcement.pl b/web/email-announcement.pl
index 573c59a..d618c58 100755
--- a/web/email-announcement.pl
+++ b/web/email-announcement.pl
@@ -1,8 +1,8 @@
 #!/usr/bin/perl
-# Copyright 2005 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 2014 Gentoo Foundation; Distributed under the GPL v2
 
 use Cwd;
-use gentoo_sources_web;
+#use gentoo_sources_web;
 
 $tag = shift;
 $kernel_name = shift;
@@ -20,54 +20,96 @@ else { # support for kernels >= 3.0
 $have_history = 0;
 
 # Try and find previous release
+
 if ($rel > 1) {
 	$oldtag = $ver.'-'.($rel-1);
-	$cmd = 'svn log -q --stop-on-copy '.$subversion_root.'/tags/'.$oldtag;
-	@log_lines = `$cmd`;
-	$lastrev = 0;
-	foreach (@log_lines) {
-		next if $_ !~ /^r(\d+) \|/;
-		$lastrev = $1;
-		last;
-	}
-}
+    $cmd='git -C '.${LOCAL_PATCHES_TRUNK}.' rev-list '.$oldtag;
+    @output = `$cmd`;
+
+    foreach $line (@output) { 
+        $have_history = 1;
+        if (index($line, "fatal") != -1) {
+            $have_history =0;
+        }
+        if ($have_history == 0) {
+           break;
+        }
+    }
+
 
-if ($lastrev) {
-	@commits = _parse_log($tag, $lastrev);
-	$have_history = @commits;
+
+    if ($have_history == 1) {
+        $cmd='git --no-pager -C '.${LOCAL_PATCHES_TRUNK}.' log  --pretty=format:"%s (%an)" --name-status '.$oldtag.'..'.$tag;
+        @log_lines = `$cmd`;
+        $have_history = 1;
+    }
+    else {
+        $cmd='git --no-pager -C '.${LOCAL_PATCHES_TRUNK}.' log  --pretty=format:"%s (%an)" --name-status '.$tag;
+        @log_lines = `$cmd`;
+    }
 }
 
-local $ext;
-$ext = get_tarball_ext($tag);
 
+#if ($rel > 1) {
+#	$oldtag = $ver.'-'.($rel-1);
+#	#$cmd = 'svn log -q --stop-on-copy '.$subversion_root.'/tags/'.$oldtag;
+#	#$cmd = 'svn log -q --stop-on-copy '.$subversion_root.'/tags/'.$oldtag;
+#
+#    # check out branch
+#    printf("LOCAL_PATCHES_TRUNK is ${LOCAL_PATCHES_TRUNK}\n");
+#    $cmd='git -C '.${LOCAL_PATCHES_TRUNK}.' checkout '.$ver;
+#    @result = `$cmd`;
+#
+#    # get log in between tags
+#    $cmd='git -C '.${LOCAL_PATCHES_TRUNK}.' log '.$oldtag.'..'.$tag.' --name-status';
+#    printf (" cmd is $cmd\n");
+#
+#	@log_lines = `$cmd`;
+#	$lastrev = 0;
+#	foreach (@log_lines) {
+#		next if $_ !~ /^r(\d+) \|/;
+#		$lastrev = $1;
+#		last;
+#	}
+#}
+#
+#printf("lastrev is $lastrev\n");
+#
+#if ($lastrev) {
+#    printf("inside lastrev\n");
+#	@commits = _parse_log($tag, $lastrev);
+#	$have_history = @commits;
+#}
+#
+#local $ext;
+#$ext = get_tarball_ext($tag);
+#
 $email .= "To: Gentoo Kernel List <gentoo-kernel\@lists.gentoo.org>\n";
 $email .= "Subject: [ANNOUNCE] $kernel_name-$tag release\n";
 
 $email .= "\nThis is an automated email announcing the release of $kernel_name-$tag\n\n";
 
-if ($lastrev && $have_history) {
+if ($have_history) {
 	$email .= "\nCHANGES SINCE $oldtag\n";
+}
+else {
+	$email .= "\nCHANGES\n";
+}
 	$email .= "-----------------------\n\n";
-	foreach $rev (@commits) {
-		next if !$rev->{'rev'};
-		chomp $rev->{'logmsg'};
-		$email .= 'Revision '.$rev->{'rev'}.': ';
-		$email .= $rev->{'logmsg'}.' ('.$rev->{'author'}.')'."\n";
-		$email .= 'Added: '.$_."\n" foreach (@{$rev->{'actionA'}});
-		$email .= 'Modified: '.$_."\n" foreach (@{$rev->{'actionM'}});
-		$email .= 'Deleted: '.$_."\n" foreach (@{$rev->{'actionD'}});
-		$email .= "\n";
+	foreach $line (@log_lines) {
+        if (index($line, "0000_README") == -1) {
+            $email .= "$line";
+        }
 	}
-}
 
-$email .= "\nPATCHES\n";
-$email .= "-------\n\n";
-$email .= "When the website updates, the complete patch list and split-out patches will be\n";
-$email .= "available here:\n";
-$email .= $website_base."/patches-".$tag.".htm\n";
-$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".base.tar".$ext."\n";
-$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".extras.tar".$ext."\n";
-$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".experimental.tar".$ext."\n";
+#$email .= "\nPATCHES\n";
+#$email .= "-------\n\n";
+#$email .= "When the website updates, the complete patch list and split-out patches will be\n";
+#$email .= "available here:\n";
+#$email .= $website_base."/patches-".$tag.".htm\n";
+#$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".base.tar".$ext."\n";
+#$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".extras.tar".$ext."\n";
+#$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".experimental.tar".$ext."\n";
 
 if ($kernel_name == "genpatches") {
 	$email .= "\n\nABOUT GENPATCHES\n";


             reply	other threads:[~2014-06-24 16:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 16:47 Mike Pagano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-06-25 23:23 [gentoo-commits] proj/linux-patches:genpatches-misc commit in: scripts/, web/ Mike Pagano
2022-07-22 20:29 Alice Ferrazzi
2025-01-09 16:11 Mike Pagano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403628418.3eafe7fb22fbe3f85a32801db33aea94f05de1e7.mpagano@gentoo \
    --to=mpagano@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox