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 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 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 "Leave point at revision (default: last revision): " nil
				      nil nil nil))
	   (lim (string-to-number
		 (read-from-minibuffer
		  "Limit display (unlimited: 0): "
		  (format "%s" vc-log-show-limit)
		  nil nil nil))))
       (when (string= rev "") (setq rev nil))
       (when (<= lim 0) (setq lim nil))
       (list rev lim)))
    (t
     (list nil (when (> vc-log-show-limit 0) vc-log-show-limit)))))
  (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef
	 (backend (car vc-fileset))
	 (files (cadr vc-fileset))
;;	 (working-revision (or working-revision (vc-working-revision (car files))))
         )
    (vc-print-log-internal backend files working-revision nil limit)))