   :type 'boolean
   :group 'dsvn)
 
+;; start-file-process and process-file are needed for tramp but only appeared
+;; in Emacs 23 and 22 respectively.
+(setq svn-start-file-process
+  (if (fboundp 'start-file-process) 'start-file-process 'start-process))
+(setq svn-process-file
+  (if (fboundp 'process-file) 'process-file 'call-process))
+
 (defun svn-call-process (program buffer &rest args)
   "Run svn and wait for it to finish.
 Argument PROGRAM is the svn binary to run.
 Argument BUFFER is the buffer in which to insert output.
 Optional argument ARGS are the arguments to svn."
-  (let ((proc (apply 'start-process "svn" buffer program args)))
+  (let ((proc (apply svn-start-file-process "svn" buffer program args)))
     (set-process-coding-system proc 'utf-8)
     (set-process-filter proc 'svn-output-filter)
     (while (eq (process-status proc) 'run)

      (setq buffer-read-only t)
      (let ((cmd `(,svn-program ,subcommand ,@args))
            proc)
        (setq proc (apply 'start-process "svn" buf cmd))
        (set-process-coding-system proc 'utf-8)
        (set-process-filter proc 'svn-output-filter)
        (while (eq (process-status proc) 'run)

            args (cons "-v" args)))
    (unless (memq command svn-noninteractive-blacklist)
      (setq args (cons "--non-interactive" args)))
    (setq proc (apply svn-start-file-process "svn" (current-buffer)
                      svn-program command-s args))
    (if (fboundp filter-func)
        (set-process-filter proc filter-func)
