unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Filtering out replies to a patch series
@ 2011-04-01  8:47 Amit Kucheria
  2011-04-01  8:50 ` Amit Kucheria
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Amit Kucheria @ 2011-04-01  8:47 UTC (permalink / raw)
  To: notmuch

Hi,

I am wondering how developers on this list handle the case of grabbing
a patch series posted to the list and using something like git-am to
apply it to their local trees.

Several patches in the series could have replies to them and hence
they need to be filtered out.

e.g. I use notmuch show --output=mbox thread:000000000000eb4e to get
the basic series. But I'd appreciate any tips on filtering out the
replies.

Cheers,
Amit

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Filtering out replies to a patch series
  2011-04-01  8:47 Filtering out replies to a patch series Amit Kucheria
@ 2011-04-01  8:50 ` Amit Kucheria
  2011-04-18  6:57 ` Pieter Praet
  2011-04-25 21:02 ` Carl Worth
  2 siblings, 0 replies; 5+ messages in thread
From: Amit Kucheria @ 2011-04-01  8:50 UTC (permalink / raw)
  To: notmuch

On Fri, Apr 1, 2011 at 11:47 AM, Amit Kucheria
<amit.kucheria@verdurent.com> wrote:
> Hi,
>
> I am wondering how developers on this list handle the case of grabbing
> a patch series posted to the list and using something like git-am to
> apply it to their local trees.
>
> Several patches in the series could have replies to them and hence
> they need to be filtered out.
>
> e.g. I use notmuch show --output=mbox thread:000000000000eb4e to get
> the basic series. But I'd appreciate any tips on filtering out the
> replies.

Aargh, that was meant to be notmuch show --format=mbox thread:000000000000eb4e

/Amit

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Filtering out replies to a patch series
  2011-04-01  8:47 Filtering out replies to a patch series Amit Kucheria
  2011-04-01  8:50 ` Amit Kucheria
@ 2011-04-18  6:57 ` Pieter Praet
  2011-04-19  9:16   ` Amit Kucheria
  2011-04-25 21:02 ` Carl Worth
  2 siblings, 1 reply; 5+ messages in thread
From: Pieter Praet @ 2011-04-18  6:57 UTC (permalink / raw)
  To: Amit Kucheria, notmuch

On Fri, 1 Apr 2011 11:47:25 +0300, Amit Kucheria <amit.kucheria@verdurent.com> wrote:
> Hi,
> 
> I am wondering how developers on this list handle the case of grabbing
> a patch series posted to the list and using something like git-am to
> apply it to their local trees.

See id:"m2vd3p3u78.fsf@kcals.maillard.im"

> Several patches in the series could have replies to them and hence
> they need to be filtered out.
> 
> e.g. I use notmuch show --output=mbox thread:000000000000eb4e to get
> the basic series. But I'd appreciate any tips on filtering out the
> replies.

Something like this might work:

  noreplieskthxbye() {
      thread_id=${1}
      target_dir=/tmp/${thread_id}
      test -d ${target_dir} && echo "Patch queue dirty. Remove ${target_dir}" && return 1
      mkdir -p ${target_dir}
      notmuch show --format=mbox ${thread_id} | git mailsplit -o${target_dir}
      grep -l "^diff --git" ${target_dir}/* | xargs git am -3
      rm -rf ${target_dir} # "Danger, Will Robinson!"
  }

  noreplieskthxbye thread:000000000000eb4e

But I'd be suprised beyond belief if there weren't a *sane* way to do
this. I might also need some coffee first...

> Cheers,
> Amit
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

Peace

-Pieter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Filtering out replies to a patch series
  2011-04-18  6:57 ` Pieter Praet
@ 2011-04-19  9:16   ` Amit Kucheria
  0 siblings, 0 replies; 5+ messages in thread
From: Amit Kucheria @ 2011-04-19  9:16 UTC (permalink / raw)
  To: Pieter Praet; +Cc: notmuch

On Mon, Apr 18, 2011 at 9:57 AM, Pieter Praet <pieter@praet.org> wrote:
> On Fri, 1 Apr 2011 11:47:25 +0300, Amit Kucheria <amit.kucheria@verdurent.com> wrote:
>> Hi,
>>
>> I am wondering how developers on this list handle the case of grabbing
>> a patch series posted to the list and using something like git-am to
>> apply it to their local trees.
>
> See id:"m2vd3p3u78.fsf@kcals.maillard.im"
>
>> Several patches in the series could have replies to them and hence
>> they need to be filtered out.
>>
>> e.g. I use notmuch show --output=mbox thread:000000000000eb4e to get
>> the basic series. But I'd appreciate any tips on filtering out the
>> replies.
>
> Something like this might work:
>
>  noreplieskthxbye() {
>      thread_id=${1}
>      target_dir=/tmp/${thread_id}
>      test -d ${target_dir} && echo "Patch queue dirty. Remove ${target_dir}" && return 1
>      mkdir -p ${target_dir}
>      notmuch show --format=mbox ${thread_id} | git mailsplit -o${target_dir}
>      grep -l "^diff --git" ${target_dir}/* | xargs git am -3
>      rm -rf ${target_dir} # "Danger, Will Robinson!"
>  }
>
>  noreplieskthxbye thread:000000000000eb4e
>
> But I'd be suprised beyond belief if there weren't a *sane* way to do
> this. I might also need some coffee first...

I haven't found a 'sane way' yet. Your scripting hack looks like a
good way to start though.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Filtering out replies to a patch series
  2011-04-01  8:47 Filtering out replies to a patch series Amit Kucheria
  2011-04-01  8:50 ` Amit Kucheria
  2011-04-18  6:57 ` Pieter Praet
@ 2011-04-25 21:02 ` Carl Worth
  2 siblings, 0 replies; 5+ messages in thread
From: Carl Worth @ 2011-04-25 21:02 UTC (permalink / raw)
  To: Amit Kucheria, notmuch; +Cc: Eric Anholt

[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]

On Fri, 1 Apr 2011 11:47:25 +0300, Amit Kucheria <amit.kucheria@verdurent.com> wrote:
> Several patches in the series could have replies to them and hence
> they need to be filtered out.

I think I haven't run into this problem since when there's a reply, (on
this list at least), it's often of the form "please fix up this issue or
another" which then results in a subsequent mail with a new patch
series.

So I've been getting by with:

	| (cd ~/src/notmuch; git am -3)

And I think that "git am" probably handles an erroneous reply fairly
smoothly here, (gives "patch did not apply" and user does "git rebase
--continue" probably?).

Meanwhile, I have friends and co-workers that live within the world of
the Linux-kernel mailing list. And that world has a culture where people
reply with things like:

	Signed-off-by: Elite Hacker <elite@example.com>
or:
	Reviewed-by: Quality Coder <qc@example.com>

And it would be awfully convenient to have an easy mechanism for the
right thing to happen with replies like this, (which is that lines like
the above should be added to the commit message of the message above).

It would probably make sense for any extra smarts along these lines to
be implemented in "git am" rather than in anything in notmuch I think.

-Carl

-- 
carl.d.worth@intel.com

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-25 21:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-01  8:47 Filtering out replies to a patch series Amit Kucheria
2011-04-01  8:50 ` Amit Kucheria
2011-04-18  6:57 ` Pieter Praet
2011-04-19  9:16   ` Amit Kucheria
2011-04-25 21:02 ` Carl Worth

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.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).