aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2006-11-09 03:14:51 +0000
committerChong Yidong2006-11-09 03:14:51 +0000
commit9a25258f0f0e40ec608641edd522d9df8d870c1f (patch)
tree409f2c8919b1b089d7c5f578146048419a729f4f
parent8f65162b5ddd3ef5766ac664b85f8b1a2675eff7 (diff)
downloademacs-9a25258f0f0e40ec608641edd522d9df8d870c1f.tar.gz
emacs-9a25258f0f0e40ec608641edd522d9df8d870c1f.zip
(vc-svn-admin-directory): New var.
(vc-svn-registered, vc-svn-responsible-p) (vc-svn-repository-hostname): Use it. Suggested by arit93@yahoo.com.
-rw-r--r--lisp/vc-svn.el30
1 files changed, 24 insertions, 6 deletions
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el
index c48ce7a5f99..68bbc5b397d 100644
--- a/lisp/vc-svn.el
+++ b/lisp/vc-svn.el
@@ -95,22 +95,38 @@ This is only meaningful if you don't use the implicit checkout model
95 ;; :group 'vc 95 ;; :group 'vc
96 ) 96 )
97 97
98(defvar vc-svn-admin-directory
99 (cond ((and (eq system-type 'windows-nt)
100 (getenv "SVN_ASP_DOT_NET_HACK"))
101 "_svn")
102 (t ".svn"))
103 "The name of the \".svn\" subdirectory or its equivalent.")
104
98;;; 105;;;
99;;; State-querying functions 106;;; State-querying functions
100;;; 107;;;
101 108
109;;; vc-svn-admin-directory is generally not defined when the
110;;; autoloaded function is called.
111
102;;;###autoload (defun vc-svn-registered (f) 112;;;###autoload (defun vc-svn-registered (f)
103;;;###autoload (when (file-readable-p (expand-file-name 113;;;###autoload (let ((admin-dir (cond ((and (eq system-type 'windows-nt)
104;;;###autoload ".svn/entries" (file-name-directory f))) 114;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK"))
115;;;###autoload "_svn")
116;;;###autoload (t ".svn"))))
117;;;###autoload (when (file-readable-p (expand-file-name
118;;;###autoload (concat admin-dir "/entries"))
119;;;###autoload (file-name-directory f))
105;;;###autoload (load "vc-svn") 120;;;###autoload (load "vc-svn")
106;;;###autoload (vc-svn-registered f))) 121;;;###autoload (vc-svn-registered f))))
107 122
108;;;###autoload 123;;;###autoload
109(add-to-list 'completion-ignored-extensions ".svn/") 124(add-to-list 'completion-ignored-extensions ".svn/")
110 125
111(defun vc-svn-registered (file) 126(defun vc-svn-registered (file)
112 "Check if FILE is SVN registered." 127 "Check if FILE is SVN registered."
113 (when (file-readable-p (expand-file-name ".svn/entries" 128 (when (file-readable-p (expand-file-name (concat vc-svn-admin-directory
129 "/entries")
114 (file-name-directory file))) 130 (file-name-directory file)))
115 (with-temp-buffer 131 (with-temp-buffer
116 (cd (file-name-directory file)) 132 (cd (file-name-directory file))
@@ -206,7 +222,7 @@ the SVN command (in that order)."
206 222
207(defun vc-svn-responsible-p (file) 223(defun vc-svn-responsible-p (file)
208 "Return non-nil if SVN thinks it is responsible for FILE." 224 "Return non-nil if SVN thinks it is responsible for FILE."
209 (file-directory-p (expand-file-name ".svn" 225 (file-directory-p (expand-file-name vc-svn-admin-directory
210 (if (file-directory-p file) 226 (if (file-directory-p file)
211 file 227 file
212 (file-name-directory file))))) 228 (file-name-directory file)))))
@@ -474,7 +490,9 @@ and that it passes `vc-svn-global-switches' to it before FLAGS."
474 (let ((coding-system-for-read 490 (let ((coding-system-for-read
475 (or file-name-coding-system 491 (or file-name-coding-system
476 default-file-name-coding-system))) 492 default-file-name-coding-system)))
477 (vc-insert-file (expand-file-name ".svn/entries" dirname))) 493 (vc-insert-file (expand-file-name (concat vc-svn-admin-directory
494 "/entries")
495 dirname)))
478 (goto-char (point-min)) 496 (goto-char (point-min))
479 (when (re-search-forward 497 (when (re-search-forward
480 ;; Old `svn' used name="svn:dir", newer use just name="". 498 ;; Old `svn' used name="svn:dir", newer use just name="".