From: Arif Khokar <arif_khokar@hotmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Arif Khokar <arif_khokar@hotmail.com>
Cc: "Jakub Narębski" <jnareb@gmail.com>, "Jeff King" <peff@peff.net>,
"Stefan Beller" <sbeller@google.com>,
"meta@public-inbox.org" <meta@public-inbox.org>,
"git@vger.kernel.org" <git@vger.kernel.org>,
"Eric Wong" <e@80x24.org>
Subject: Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]
Date: Thu, 25 Aug 2016 02:41:30 +0000 [thread overview]
Message-ID: <DM5PR17MB1353B99EBD5F4FD23360DD41D3ED0@DM5PR17MB1353.namprd17.prod.outlook.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1608241509200.4924@virtualbox>
On 08/24/2016 11:34 AM, Johannes Schindelin wrote:
> Hi Arif,
Hello Johannes,
> On Tue, 23 Aug 2016, Arif Khokar wrote:
>
>> Given that public-inbox provides an NNTP interface, couldn't the ARTICLE
>> <message-id> NNTP command be used to easily retrieve the messages in a
>> given patch series (at least compared to POP or IMAP). Perhaps
>> git-send-email could be modified to include the message-id value of each
>> patch in the series that it sends to the mailing list and include it in
>> the cover letter.
>
> I am no expert in the NNTP protocol (I abandoned News long ago), but if
> you go from HTML, you can automate the process without requiring changes
> in format-patch.
Could you elaborate further on what you mean by using HTML in this context?
> I recently adapted an old script I had to apply an entire patch series
> given the GMane link to its cover letter:
>
> https://github.com/git-for-windows/build-extra/blob/master/apply-from-gmane.sh
>
> Maybe you find it in you to adapt that to work with public-inbox.org?
I was thinking more along the lines of using NNTP to retrieve the
patches and save them to disk (rather than HTTP). For example, a perl
script like the following could retrieve the article directly over NNTP.
I haven't tested whether the resulting file would work with git-am
though (since it may not meet the criteria of a mbox file).
You can invoke it as follows:
> perl download_patch.pl "<520a941f7472ac1cb4fa41e6bba33a0afc2f5999.1471264971.git.johannes.schindelin@gmx.de>"
* Forgive any formatting issues resulting from my use of Thunderbird as
a MUA.
use strict;
use warnings;
use Net::NNTP;
# Assume $ARGV[0] is the message id
my $message_id = $ARGV[0];
my $gmane_nntp = Net::NNTP->new('news.gmane.org');
my $article_ref = $gmane_nntp->article($message_id);
# Make a filename like git-format-patch would
my $counter = 1;
my $subject_line = (grep /^Subject: /, @$article_ref)[0];
$subject_line =~ s/^Subject:[^]]+] //;
$subject_line =~ s/ /-/g;
my $filename = sprintf "%04i-%s", $counter, $subject_line;
print "Filename:\n";
print $filename;
print "\n";
print "Article\n";
my $article_str = join "", @$article_ref;
print $article_str;
next prev parent reply other threads:[~2016-08-25 2:41 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 16:55 Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path] Stefan Beller
2016-08-16 17:10 ` Junio C Hamano
2016-08-16 17:20 ` Jeff King
2016-08-16 17:54 ` Junio C Hamano
2016-08-16 17:22 ` Stefan Beller
2016-08-16 17:47 ` Junio C Hamano
2016-08-16 20:44 ` Eric Wong
2016-08-16 20:56 ` Eric Wong
2016-08-18 12:42 ` Johannes Schindelin
2016-08-18 20:49 ` Eric Wong
2016-08-18 21:41 ` Junio C Hamano
2016-08-19 15:18 ` Johannes Schindelin
2016-08-19 15:30 ` Johannes Schindelin
2016-08-19 16:55 ` Stefan Beller
2016-08-19 22:35 ` Eric Wong
2016-08-22 13:38 ` Johannes Schindelin
2016-08-22 19:21 ` Jeff King
2016-08-19 22:35 ` Eric Wong
2016-08-22 13:18 ` Johannes Schindelin
2016-08-22 18:05 ` Jakub Narębski
2016-08-25 13:21 ` Johannes Schindelin
2016-08-28 18:23 ` Jakub Narębski
2016-08-29 10:46 ` Johannes Schindelin
2016-08-22 22:55 ` Eric Wong
2016-08-25 12:58 ` Johannes Schindelin
2016-08-27 22:38 ` Jakub Narębski
2016-08-28 8:36 ` Working with public-inbox.org Johannes Schindelin
2016-08-28 11:41 ` Jakub Narębski
2016-08-29 5:35 ` Johannes Schindelin
2016-08-19 15:03 ` Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path] Jeff King
2016-08-20 19:57 ` Jakub Narębski
2016-08-23 4:47 ` Arif Khokar
2016-08-24 15:34 ` Johannes Schindelin
2016-08-24 18:49 ` Eric Wong
2016-08-24 19:12 ` Jeff King
2016-08-24 19:27 ` Eric Wong
2016-08-25 3:40 ` Arif Khokar
2016-08-25 2:41 ` Arif Khokar [this message]
2017-02-10 16:10 ` Johannes Schindelin
2017-02-13 5:52 ` Arif Khokar
2017-02-13 14:37 ` Johannes Schindelin
2017-02-14 3:56 ` Arif Khokar
2017-02-14 3:59 ` Arif Khokar
2017-02-14 7:13 ` Eric Wong
2017-02-13 19:21 ` Junio C Hamano
2017-02-14 3:55 ` Arif Khokar
2017-02-14 4:41 ` Junio C Hamano
2017-02-14 5:09 ` Arif Khokar
2017-02-14 5:14 ` Jeff King
2016-08-22 13:06 ` Johannes Schindelin
2016-08-22 13:15 ` Duy Nguyen
2016-08-22 20:38 ` Philip Oakley
2016-08-24 13:04 ` Johannes Schindelin
2016-08-24 19:16 ` Eric Wong
2016-08-25 13:08 ` Johannes Schindelin
2016-08-25 3:57 ` Arif Khokar
2016-08-25 13:01 ` Johannes Schindelin
2016-08-25 23:14 ` Arif Khokar
2016-08-26 8:08 ` Johannes Schindelin
2016-08-27 22:26 ` Jakub Narębski
2016-08-28 8:38 ` Johannes Schindelin
2016-08-28 13:45 ` Announcing Git User's Survey 2016 [was: Working with public-inbox.org] Jakub Narębski
2016-09-09 13:06 ` Johannes Schindelin
2016-09-09 18:51 ` Jakub Narębski
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
List information: http://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM5PR17MB1353B99EBD5F4FD23360DD41D3ED0@DM5PR17MB1353.namprd17.prod.outlook.com \
--to=arif_khokar@hotmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=e@80x24.org \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=meta@public-inbox.org \
--cc=peff@peff.net \
--cc=sbeller@google.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).