summaryrefslogtreecommitdiff
path: root/lisp/vc-hg.el
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2009-11-15 20:28:58 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2009-11-15 20:28:58 +0000
commit6616006b025a584a907e70dfffe54f65fc89e058 (patch)
treed1c2d9a0919cd070081cd22b2ce3ddb7d4419297 /lisp/vc-hg.el
parentf8e65267070633b270e2edf46bd9b521168e5358 (diff)
downloademacs-6616006b025a584a907e70dfffe54f65fc89e058.tar.gz
* 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
Diffstat (limited to 'lisp/vc-hg.el')
-rw-r--r--lisp/vc-hg.el15
1 files changed, 6 insertions, 9 deletions
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 @@
;; - merge-news (file) NEEDED
;; - steal-lock (file &optional revision) NOT NEEDED
;; HISTORY FUNCTIONS
-;; * print-log (files &optional buffer shortlog)OK
+;; * print-log (files buffer &optional shortlog) OK
;; - log-view-mode () OK
;; - show-log-entry (revision) NOT NEEDED, DEFAULT IS GOOD
;; - comment-history (file) NOT NEEDED
@@ -219,12 +219,8 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(repeat :tag "Argument List" :value ("") string))
:group 'vc-hg)
-(defun vc-hg-print-log (files &optional buffer shortlog)
+(defun vc-hg-print-log (files buffer &optional shortlog limit)
"Get change log associated with FILES."
- ;; `log-view-mode' needs to have the file names in order to function
- ;; correctly. "hg log" does not print it, so we insert it here by
- ;; hand.
-
;; `vc-do-command' creates the buffer, but we need it before running
;; the command.
(vc-setup-buffer buffer)
@@ -234,9 +230,10 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(with-current-buffer
buffer
(apply 'vc-hg-command buffer 0 files "log"
- (if shortlog
- (append '("--style" "compact") vc-hg-log-switches)
- vc-hg-log-switches)))))
+ (append
+ (when limit (list "-l" (format "%s" limit)))
+ (when shortlog '("--style" "compact"))
+ vc-hg-log-switches)))))
(defvar log-view-message-re)
(defvar log-view-file-re)