Function: vc-print-log

vc-print-log is an autoloaded, interactive and byte-compiled function defined in vc.el.gz.

Signature

(vc-print-log &optional WORKING-REVISION LIMIT)

Documentation

Show in another window the VC change history of the current fileset.

If WORKING-REVISION is non-nil, it should be a revision ID; position point in the change history buffer at that revision. If LIMIT is non-nil, it should be a number specifying the maximum number of revisions to show; the default for interactive calls is vc-log-show-limit.

When called interactively with a prefix argument, prompt for WORKING-REVISION and LIMIT.

This shows a short log (one line for each commit) if the current fileset includes directories and the VC backend supports that; otherwise it shows the detailed log of each commit, which includes the full log message and the author. Additional control of the shown log style is available via vc-log-short-style.

View in manual

Probably introduced at or before Emacs version 20.3.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
;;;###autoload
(defun vc-print-log (&optional working-revision limit)
  "Show in another window the VC change history of the current fileset.
If WORKING-REVISION is non-nil, it should be a revision ID; position
point in the change history buffer at that revision.
If LIMIT is non-nil, it should be a number specifying the maximum
number of revisions to show; the default for interactive calls is
`vc-log-show-limit'.

When called interactively with a prefix argument, prompt for
WORKING-REVISION and LIMIT.

This shows a short log (one line for each commit) if the current
fileset includes directories and the VC backend supports that;
otherwise it shows the detailed log of each commit, which includes
the full log message and the author.  Additional control of the
shown log style is available via `vc-log-short-style'."
  (interactive
   (cond
    (current-prefix-arg
     (let ((rev (read-from-minibuffer (format-prompt "Leave point at revision"
                                                     "last revision")))
	   (lim (vc--read-limit)))
       (list (and (not (string-empty-p rev)) rev) (and (plusp lim) lim))))
    (t
     (list nil (and (plusp vc-log-show-limit) vc-log-show-limit)))))
  (let ((fileset (vc-deduce-fileset t))
	(working-revision (or working-revision vc-buffer-revision)))
    (vc-print-log-internal (car fileset) (cadr fileset)
                           working-revision nil limit)))