GNU bug report logs - #33295
Unhandled error in log-view-find-revision

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Tue, 6 Nov 2018 21:47:01 UTC

Severity: minor

Fixed in version 27.1

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Juri Linkov <juri <at> linkov.net>
Subject: bug#33295: closed (Re: bug#33295: Unhandled error in
 log-view-find-revision)
Date: Wed, 07 Nov 2018 22:54:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#33295: Unhandled error in log-view-find-revision

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 33295 <at> debbugs.gnu.org.

-- 
33295: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33295
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juri Linkov <juri <at> linkov.net>
To: 33295-done <at> debbugs.gnu.org
Subject: Re: bug#33295: Unhandled error in log-view-find-revision
Date: Thu, 08 Nov 2018 00:42:42 +0200
Version: 27.1

> vc-find-backend-function: Cannot open load file: No such file or directory, vc-nil
>
> and with non-nil ‘debug-on-error’ shows a backtrace that refers to ‘require(vc-nil)’.
>
> This is because the value of ‘log-view-vc-fileset’ in that *vc-change-log* buffer
> is a directory.
>
> This patch changes it to display a nicer error:

Fixed.

[Message part 3 (message/rfc822, inline)]
From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Unhandled error in log-view-find-revision
Date: Tue, 06 Nov 2018 23:27:22 +0200
0. emacs -Q

1. in the root of a vc-controlled directory:

 C-x v L   ;; vc-print-root-log

2. on any revision

 f         ;; log-view-find-revision

fails with an error:
vc-find-backend-function: Cannot open load file: No such file or directory, vc-nil

and with non-nil ‘debug-on-error’ shows a backtrace that refers to ‘require(vc-nil)’.

This is because the value of ‘log-view-vc-fileset’ in that *vc-change-log* buffer
is a directory.

This patch changes it to display a nicer error:

diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el
index 6ff50dcde5..bfb31ccdab 100644
--- a/lisp/vc/log-view.el
+++ b/lisp/vc/log-view.el
@@ -517,8 +517,10 @@ log-view-find-revision
 If called interactively, visit the version at point."
   (interactive "d")
   (unless log-view-per-file-logs
-    (when (> (length log-view-vc-fileset) 1)
-      (error "Multiple files shown in this buffer, cannot use this command here")))
+    (when (or (> (length log-view-vc-fileset) 1)
+              (null (car log-view-vc-fileset))
+              (file-directory-p (car log-view-vc-fileset)))
+      (user-error "Multiple files shown in this buffer, cannot use this command here")))
   (save-excursion
     (goto-char pos)
     (switch-to-buffer (vc-find-revision (if log-view-per-file-logs
@@ -561,8 +563,10 @@ log-view-annotate-version
 If called interactively, annotate the version at point."
   (interactive "d")
   (unless log-view-per-file-logs
-    (when (> (length log-view-vc-fileset) 1)
-      (error "Multiple files shown in this buffer, cannot use this command here")))
+    (when (or (> (length log-view-vc-fileset) 1)
+              (null (car log-view-vc-fileset))
+              (file-directory-p (car log-view-vc-fileset)))
+      (user-error "Multiple files shown in this buffer, cannot use this command here")))
   (save-excursion
     (goto-char pos)
     (vc-annotate (if log-view-per-file-logs



This bug report was last modified 6 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.