Subject: Re: bug#4972: 23.1.50; Can't view revision log from Hg annotate buffer

From: Dan Nicolaescu <[email-masked]>
Date: Thu, 19 Nov 2009 10:43:57 -0800 (PST)

Magnus Henoch <[email-masked]> writes:

  > Please write in English if possible, because the Emacs maintainers
  > usually do not have translators to read other languages for them.
  > 
  > Your bug report will be posted to the [email-masked] mailing list.
  > 
  > Please describe exactly what actions triggered the bug
  > and the precise symptoms of the bug.  If you can, give
  > a recipe starting from `emacs -Q':
  > 
  > When I open a file managed by Mercurial, hit C-x v g to annotate it, and
  > hit `l' to view the log message of the revision of the current line, I
  > get this:
  > 
  > Debugger entered--Lisp error: (wrong-number-of-arguments #[(backend files working-revision limit) "*byte code removed*" [pl-return vc-short-log dir-present files file --cl-dolist-temp-- nil file-directory-p t directory vc-call-backend print-log "*vc-change-log*" pop-to-buffer vc-exec-after let (inhibit-read-only t) quote ((quote log-view-mode)) set (make-local-variable (quote log-view-vc-backend)) (make-local-variable (quote log-view-vc-fileset)) when and ((not (eq (quote limit-unsupported) pl-return))) (goto-char (point-max)) widget-create (quote push-button) :notify lambda (&rest ignore) vc-print-log-internal * 2 (:help-echo "Show the log again, and double the number of log entries shown" "Show 2X entries") (widget-insert "    ") (quote push-button) (&rest ignore) (nil) (:help-echo "Show the log again, showing all entries" "Show unlimited entries") ((widget-setup)) (shrink-window-if-larger-than-buffer) (quote show-log-entry) ((setq vc-sentinel-movepoint (point)) (set-buffer-modified-p nil)) vc-log-short-style backend limit working-revision] 21] 3)
  >   vc-print-log-internal(Hg ("/home/magnus/foo.erl") "23")
  >   (if (not rev-at-line) (message "Cannot extract revision number from the current line") (vc-print-log-internal vc-annotate-backend (list ...) (car rev-at-line)))
  >   (let ((rev-at-line ...)) (if (not rev-at-line) (message "Cannot extract revision number from the current line") (vc-print-log-internal vc-annotate-backend ... ...)))
  >   (if (not (equal major-mode ...)) (message "Cannot be invoked outside of a vc annotate buffer") (let (...) (if ... ... ...)))
  >   vc-annotate-show-log-revision-at-line()
  >   call-interactively(vc-annotate-show-log-revision-at-line nil nil)

This should fix it.

--- vc-annotate.el.~1.10.~                                     Thu Nov 19 07:37:30 2009
+++ vc-annotate.el                                             Thu Nov 19 10:42:54 2009
@@ -487,7 +487,7 @@ Return a cons (REV . FILENAME)."
       (if (not rev-at-line)
         (message "Cannot extract revision number from the current line")
         (vc-print-log-internal
-         vc-annotate-backend (list (cdr rev-at-line)) (car rev-at-line))))))
+          vc-annotate-backend (list (cdr rev-at-line)) (car rev-at-line) nil)))))
 
 (defun vc-annotate-show-diff-revision-at-line-internal (filediff)
   (if (not (equal major-mode 'vc-annotate-mode))