1 Return-Path: <pieter@praet.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 3CDE0431FB6
\r
6 for <notmuch@notmuchmail.org>; Sun, 17 Apr 2011 23:57:14 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id Q9hfzuT1I3n0 for <notmuch@notmuchmail.org>;
\r
16 Sun, 17 Apr 2011 23:57:12 -0700 (PDT)
\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
18 [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 3534E431FB5
\r
21 for <notmuch@notmuchmail.org>; Sun, 17 Apr 2011 23:57:12 -0700 (PDT)
\r
22 Received: by wyi11 with SMTP id 11so5184731wyi.26
\r
23 for <notmuch@notmuchmail.org>; Sun, 17 Apr 2011 23:57:11 -0700 (PDT)
\r
24 Received: by 10.216.143.7 with SMTP id k7mr4290187wej.95.1303109830831;
\r
25 Sun, 17 Apr 2011 23:57:10 -0700 (PDT)
\r
26 Received: from localhost (6.159-240-81.adsl-dyn.isp.belgacom.be
\r
27 [81.240.159.6]) by mx.google.com with ESMTPS id
\r
28 z50sm2406436weq.47.2011.04.17.23.57.08 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Sun, 17 Apr 2011 23:57:09 -0700 (PDT)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: Amit Kucheria <amit.kucheria@verdurent.com>, notmuch@notmuchmail.org
\r
32 Subject: Re: Filtering out replies to a patch series
\r
33 In-Reply-To: <AANLkTinTezCRqQT=B567_A+dCJi7O_WFDmvYS7sdzjGk@mail.gmail.com>
\r
34 References: <AANLkTinTezCRqQT=B567_A+dCJi7O_WFDmvYS7sdzjGk@mail.gmail.com>
\r
35 User-Agent: Notmuch/0.5-87-g30203d7 (http://notmuchmail.org) Emacs/23.1.50.1
\r
36 (x86_64-pc-linux-gnu)
\r
37 Date: Mon, 18 Apr 2011 08:57:07 +0200
\r
39 <87k4es9hdo.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me>
\r
41 Content-Type: text/plain; charset=us-ascii
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
50 List-Post: <mailto:notmuch@notmuchmail.org>
\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Mon, 18 Apr 2011 06:57:14 -0000
\r
56 On Fri, 1 Apr 2011 11:47:25 +0300, Amit Kucheria <amit.kucheria@verdurent.com> wrote:
\r
59 > I am wondering how developers on this list handle the case of grabbing
\r
60 > a patch series posted to the list and using something like git-am to
\r
61 > apply it to their local trees.
\r
63 See id:"m2vd3p3u78.fsf@kcals.maillard.im"
\r
65 > Several patches in the series could have replies to them and hence
\r
66 > they need to be filtered out.
\r
68 > e.g. I use notmuch show --output=mbox thread:000000000000eb4e to get
\r
69 > the basic series. But I'd appreciate any tips on filtering out the
\r
72 Something like this might work:
\r
74 noreplieskthxbye() {
\r
76 target_dir=/tmp/${thread_id}
\r
77 test -d ${target_dir} && echo "Patch queue dirty. Remove ${target_dir}" && return 1
\r
78 mkdir -p ${target_dir}
\r
79 notmuch show --format=mbox ${thread_id} | git mailsplit -o${target_dir}
\r
80 grep -l "^diff --git" ${target_dir}/* | xargs git am -3
\r
81 rm -rf ${target_dir} # "Danger, Will Robinson!"
\r
84 noreplieskthxbye thread:000000000000eb4e
\r
86 But I'd be suprised beyond belief if there weren't a *sane* way to do
\r
87 this. I might also need some coffee first...
\r
91 > _______________________________________________
\r
92 > notmuch mailing list
\r
93 > notmuch@notmuchmail.org
\r
94 > http://notmuchmail.org/mailman/listinfo/notmuch
\r