Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
104710:a211a43679df | 104711:adeed914a5fb |
---|---|
536 | 536 |
537 ;;; | 537 ;;; |
538 ;;; History functions | 538 ;;; History functions |
539 ;;; | 539 ;;; |
540 | 540 |
541 (defun vc-rcs-print-log-cleanup () | |
542 (let ((inhibit-read-only t)) | |
543 (goto-char (point-max)) | |
544 (forward-line -1) | |
545 (while (looking-at "=*\n") | |
546 (delete-char (- (match-end 0) (match-beginning 0))) | |
547 (forward-line -1)) | |
548 (goto-char (point-min)) | |
549 (when (looking-at "[\b\t\n\v\f\r ]+") | |
550 (delete-char (- (match-end 0) (match-beginning 0)))))) | |
551 | |
541 (defun vc-rcs-print-log (files &optional buffer) | 552 (defun vc-rcs-print-log (files &optional buffer) |
542 "Get change log associated with FILE. If FILE is a | 553 "Get change log associated with FILE. If FILE is a |
543 directory the operation is applied to all registered files beneath it." | 554 directory the operation is applied to all registered files beneath it." |
544 (vc-do-command (or buffer "*vc*") 0 "rlog" (mapcar 'vc-name (vc-expand-dirs files)))) | 555 (vc-do-command (or buffer "*vc*") 0 "rlog" (mapcar 'vc-name (vc-expand-dirs files))) |
556 (with-current-buffer (or buffer "*vc*") | |
557 (vc-rcs-print-log-cleanup))) | |
545 | 558 |
546 (defun vc-rcs-diff (files &optional oldvers newvers buffer) | 559 (defun vc-rcs-diff (files &optional oldvers newvers buffer) |
547 "Get a difference report using RCS between two sets of files." | 560 "Get a difference report using RCS between two sets of files." |
548 (apply 'vc-do-command (or buffer "*vc-diff*") | 561 (apply 'vc-do-command (or buffer "*vc-diff*") |
549 1 ;; Always go synchronous, the repo is local | 562 1 ;; Always go synchronous, the repo is local |