           (while (re-search-forward search-string (point-max) t)
             (replace-match (replace-regexp-in-string " " "-" (match-string 1)) nil nil nil 1)))))))
 
+(defun svn-status-parse-fixup-tramp-exit ()
+  "Helper function to handle tramp connections stopping with an exit output.
+Add this function to the `svn-pre-parse-status-hook'."
+  (goto-char (point-max))
+  (beginning-of-line)
+  (when (looking-at "exit")
+    (delete-region (point) (svn-point-at-eol))))
+;;(add-hook 'svn-pre-parse-status-hook 'svn-status-parse-fixup-tramp-exit)
+
 (defun svn-parse-status-result ()
   "Parse the `svn-process-buffer-name' buffer.
 The results are used to build the `svn-status-info' variable."

;;; Commentary

;; psvn.el is tested with GNU Emacs 21.3 on windows, debian linux,
;; freebsd5, red hat el4, ubuntu edgy with svn 1.4.0

;; psvn.el needs at least svn 1.1.0
;; if you upgrade to a higher version, you need to do a fresh checkout

(eval-when-compile (require 'dired))
(eval-when-compile (require 'ediff-util))
(eval-when-compile (require 'ediff-wind))
(eval-when-compile (require 'vc-hooks))
(eval-when-compile (require 'elp))
(eval-when-compile (require 'pp))

