bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34532: Unhandled errors in vc


From: Juri Linkov
Subject: bug#34532: Unhandled errors in vc
Date: Mon, 18 Feb 2019 23:37:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]