mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 13:27:36 +00:00
Remove wash-log from the VC backend API.
This commit is contained in:
parent
a749e19d07
commit
6aa5d910bf
9 changed files with 34 additions and 44 deletions
|
|
@ -1,5 +1,11 @@
|
|||
2008-05-09 Eric S. Raymond <esr@snark.thyrsus.com>
|
||||
|
||||
* vc-sccs.el, vc.svn.el, vc-git.el, vc-hg.el, vc-mtn.el: Remove
|
||||
stub implementations of, and references to, wash-log.
|
||||
* vc-rcs.el (vc-rcs-comment-history),
|
||||
vc-cvs.el (vc-cvs-comment-history):
|
||||
Inline the code that used to be wash-log.
|
||||
|
||||
* vc-scs.el (vc-sccs-checkin, vc-sccs-checkout, vc-sccs-rollback)
|
||||
(vc-sccs-revert, vc-sccs-steal-lock, vc-sccs-modify-change-comment)
|
||||
(vc-sccs-print-log, vc-sccs-diff): Grok directories.
|
||||
|
|
|
|||
|
|
@ -492,10 +492,9 @@ Will fail unless you have administrative privileges on the repo."
|
|||
(if (vc-stay-local-p files) 'async 0)
|
||||
files "log"))
|
||||
|
||||
(defun vc-cvs-wash-log ()
|
||||
"Remove all non-comment information from log output."
|
||||
(vc-call-backend 'RCS 'wash-log)
|
||||
nil)
|
||||
(defun vc-cvs-comment-history (file)
|
||||
"Get comment history of a file."
|
||||
(vc-call-backend 'RCS 'comment-history file))
|
||||
|
||||
(defun vc-cvs-diff (files &optional oldvers newvers buffer)
|
||||
"Get a difference report using CVS between two revisions of FILE."
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@
|
|||
;; * print-log (files &optional buffer) OK
|
||||
;; - log-view-mode () OK
|
||||
;; - show-log-entry (revision) OK
|
||||
;; - wash-log (file) COULD BE SUPPORTED
|
||||
;; - comment-history (file) ??
|
||||
;; - update-changelog (files) COULD BE SUPPORTED
|
||||
;; * diff (file &optional rev1 rev2 buffer) OK
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@
|
|||
;; * print-log (files &optional buffer) OK
|
||||
;; - log-view-mode () OK
|
||||
;; - show-log-entry (revision) NOT NEEDED, DEFAULT IS GOOD
|
||||
;; - wash-log (file) ??
|
||||
;; - comment-history (file) NOT NEEDED
|
||||
;; - update-changelog (files) NOT NEEDED
|
||||
;; * diff (files &optional rev1 rev2 buffer) OK
|
||||
|
|
|
|||
|
|
@ -175,8 +175,6 @@
|
|||
;; (defun vc-mtn-show-log-entry (revision)
|
||||
;; )
|
||||
|
||||
(defun vc-mtn-wash-log (file))
|
||||
|
||||
(defun vc-mtn-diff (files &optional rev1 rev2 buffer)
|
||||
(apply 'vc-mtn-command (or buffer "*vc-diff*") 1 files "diff"
|
||||
(append (if rev1 (list "-r" rev1)) (if rev2 (list "-r" rev2)))))
|
||||
|
|
|
|||
|
|
@ -547,23 +547,29 @@ Needs RCS 5.6.2 or later for -M."
|
|||
(and newvers (concat "-r" newvers)))
|
||||
(vc-switches 'RCS 'diff))))
|
||||
|
||||
(defun vc-rcs-wash-log ()
|
||||
"Remove all non-comment information from log output."
|
||||
(let ((separator (concat "^-+\nrevision [0-9.]+\ndate: .*\n"
|
||||
"\\(branches: .*;\n\\)?"
|
||||
"\\(\\*\\*\\* empty log message \\*\\*\\*\n\\)?")))
|
||||
(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))
|
||||
(if (looking-at "[\b\t\n\v\f\r ]+")
|
||||
(delete-char (- (match-end 0) (match-beginning 0))))
|
||||
(goto-char (point-min))
|
||||
(re-search-forward separator nil t)
|
||||
(delete-region (point-min) (point))
|
||||
(while (re-search-forward separator nil t)
|
||||
(delete-region (match-beginning 0) (match-end 0)))))
|
||||
(defun vc-rcs-comment-history (file)
|
||||
"Return a string with all log entries stored in BACKEND for FILE."
|
||||
(with-current-buffer "*vc*"
|
||||
;; Has to be written this way, this function is used by the CVS backend too
|
||||
(vc-call-backend (vc-backend file) 'print-log (list file))
|
||||
;; Remove cruft
|
||||
(let ((separator (concat "^-+\nrevision [0-9.]+\ndate: .*\n"
|
||||
"\\(branches: .*;\n\\)?"
|
||||
"\\(\\*\\*\\* empty log message \\*\\*\\*\n\\)?")))
|
||||
(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))
|
||||
(if (looking-at "[\b\t\n\v\f\r ]+")
|
||||
(delete-char (- (match-end 0) (match-beginning 0))))
|
||||
(goto-char (point-min))
|
||||
(re-search-forward separator nil t)
|
||||
(delete-region (point-min) (point))
|
||||
(while (re-search-forward separator nil t)
|
||||
(delete-region (match-beginning 0) (match-end 0))))
|
||||
;; Return the de-crufted comment list
|
||||
(buffer-string)))
|
||||
|
||||
(defun vc-rcs-annotate-command (file buffer &optional revision)
|
||||
"Annotate FILE, inserting the results in BUFFER.
|
||||
|
|
|
|||
|
|
@ -332,11 +332,6 @@ revert all subfiles."
|
|||
(setq files (vc-expand-dirs files))
|
||||
(vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files)))
|
||||
|
||||
(defun vc-sccs-wash-log ()
|
||||
"Remove all non-comment information from log output."
|
||||
;; FIXME: not implemented for SCCS
|
||||
nil)
|
||||
|
||||
(defun vc-sccs-diff (files &optional oldvers newvers buffer)
|
||||
"Get a difference report using SCCS between two filesets."
|
||||
(setq files (vc-expand-dirs files))
|
||||
|
|
|
|||
|
|
@ -431,11 +431,6 @@ or svn+ssh://."
|
|||
;; Dump log for the entire directory.
|
||||
(vc-svn-command buffer 0 nil "log" "-rHEAD:0")))))
|
||||
|
||||
(defun vc-svn-wash-log ()
|
||||
"Remove all non-comment information from log output."
|
||||
;; FIXME: not implemented for SVN
|
||||
nil)
|
||||
|
||||
(defun vc-svn-diff (files &optional oldvers newvers buffer)
|
||||
"Get a difference report using SVN between two revisions of fileset FILES."
|
||||
(and oldvers
|
||||
|
|
|
|||
11
lisp/vc.el
11
lisp/vc.el
|
|
@ -55,7 +55,7 @@
|
|||
;; This mode is fully documented in the Emacs user's manual.
|
||||
;;
|
||||
;; Supported version-control systems presently include CVS, RCS, GNU
|
||||
;; Arch, Subversion, Bzr, Git, Mercurial, Meta-CVS, Monotone and SCCS
|
||||
;; Arch, Subversion, Bzr, Git, Mercurial, Monotone and SCCS
|
||||
;; (or its free replacement, CSSC).
|
||||
;;
|
||||
;; Some features will not work with old RCS versions. Where
|
||||
|
|
@ -371,17 +371,11 @@
|
|||
;; and make sure it is displayed in the buffer's window. The default
|
||||
;; implementation of this function works for RCS-style logs.
|
||||
;;
|
||||
;; - wash-log (file)
|
||||
;;
|
||||
;; Remove all non-comment information from the output of print-log.
|
||||
;;
|
||||
;; - comment-history (file)
|
||||
;;
|
||||
;; Return a string containing all log entries that were made for FILE.
|
||||
;; This is used for transferring a file from one backend to another,
|
||||
;; retaining comment information. The default implementation of this
|
||||
;; function does this by calling print-log and then wash-log, and
|
||||
;; returning the resulting buffer contents as a string.
|
||||
;; retaining comment information.
|
||||
;;
|
||||
;; - update-changelog (files)
|
||||
;;
|
||||
|
|
@ -2709,7 +2703,6 @@ to provide the `find-revision' operation instead."
|
|||
(when (vc-find-backend-function backend 'print-log)
|
||||
(with-current-buffer "*vc*"
|
||||
(vc-call-backend backend 'print-log (list file))
|
||||
(vc-call-backend backend 'wash-log)
|
||||
(buffer-string))))
|
||||
|
||||
(defun vc-default-receive-file (backend file rev)
|
||||
|
|
|
|||
Loading…
Reference in a new issue