 
 (defun svn-status-repo-for-path (directory)
   "Find the repository root for DIRECTORY."
-  (let ((default-directory directory))
-    ;;(svn-run nil t 'parse-info "info" (expand-file-name ".")) ;; expand-file-name does not work in symlinked directories...
-    (svn-run nil t 'parse-info "info" ".")
-    (with-current-buffer svn-process-buffer-name
-      (goto-char (point-min))
-      (let ((case-fold-search t))
-        (when (search-forward "repository root: " nil t)
-          (buffer-substring-no-properties (point) (svn-point-at-eol)))))))
+  (let ((old-process-default-dir))
+    (with-current-buffer (get-buffer-create svn-process-buffer-name)
+      (setq old-process-default-dir default-directory)
+      (setq default-directory directory)) ;; update the default-directory for the *svn-process* buffer
+  (svn-run nil t 'parse-info "info" ".")
+  (with-current-buffer svn-process-buffer-name
+    ;; (message "svn-status-repo-for-path: %s: default-directory: %s directory: %s old-process-default-dir: %s" svn-process-buffer-name default-directory directory old-process-default-dir)
+    (setq default-directory old-process-default-dir)
+    (goto-char (point-min))
+    (let ((case-fold-search t))
+      (when (search-forward "repository root: " nil t)
+        (buffer-substring-no-properties (point) (svn-point-at-eol)))))))
 
 (defun svn-status-base-dir (&optional start-directory)
   "Find the svn root directory for the current working copy.

                   (setq dir-below
                         (and (string-match "\\(.*/\\)[^/]+/" dir-below)
                              (match-string 1 dir-below)))
                   (when dir-below
                     (if (string= (svn-status-repo-for-path dir-below) repository-root)
                         (setq dot-svn-dir (concat dir-below (svn-wc-adm-dir-name)))

  "Save all buffers visiting a file in TREE.
If TREE is not given, try `svn-status-base-dir' as TREE."
  (interactive)
  ;; (message "svn-status-save-some-buffers: tree1: %s" tree)
  (let ((ok t)
        (tree (or (svn-status-base-dir)
                  tree)))
    ;; (message "svn-status-save-some-buffers: tree2: %s" tree)
    (unless tree
      (error "Not in a svn project tree"))
    (dolist (buffer (buffer-list))
