Mercurial > emacs
comparison lisp/vc-rcs.el @ 94806:eedf64b515f0
Remove wash-log from the VC backend API.
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Fri, 09 May 2008 17:30:49 +0000 |
parents | ee5932bf781d |
children | 76b523d99056 |
comparison
equal
deleted
inserted
replaced
94805:89d37b54b964 | 94806:eedf64b515f0 |
---|---|
545 (append (list "-q" | 545 (append (list "-q" |
546 (and oldvers (concat "-r" oldvers)) | 546 (and oldvers (concat "-r" oldvers)) |
547 (and newvers (concat "-r" newvers))) | 547 (and newvers (concat "-r" newvers))) |
548 (vc-switches 'RCS 'diff)))) | 548 (vc-switches 'RCS 'diff)))) |
549 | 549 |
550 (defun vc-rcs-wash-log () | 550 (defun vc-rcs-comment-history (file) |
551 "Remove all non-comment information from log output." | 551 "Return a string with all log entries stored in BACKEND for FILE." |
552 (let ((separator (concat "^-+\nrevision [0-9.]+\ndate: .*\n" | 552 (with-current-buffer "*vc*" |
553 "\\(branches: .*;\n\\)?" | 553 ;; Has to be written this way, this function is used by the CVS backend too |
554 "\\(\\*\\*\\* empty log message \\*\\*\\*\n\\)?"))) | 554 (vc-call-backend (vc-backend file) 'print-log (list file)) |
555 (goto-char (point-max)) (forward-line -1) | 555 ;; Remove cruft |
556 (while (looking-at "=*\n") | 556 (let ((separator (concat "^-+\nrevision [0-9.]+\ndate: .*\n" |
557 (delete-char (- (match-end 0) (match-beginning 0))) | 557 "\\(branches: .*;\n\\)?" |
558 (forward-line -1)) | 558 "\\(\\*\\*\\* empty log message \\*\\*\\*\n\\)?"))) |
559 (goto-char (point-min)) | 559 (goto-char (point-max)) (forward-line -1) |
560 (if (looking-at "[\b\t\n\v\f\r ]+") | 560 (while (looking-at "=*\n") |
561 (delete-char (- (match-end 0) (match-beginning 0)))) | 561 (delete-char (- (match-end 0) (match-beginning 0))) |
562 (goto-char (point-min)) | 562 (forward-line -1)) |
563 (re-search-forward separator nil t) | 563 (goto-char (point-min)) |
564 (delete-region (point-min) (point)) | 564 (if (looking-at "[\b\t\n\v\f\r ]+") |
565 (while (re-search-forward separator nil t) | 565 (delete-char (- (match-end 0) (match-beginning 0)))) |
566 (delete-region (match-beginning 0) (match-end 0))))) | 566 (goto-char (point-min)) |
567 (re-search-forward separator nil t) | |
568 (delete-region (point-min) (point)) | |
569 (while (re-search-forward separator nil t) | |
570 (delete-region (match-beginning 0) (match-end 0)))) | |
571 ;; Return the de-crufted comment list | |
572 (buffer-string))) | |
567 | 573 |
568 (defun vc-rcs-annotate-command (file buffer &optional revision) | 574 (defun vc-rcs-annotate-command (file buffer &optional revision) |
569 "Annotate FILE, inserting the results in BUFFER. | 575 "Annotate FILE, inserting the results in BUFFER. |
570 Optional arg REVISION is a revision to annotate from." | 576 Optional arg REVISION is a revision to annotate from." |
571 (vc-setup-buffer buffer) | 577 (vc-setup-buffer buffer) |