Hi Subversion developers! The current HEAD version of the Emacs SVN status mode, psvn.el does not properly support working copies in SVN 1.7 format. It expects each directory to have a .svn subdirectory, which is no longer the case.
Googling around, I found a small patch [1], courtesy of Koji Nakamaru (CC'ed) that makes psvn.el work with Subversion 1.7 working copies. I tested it on GNU Emacs 23.3 and 24.1 on Microsoft Windows XP. If you're interested, please apply the attached patch to the psvn.el version in the Apache Subversion repository [2]. I just re-diffed Koji Nakamaru's patch to apply cleanly against HEAD (r1369093 for this file). I originally posted this message to the users@ mailing list by accident. Please excuse the duplication, but at least I got a hint now to the patch submission guidelines. Thank you very much and kind regards, André [1] http://www.eaflux.com/psvn/psvn.el.diff [2] http://svn.apache.org/repos/asf/subversion/trunk/contrib/client-side/emacs/psvn.el -- Greetings... From: Andre Colomb <[email protected]>
Index: contrib/client-side/emacs/psvn.el
===================================================================
--- contrib/client-side/emacs/psvn.el (revision 1374368)
+++ contrib/client-side/emacs/psvn.el (working copy)
@@ -1137,7 +1137,7 @@ If there is no .svn directory, examine if there is
(svn-wc-adm-dir-name)))
(cvs-dir (format "%sCVS" (file-name-as-directory dir))))
(cond
- ((file-directory-p svn-dir)
+ ((my-file-directory-p svn-dir)
(setq arg (svn-status-possibly-negate-meaning-of-arg arg 'svn-status))
(svn-status-1 dir arg))
((and (file-directory-p cvs-dir)
@@ -6036,12 +6036,12 @@ Return nil, if not in a svn working copy."
(let* ((base-dir start-dir)
(repository-root (svn-status-repo-for-path base-dir))
(dot-svn-dir (concat base-dir (svn-wc-adm-dir-name)))
- (in-tree (and repository-root (file-exists-p dot-svn-dir)))
+ (in-tree (and repository-root (my-file-exists-p dot-svn-dir)))
(dir-below (expand-file-name base-dir)))
;; (message "repository-root: %s start-dir: %s" repository-root start-dir)
(if (and (<= (car svn-client-version) 1) (< (cadr svn-client-version) 3))
(setq base-dir (svn-status-base-dir-for-ancient-svn-client start-dir)) ;; svn version < 1.3
- (while (when (and dir-below (file-exists-p dot-svn-dir))
+ (while (when (and dir-below (my-file-exists-p dot-svn-dir))
(setq base-dir (file-name-directory dot-svn-dir))
(string-match "\\(.+/\\).+/" dir-below)
(setq dir-below
@@ -6423,6 +6423,19 @@ working directory."
(setq svn-admin-last-repository-dir (read-string "Repository Url: ")))
(svn-checkout svn-admin-last-repository-dir "."))
+(defun my-file-directory-p (dir)
+ (setq dir (expand-file-name dir))
+ (if (file-directory-p dir)
+ t
+ (let* ((dir1 (directory-file-name (file-name-directory dir)))
+ (dir2 (directory-file-name (file-name-directory dir1))))
+ (if (equal dir1 dir2)
+ nil
+ (my-file-directory-p (concat (file-name-as-directory dir2) ".svn"))))))
+
+(defun my-file-exists-p (dir)
+ (my-file-directory-p dir))
+
;; --------------------------------------------------------------------------------
;; svn status profiling
;; --------------------------------------------------------------------------------
signature.asc
Description: OpenPGP digital signature

