comparison lisp/vc-bzr.el @ 106033:2bed02fa3041

* 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
author Dan Nicolaescu <dann@ics.uci.edu>
date Sun, 15 Nov 2009 20:28:58 +0000
parents 35ac8b2ebcf2
children e90925cbde07
comparison
equal deleted inserted replaced
106032:42cdafa98c50 106033:2bed02fa3041
479 \\([^<(]+?\\)[ ]*[(<]\\([[:alnum:]_.+-]+@[[:alnum:]_.-]+\\)[>)]" 479 \\([^<(]+?\\)[ ]*[(<]\\([[:alnum:]_.+-]+@[[:alnum:]_.-]+\\)[>)]"
480 (1 'change-log-name) 480 (1 'change-log-name)
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.
488 (vc-setup-buffer buffer) 488 (vc-setup-buffer buffer)
489 ;; If the buffer exists from a previous invocation it might be 489 ;; If the buffer exists from a previous invocation it might be
491 ;; FIXME: `vc-bzr-command' runs `bzr log' with `LC_MESSAGES=C', so 491 ;; FIXME: `vc-bzr-command' runs `bzr log' with `LC_MESSAGES=C', so
492 ;; the log display may not what the user wants - but I see no other 492 ;; the log display may not what the user wants - but I see no other
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))))
500 501
501 (defun vc-bzr-show-log-entry (revision) 502 (defun vc-bzr-show-log-entry (revision)