# HG changeset patch # User Eric S. Raymond # Date 1199234557 0 # Node ID 78fc69cc7befa5765a38135d18c3a0f26912c2f4 # Parent f74e1db4c1825a08ce1dec77e76f47087acbac91 * vc-svn.el (vc-svn-modify-change comment): New function. diff -r f74e1db4c182 -r 78fc69cc7bef lisp/ChangeLog --- a/lisp/ChangeLog Tue Jan 01 21:19:17 2008 +0000 +++ b/lisp/ChangeLog Wed Jan 02 00:42:37 2008 +0000 @@ -1,3 +1,7 @@ +2008-01-02 Eric S. Raymond + + * vc-svn.el (vc-svn-modify-change comment): New function. + 2008-01-01 Dan Nicolaescu * vc-git.el (vc-git-dir-state): Set the vc-backend property. Do diff -r f74e1db4c182 -r 78fc69cc7bef lisp/vc-svn.el --- a/lisp/vc-svn.el Tue Jan 01 21:19:17 2008 +0000 +++ b/lisp/vc-svn.el Wed Jan 02 00:42:37 2008 +0000 @@ -366,6 +366,30 @@ (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