Subject: bug#34532: closed (Re: bug#34532: Unhandled errors in vc)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 19 Mar 2019 21:54:02 +0000

Your bug report

#34532: Unhandled errors in vc

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 [email-masked].

-- 
34532: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34532
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#34532: Unhandled errors in vc
From: Juri Linkov <[email-masked]>
To: [email-masked]
Date: Tue, 19 Mar 2019 23:52:47 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> This is now fixed.
>
> Another problem is that ‘vc-root-version-diff’ can't be used when
> fileset is not available.  But this command doesn't use fileset,
> it uses the root directory, so this patch adds an optional
> arg ‘fileset’ to ‘vc-diff-build-argument-list-internal’,
> so ‘vc-root-version-diff’ can provide its own fake fileset
> with the root directory:

Fixed as well.

Subject: Unhandled errors in vc
From: Juri Linkov <[email-masked]>
To: [email-masked]
Date: Mon, 18 Feb 2019 23:37:44 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

After ‘C-x v g’ (vc-annotate) typing ‘a’ (vc-annotate-revision-previous-to-line)
in the *Annotate* buffer on the earliest (initial) revision fails with:

  Debugger entered--Lisp error: (error "Invalid argument to vc-annotate-warp-revision")
    signal(error ("Invalid argument to vc-annotate-warp-revision"))
    error("Invalid argument to vc-annotate-warp-revision")
    vc-annotate-warp-revision(nil "...")

This patch provides a nicer message:

diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index 86fc8686c3..84838135fc 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -541,7 +541,9 @@ vc-annotate-revision-previous-to-line
 	(setq prev-rev
 	      (vc-call-backend vc-annotate-backend 'previous-revision
                                fname rev))
-	(vc-annotate-warp-revision prev-rev fname)))))
+	(if (not prev-rev)
+            (message "No previous revisions")
+          (vc-annotate-warp-revision prev-rev fname))))))
 
 (defvar log-view-vc-backend)
 (defvar log-view-vc-fileset)