Mercurial > emacs
changeset 106060:2f9ecf376c7a
* vc.el (vc-log-show-limit): Default to 2000.
(vc-print-log-internal): Insert buttons to request more entries
when limiting the output.
* vc-sccs.el (vc-sccs-print-log):
* vc-rcs.el (vc-rcs-print-log):
* vc-cvs.el (vc-cvs-print-log):
* vc-git.el (vc-git-print-log): Return 'limit-unsupported when
LIMIT is non-nil.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Mon, 16 Nov 2009 20:36:06 +0000 |
parents | 996d28557095 |
children | 014672c3a25f |
files | etc/NEWS lisp/ChangeLog lisp/vc-cvs.el lisp/vc-git.el lisp/vc-rcs.el lisp/vc-sccs.el lisp/vc.el |
diffstat | 7 files changed, 53 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/etc/NEWS Mon Nov 16 20:10:39 2009 +0000 +++ b/etc/NEWS Mon Nov 16 20:36:06 2009 +0000 @@ -201,6 +201,13 @@ *** FIXME: add info about the new VC functions: vc-root-diff and vc-root-print-log once they stabilize. +*** The log functions (C-x v l and C-x v L) do not show the full log +by default anymore. The number of entries shown can be chosen +interactively with a prefix argument, by customizing +vc-log-show-limit. The log buffer display buttons that can be used +to change the number of entries shown. +RCS, SCCS, CVS and Git do not support this feature. + *** vc-annotate supports annotations through file copies and renames, it displays the old names for the files and it can show logs/diffs for the corresponding lines. Currently only Git and Mercurial take
--- a/lisp/ChangeLog Mon Nov 16 20:10:39 2009 +0000 +++ b/lisp/ChangeLog Mon Nov 16 20:36:06 2009 +0000 @@ -1,3 +1,15 @@ +2009-11-16 Dan Nicolaescu <dann@ics.uci.edu> + + * vc.el (vc-log-show-limit): Default to 2000. + (vc-print-log-internal): Insert buttons to request more entries + when limiting the output. + + * vc-sccs.el (vc-sccs-print-log): + * vc-rcs.el (vc-rcs-print-log): + * vc-cvs.el (vc-cvs-print-log): + * vc-git.el (vc-git-print-log): Return 'limit-unsupported when + LIMIT is non-nil. + 2009-11-16 Michael Albinus <michael.albinus@gmx.de> * net/tramp-gvfs.el (tramp-gvfs-dbus-event-error): Raise only an
--- a/lisp/vc-cvs.el Mon Nov 16 20:10:39 2009 +0000 +++ b/lisp/vc-cvs.el Mon Nov 16 20:36:06 2009 +0000 @@ -505,7 +505,8 @@ (if (vc-stay-local-p files 'CVS) 'async 0) files "log") (with-current-buffer buffer - (vc-exec-after (vc-rcs-print-log-cleanup)))) + (vc-exec-after (vc-rcs-print-log-cleanup))) + (when limit 'limit-unsupported)) (defun vc-cvs-comment-history (file) "Get comment history of a file."
--- a/lisp/vc-git.el Mon Nov 16 20:10:39 2009 +0000 +++ b/lisp/vc-git.el Mon Nov 16 20:36:06 2009 +0000 @@ -526,7 +526,8 @@ "--") (vc-git-command buffer 'async files "rev-list" ;; "--graph" - "--pretty" "HEAD" "--")))))) + "--pretty" "HEAD" "--"))) + (when limit 'limit-unsupported)))) (defvar log-view-message-re) (defvar log-view-file-re)
--- a/lisp/vc-rcs.el Mon Nov 16 20:10:39 2009 +0000 +++ b/lisp/vc-rcs.el Mon Nov 16 20:36:06 2009 +0000 @@ -564,7 +564,8 @@ directory the operation is applied to all registered files beneath it." (vc-do-command (or buffer "*vc*") 0 "rlog" (mapcar 'vc-name (vc-expand-dirs files))) (with-current-buffer (or buffer "*vc*") - (vc-rcs-print-log-cleanup))) + (vc-rcs-print-log-cleanup)) + (when limit 'limit-unsupported)) (defun vc-rcs-diff (files &optional oldvers newvers buffer) "Get a difference report using RCS between two sets of files."
--- a/lisp/vc-sccs.el Mon Nov 16 20:10:39 2009 +0000 +++ b/lisp/vc-sccs.el Mon Nov 16 20:36:06 2009 +0000 @@ -338,7 +338,8 @@ (defun vc-sccs-print-log (files buffer &optional shortlog limit) "Get change log associated with FILES." (setq files (vc-expand-dirs files)) - (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files))) + (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files)) + (when limit 'limit-unsupported)) (defun vc-sccs-diff (files &optional oldvers newvers buffer) "Get a difference report using SCCS between two filesets."
--- a/lisp/vc.el Mon Nov 16 20:10:39 2009 +0000 +++ b/lisp/vc.el Mon Nov 16 20:36:06 2009 +0000 @@ -337,7 +337,9 @@ ;; ;; 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 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'. ;; ;; - log-view-mode () ;; @@ -694,7 +696,7 @@ :type '(choice (const :tag "Work out" nil) (const yes) (const no)) :group 'vc) -(defcustom vc-log-show-limit 0 +(defcustom vc-log-show-limit 2000 "Limit the number of items shown by the VC log commands. Zero means unlimited. Not all VC backends are able to support this feature." @@ -1850,7 +1852,8 @@ ;; so that any buffer-local settings in the vc-controlled ;; buffer can be accessed by the command. (let ((dir-present nil) - (vc-short-log nil)) + (vc-short-log nil) + pl-return) (dolist (file files) (when (file-directory-p file) (setq dir-present t))) @@ -1858,7 +1861,9 @@ (not (null (if dir-present (memq 'directory vc-log-short-style) (memq 'file vc-log-short-style))))) - (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 limit)) (pop-to-buffer "*vc-change-log*") (vc-exec-after `(let ((inhibit-read-only t) @@ -1867,6 +1872,23 @@ (set (make-local-variable 'log-view-vc-backend) ',backend) (set (make-local-variable 'log-view-vc-fileset) ',files) + (when (and ,limit (not (eq 'limit-unsupported pl-return))) + (goto-char (point-max)) + (widget-create 'push-button + :notify (lambda (&rest ignore) + (vc-print-log-internal + ',backend ',files ',working-revision (* 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)) + :help-echo "Show the log again, showing all entries" + "Show unlimited entries") + (widget-setup)) + (shrink-window-if-larger-than-buffer) ;; move point to the log entry for the working revision (vc-call-backend ',backend 'show-log-entry ',working-revision)