 ;;   unfortunately `read-directory-name' doesn't exist in Emacs 21.3
 ;; * Add repository browser
 ;; * Improve support for svn blame
-;; * Support for editing the log file entries, e.g.:
-;;   svn propedit --revprop -r9821 svn:log
-;; * Better logview mode (allow to show the changeset for a given entry)
 
 ;; Overview over the implemented/not (yet) implemented svn sub-commands:
 ;; * add                       implemented

    (when svn-log-edit-insert-files-to-commit
      (svn-log-edit-remove-comment-lines))
    (set-buffer-file-coding-system 'undecided-unix nil)
    (write-region (point-min) (point-max)
                  (concat svn-status-temp-dir "svn-log-edit.txt" svn-temp-suffix) nil 1))
  (when svn-status-files-to-commit ; there are files to commit
    (setq svn-status-operated-on-dot (and (= 1 (length svn-status-files-to-commit))
         (string= "." (svn-status-line-info->filename (car svn-status-files-to-commit)))))
    (svn-status-create-arg-file svn-status-temp-arg-file ""
                                svn-status-files-to-commit "")
    (setq svn-status-files-to-commit nil)
    (setq svn-status-temp-file-to-remove (concat svn-status-temp-dir "svn-log-edit.txt" svn-temp-suffix))
    (svn-run-svn t t 'commit "commit" "--targets" svn-status-temp-arg-file
                 "-F" svn-status-temp-file-to-remove))
  (set-window-configuration svn-status-pre-commit-window-configuration))

(defun svn-log-edit-svn-diff (arg)
  "Show the diff we are about to commit.

      (diff-mode)
      (font-lock-fontify-buffer))))

(defun svn-log-edit-log-entry ()
  "Edit the given log entry."
  (interactive)
  (let ((rev (svn-log-revision-at-point))
        (log-message))
    (svn-run-svn nil t 'propget-parse "propget" "--revprop" (concat "-r" rev) "svn:log")
    (save-excursion
      (set-buffer "*svn-process*")
      (setq log-message (if (> (point-max) 1)
                            (buffer-substring (point-min) (- (point-max) 1))
                          "")))
    (svn-status-pop-to-commit-buffer)
    (delete-region (point-min) (point-max))
    (insert log-message)
    (goto-char (point-min))
    (setq svn-log-edit-update-log-entry rev)))

;; --------------------------------------------------------------------------------
;; svn status persistent options
;; --------------------------------------------------------------------------------
