all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: How to apply (multi file) patches conveniently
Date: Mon, 06 Feb 2017 13:13:14 +0100	[thread overview]
Message-ID: <87efzb5xgl.fsf@drachen> (raw)

Hi,

I wonder how a convenient way to apply multi-file patches like they are
posted in emacs-devel or emacs-bug looks like.

Most of the time I first save the patch into a file and try to let git
apply it.  I do that with Magit (w w).  But in 50% of the cases I just
get a message like

128 git … am --3way -- /home/micha/isearch.patch
Patch format detection failed.

Though the patch looks normal to me (what could I'm being doing wrong?
in 50% of the cases it works as expected, and I don't see that I'm doing
something differently in these cases).

Since the documentation of git is not really... cool, I tried to find a
reliable tool in `epatch'.  But it's a total mess.  Consider I have a
patch with a skeleton that looks like this:

 doc/misc/cl.texi                     |   4 +-
 etc/NEWS                             |   4 +
 lisp/emacs-lisp/cl-seq.el            | 355 +++++++++++++++++++++--------------
 test/lisp/emacs-lisp/cl-seq-tests.el |  90 +++++++++
 4 files changed, 307 insertions(+), 146 deletions(-)

diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index 8baa0bd88c..6f387f5cbb 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
....

--- a/etc/NEWS
+++ b/etc/NEWS
....

--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
...

I call `epatch', then I'm asked for a directory to which the multi-file
patch should be applied to.  I'm specifying the name of the root of the
emacs repository, in my case, "/home/micha/software/emacs".

Epatch should be able to DTRT with this information.  But instead, it
apparently searches all files in this directory, for example, it
searches "cl.texi" in "/home/micha/software/emacs/" instead of
"/home/micha/software/emacs/doc/misc/" as expected.  As a result, I'm
prompted once for the location of every single file.  When I happen to
make a typo, like specifying "cl-seq.elc" instead of "cl-seq.el", the
whole session gets worthless and I can start anew from the beginning.

That looks like a bug to me, but why doesn't anyone else complain about
this - am I doing something wrong?


Thanks,

Michael.



             reply	other threads:[~2017-02-06 12:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06 12:13 Michael Heerdegen [this message]
2017-02-06 15:49 ` How to apply (multi file) patches conveniently Eli Zaretskii
2017-02-07 16:48   ` Michael Heerdegen
2017-02-07 17:19     ` Nick Dokos
2017-02-07 17:52       ` Michael Heerdegen
2017-02-07 19:45         ` Nick Dokos
2017-02-07 22:42         ` Robert Thorpe
2017-02-07 20:23     ` tomas
2017-02-07 20:42       ` Michael Heerdegen
2017-02-07 21:57         ` tomas
2017-02-07 19:31   ` Michael Heerdegen
2017-02-07 20:03     ` Eli Zaretskii
2017-02-07 20:22       ` Michael Heerdegen
2017-02-07 20:42         ` Eli Zaretskii
2017-02-07 20:50           ` Michael Heerdegen
2017-02-08  9:48         ` Thien-Thi Nguyen
2017-02-08 22:34           ` Michael Heerdegen
2017-02-09 17:49             ` Thien-Thi Nguyen
2017-02-07 14:25 ` Stefan Monnier
2017-02-07 16:51   ` Michael Heerdegen

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=87efzb5xgl.fsf@drachen \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.