Mercurial > emacs
comparison lisp/vc-svn.el @ 73847:d4b9e5c377b4
Undo last fix.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 09 Nov 2006 03:31:09 +0000 |
parents | 43b04b94a590 |
children | 299d3322c8be |
comparison
equal
deleted
inserted
replaced
73846:43b04b94a590 | 73847:d4b9e5c377b4 |
---|---|
93 ;; :type 'boolean | 93 ;; :type 'boolean |
94 ;; :version "22.1" | 94 ;; :version "22.1" |
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 | |
105 ;;; | 98 ;;; |
106 ;;; State-querying functions | 99 ;;; State-querying functions |
107 ;;; | 100 ;;; |
108 | 101 |
109 ;;; vc-svn-admin-directory is generally not defined when the | |
110 ;;; autoloaded function is called. | |
111 | |
112 ;;;###autoload (defun vc-svn-registered (f) | 102 ;;;###autoload (defun vc-svn-registered (f) |
113 ;;;###autoload (let ((admin-dir (cond ((and (eq system-type 'windows-nt) | 103 ;;;###autoload (when (file-readable-p (expand-file-name |
114 ;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK")) | 104 ;;;###autoload ".svn/entries" (file-name-directory f))) |
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)) | |
120 ;;;###autoload (load "vc-svn") | 105 ;;;###autoload (load "vc-svn") |
121 ;;;###autoload (vc-svn-registered f)))) | 106 ;;;###autoload (vc-svn-registered f))) |
122 | 107 |
123 ;;;###autoload | 108 ;;;###autoload |
124 (add-to-list 'completion-ignored-extensions ".svn/") | 109 (add-to-list 'completion-ignored-extensions ".svn/") |
125 | 110 |
126 (defun vc-svn-registered (file) | 111 (defun vc-svn-registered (file) |
127 "Check if FILE is SVN registered." | 112 "Check if FILE is SVN registered." |
128 (when (file-readable-p (expand-file-name (concat vc-svn-admin-directory | 113 (when (file-readable-p (expand-file-name ".svn/entries" |
129 "/entries") | |
130 (file-name-directory file))) | 114 (file-name-directory file))) |
131 (with-temp-buffer | 115 (with-temp-buffer |
132 (cd (file-name-directory file)) | 116 (cd (file-name-directory file)) |
133 (let ((status | 117 (let ((status |
134 (condition-case nil | 118 (condition-case nil |
220 the SVN command (in that order)." | 204 the SVN command (in that order)." |
221 (apply 'vc-svn-command nil 0 file "add" (vc-switches 'SVN 'register))) | 205 (apply 'vc-svn-command nil 0 file "add" (vc-switches 'SVN 'register))) |
222 | 206 |
223 (defun vc-svn-responsible-p (file) | 207 (defun vc-svn-responsible-p (file) |
224 "Return non-nil if SVN thinks it is responsible for FILE." | 208 "Return non-nil if SVN thinks it is responsible for FILE." |
225 (file-directory-p (expand-file-name vc-svn-admin-directory | 209 (file-directory-p (expand-file-name ".svn" |
226 (if (file-directory-p file) | 210 (if (file-directory-p file) |
227 file | 211 file |
228 (file-name-directory file))))) | 212 (file-name-directory file))))) |
229 | 213 |
230 (defalias 'vc-svn-could-register 'vc-svn-responsible-p | 214 (defalias 'vc-svn-could-register 'vc-svn-responsible-p |
488 (defun vc-svn-repository-hostname (dirname) | 472 (defun vc-svn-repository-hostname (dirname) |
489 (with-temp-buffer | 473 (with-temp-buffer |
490 (let ((coding-system-for-read | 474 (let ((coding-system-for-read |
491 (or file-name-coding-system | 475 (or file-name-coding-system |
492 default-file-name-coding-system))) | 476 default-file-name-coding-system))) |
493 (vc-insert-file (expand-file-name (concat vc-svn-admin-directory | 477 (vc-insert-file (expand-file-name ".svn/entries" dirname))) |
494 "/entries") | |
495 dirname))) | |
496 (goto-char (point-min)) | 478 (goto-char (point-min)) |
497 (when (re-search-forward | 479 (when (re-search-forward |
498 ;; Old `svn' used name="svn:dir", newer use just name="". | 480 ;; Old `svn' used name="svn:dir", newer use just name="". |
499 (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*" | 481 (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*" |
500 "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?" | 482 "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?" |