GNU bug report logs - #34532
Unhandled errors in vc

Previous Next

Package: emacs;

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

Date: Mon, 18 Feb 2019 21:42:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34532 in the body.
You can then email your comments to 34532 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34532; Package emacs. (Mon, 18 Feb 2019 21:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 18 Feb 2019 21:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Unhandled errors in vc
Date: Mon, 18 Feb 2019 23:37:44 +0200
[Message part 1 (text/plain, inline)]
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:

[vc-annotate.el.patch (text/x-diff, inline)]
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)

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34532; Package emacs. (Wed, 27 Feb 2019 21:22:01 GMT) Full text and rfc822 format available.

Message #8 received at 34532 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: 34532 <at> debbugs.gnu.org
Subject: Re: bug#34532: Unhandled errors in vc
Date: Wed, 27 Feb 2019 23:20:35 +0200
[Message part 1 (text/plain, inline)]
> 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 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:

[vc-diff-build-argument-list-internal.patch (text/x-diff, inline)]
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index aae21ec45a..0a638ec7d7 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1762,9 +1762,9 @@ vc-read-revision
                          nil nil initial-input 'vc-revision-history default)
       (read-string prompt initial-input nil default))))
 
-(defun vc-diff-build-argument-list-internal ()
+(defun vc-diff-build-argument-list-internal (&optional fileset)
   "Build argument list for calling internal diff functions."
-  (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: why t?  --Stef
+  (let* ((vc-fileset (or fileset (vc-deduce-fileset t))) ;FIXME: why t?  --Stef
          (files (cadr vc-fileset))
          (backend (car vc-fileset))
          (first (car files))
@@ -1815,7 +1815,11 @@ vc-version-diff
 ;;;###autoload
 (defun vc-root-version-diff (_files rev1 rev2)
   "Report diffs between REV1 and REV2 revisions of the whole tree."
-  (interactive (vc-diff-build-argument-list-internal))
+  (interactive
+   (vc-diff-build-argument-list-internal
+    (or (ignore-errors (vc-deduce-fileset t))
+        (let ((backend (or (vc-deduce-backend) (vc-responsible-backend default-directory))))
+          (list backend (list (vc-call-backend backend 'root default-directory)))))))
   ;; This is a mix of `vc-root-diff' and `vc-version-diff'
   (when (and (not rev1) rev2)
     (error "Not a valid revision range"))

Reply sent to Juri Linkov <juri <at> linkov.net>:
You have taken responsibility. (Tue, 19 Mar 2019 21:54:01 GMT) Full text and rfc822 format available.

Notification sent to Juri Linkov <juri <at> linkov.net>:
bug acknowledged by developer. (Tue, 19 Mar 2019 21:54:02 GMT) Full text and rfc822 format available.

Message #13 received at 34532-done <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: 34532-done <at> debbugs.gnu.org
Subject: Re: bug#34532: Unhandled errors in vc
Date: Tue, 19 Mar 2019 23:52:47 +0200
> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 17 Apr 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 10 days ago.

Previous Next


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