*** 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
+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
(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."
"--")
(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)
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."
(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."
;;
;; 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 ()
;;
: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."
;; 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)))
(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)
(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)