diff options
| author | Dan Nicolaescu | 2009-11-15 20:28:58 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2009-11-15 20:28:58 +0000 |
| commit | 6616006b025a584a907e70dfffe54f65fc89e058 (patch) | |
| tree | d1c2d9a0919cd070081cd22b2ce3ddb7d4419297 | |
| parent | f8e65267070633b270e2edf46bd9b521168e5358 (diff) | |
| download | emacs-6616006b025a584a907e70dfffe54f65fc89e058.tar.gz emacs-6616006b025a584a907e70dfffe54f65fc89e058.zip | |
* vc.el (vc-log-show-limit): New variable.
(vc-print-log, vc-print-root-log): Add new argument LIMIT. Set it
when using a prefix argument.
(vc-print-log-internal): Add new argument LIMIT.
* vc-svn.el (vc-svn-print-log):
* vc-mtn.el (vc-mtn-print-log):
* vc-hg.el (vc-hg-print-log):
* vc-bzr.el (vc-bzr-print-log): Add new optional argument LIMIT,
pass it to the log command when set. Make the BUFFER argument
non-optional.
* vc-sccs.el (vc-sccs-print-log):
* vc-rcs.el (vc-rcs-print-log):
* vc-git.el (vc-git-print-log):
* vc-cvs.el (vc-cvs-print-log): Add new optional argument LIMIT,
ignore it. Make the BUFFER argument non-optional
| -rw-r--r-- | lisp/ChangeLog | 18 | ||||
| -rw-r--r-- | lisp/vc-bzr.el | 5 | ||||
| -rw-r--r-- | lisp/vc-cvs.el | 2 | ||||
| -rw-r--r-- | lisp/vc-git.el | 4 | ||||
| -rw-r--r-- | lisp/vc-hg.el | 15 | ||||
| -rw-r--r-- | lisp/vc-mtn.el | 5 | ||||
| -rw-r--r-- | lisp/vc-rcs.el | 2 | ||||
| -rw-r--r-- | lisp/vc-sccs.el | 2 | ||||
| -rw-r--r-- | lisp/vc-svn.el | 11 | ||||
| -rw-r--r-- | lisp/vc.el | 55 |
10 files changed, 85 insertions, 34 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c0860179da1..876e48db9fd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,23 @@ | |||
| 1 | 2009-11-15 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2009-11-15 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | * vc.el (vc-log-show-limit): New variable. | ||
| 4 | (vc-print-log, vc-print-root-log): Add new argument LIMIT. Set it | ||
| 5 | when using a prefix argument. | ||
| 6 | (vc-print-log-internal): Add new argument LIMIT. | ||
| 7 | |||
| 8 | * vc-svn.el (vc-svn-print-log): | ||
| 9 | * vc-mtn.el (vc-mtn-print-log): | ||
| 10 | * vc-hg.el (vc-hg-print-log): | ||
| 11 | * vc-bzr.el (vc-bzr-print-log): Add new optional argument LIMIT, | ||
| 12 | pass it to the log command when set. Make the BUFFER argument | ||
| 13 | non-optional. | ||
| 14 | |||
| 15 | * vc-sccs.el (vc-sccs-print-log): | ||
| 16 | * vc-rcs.el (vc-rcs-print-log): | ||
| 17 | * vc-git.el (vc-git-print-log): | ||
| 18 | * vc-cvs.el (vc-cvs-print-log): Add new optional argument LIMIT, | ||
| 19 | ignore it. Make the BUFFER argument non-optional | ||
| 20 | |||
| 3 | * bindings.el (mode-line-buffer-identification): Do not purecopy. | 21 | * bindings.el (mode-line-buffer-identification): Do not purecopy. |
| 4 | 22 | ||
| 5 | 2009-11-15 Chong Yidong <cyd@stupidchicken.com> | 23 | 2009-11-15 Chong Yidong <cyd@stupidchicken.com> |
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index c5d951a48f4..a40aad73597 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el | |||
| @@ -481,7 +481,7 @@ REV non-nil gets an error." | |||
| 481 | (2 'change-log-email)) | 481 | (2 'change-log-email)) |
| 482 | ("^ *timestamp: \\(.*\\)" (1 'change-log-date-face))))))) | 482 | ("^ *timestamp: \\(.*\\)" (1 'change-log-date-face))))))) |
| 483 | 483 | ||
| 484 | (defun vc-bzr-print-log (files &optional buffer shortlog) ; get buffer arg in Emacs 22 | 484 | (defun vc-bzr-print-log (files buffer &optional shortlog limit) |
| 485 | "Get bzr change log for FILES into specified BUFFER." | 485 | "Get bzr change log for FILES into specified BUFFER." |
| 486 | ;; `vc-do-command' creates the buffer, but we need it before running | 486 | ;; `vc-do-command' creates the buffer, but we need it before running |
| 487 | ;; the command. | 487 | ;; the command. |
| @@ -493,7 +493,8 @@ REV non-nil gets an error." | |||
| 493 | ;; way of getting the above regexps working. | 493 | ;; way of getting the above regexps working. |
| 494 | (with-current-buffer buffer | 494 | (with-current-buffer buffer |
| 495 | (apply 'vc-bzr-command "log" buffer 'async files | 495 | (apply 'vc-bzr-command "log" buffer 'async files |
| 496 | (if shortlog "--short") | 496 | (when shortlog "--short") |
| 497 | (when limit (list "-l" (format "%s" limit))) | ||
| 497 | (if (stringp vc-bzr-log-switches) | 498 | (if (stringp vc-bzr-log-switches) |
| 498 | (list vc-bzr-log-switches) | 499 | (list vc-bzr-log-switches) |
| 499 | vc-bzr-log-switches)))) | 500 | vc-bzr-log-switches)))) |
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index 1cc971a58af..887804689d4 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el | |||
| @@ -496,7 +496,7 @@ Will fail unless you have administrative privileges on the repo." | |||
| 496 | 496 | ||
| 497 | (declare-function vc-rcs-print-log-cleanup "vc-rcs" ()) | 497 | (declare-function vc-rcs-print-log-cleanup "vc-rcs" ()) |
| 498 | 498 | ||
| 499 | (defun vc-cvs-print-log (files &optional buffer shortlog) | 499 | (defun vc-cvs-print-log (files buffer &optional shortlog limit) |
| 500 | "Get change logs associated with FILES." | 500 | "Get change logs associated with FILES." |
| 501 | (require 'vc-rcs) | 501 | (require 'vc-rcs) |
| 502 | ;; It's just the catenation of the individual logs. | 502 | ;; It's just the catenation of the individual logs. |
diff --git a/lisp/vc-git.el b/lisp/vc-git.el index 9f01a84cc81..c2900dd0b1c 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el | |||
| @@ -77,7 +77,7 @@ | |||
| 77 | ;; - merge-news (file) see `merge' | 77 | ;; - merge-news (file) see `merge' |
| 78 | ;; - steal-lock (file &optional revision) NOT NEEDED | 78 | ;; - steal-lock (file &optional revision) NOT NEEDED |
| 79 | ;; HISTORY FUNCTIONS | 79 | ;; HISTORY FUNCTIONS |
| 80 | ;; * print-log (files &optional buffer shortlog) OK | 80 | ;; * print-log (files buffer &optional shortlog limit) OK |
| 81 | ;; - log-view-mode () OK | 81 | ;; - log-view-mode () OK |
| 82 | ;; - show-log-entry (revision) OK | 82 | ;; - show-log-entry (revision) OK |
| 83 | ;; - comment-history (file) ?? | 83 | ;; - comment-history (file) ?? |
| @@ -508,7 +508,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." | |||
| 508 | 508 | ||
| 509 | ;;; HISTORY FUNCTIONS | 509 | ;;; HISTORY FUNCTIONS |
| 510 | 510 | ||
| 511 | (defun vc-git-print-log (files &optional buffer shortlog) | 511 | (defun vc-git-print-log (files buffer &optional shortlog limit) |
| 512 | "Get change log associated with FILES." | 512 | "Get change log associated with FILES." |
| 513 | (let ((coding-system-for-read git-commits-coding-system)) | 513 | (let ((coding-system-for-read git-commits-coding-system)) |
| 514 | ;; `vc-do-command' creates the buffer, but we need it before running | 514 | ;; `vc-do-command' creates the buffer, but we need it before running |
diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index b5c55d783f6..42bdd4185e3 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el | |||
| @@ -68,7 +68,7 @@ | |||
| 68 | ;; - merge-news (file) NEEDED | 68 | ;; - merge-news (file) NEEDED |
| 69 | ;; - steal-lock (file &optional revision) NOT NEEDED | 69 | ;; - steal-lock (file &optional revision) NOT NEEDED |
| 70 | ;; HISTORY FUNCTIONS | 70 | ;; HISTORY FUNCTIONS |
| 71 | ;; * print-log (files &optional buffer shortlog)OK | 71 | ;; * print-log (files buffer &optional shortlog) OK |
| 72 | ;; - log-view-mode () OK | 72 | ;; - log-view-mode () OK |
| 73 | ;; - show-log-entry (revision) NOT NEEDED, DEFAULT IS GOOD | 73 | ;; - show-log-entry (revision) NOT NEEDED, DEFAULT IS GOOD |
| 74 | ;; - comment-history (file) NOT NEEDED | 74 | ;; - comment-history (file) NOT NEEDED |
| @@ -219,12 +219,8 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." | |||
| 219 | (repeat :tag "Argument List" :value ("") string)) | 219 | (repeat :tag "Argument List" :value ("") string)) |
| 220 | :group 'vc-hg) | 220 | :group 'vc-hg) |
| 221 | 221 | ||
| 222 | (defun vc-hg-print-log (files &optional buffer shortlog) | 222 | (defun vc-hg-print-log (files buffer &optional shortlog limit) |
| 223 | "Get change log associated with FILES." | 223 | "Get change log associated with FILES." |
| 224 | ;; `log-view-mode' needs to have the file names in order to function | ||
| 225 | ;; correctly. "hg log" does not print it, so we insert it here by | ||
| 226 | ;; hand. | ||
| 227 | |||
| 228 | ;; `vc-do-command' creates the buffer, but we need it before running | 224 | ;; `vc-do-command' creates the buffer, but we need it before running |
| 229 | ;; the command. | 225 | ;; the command. |
| 230 | (vc-setup-buffer buffer) | 226 | (vc-setup-buffer buffer) |
| @@ -234,9 +230,10 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." | |||
| 234 | (with-current-buffer | 230 | (with-current-buffer |
| 235 | buffer | 231 | buffer |
| 236 | (apply 'vc-hg-command buffer 0 files "log" | 232 | (apply 'vc-hg-command buffer 0 files "log" |
| 237 | (if shortlog | 233 | (append |
| 238 | (append '("--style" "compact") vc-hg-log-switches) | 234 | (when limit (list "-l" (format "%s" limit))) |
| 239 | vc-hg-log-switches))))) | 235 | (when shortlog '("--style" "compact")) |
| 236 | vc-hg-log-switches))))) | ||
| 240 | 237 | ||
| 241 | (defvar log-view-message-re) | 238 | (defvar log-view-message-re) |
| 242 | (defvar log-view-file-re) | 239 | (defvar log-view-file-re) |
diff --git a/lisp/vc-mtn.el b/lisp/vc-mtn.el index e03dfaad350..05be5c8ef11 100644 --- a/lisp/vc-mtn.el +++ b/lisp/vc-mtn.el | |||
| @@ -188,8 +188,9 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." | |||
| 188 | ;; (defun vc-mtn-roolback (files) | 188 | ;; (defun vc-mtn-roolback (files) |
| 189 | ;; ) | 189 | ;; ) |
| 190 | 190 | ||
| 191 | (defun vc-mtn-print-log (files &optional buffer shortlog) | 191 | (defun vc-mtn-print-log (files buffer &optional shortlog limit) |
| 192 | (vc-mtn-command buffer 0 files "log")) | 192 | (apply 'vc-mtn-command buffer 0 files "log" |
| 193 | (when limit (list "--last" (format "%s" limit))))) | ||
| 193 | 194 | ||
| 194 | (defvar log-view-message-re) | 195 | (defvar log-view-message-re) |
| 195 | (defvar log-view-file-re) | 196 | (defvar log-view-file-re) |
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index ddc27e4b36c..0fa40fac824 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el | |||
| @@ -559,7 +559,7 @@ directory the operation is applied to all registered files beneath it." | |||
| 559 | (when (looking-at "[\b\t\n\v\f\r ]+") | 559 | (when (looking-at "[\b\t\n\v\f\r ]+") |
| 560 | (delete-char (- (match-end 0) (match-beginning 0)))))) | 560 | (delete-char (- (match-end 0) (match-beginning 0)))))) |
| 561 | 561 | ||
| 562 | (defun vc-rcs-print-log (files &optional buffer shortlog) | 562 | (defun vc-rcs-print-log (files buffer &optional shortlog limit) |
| 563 | "Get change log associated with FILE. If FILE is a | 563 | "Get change log associated with FILE. If FILE is a |
| 564 | directory the operation is applied to all registered files beneath it." | 564 | directory the operation is applied to all registered files beneath it." |
| 565 | (vc-do-command (or buffer "*vc*") 0 "rlog" (mapcar 'vc-name (vc-expand-dirs files))) | 565 | (vc-do-command (or buffer "*vc*") 0 "rlog" (mapcar 'vc-name (vc-expand-dirs files))) |
diff --git a/lisp/vc-sccs.el b/lisp/vc-sccs.el index e805f621d28..4c72e3be0c0 100644 --- a/lisp/vc-sccs.el +++ b/lisp/vc-sccs.el | |||
| @@ -335,7 +335,7 @@ revert all subfiles." | |||
| 335 | ;;; History functions | 335 | ;;; History functions |
| 336 | ;;; | 336 | ;;; |
| 337 | 337 | ||
| 338 | (defun vc-sccs-print-log (files &optional buffer shortlog) | 338 | (defun vc-sccs-print-log (files buffer &optional shortlog limit) |
| 339 | "Get change log associated with FILES." | 339 | "Get change log associated with FILES." |
| 340 | (setq files (vc-expand-dirs files)) | 340 | (setq files (vc-expand-dirs files)) |
| 341 | (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files))) | 341 | (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files))) |
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index ff3eef245f1..23c23e180ba 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el | |||
| @@ -462,7 +462,7 @@ or svn+ssh://." | |||
| 462 | (require 'add-log) | 462 | (require 'add-log) |
| 463 | (set (make-local-variable 'log-view-per-file-logs) nil)) | 463 | (set (make-local-variable 'log-view-per-file-logs) nil)) |
| 464 | 464 | ||
| 465 | (defun vc-svn-print-log (files &optional buffer shortlog) | 465 | (defun vc-svn-print-log (files buffer &optional shortlog limit) |
| 466 | "Get change log(s) associated with FILES." | 466 | "Get change log(s) associated with FILES." |
| 467 | (save-current-buffer | 467 | (save-current-buffer |
| 468 | (vc-setup-buffer buffer) | 468 | (vc-setup-buffer buffer) |
| @@ -471,7 +471,8 @@ or svn+ssh://." | |||
| 471 | (if files | 471 | (if files |
| 472 | (dolist (file files) | 472 | (dolist (file files) |
| 473 | (insert "Working file: " file "\n") | 473 | (insert "Working file: " file "\n") |
| 474 | (vc-svn-command | 474 | (apply |
| 475 | 'vc-svn-command | ||
| 475 | buffer | 476 | buffer |
| 476 | 'async | 477 | 'async |
| 477 | ;; (if (and (= (length files) 1) (vc-stay-local-p file 'SVN)) 'async 0) | 478 | ;; (if (and (= (length files) 1) (vc-stay-local-p file 'SVN)) 'async 0) |
| @@ -481,9 +482,11 @@ or svn+ssh://." | |||
| 481 | ;; working revision, whereas we also want the log of the | 482 | ;; working revision, whereas we also want the log of the |
| 482 | ;; subsequent commits. At least that's what the | 483 | ;; subsequent commits. At least that's what the |
| 483 | ;; vc-cvs.el code does. | 484 | ;; vc-cvs.el code does. |
| 484 | "-rHEAD:0")) | 485 | "-rHEAD:0" |
| 486 | (when limit (list "-l" (format "%s" limit))))) | ||
| 485 | ;; Dump log for the entire directory. | 487 | ;; Dump log for the entire directory. |
| 486 | (vc-svn-command buffer 0 nil "log" "-rHEAD:0"))))) | 488 | (apply vc-svn-command buffer 0 nil "log" "-rHEAD:0" |
| 489 | (when limit (list "-l" (format "%s" limit)))))))) | ||
| 487 | 490 | ||
| 488 | (defun vc-svn-diff (files &optional oldvers newvers buffer) | 491 | (defun vc-svn-diff (files &optional oldvers newvers buffer) |
| 489 | "Get a difference report using SVN between two revisions of fileset FILES." | 492 | "Get a difference report using SVN between two revisions of fileset FILES." |
diff --git a/lisp/vc.el b/lisp/vc.el index 19033c214d8..9c38d98a15a 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -333,12 +333,11 @@ | |||
| 333 | ;; | 333 | ;; |
| 334 | ;; HISTORY FUNCTIONS | 334 | ;; HISTORY FUNCTIONS |
| 335 | ;; | 335 | ;; |
| 336 | ;; * print-log (files &optional buffer shortlog) | 336 | ;; * print-log (files buffer &optional shortlog limit) |
| 337 | ;; | 337 | ;; |
| 338 | ;; Insert the revision log for FILES into BUFFER, or the *vc* buffer | 338 | ;; Insert the revision log for FILES into BUFFER. |
| 339 | ;; if BUFFER is nil. (Note: older versions of this function expected | ||
| 340 | ;; only a single file argument.) | ||
| 341 | ;; If SHORTLOG is true insert a short version of the log. | 339 | ;; If SHORTLOG is true insert a short version of the log. |
| 340 | ;; If LIMIT is true insert only insert LIMIT log entries. | ||
| 342 | ;; | 341 | ;; |
| 343 | ;; - log-view-mode () | 342 | ;; - log-view-mode () |
| 344 | ;; | 343 | ;; |
| @@ -695,6 +694,13 @@ to use -L and sets this variable to remember whether it worked." | |||
| 695 | :type '(choice (const :tag "Work out" nil) (const yes) (const no)) | 694 | :type '(choice (const :tag "Work out" nil) (const yes) (const no)) |
| 696 | :group 'vc) | 695 | :group 'vc) |
| 697 | 696 | ||
| 697 | (defcustom vc-log-show-limit 0 | ||
| 698 | "Limit the number of items shown by the VC log commands. | ||
| 699 | Zero means unlimited. | ||
| 700 | Not all VC backends are able to support this feature." | ||
| 701 | :type 'integer | ||
| 702 | :group 'vc) | ||
| 703 | |||
| 698 | (defcustom vc-allow-async-revert nil | 704 | (defcustom vc-allow-async-revert nil |
| 699 | "Specifies whether the diff during \\[vc-revert] may be asynchronous. | 705 | "Specifies whether the diff during \\[vc-revert] may be asynchronous. |
| 700 | Enabling this option means that you can confirm a revert operation even | 706 | Enabling this option means that you can confirm a revert operation even |
| @@ -1839,7 +1845,7 @@ If it contains `directory' then if the fileset contains a directory show a short | |||
| 1839 | If it contains `file' then show short logs for files. | 1845 | If it contains `file' then show short logs for files. |
| 1840 | Not all VC backends support short logs!") | 1846 | Not all VC backends support short logs!") |
| 1841 | 1847 | ||
| 1842 | (defun vc-print-log-internal (backend files working-revision) | 1848 | (defun vc-print-log-internal (backend files working-revision limit) |
| 1843 | ;; Don't switch to the output buffer before running the command, | 1849 | ;; Don't switch to the output buffer before running the command, |
| 1844 | ;; so that any buffer-local settings in the vc-controlled | 1850 | ;; so that any buffer-local settings in the vc-controlled |
| 1845 | ;; buffer can be accessed by the command. | 1851 | ;; buffer can be accessed by the command. |
| @@ -1852,7 +1858,7 @@ Not all VC backends support short logs!") | |||
| 1852 | (not (null (if dir-present | 1858 | (not (null (if dir-present |
| 1853 | (memq 'directory vc-log-short-style) | 1859 | (memq 'directory vc-log-short-style) |
| 1854 | (memq 'file vc-log-short-style))))) | 1860 | (memq 'file vc-log-short-style))))) |
| 1855 | (vc-call-backend backend 'print-log files "*vc-change-log*" vc-short-log) | 1861 | (vc-call-backend backend 'print-log files "*vc-change-log*" vc-short-log limit) |
| 1856 | (pop-to-buffer "*vc-change-log*") | 1862 | (pop-to-buffer "*vc-change-log*") |
| 1857 | (vc-exec-after | 1863 | (vc-exec-after |
| 1858 | `(let ((inhibit-read-only t) | 1864 | `(let ((inhibit-read-only t) |
| @@ -1868,20 +1874,45 @@ Not all VC backends support short logs!") | |||
| 1868 | (set-buffer-modified-p nil))))) | 1874 | (set-buffer-modified-p nil))))) |
| 1869 | 1875 | ||
| 1870 | ;;;###autoload | 1876 | ;;;###autoload |
| 1871 | (defun vc-print-log (&optional working-revision) | 1877 | (defun vc-print-log (&optional working-revision limit) |
| 1872 | "List the change log of the current fileset in a window. | 1878 | "List the change log of the current fileset in a window. |
| 1873 | If WORKING-REVISION is non-nil, leave the point at that revision." | 1879 | If WORKING-REVISION is non-nil, leave the point at that revision." |
| 1874 | (interactive) | 1880 | (interactive |
| 1881 | (cond | ||
| 1882 | (current-prefix-arg | ||
| 1883 | (let ((rev (read-from-minibuffer "Log from revision (default: last revision): " nil | ||
| 1884 | nil nil nil)) | ||
| 1885 | (lim (string-to-number | ||
| 1886 | (read-from-minibuffer | ||
| 1887 | "Limit display (unlimited: 0): " | ||
| 1888 | (format "%s" vc-log-show-limit) | ||
| 1889 | nil nil nil)))) | ||
| 1890 | (when (string= rev "") (setq rev nil)) | ||
| 1891 | (when (<= lim 0) (setq lim nil)) | ||
| 1892 | (list rev lim))) | ||
| 1893 | (t | ||
| 1894 | (list nil nil)))) | ||
| 1875 | (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef | 1895 | (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef |
| 1876 | (backend (car vc-fileset)) | 1896 | (backend (car vc-fileset)) |
| 1877 | (files (cadr vc-fileset)) | 1897 | (files (cadr vc-fileset)) |
| 1878 | (working-revision (or working-revision (vc-working-revision (car files))))) | 1898 | (working-revision (or working-revision (vc-working-revision (car files))))) |
| 1879 | (vc-print-log-internal backend files working-revision))) | 1899 | (vc-print-log-internal backend files working-revision limit))) |
| 1880 | 1900 | ||
| 1881 | ;;;###autoload | 1901 | ;;;###autoload |
| 1882 | (defun vc-print-root-log () | 1902 | (defun vc-print-root-log (&optional limit) |
| 1883 | "List the change log of for the current VC controlled tree in a window." | 1903 | "List the change log of for the current VC controlled tree in a window." |
| 1884 | (interactive) | 1904 | (interactive |
| 1905 | (cond | ||
| 1906 | (current-prefix-arg | ||
| 1907 | (let ((lim (string-to-number | ||
| 1908 | (read-from-minibuffer | ||
| 1909 | "Limit display (unlimited: 0): " | ||
| 1910 | (format "%s" vc-log-show-limit) | ||
| 1911 | nil nil nil)))) | ||
| 1912 | (when (<= lim 0) (setq lim nil)) | ||
| 1913 | (list lim))) | ||
| 1914 | (t | ||
| 1915 | (list nil)))) | ||
| 1885 | (let ((backend | 1916 | (let ((backend |
| 1886 | (cond ((derived-mode-p 'vc-dir-mode) vc-dir-backend) | 1917 | (cond ((derived-mode-p 'vc-dir-mode) vc-dir-backend) |
| 1887 | (vc-mode (vc-backend buffer-file-name)))) | 1918 | (vc-mode (vc-backend buffer-file-name)))) |
| @@ -1890,7 +1921,7 @@ If WORKING-REVISION is non-nil, leave the point at that revision." | |||
| 1890 | (error "Buffer is not version controlled")) | 1921 | (error "Buffer is not version controlled")) |
| 1891 | (setq rootdir (vc-call-backend backend 'root default-directory)) | 1922 | (setq rootdir (vc-call-backend backend 'root default-directory)) |
| 1892 | (setq working-revision (vc-working-revision rootdir)) | 1923 | (setq working-revision (vc-working-revision rootdir)) |
| 1893 | (vc-print-log-internal backend (list rootdir) working-revision))) | 1924 | (vc-print-log-internal backend (list rootdir) working-revision limit))) |
| 1894 | 1925 | ||
| 1895 | ;;;###autoload | 1926 | ;;;###autoload |
| 1896 | (defun vc-revert () | 1927 | (defun vc-revert () |