threads / discuss / 16810

Applying patches from a patch set

Subject: Applying patches from a patch set

## tl;dr

7 messages between Dec 20, 2008 and Dec 23, 2008.

replies: 6people: 4as markdown or json

Mark Ryden· Dec 20, 2008, 14:37 UTC · lore
Hello,
  I am subscribed to some linux kernel subsystem mailing list; in this
list there are sometimes patchsets with more than
30-40 patches.
I am using gmail web interface client.

In order to apply a patch set I copy and paste each patch from the patchset into a file, and then apply that patch. I assume that there is a better way. Recently I encountered a fatal error when doing so (and I am not sure what caused it).

So my question is: does anyone know a more elegant way of applying a large patchset ? Maybe there is better mail client with which this process can be done easily ?

(I remember there was something called git apply-mbox in the past).

Rgs, Mark

Jakub Narebski· Dec 20, 2008, 19:25 UTC · re: Mark Ryden · lore

Re: Applying patches from a patch set

"Mark Ryden" <markryde@gmail.com> writes:
>   I am subscribed to some linux kernel subsystem mailing list; in this
> list there are sometimes patchsets with more than
> 30-40 patches.
I hope in proper patch series...
> I am using gmail web interface client.

Better use some standalone mail program. Patch series should be send in thread, either as reply to the cover letter message, or threaded each being reply to previous patch... beside being numbered; IIRC GMail web interface doesn't have threading implemented...

> In order to apply a patch set I copy and paste each patch from the
> patchset into a file, and then apply that patch.

You use raw view, I assume? Otherwise you would fail afoul word wrapping and other whitespace mangling, at least...

[...]
> (I remember there was something called git apply-mbox in the past).

You can use "git am" for that, which is modern equivalent, and which can do (almost) everything git-apply-mbox did.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Junio C Hamano· Dec 20, 2008, 20:06 UTC · re: Mark Ryden · lore

Re: Applying patches from a patch set

"Mark Ryden" <markryde@gmail.com> writes:
Show 15 quoted lines
> Hello,
>   I am subscribed to some linux kernel subsystem mailing list; in this
> list there are sometimes patchsets with more than
> 30-40 patches.
> I am using gmail web interface client.
>
> In order to apply a patch set I copy and paste each patch from the
> patchset into a file, and then apply that patch.
> I assume that there is a better way.
> Recently I encountered a fatal error when doing so (and I am not sure
> what caused it).
>
> So my question is: does anyone know a more elegant way of applying a
> large patchset ?
> Maybe there is better mail client with which this process can be done easily ?

First mistake(?) is you seem to be doing copy&paste from browser. Don't. It can easily damage whitespaces. Find out how your webmail interface allows you to save selected messages in a mbox and let you download it.

Then
	$ git am that-mbox-file
Mark Ryden· Dec 23, 2008, 11:25 UTC · re: Junio C Hamano · lore

Re: Applying patches from a patch set

Hello,
  I tried usuing slrn with mutt; mutt seems to me better.
I saved 15 git patches from one patch set into a mailbox
using mutt.
Now I tried:
git am maibox
and got this error:
Patch is empty.  Was it split wrong?

This error occurred after "git am maibox" applied the first 6 patches in this patch set.

looking at that seventh patch shows that it seems to be perfectly ok.

Any ideas what can be wrong here? Regards, Mark

On Sat, Dec 20, 2008 at 10:06 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 30 quoted lines
> "Mark Ryden" <markryde@gmail.com> writes:
>
>> Hello,
>>   I am subscribed to some linux kernel subsystem mailing list; in this
>> list there are sometimes patchsets with more than
>> 30-40 patches.
>> I am using gmail web interface client.
>>
>> In order to apply a patch set I copy and paste each patch from the
>> patchset into a file, and then apply that patch.
>> I assume that there is a better way.
>> Recently I encountered a fatal error when doing so (and I am not sure
>> what caused it).
>>
>> So my question is: does anyone know a more elegant way of applying a
>> large patchset ?
>> Maybe there is better mail client with which this process can be done easily ?
>
> First mistake(?) is you seem to be doing copy&paste from browser.  Don't.
> It can easily damage whitespaces.  Find out how your webmail interface
> allows you to save selected messages in a mbox and let you download it.
>
> Then
>
>        $ git am that-mbox-file
>
>
>
>
>
Sitaram Chamarty· Dec 21, 2008, 08:20 UTC · re: Mark Ryden · lore

Re: Applying patches from a patch set

On 2008-12-20, Mark Ryden <markryde@gmail.com> wrote:
>   I am subscribed to some linux kernel subsystem mailing list; in this
> list there are sometimes patchsets with more than
> 30-40 patches.
> I am using gmail web interface client.

solution 1: see if that list is mirrored by gmane and use a newsreader like slrn to access the list via gmane

solution 2: enable pop/imap access on your gmail account and pull emails from there using whatever command line mail client you like (like mutt maybe). Not tested, but should work. For some definition of "work" (not sure how gmail's "tags" map to imap folders, which might trip you...)

Mark Ryden· Dec 21, 2008, 18:34 UTC · re: Sitaram Chamarty · lore

Re: Applying patches from a patch set

Hello,
  Thanks a lot for your answer ! I was not aware of the option using a
newsreader like slrn to access the list via gmane.

The list I want to work with **does** have a gmane interface. It is : http://thread.gmane.org/gmane.linux.kernel.wireless.general

However, after I tried: setenv NNTPSERVER gmane.linux.kernel.wireless.general and slrn -f /root/.jnewsrc --create I got: slrn 0.9.8.1pl2 [2005-02-17]

Reading startup file /etc/slrn.rc. Using newsrc file /root/.jnewsrc for server gmane.linux.kernel.wireless.general. Connecting to host gmane.linux.kernel.wireless.general ... Failed to resolve gmane.linux.kernel.wireless.general

Run-Time Error slrn fatal error: Failed to initialize server.

I assume that this is some silly mistake I had done,.Any ideas?

Rgs, Mark

On Sun, Dec 21, 2008 at 10:20 AM, Sitaram Chamarty <sitaramc@gmail.com> wrote:
Show 21 quoted lines
> On 2008-12-20, Mark Ryden <markryde@gmail.com> wrote:
>
>>   I am subscribed to some linux kernel subsystem mailing list; in this
>> list there are sometimes patchsets with more than
>> 30-40 patches.
>> I am using gmail web interface client.
>
> solution 1: see if that list is mirrored by gmane and use a
> newsreader like slrn to access the list via gmane
>
> solution 2: enable pop/imap access on your gmail account and
> pull emails from there using whatever command line mail
> client you like (like mutt maybe).  Not tested, but should
> work.  For some definition of "work" (not sure how gmail's
> "tags" map to imap folders, which might trip you...)
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Jakub Narebski· Dec 21, 2008, 18:53 UTC · re: Mark Ryden · lore

Re: Applying patches from a patch set

"Mark Ryden" <markryde@gmail.com> writes:
> However, after I tried:
> setenv NNTPSERVER gmane.linux.kernel.wireless.general

This is not a _NNTP server_; this is _news group_ name. You should use news.gmane.org for NNTPSERVER.

> I assume that this is some silly mistake I had done,.Any ideas?
setenv NNTPSERVER news.gmane.org
-- 
Jakub Narebski
Poland
ShadeHawk on #git

← back to recent threads