diff options
Diffstat (limited to 'lisp/vc.el')
-rw-r--r-- | lisp/vc.el | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index cd9f11bcf3a..9a71286d685 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -333,13 +333,16 @@ ;; ;; HISTORY FUNCTIONS ;; -;; * print-log (files buffer &optional shortlog limit) +;; * print-log (files buffer &optional shortlog start-revision limit) ;; ;; Insert the revision log for FILES into BUFFER. ;; If SHORTLOG is true insert a short version of the log. ;; If LIMIT is true insert only insert LIMIT log entries. If the ;; backend does not support limiting the number of entries to show ;; it should return `limit-unsupported'. +;; If START-REVISION is given, then show the log starting from the +;; revision. At this point START-REVISION is only required to work +;; in conjunction with LIMIT = 1. ;; ;; - log-view-mode () ;; @@ -1863,7 +1866,7 @@ Not all VC backends support short logs!") (defvar log-view-vc-fileset) (defun vc-print-log-internal (backend files working-revision - &optional limit) + &optional is-start-revision limit) ;; Don't switch to the output buffer before running the command, ;; so that any buffer-local settings in the vc-controlled ;; buffer can be accessed by the command. @@ -1878,8 +1881,9 @@ Not all VC backends support short logs!") (memq 'directory vc-log-short-style) (memq 'file vc-log-short-style))))) - (setq pl-return (vc-call-backend backend 'print-log files "*vc-change-log*" - vc-short-log limit)) + (setq pl-return (vc-call-backend + backend 'print-log files "*vc-change-log*" + vc-short-log (when is-start-revision working-revision) limit)) (pop-to-buffer "*vc-change-log*") (let ((inhibit-read-only t)) ;; log-view-mode used to be called with inhibit-read-only bound @@ -1890,19 +1894,20 @@ Not all VC backends support short logs!") (vc-exec-after `(let ((inhibit-read-only t)) - (when (and ,limit (not ,(eq 'limit-unsupported pl-return))) + (when (and ,limit (not ,(eq 'limit-unsupported pl-return)) + (not ,is-start-revision)) (goto-char (point-max)) (widget-create 'push-button :notify (lambda (&rest ignore) (vc-print-log-internal - ',backend ',files ',working-revision (* 2 ,limit))) + ',backend ',files ',working-revision nil (* 2 ,limit))) :help-echo "Show the log again, and double the number of log entries shown" "Show 2X entries") (widget-insert " ") (widget-create 'push-button :notify (lambda (&rest ignore) (vc-print-log-internal - ',backend ',files ',working-revision nil)) + ',backend ',files ',working-revision nil nil)) :help-echo "Show the log again, showing all entries" "Show unlimited entries") (widget-setup)) @@ -1936,7 +1941,7 @@ If WORKING-REVISION is non-nil, leave the point at that revision." (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 limit))) + (vc-print-log-internal backend files working-revision nil limit))) ;;;###autoload (defun vc-print-root-log (&optional limit) @@ -1962,7 +1967,7 @@ If WORKING-REVISION is non-nil, leave the point at that revision." (error "Buffer is not version controlled")) (setq rootdir (vc-call-backend backend 'root default-directory)) (setq working-revision (vc-working-revision rootdir)) - (vc-print-log-internal backend (list rootdir) working-revision limit))) + (vc-print-log-internal backend (list rootdir) working-revision nil limit))) ;;;###autoload (defun vc-revert () |