Mercurial > emacs
changeset 104041:f2d3a9b75762
(vc-print-log-internal): New function, split out from ...
(vc-print-log): ... here.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Thu, 23 Jul 2009 05:21:34 +0000 |
parents | 713b01004f7b |
children | 47d49939ab41 |
files | lisp/ChangeLog lisp/vc.el |
diffstat | 2 files changed, 33 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Jul 23 05:17:48 2009 +0000 +++ b/lisp/ChangeLog Thu Jul 23 05:21:34 2009 +0000 @@ -1,5 +1,8 @@ 2009-07-22 Dan Nicolaescu <dann@ics.uci.edu> + * vc.el (vc-print-log-internal): New function, split out from ... + (vc-print-log): ... here. + * vc-git.el (vc-git-add-signoff): New variable. (vc-git-checkin): Use it. (vc-git-toggle-signoff): New function.
--- a/lisp/vc.el Thu Jul 23 05:17:48 2009 +0000 +++ b/lisp/vc.el Thu Jul 23 05:21:34 2009 +0000 @@ -1815,6 +1815,35 @@ ;; Miscellaneous other entry points +(defun vc-print-log-internal (backend files working-revision) + ;; Don't switch to the output buffer before running the command, + ;; so that any buffer-local settings in the vc-controlled + ;; buffer can be accessed by the command. + (vc-call-backend backend 'print-log files "*vc-change-log*") + (pop-to-buffer "*vc-change-log*") + (vc-exec-after + `(let ((inhibit-read-only t)) + (vc-call-backend ',backend 'log-view-mode) + (set (make-local-variable 'log-view-vc-backend) ',backend) + (set (make-local-variable 'log-view-vc-fileset) ',files) + + ;; FIXME: this seems to apply only to RCS/CVS, it doesn't quite + ;; belong here in the generic code. + (goto-char (point-max)) + (forward-line -1) + (while (looking-at "=*\n") + (delete-char (- (match-end 0) (match-beginning 0))) + (forward-line -1)) + (goto-char (point-min)) + (when (looking-at "[\b\t\n\v\f\r ]+") + (delete-char (- (match-end 0) (match-beginning 0)))) + + (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) + (setq vc-sentinel-movepoint (point)) + (set-buffer-modified-p nil)))) + ;;;###autoload (defun vc-print-log (&optional working-revision) "List the change log of the current fileset in a window. @@ -1824,28 +1853,7 @@ (backend (car vc-fileset)) (files (cadr vc-fileset)) (working-revision (or working-revision (vc-working-revision (car files))))) - ;; Don't switch to the output buffer before running the command, - ;; so that any buffer-local settings in the vc-controlled - ;; buffer can be accessed by the command. - (vc-call-backend backend 'print-log files "*vc-change-log*") - (pop-to-buffer "*vc-change-log*") - (vc-exec-after - `(let ((inhibit-read-only t)) - (vc-call-backend ',backend 'log-view-mode) - (set (make-local-variable 'log-view-vc-backend) ',backend) - (set (make-local-variable 'log-view-vc-fileset) ',files) - (goto-char (point-max)) (forward-line -1) - (while (looking-at "=*\n") - (delete-char (- (match-end 0) (match-beginning 0))) - (forward-line -1)) - (goto-char (point-min)) - (when (looking-at "[\b\t\n\v\f\r ]+") - (delete-char (- (match-end 0) (match-beginning 0)))) - (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) - (setq vc-sentinel-movepoint (point)) - (set-buffer-modified-p nil))))) + (vc-print-log-internal backend files working-revision))) ;;;###autoload (defun vc-revert ()