From dann@godzilla.ics.uci.edu Mon Oct 5 05:45:41 2009 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? From monnier@iro.umontreal.ca Mon Oct 5 06:45:07 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 5 Oct 2009 13:45:08 +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=-3.6 required=4.0 tests=AWL,HAS_BUG_NUMBER 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 n95Dj5xt002814 for ; Mon, 5 Oct 2009 06:45:07 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Muns9-0001zu-E9 for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 09:45:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Muns4-0001vC-UN for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 09:45:05 -0400 Received: from [199.232.76.173] (port=49209 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Muns4-0001uz-Iq for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 09:45:00 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:50576 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Muns4-0007YE-8D for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2009 09:45:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAHeVyUrO+IBv/2dsb2JhbACBUtA3hCoEgVKFVoJ1 X-IronPort-AV: E=Sophos;i="4.44,505,1249272000"; d="scan'208";a="47104284" Received: from 206-248-128-111.dsl.teksavvy.com (HELO pastel.home) ([206.248.128.111]) by ironport2-out.pppoe.ca with ESMTP; 05 Oct 2009 09:44:59 -0400 Received: by pastel.home (Postfix, from userid 20848) id 6A12281F0; Mon, 5 Oct 2009 09:44:59 -0400 (EDT) From: Stefan Monnier To: Dan Nicolaescu Cc: 4642@debbugs.gnu.org, bug-gnu-emacs Subject: Re: bug#4642: diff from log-view somtime diffs the wrong file Message-ID: References: <200910051243.n95ChutU010935@godzilla.ics.uci.edu> Date: Mon, 05 Oct 2009 09:44:59 -0400 In-Reply-To: <200910051243.n95ChutU010935@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Mon, 5 Oct 2009 05:43:57 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. > 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. But we should also either fix vc-version-diff so it doesn't ignore its `files' argument, or otherwise remove that argument (which will be a good opportunity to go and fix the other callers). 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? From dann@godzilla.ics.uci.edu Mon Oct 5 08:14:30 2009 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@debbugs.gnu.org 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? From unknown Tue Sep 09 21:33:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 02 Nov 2009 15:24:13 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator