all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to apply (multi file) patches conveniently
@ 2017-02-06 12:13 Michael Heerdegen
  2017-02-06 15:49 ` Eli Zaretskii
  2017-02-07 14:25 ` Stefan Monnier
  0 siblings, 2 replies; 20+ messages in thread
From: Michael Heerdegen @ 2017-02-06 12:13 UTC (permalink / raw)
  To: Emacs mailing list

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.



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

end of thread, other threads:[~2017-02-09 17:49 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-06 12:13 How to apply (multi file) patches conveniently Michael Heerdegen
2017-02-06 15:49 ` 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

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.