GNU bug report logs -
#4642
diff from log-view somtime diffs the wrong file
Previous Next
Reported by: Dan Nicolaescu <dann <at> ics.uci.edu>
Date: Mon, 5 Oct 2009 12:55:04 UTC
Severity: normal
Done: Dan Nicolaescu <dann <at> ics.uci.edu>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4642 in the body.
You can then email your comments to 4642 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4642
; Package
emacs
.
(Mon, 05 Oct 2009 12:55:05 GMT)
Full text and
rfc822 format available.
Message #3 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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?
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4642
; Package
emacs
.
(Mon, 05 Oct 2009 13:55:06 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 05 Oct 2009 13:55:06 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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?
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4642
; Package
emacs
.
(Mon, 05 Oct 2009 13:55:09 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 05 Oct 2009 13:55:09 GMT)
Full text and
rfc822 format available.
Reply sent
to
Dan Nicolaescu <dann <at> ics.uci.edu>
:
You have taken responsibility.
(Mon, 05 Oct 2009 15:20:05 GMT)
Full text and
rfc822 format available.
Notification sent
to
Dan Nicolaescu <dann <at> ics.uci.edu>
:
bug acknowledged by developer.
(Mon, 05 Oct 2009 15:20:07 GMT)
Full text and
rfc822 format available.
Message #18 received at 4642-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Stefan Monnier <monnier <at> 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?
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Mon, 02 Nov 2009 15:24:13 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.