From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#4642: marked as done (diff from log-view somtime diffs the wrong file) Date: Mon, 05 Oct 2009 15:20:05 +0000 Message-ID: References: <200910051514.n95FEK5r011964@godzilla.ics.uci.edu> <200910051243.n95ChutU010935@godzilla.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1254756005-19072-0" X-Trace: ger.gmane.org 1254756462 21756 80.91.229.12 (5 Oct 2009 15:27:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Oct 2009 15:27:42 +0000 (UTC) To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 05 17:27:39 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MupTK-00077L-Ni for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Oct 2009 17:27:35 +0200 Original-Received: from localhost ([127.0.0.1]:42528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MupTK-0005PK-06 for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Oct 2009 11:27:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MupT5-0005NG-A1 for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 11:27:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MupT0-0005Je-QA for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 11:27:18 -0400 Original-Received: from [199.232.76.173] (port=51953 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MupSz-0005JV-0r for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 11:27:13 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43025) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MupSy-00036e-CX for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 11:27:12 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n95FR8sU020626; Mon, 5 Oct 2009 08:27:08 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n95FK5Ym019143; Mon, 5 Oct 2009 08:20:05 -0700 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 4642 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31702 Archived-At: This is a multi-part message in MIME format... ------------=_1254756005-19072-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Mon, 5 Oct 2009 08:14:20 -0700 (PDT) with message-id <200910051514.n95FEK5r011964@godzilla.ics.uci.edu> and subject line Re: bug#4642: diff from log-view somtime diffs the wrong f= ile has caused the Emacs bug report #4642, regarding diff from log-view somtime diffs the wrong file to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 4642: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D4642 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1254756005-19072-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 5 Oct 2009 12:45:41 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.0 required=4.0 tests=AWL,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n95CjdaQ026365 for ; Mon, 5 Oct 2009 05:45:41 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mumwd-0000To-BO for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 08:45:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MumwY-0000TB-Ag for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 08:45:39 -0400 Received: from [199.232.76.173] (port=57830 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MumwY-0000T8-1b for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 08:45:34 -0400 Received: from colin-baker-v0.ics.uci.edu ([128.195.1.153]:44953) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MumwX-0004ln-Bv for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 08:45:33 -0400 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by colin-baker-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id n95ChvLe027036 for ; Mon, 5 Oct 2009 05:43:57 -0700 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n95ChutU010935; Mon, 5 Oct 2009 05:43:57 -0700 (PDT) Date: Mon, 5 Oct 2009 05:43:57 -0700 (PDT) Message-Id: <200910051243.n95ChutU010935@godzilla.ics.uci.edu> From: Dan Nicolaescu To: bug-gnu-emacs Subject: diff from log-view somtime diffs the wrong file X-Debbugs-No-Ack: yes Lines: 59 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: n95ChvLe027036 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) emacs -Q C-x v d SOME_DIRECTORY RET say the above display 2 files a and b put the cursor on a and do: C-x v l put the cursor on b and switch to the *vc-change-log* buffer. press d in that buffer it will show a diff for the file "b", not "a" (or it will give an error that the diff is not found). log-view-diff calls vc-version-diff, which calls vc-diff-internal not using it's arguments, but by calling `vc-deduce-fileset'. That will trigger this code in vc-deduce-fileset: ((and (buffer-live-p vc-parent-buffer) (or (buffer-file-name vc-parent-buffer) (with-current-buffer vc-parent-buffer (derived-mode-p 'vc-dir-mode)))) but the selected file in the vc-dir buffer has changed, and this will return the new selected file, while log-view actually wants the old one. One way to fix this is to make log-view-diff not call vc-version-diff, but vc-diff-internal, like so: --- log-view.el.~1.60.~ 2009-10-03 03:20:50.000000000 -0700 +++ log-view.el 2009-10-04 19:20:58.000000000 -0700 @@ -496,11 +496,12 @@ changeset that affected the currently co (goto-char end) (log-view-msg-next) (setq to (log-view-current-tag)))) - (vc-version-diff - (if log-view-per-file-logs - (list (log-view-current-file)) - log-view-vc-fileset) - to fr))) + (vc-diff-internal + t (list log-view-vc-backend + (if log-view-per-file-logs + (list (log-view-current-file)) + log-view-vc-fileset)) + to fr))) (declare-function vc-diff-internal "vc" (async vc-fileset rev1 rev2 &optional verbose)) OK to check in? ------------=_1254756005-19072-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4642-done) by emacsbugs.donarmstrong.com; 5 Oct 2009 15:14:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from colin-baker-v0.ics.uci.edu (colin-baker-v0.ics.uci.edu [128.195.1.153]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n95FETok018098 for <4642-done@emacsbugs.donarmstrong.com>; Mon, 5 Oct 2009 08:14:30 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by colin-baker-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id n95FEKCL018228; Mon, 5 Oct 2009 08:14:21 -0700 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n95FEK5r011964; Mon, 5 Oct 2009 08:14:20 -0700 (PDT) Date: Mon, 5 Oct 2009 08:14:20 -0700 (PDT) Message-Id: <200910051514.n95FEK5r011964@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Stefan Monnier Cc: 4642-done@emacsbugs.donarmstrong.com Subject: Re: bug#4642: diff from log-view somtime diffs the wrong file References: <200910051243.n95ChutU010935@godzilla.ics.uci.edu> X-Debbugs-No-Ack: yes In-Reply-To: (Stefan Monnier's message of "Mon, 05 Oct 2009 09:44:59 -0400") Lines: 45 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: n95FEKCL018228 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu Stefan Monnier writes: > > One way to fix this is to make log-view-diff not call vc-version-diff, > > but vc-diff-internal, like so: > > That looks OK. Thanks, checked in. > But we should also either fix vc-version-diff so it doesn't ignore > its `files' argument, or otherwise remove that argument Can you please do that, it's unclear to me how to fix this. > (which will be a good opportunity to go and fix the other callers). Luckily there's only 2 callers: vc-diff and vc-root-diff (which is clearly marked as not working correctly with vc-version-diff...). > > Stefan > > > > --- log-view.el.~1.60.~ 2009-10-03 03:20:50.000000000 -0700 > > +++ log-view.el 2009-10-04 19:20:58.000000000 -0700 > > @@ -496,11 +496,12 @@ changeset that affected the currently co > > (goto-char end) > > (log-view-msg-next) > > (setq to (log-view-current-tag)))) > > - (vc-version-diff > > - (if log-view-per-file-logs > > - (list (log-view-current-file)) > > - log-view-vc-fileset) > > - to fr))) > > + (vc-diff-internal > > + t (list log-view-vc-backend > > + (if log-view-per-file-logs > > + (list (log-view-current-file)) > > + log-view-vc-fileset)) > > + to fr))) > > > (declare-function vc-diff-internal "vc" > > (async vc-fileset rev1 rev2 &optional verbose)) > > > OK to check in? ------------=_1254756005-19072-0--