* 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.
This commit is contained in:
parent
d3e971853d
commit
48b2757534
7 changed files with 53 additions and 8 deletions
7
etc/NEWS
7
etc/NEWS
|
@ -201,6 +201,13 @@ file.
|
|||
*** 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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -505,7 +505,8 @@ Will fail unless you have administrative privileges on the repo."
|
|||
(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."
|
||||
|
|
|
@ -526,7 +526,8 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
|
|||
"--")
|
||||
(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)
|
||||
|
|
|
@ -564,7 +564,8 @@ directory the operation is applied to all registered files beneath it."
|
|||
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."
|
||||
|
|
|
@ -338,7 +338,8 @@ revert all subfiles."
|
|||
(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."
|
||||
|
|
30
lisp/vc.el
30
lisp/vc.el
|
@ -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 @@ to use -L and sets this variable to remember whether it worked."
|
|||
: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 @@ Not all VC backends support short logs!")
|
|||
;; 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 all VC backends support short logs!")
|
|||
(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 @@ Not all VC backends support short logs!")
|
|||
(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)
|
||||
|
|
Loading…
Add table
Reference in a new issue