 
 (require 'vc)
 (require 'log-edit)
+(require 'uniquify)
 
 (defconst svn-status-msg-col   1)
 (defconst svn-status-flags-col 11)

  "Move to the previous changeset in the log."
  (interactive)
  (beginning-of-line)
  (unless (re-search-backward "^------------------------------------------------------------------------$" nil t)
    (error "Found no commit"))
  (svn-log-show-diff))


  (use-local-map svn-log-mode-map)
  (setq paragraph-start "^commit"))

(defconst svn-log-entry-start-re "^-\\{72\\}$")

(defun svn-log-find-revision (commit-id)
  (let (found start)
    (save-excursion
      (goto-char (point-min))
      (while (and (re-search-forward svn-log-entry-start-re nil t)
                  (setq start (point))
                  (re-search-forward "^r\\([0-9]+\\) |" nil t)
                  (if (/= (string-to-int (match-string 1)) commit-id)
                      t
                    (setq found t)
                    nil))))
    (when found
      (goto-char start)
      (beginning-of-line)
      t)))

(defun svn-log-current-commit ()
  (save-excursion
    (end-of-line)
    (re-search-backward svn-log-entry-start-re nil t)
    (unless (re-search-forward "^r\\([0-9]+\\) |" nil t)
      (error "Found no commit"))
    (string-to-int (match-string 1))))

(defun svn-log-show-diff ()
  "Show the changes introduced by the changeset under point."
