From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: diff-apply-hunk broken Date: 25 Mar 2004 12:48:53 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1080242248 8024 80.91.224.253 (25 Mar 2004 19:17:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 25 Mar 2004 19:17:28 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Mar 25 20:17:20 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B6aLw-0005Fu-00 for ; Thu, 25 Mar 2004 20:17:20 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B6aLv-0008PO-00 for ; Thu, 25 Mar 2004 20:17:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B6Zpc-0007ZM-Cn for emacs-devel@quimby.gnus.org; Thu, 25 Mar 2004 13:43:56 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B6Zht-0005pq-Gu for emacs-devel@gnu.org; Thu, 25 Mar 2004 13:35:57 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B6ZgK-0005OS-Je for emacs-devel@gnu.org; Thu, 25 Mar 2004 13:34:51 -0500 Original-Received: from [206.47.199.164] (helo=simmts6-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B6ZYl-0002zK-NU for emacs-devel@gnu.org; Thu, 25 Mar 2004 13:26:31 -0500 Original-Received: from empanada.local ([67.71.118.2]) by simmts6-srv.bellnexxia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040325174853.EILH8424.simmts6-srv.bellnexxia.net@empanada.local>; Thu, 25 Mar 2004 12:48:53 -0500 Original-Received: by empanada.local (Postfix, from userid 502) id 165841429C7; Thu, 25 Mar 2004 12:48:54 -0500 (EST) Original-To: emacs-devel@gnu.org In-Reply-To: Original-Lines: 28 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20927 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20927 > Stefan, it appears that your recent patch broke `diff-apply-hunk': Hmm... > in a modified CVS file, I do C-x v = (vc-diff) and in the resulting > *vc-diff* buffer I do C-c C-a (diff-apply-hunk) to reverse the section > of the diff: To undo a hunk you should use C-u C-c C-a rather than C-c C-a. It is true that when C-c C-a finds that the requested direction cannot be done on the buffer but the reverse can, it tries to reverse the direction for you, but it's always better to say explicitly what you want. > Debugger entered--Lisp error: (buffer-read-only #) The reason why things have changed is that it used to be that C-c C-a looked for the "dest file" no matter what, whereas now the file to which the hunk is applied depends on the direction you've chosen (via C-u C-c C-a). This way if you `diff a b' it used to be that both C-c C-a and C-u C-c C-a tried to apply (or reverse) the current hunk on file `b' whereas now C-c C-a will try to apply the hunk in file `a' and C-u C-c C-a will try to undo the hunk in file `b'. In your case, clearly the new behavior is undesirable, so I think we need to fix VC so that the diff doesn't mention io.d.~1.204.~. Stefan