         (goto-char (point-min))
         (while (re-search-forward "\r$" (point-max) t)
           (replace-match "" nil nil))))))
+
+(defun svn-status-file-name-sans-versions (name &optional keep-backup-version)
+  "Strip the version info from a psvn revision file name."
+  (string-match "\\(.+\\)\\.~.+~" name)
+  (or (match-string-no-properties 1 name) name))
+
+(defun svn-revision-normal-mode ()
+  "Run normal-mode in a svn revision file."
+  (interactive)
+  (flet ((file-name-sans-versions
+          (name &optional keep-backup-version)
+          (svn-status-file-name-sans-versions name keep-backup-version)))
+    (normal-mode)))
+
 
 (condition-case nil
     ;;(easy-menu-add-item nil '("tools") ["SVN Status" svn-status t] "PCL-CVS")

;; Getting older revisions
;; --------------------------------------------------------------------------------

(defun svn-status-get-specific-revision (&optional only-actual-file arg)
  "Retrieve older revisions.
The older revisions are stored in backup files named F.~REVISION~."
  (interactive)
  (let* ((file-names (if only-actual-file
                         (list (svn-status-line-info->filename (svn-status-get-line-information)))
                       (svn-status-marked-file-names)))

        (find-file file-name-with-revision)
        (setq buffer-read-only nil)
        (delete-region (point-min) (point-max))
        (svn-revision-normal-mode)
        (svn-run-svn nil t 'cat (append (list "cat" "-r" revision) (list file-name)))
        ;;todo: error processing
        ;;svn: Filesystem has no item
