* bug#4642: diff from log-view somtime diffs the wrong file
@ 2009-10-05 12:43 ` Dan Nicolaescu
2009-10-05 13:44 ` Stefan Monnier
2009-10-05 15:20 ` bug#4642: marked as done (diff from log-view somtime diffs the wrong file) Emacs bug Tracking System
0 siblings, 2 replies; 3+ messages in thread
From: Dan Nicolaescu @ 2009-10-05 12:43 UTC (permalink / raw
To: bug-gnu-emacs
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#4642: diff from log-view somtime diffs the wrong file
2009-10-05 12:43 ` bug#4642: diff from log-view somtime diffs the wrong file Dan Nicolaescu
@ 2009-10-05 13:44 ` Stefan Monnier
2009-10-05 15:20 ` bug#4642: marked as done (diff from log-view somtime diffs the wrong file) Emacs bug Tracking System
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2009-10-05 13:44 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: 4642, bug-gnu-emacs
> 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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#4642: marked as done (diff from log-view somtime diffs the wrong file)
2009-10-05 12:43 ` bug#4642: diff from log-view somtime diffs the wrong file Dan Nicolaescu
2009-10-05 13:44 ` Stefan Monnier
@ 2009-10-05 15:20 ` Emacs bug Tracking System
1 sibling, 0 replies; 3+ messages in thread
From: Emacs bug Tracking System @ 2009-10-05 15:20 UTC (permalink / raw
To: Dan Nicolaescu
[-- Attachment #1: Type: text/plain, Size: 915 bytes --]
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 file
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.)
--
4642: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4642
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems
[-- Attachment #2: Type: message/rfc822, Size: 4243 bytes --]
From: Dan Nicolaescu <dann@ics.uci.edu>
To: bug-gnu-emacs <bug-gnu-emacs@gnu.org>
Subject: diff from log-view somtime diffs the wrong file
Date: Mon, 5 Oct 2009 05:43:57 -0700 (PDT)
Message-ID: <200910051243.n95ChutU010935@godzilla.ics.uci.edu>
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?
[-- Attachment #3: Type: message/rfc822, Size: 3527 bytes --]
From: Dan Nicolaescu <dann@ics.uci.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 4642-done@emacsbugs.donarmstrong.com
Subject: Re: bug#4642: diff from log-view somtime diffs the wrong file
Date: Mon, 5 Oct 2009 08:14:20 -0700 (PDT)
Message-ID: <200910051514.n95FEK5r011964@godzilla.ics.uci.edu>
Stefan Monnier <monnier@iro.umontreal.ca> 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?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-05 15:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200910051514.n95FEK5r011964@godzilla.ics.uci.edu>
2009-10-05 12:43 ` bug#4642: diff from log-view somtime diffs the wrong file Dan Nicolaescu
2009-10-05 13:44 ` Stefan Monnier
2009-10-05 15:20 ` bug#4642: marked as done (diff from log-view somtime diffs the wrong file) Emacs bug Tracking System
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.