Mercurial > emacs
comparison lisp/vc-svn.el @ 87518:78fc69cc7bef
* vc-svn.el (vc-svn-modify-change comment): New function.
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Wed, 02 Jan 2008 00:42:37 +0000 |
parents | 5c7eec3035ec |
children | 107ccd98fa12 c938ab6810a4 |
comparison
equal
deleted
inserted
replaced
87517:f74e1db4c182 | 87518:78fc69cc7bef |
---|---|
364 ) | 364 ) |
365 (pop-to-buffer "*vc*") | 365 (pop-to-buffer "*vc*") |
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. | |
371 You must have ssh access to the repository host, and the directory Emacs | |
372 uses 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 |
372 ;;; | 396 ;;; |
373 | 397 |