From 4a16e6302d8971a2414543c9c04405df99271dfa Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 27 Feb 2019 23:18:10 +0200 Subject: [PATCH] * lisp/vc/vc-annotate.el: Better error handling (bug#34532) * lisp/vc/vc-annotate.el (vc-annotate-revision-previous-to-line): Print message when prev-rev is nil. --- lisp/vc/vc-annotate.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index 86fc8686c39..84838135fcc 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -541,7 +541,9 @@ Return a cons (REV . FILENAME)." (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) -- 2.39.2