From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Arseny Sher Newsgroups: gmane.emacs.bugs Subject: bug#26028: 26.0.50; epatch for multifile patches Date: Thu, 09 Mar 2017 00:53:41 +0300 Message-ID: <87y3wfv3iy.fsf@yandex.ru> References: <87varjfzhr.fsf@yandex.ru> <838tofh93b.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489010057 30017 195.159.176.226 (8 Mar 2017 21:54:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 8 Mar 2017 21:54:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 26028@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 08 22:54:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cljX4-0006cV-3I for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Mar 2017 22:54:06 +0100 Original-Received: from localhost ([::1]:58656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cljX9-0001rC-To for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Mar 2017 16:54:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cljX3-0001qu-Em for bug-gnu-emacs@gnu.org; Wed, 08 Mar 2017 16:54:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cljX0-0006GL-DL for bug-gnu-emacs@gnu.org; Wed, 08 Mar 2017 16:54:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48594) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cljX0-0006GH-AK for bug-gnu-emacs@gnu.org; Wed, 08 Mar 2017 16:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cljX0-0000oQ-40 for bug-gnu-emacs@gnu.org; Wed, 08 Mar 2017 16:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Arseny Sher Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Mar 2017 21:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26028 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26028-submit@debbugs.gnu.org id=B26028.14890100333106 (code B ref 26028); Wed, 08 Mar 2017 21:54:02 +0000 Original-Received: (at 26028) by debbugs.gnu.org; 8 Mar 2017 21:53:53 +0000 Original-Received: from localhost ([127.0.0.1]:46793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cljWr-0000o1-Em for submit@debbugs.gnu.org; Wed, 08 Mar 2017 16:53:53 -0500 Original-Received: from forward3m.cmail.yandex.net ([5.255.216.21]:50159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cljWp-0000nn-GY for 26028@debbugs.gnu.org; Wed, 08 Mar 2017 16:53:52 -0500 Original-Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::25]) by forward3m.cmail.yandex.net (Yandex) with ESMTP id AE79C216E3; Thu, 9 Mar 2017 00:53:44 +0300 (MSK) Original-Received: from smtp1o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1o.mail.yandex.net (Yandex) with ESMTP id 283B61300C13; Thu, 9 Mar 2017 00:53:43 +0300 (MSK) Original-Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 5PF9iSI40Z-rguOOMbm; Thu, 09 Mar 2017 00:53:42 +0300 (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1489010022; bh=myB87SytBKvX1gpUX3/GnXmaWJGwGmShSR0ZASfO+ck=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID; b=sKmroETg31kH/s1ww2K+TNCecu/UEyRSeWEIiOW+SjSZycaogGuN0JpfSy5z0luBY 1tJi0y09P89JdkJLJ++EjSY53RzXQXLk3UkA5ofIgHVFevd/vHSs0poUNgVBpt2BMg m+5AWtgQv1GCt9EjquMXYoD2hKZZ9yCemK35DO5E= Authentication-Results: smtp1o.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0 In-Reply-To: <838tofh93b.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 08 Mar 2017 21:17:12 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130358 Archived-At: Eli Zaretskii 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!