aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond2008-01-02 00:42:37 +0000
committerEric S. Raymond2008-01-02 00:42:37 +0000
commit42a0a13593c252378b8d6eecd97b7971ebd6808a (patch)
tree61cbcea8f12e41da8e885d75dd66bfe87344247d
parent7ae19274abe78f956c5810962aa564ee24453d71 (diff)
downloademacs-42a0a13593c252378b8d6eecd97b7971ebd6808a.tar.gz
emacs-42a0a13593c252378b8d6eecd97b7971ebd6808a.zip
* vc-svn.el (vc-svn-modify-change comment): New function.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/vc-svn.el24
2 files changed, 28 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5589f73a817..ac027b954c2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12008-01-02 Eric S. Raymond <esr@snark.thyrsus.com>
2
3 * vc-svn.el (vc-svn-modify-change comment): New function.
4
12008-01-01 Dan Nicolaescu <dann@ics.uci.edu> 52008-01-01 Dan Nicolaescu <dann@ics.uci.edu>
2 6
3 * vc-git.el (vc-git-dir-state): Set the vc-backend property. Do 7 * vc-git.el (vc-git-dir-state): Set the vc-backend property. Do
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."
366 (error "Couldn't analyze svn update result"))) 366 (error "Couldn't analyze svn update result")))
367 (message "Merging changes into %s...done" file)))) 367 (message "Merging changes into %s...done" file))))
368 368
369(defun vc-svn-modify-change-comment (files rev comment)
370 "Modify the change comments for a specified REV.
371You must have ssh access to the repository host, and the directory Emacs
372uses locally for temp files must also be writeable by you on that host."
373 (vc-do-command nil 0 "svn" nil "info")
374 (set-buffer "*vc*")
375 (goto-char (point-min))
376 (unless (re-search-forward "Repository Root: svn\\+ssh://\\([^/]+\\)\\(/.*\\)" nil t)
377 (error "Repository information is unavailable."))
378 (let* ((tempfile (make-temp-file user-mail-address))
379 (host (match-string 1))
380 (directory (match-string 2))
381 (remotefile (concat host ":" tempfile)))
382 (with-temp-buffer
383 (insert comment)
384 (write-region (point-min) (point-max) tempfile))
385 (unless (vc-do-command nil 0 "scp" nil "-q" tempfile remotefile)
386 (error "Copy of comment to %s failed" remotefile))
387 (unless (vc-do-command nil 0 "ssh" nil
388 "-q" host
389 (format "svnadmin setlog --bypass-hooks %s -r %s %s; rm %s"
390 directory rev tempfile tempfile))
391 (error "Log edit failed"))
392 ))
369 393
370;;; 394;;;
371;;; History functions 395;;; History functions