Mercurial > emacs
diff lisp/vc-rcs.el @ 104711:adeed914a5fb
* vc.el (vc-print-log-internal): Move RCS/CVS specific code ...
* vc-rcs.el (vc-rcs-print-log-cleanup): ... here. New function.
(vc-rcs-print-log): Use it.
* vc-cvs.el (vc-cvs-print-log): Use vc-rcs-print-log-cleanup.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sat, 29 Aug 2009 18:56:12 +0000 |
parents | f4a041a8c69d |
children | 6c2939592100 |
line wrap: on
line diff
--- a/lisp/vc-rcs.el Sat Aug 29 17:36:30 2009 +0000 +++ b/lisp/vc-rcs.el Sat Aug 29 18:56:12 2009 +0000 @@ -538,10 +538,23 @@ ;;; History functions ;;; +(defun vc-rcs-print-log-cleanup () + (let ((inhibit-read-only t)) + (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)))))) + (defun vc-rcs-print-log (files &optional buffer) "Get change log associated with FILE. If FILE is a 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)))) + (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))) (defun vc-rcs-diff (files &optional oldvers newvers buffer) "Get a difference report using RCS between two sets of files."