unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Arseny Sher <sher-ars@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 26028@debbugs.gnu.org
Subject: bug#26028: 26.0.50; epatch for multifile patches
Date: Thu, 09 Mar 2017 00:53:41 +0300	[thread overview]
Message-ID: <87y3wfv3iy.fsf@yandex.ru> (raw)
In-Reply-To: <838tofh93b.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 08 Mar 2017 21:17:12 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

> I think you should point it to ~/tmp, not ~/tmp/old.  IOW, the
> directory should be the one relative to which the file names in the
> patch file will correctly point to the files.

Okay, it might be not very convenient (as you might have several
versions of project inside ~/tmp, and ediff will ask you which one is to
be patched), but it works. However, how then I am expected to apply
patches generated by VCS, where paths are prefixed with a/ and b/?
Again, let's consider some simple example:

mkdir -p proj/src
cd proj
echo "void main() {}" > src/hello.c
git init
git add src/ && git commit -m "commit"
echo "int main() { return 0; }" > src/hello.c
git diff > ../tmp.patch
git reset --hard HEAD

cat ../tmp.patch
diff --git a/src/hello.c b/src/hello.c
index ab73b3a..76e8197 100644
--- a/src/hello.c
+++ b/src/hello.c
@@ -1 +1 @@
-void main() {}
+int main() { return 0; }

How should I apply tmp.patch to proj?

Yet am not still sure that this is not a bug; some other guy said that
this behaviour doesn't make sense, and similar bug was fixed recently:
http://lists.gnu.org/archive/html/help-gnu-emacs/2017-03/msg00064.html
http://emacs.1067599.n8.nabble.com/bug-25010-26-0-50-epatch-might-parse-wrongly-a-file-name-td413747.html

And while I am here, I would like to express my gratitude to ediff
developers; it is in overall a great tool, and it is a pleasure to read
its manual. Thank you guys!





  reply	other threads:[~2017-03-08 21:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08 17:29 bug#26028: 26.0.50; epatch for multifile patches Arseny Sher
2017-03-08 19:17 ` Eli Zaretskii
2017-03-08 21:53   ` Arseny Sher [this message]
2017-03-09  1:41     ` Tino Calancha
2017-03-09 11:44       ` Arseny Sher
2017-05-23 11:26     ` Tino Calancha
2017-05-23 22:45       ` Michael Heerdegen
2017-05-24  0:46         ` Tino Calancha
2020-08-11  7:34           ` Stefan Kangas
2020-10-03 22:25             ` Michael Heerdegen
2021-05-10 12:02               ` Lars Ingebrigtsen
2021-05-12  9:27                 ` Michael Heerdegen
2021-05-13 16:29                 ` Filipp Gunbin
2021-05-16 13:57                   ` Lars Ingebrigtsen
2021-07-23 12:54                     ` Lars Ingebrigtsen
2022-03-24  8:34                       ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y3wfv3iy.fsf@yandex.ru \
    --to=sher-ars@yandex.ru \
    --cc=26028@debbugs.gnu.org \
    --cc=eliz@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).