all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: 34532@debbugs.gnu.org
Subject: bug#34532: Unhandled errors in vc
Date: Mon, 18 Feb 2019 23:37:44 +0200	[thread overview]
Message-ID: <87mumssrpz.fsf@mail.linkov.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vc-annotate.el.patch --]
[-- Type: text/x-diff, Size: 576 bytes --]

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	other threads:[~2019-02-18 21:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18 21:37 Juri Linkov [this message]
2019-02-27 21:20 ` bug#34532: Unhandled errors in vc Juri Linkov
2019-03-19 21:52   ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mumssrpz.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=34532@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.