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: web/
Date: Tue,  9 Jul 2019 12:11:46 +0000 (UTC)	[thread overview]
Message-ID: <1562674274.71848d2ac16ab64f20a82c548e8f3ced824b1092.mpagano@gentoo> (raw)

commit:     71848d2ac16ab64f20a82c548e8f3ced824b1092
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  9 12:11:14 2019 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Tue Jul  9 12:11:14 2019 +0000
URL:        https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=71848d2a

Working on email creation. Some small optimizations

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 web/email-announcement.pl | 65 ++++++++---------------------------------------
 1 file changed, 10 insertions(+), 55 deletions(-)

diff --git a/web/email-announcement.pl b/web/email-announcement.pl
index adbb455..011e15f 100755
--- a/web/email-announcement.pl
+++ b/web/email-announcement.pl
@@ -25,13 +25,17 @@ $website_base = 'http://dev.gentoo.org/~mpagano/genpatches';
 $result = `rm -rf ${LOCAL_TMP}/linux-patches`;
 $result = `cd $LOCAL_TMP`;
 $result = `git -C ${LOCAL_TMP}/linux-patches reset`;
-#$result = `git clone --depth=50 $REMOTE_BASE ${LOCAL_TMP}/linux-patches`;
-$result = `git clone $REMOTE_BASE ${LOCAL_TMP}/linux-patches`;
-#$result = `git clone -b $ver --single-branch $REMOTE_BASE ${LOCAL_TMP}/linux-patches`;
 
-#printf ("ver is ${ver} rel is ${rel} tag is ${tag}\n");
-# checkout branch
-#$result = `git -C ${LOCAL_TMP}/linux-patches checkout ${tag}`;
+# for X.Y.0 kernels, you can't do a shallow clone
+# for non X.Y.0 kernels (notice the 0), you can do a shallow clone
+if ($rel == 1) {
+	$result = `git clone $REMOTE_BASE ${LOCAL_TMP}/linux-patches`;
+}
+else {
+	$result = `git clone -b $ver --single-branch $REMOTE_BASE ${LOCAL_TMP}/linux-patches`;
+}
+
+# checkout branch, not really needed fir subgke-branch checkout
 $result = `git -C ${LOCAL_TMP}/linux-patches checkout ${ver}`;
 
 # Try and find previous release
@@ -50,8 +54,6 @@ if ($rel > 1) {
         }
     }
 
-
-
     if ($have_history == 1) {
         $cmd='git --no-pager -C '.${LOCAL_TMP}.'/linux-patches log  --pretty=format:"%s (%an)" --name-status '.$oldtag.'..'.$tag;
         @log_lines = `$cmd`;
@@ -64,48 +66,10 @@ if ($rel > 1) {
 }
 else {
     # just do git log
-    #$cmd='git --no-pager -C '.${LOCAL_TMP}.'/linux-patches log  --pretty=format:"%s (%an)" --name-status '.$ver;
-    #$cmd='git --no-pager -C '.${LOCAL_TMP}.'/linux-patches log  --pretty=format:"%s (%an)" ..'.$tag;
-    #$cmd='git --no-pager -C '.${LOCAL_TMP}.'/linux-patches log  --pretty=format:"%s (%an)" --name-status '.$tag.'...master';
     $cmd='git --no-pager -C '.${LOCAL_TMP}.'/linux-patches log  --pretty=format:"%s (%an)" --name-status  master..remotes/origin/'.$ver.' /tmp/linux-patches';
     @log_lines = `$cmd`;
 }
 
-
-#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_TMP is ${LOCAL_TMP}\n");
-#    $cmd='git -C '.${LOCAL_TMP}.' checkout '.$ver;
-#    @result = `$cmd`;
-#
-#    # get log in between tags
-#    $cmd='git -C '.${LOCAL_TMP}.' 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";
 
@@ -124,15 +88,6 @@ else {
         }
 	}
 
-#$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.".html\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";
 	$email .= "----------------\n\n";


             reply	other threads:[~2019-07-09 12:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09 12:11 Mike Pagano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-07-24 17:16 [gentoo-commits] proj/linux-patches:genpatches-misc commit in: web/ Mike Pagano
2022-07-24 17:14 Mike Pagano
2021-07-13 13:26 Mike Pagano
2020-12-29 19:17 Mike Pagano
2019-07-08 20:47 Mike Pagano
2019-02-07  0:21 Mike Pagano
2019-01-12 18:46 Mike Pagano
2018-08-10 13:00 Mike Pagano
2018-08-04 13:27 Mike Pagano
2018-07-25 11:41 Mike Pagano
2018-07-24 16:43 Mike Pagano
2018-06-12 23:02 Mike Pagano
2018-03-30 11:09 Mike Pagano
2017-02-21  0:32 Mike Pagano
2015-06-23 12:07 Mike Pagano
2014-12-23 17:58 Mike Pagano
2014-07-01 22:54 Mike Pagano
2014-06-25 23:55 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=1562674274.71848d2ac16ab64f20a82c548e8f3ced824b1092.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