aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond2008-05-09 17:30:49 +0000
committerEric S. Raymond2008-05-09 17:30:49 +0000
commit6aa5d910bf3bef29b61e6d7bde22465f8a8db85f (patch)
tree6a7403460ec8702d47a107eaf50c9a2349be3322
parenta749e19d070f015f11d6e4b7fad2841d4b0df358 (diff)
downloademacs-6aa5d910bf3bef29b61e6d7bde22465f8a8db85f.tar.gz
emacs-6aa5d910bf3bef29b61e6d7bde22465f8a8db85f.zip
Remove wash-log from the VC backend API.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/vc-cvs.el7
-rw-r--r--lisp/vc-git.el1
-rw-r--r--lisp/vc-hg.el1
-rw-r--r--lisp/vc-mtn.el2
-rw-r--r--lisp/vc-rcs.el40
-rw-r--r--lisp/vc-sccs.el5
-rw-r--r--lisp/vc-svn.el5
-rw-r--r--lisp/vc.el11
9 files changed, 34 insertions, 44 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4b2d890ae41..8bb2f4809d2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
12008-05-09 Eric S. Raymond <esr@snark.thyrsus.com> 12008-05-09 Eric S. Raymond <esr@snark.thyrsus.com>
2 2
3 * vc-sccs.el, vc.svn.el, vc-git.el, vc-hg.el, vc-mtn.el: Remove
4 stub implementations of, and references to, wash-log.
5 * vc-rcs.el (vc-rcs-comment-history),
6 vc-cvs.el (vc-cvs-comment-history):
7 Inline the code that used to be wash-log.
8
3 * vc-scs.el (vc-sccs-checkin, vc-sccs-checkout, vc-sccs-rollback) 9 * vc-scs.el (vc-sccs-checkin, vc-sccs-checkout, vc-sccs-rollback)
4 (vc-sccs-revert, vc-sccs-steal-lock, vc-sccs-modify-change-comment) 10 (vc-sccs-revert, vc-sccs-steal-lock, vc-sccs-modify-change-comment)
5 (vc-sccs-print-log, vc-sccs-diff): Grok directories. 11 (vc-sccs-print-log, vc-sccs-diff): Grok directories.
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index f8cf5804eb4..603b61d1730 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -492,10 +492,9 @@ Will fail unless you have administrative privileges on the repo."
492 (if (vc-stay-local-p files) 'async 0) 492 (if (vc-stay-local-p files) 'async 0)
493 files "log")) 493 files "log"))
494 494
495(defun vc-cvs-wash-log () 495(defun vc-cvs-comment-history (file)
496 "Remove all non-comment information from log output." 496 "Get comment history of a file."
497 (vc-call-backend 'RCS 'wash-log) 497 (vc-call-backend 'RCS 'comment-history file))
498 nil)
499 498
500(defun vc-cvs-diff (files &optional oldvers newvers buffer) 499(defun vc-cvs-diff (files &optional oldvers newvers buffer)
501 "Get a difference report using CVS between two revisions of FILE." 500 "Get a difference report using CVS between two revisions of FILE."
diff --git a/lisp/vc-git.el b/lisp/vc-git.el
index 27b35c4240b..bf58572a083 100644
--- a/lisp/vc-git.el
+++ b/lisp/vc-git.el
@@ -79,7 +79,6 @@
79;; * print-log (files &optional buffer) OK 79;; * print-log (files &optional buffer) OK
80;; - log-view-mode () OK 80;; - log-view-mode () OK
81;; - show-log-entry (revision) OK 81;; - show-log-entry (revision) OK
82;; - wash-log (file) COULD BE SUPPORTED
83;; - comment-history (file) ?? 82;; - comment-history (file) ??
84;; - update-changelog (files) COULD BE SUPPORTED 83;; - update-changelog (files) COULD BE SUPPORTED
85;; * diff (file &optional rev1 rev2 buffer) OK 84;; * diff (file &optional rev1 rev2 buffer) OK
diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el
index a66a9942b27..3867c371e73 100644
--- a/lisp/vc-hg.el
+++ b/lisp/vc-hg.el
@@ -68,7 +68,6 @@
68;; * print-log (files &optional buffer) OK 68;; * print-log (files &optional buffer) OK
69;; - log-view-mode () OK 69;; - log-view-mode () OK
70;; - show-log-entry (revision) NOT NEEDED, DEFAULT IS GOOD 70;; - show-log-entry (revision) NOT NEEDED, DEFAULT IS GOOD
71;; - wash-log (file) ??
72;; - comment-history (file) NOT NEEDED 71;; - comment-history (file) NOT NEEDED
73;; - update-changelog (files) NOT NEEDED 72;; - update-changelog (files) NOT NEEDED
74;; * diff (files &optional rev1 rev2 buffer) OK 73;; * diff (files &optional rev1 rev2 buffer) OK
diff --git a/lisp/vc-mtn.el b/lisp/vc-mtn.el
index d64f05c8091..d4d1b1ff8e3 100644
--- a/lisp/vc-mtn.el
+++ b/lisp/vc-mtn.el
@@ -175,8 +175,6 @@
175;; (defun vc-mtn-show-log-entry (revision) 175;; (defun vc-mtn-show-log-entry (revision)
176;; ) 176;; )
177 177
178(defun vc-mtn-wash-log (file))
179
180(defun vc-mtn-diff (files &optional rev1 rev2 buffer) 178(defun vc-mtn-diff (files &optional rev1 rev2 buffer)
181 (apply 'vc-mtn-command (or buffer "*vc-diff*") 1 files "diff" 179 (apply 'vc-mtn-command (or buffer "*vc-diff*") 1 files "diff"
182 (append (if rev1 (list "-r" rev1)) (if rev2 (list "-r" rev2))))) 180 (append (if rev1 (list "-r" rev1)) (if rev2 (list "-r" rev2)))))
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el
index 2df84eb3189..227178d1c86 100644
--- a/lisp/vc-rcs.el
+++ b/lisp/vc-rcs.el
@@ -547,23 +547,29 @@ Needs RCS 5.6.2 or later for -M."
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.
diff --git a/lisp/vc-sccs.el b/lisp/vc-sccs.el
index af3a226052a..d6e50defdd8 100644
--- a/lisp/vc-sccs.el
+++ b/lisp/vc-sccs.el
@@ -332,11 +332,6 @@ revert all subfiles."
332 (setq files (vc-expand-dirs files)) 332 (setq files (vc-expand-dirs files))
333 (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files))) 333 (vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files)))
334 334
335(defun vc-sccs-wash-log ()
336 "Remove all non-comment information from log output."
337 ;; FIXME: not implemented for SCCS
338 nil)
339
340(defun vc-sccs-diff (files &optional oldvers newvers buffer) 335(defun vc-sccs-diff (files &optional oldvers newvers buffer)
341 "Get a difference report using SCCS between two filesets." 336 "Get a difference report using SCCS between two filesets."
342 (setq files (vc-expand-dirs files)) 337 (setq files (vc-expand-dirs files))
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el
index 49c4c4153e6..7b12717dd81 100644
--- a/lisp/vc-svn.el
+++ b/lisp/vc-svn.el
@@ -431,11 +431,6 @@ or svn+ssh://."
431 ;; Dump log for the entire directory. 431 ;; Dump log for the entire directory.
432 (vc-svn-command buffer 0 nil "log" "-rHEAD:0"))))) 432 (vc-svn-command buffer 0 nil "log" "-rHEAD:0")))))
433 433
434(defun vc-svn-wash-log ()
435 "Remove all non-comment information from log output."
436 ;; FIXME: not implemented for SVN
437 nil)
438
439(defun vc-svn-diff (files &optional oldvers newvers buffer) 434(defun vc-svn-diff (files &optional oldvers newvers buffer)
440 "Get a difference report using SVN between two revisions of fileset FILES." 435 "Get a difference report using SVN between two revisions of fileset FILES."
441 (and oldvers 436 (and oldvers
diff --git a/lisp/vc.el b/lisp/vc.el
index 052ee7ce9e1..55126cf5cfa 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -55,7 +55,7 @@
55;; This mode is fully documented in the Emacs user's manual. 55;; This mode is fully documented in the Emacs user's manual.
56;; 56;;
57;; Supported version-control systems presently include CVS, RCS, GNU 57;; Supported version-control systems presently include CVS, RCS, GNU
58;; Arch, Subversion, Bzr, Git, Mercurial, Meta-CVS, Monotone and SCCS 58;; Arch, Subversion, Bzr, Git, Mercurial, Monotone and SCCS
59;; (or its free replacement, CSSC). 59;; (or its free replacement, CSSC).
60;; 60;;
61;; Some features will not work with old RCS versions. Where 61;; Some features will not work with old RCS versions. Where
@@ -371,17 +371,11 @@
371;; and make sure it is displayed in the buffer's window. The default 371;; and make sure it is displayed in the buffer's window. The default
372;; implementation of this function works for RCS-style logs. 372;; implementation of this function works for RCS-style logs.
373;; 373;;
374;; - wash-log (file)
375;;
376;; Remove all non-comment information from the output of print-log.
377;;
378;; - comment-history (file) 374;; - comment-history (file)
379;; 375;;
380;; Return a string containing all log entries that were made for FILE. 376;; Return a string containing all log entries that were made for FILE.
381;; This is used for transferring a file from one backend to another, 377;; This is used for transferring a file from one backend to another,
382;; retaining comment information. The default implementation of this 378;; retaining comment information.
383;; function does this by calling print-log and then wash-log, and
384;; returning the resulting buffer contents as a string.
385;; 379;;
386;; - update-changelog (files) 380;; - update-changelog (files)
387;; 381;;
@@ -2709,7 +2703,6 @@ to provide the `find-revision' operation instead."
2709 (when (vc-find-backend-function backend 'print-log) 2703 (when (vc-find-backend-function backend 'print-log)
2710 (with-current-buffer "*vc*" 2704 (with-current-buffer "*vc*"
2711 (vc-call-backend backend 'print-log (list file)) 2705 (vc-call-backend backend 'print-log (list file))
2712 (vc-call-backend backend 'wash-log)
2713 (buffer-string)))) 2706 (buffer-string))))
2714 2707
2715(defun vc-default-receive-file (backend file rev) 2708(defun vc-default-receive-file (backend file rev)