summaryrefslogtreecommitdiff
path: root/lisp/vc-svn.el
diff options
context:
space:
mode:
authorEric S. Raymond <esr@snark.thyrsus.com>2008-01-02 00:42:37 +0000
committerEric S. Raymond <esr@snark.thyrsus.com>2008-01-02 00:42:37 +0000
commit42a0a13593c252378b8d6eecd97b7971ebd6808a (patch)
tree61cbcea8f12e41da8e885d75dd66bfe87344247d /lisp/vc-svn.el
parent7ae19274abe78f956c5810962aa564ee24453d71 (diff)
downloademacs-42a0a13593c252378b8d6eecd97b7971ebd6808a.tar.gz
* vc-svn.el (vc-svn-modify-change comment): New function.
Diffstat (limited to 'lisp/vc-svn.el')
-rw-r--r--lisp/vc-svn.el24
1 files changed, 24 insertions, 0 deletions
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el
index 923613f5b04..385260b3d87 100644
--- a/lisp/vc-svn.el
+++ b/lisp/vc-svn.el
@@ -366,6 +366,30 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
(error "Couldn't analyze svn update result")))
(message "Merging changes into %s...done" file))))
+(defun vc-svn-modify-change-comment (files rev comment)
+ "Modify the change comments for a specified REV.
+You must have ssh access to the repository host, and the directory Emacs
+uses locally for temp files must also be writeable by you on that host."
+ (vc-do-command nil 0 "svn" nil "info")
+ (set-buffer "*vc*")
+ (goto-char (point-min))
+ (unless (re-search-forward "Repository Root: svn\\+ssh://\\([^/]+\\)\\(/.*\\)" nil t)
+ (error "Repository information is unavailable."))
+ (let* ((tempfile (make-temp-file user-mail-address))
+ (host (match-string 1))
+ (directory (match-string 2))
+ (remotefile (concat host ":" tempfile)))
+ (with-temp-buffer
+ (insert comment)
+ (write-region (point-min) (point-max) tempfile))
+ (unless (vc-do-command nil 0 "scp" nil "-q" tempfile remotefile)
+ (error "Copy of comment to %s failed" remotefile))
+ (unless (vc-do-command nil 0 "ssh" nil
+ "-q" host
+ (format "svnadmin setlog --bypass-hooks %s -r %s %s; rm %s"
+ directory rev tempfile tempfile))
+ (error "Log edit failed"))
+ ))
;;;
;;; History functions