aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-06-27 14:27:23 +0300
committerEli Zaretskii2015-06-27 14:27:23 +0300
commit7baae811651d73b3e89c832a5c15ff5b40c82635 (patch)
tree7db7653a9e9f620792be265f998bb98b38f77289
parent31807189b55d9519a46e4b35fadbe20218e4ebea (diff)
downloademacs-7baae811651d73b3e89c832a5c15ff5b40c82635.tar.gz
emacs-7baae811651d73b3e89c832a5c15ff5b40c82635.zip
Fix VC test suite on MS-Windows
* lisp/vc/vc-svn.el (vc-svn-create-repo): Make sure the file: URL always starts with 3 slashes after the colon. * test/automated/vc-tests.el (vc-test--create-repo-function): Use 'w32-application-type' to invoke CVS on MS-Windows with properly formatted CVSROOT directory name.
-rw-r--r--lisp/vc/vc-svn.el10
-rw-r--r--test/automated/vc-tests.el14
2 files changed, 22 insertions, 2 deletions
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 5ce9afa02c6..f97e2ab17e9 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -279,7 +279,15 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
279 ;; Expand default-directory because svn gets confused by eg 279 ;; Expand default-directory because svn gets confused by eg
280 ;; file://~/path/to/file. (Bug#15446). 280 ;; file://~/path/to/file. (Bug#15446).
281 (vc-svn-command "*vc*" 0 "." "checkout" 281 (vc-svn-command "*vc*" 0 "." "checkout"
282 (concat "file://" (expand-file-name default-directory) "SVN"))) 282 (let ((defdir (expand-file-name default-directory)))
283 (concat (if (and (stringp defdir)
284 (eq (aref defdir 0) ?/))
285 "file://"
286 ;; MS-Windows files d:/foo/bar need to
287 ;; begin with 3 leading slashes.
288 "file:///")
289 defdir
290 "SVN"))))
283 291
284(autoload 'vc-switches "vc") 292(autoload 'vc-switches "vc")
285 293
diff --git a/test/automated/vc-tests.el b/test/automated/vc-tests.el
index 58d22378100..a7242e95e95 100644
--- a/test/automated/vc-tests.el
+++ b/test/automated/vc-tests.el
@@ -130,7 +130,19 @@ For backends which dont support it, it is emulated."
130 (make-temp-name "vc-test") temporary-file-directory))) 130 (make-temp-name "vc-test") temporary-file-directory)))
131 (make-directory (expand-file-name "module" tmp-dir) 'parents) 131 (make-directory (expand-file-name "module" tmp-dir) 'parents)
132 (make-directory (expand-file-name "CVSROOT" tmp-dir) 'parents) 132 (make-directory (expand-file-name "CVSROOT" tmp-dir) 'parents)
133 (shell-command-to-string (format "cvs -Q -d:local:%s co module" tmp-dir)) 133 (if (not (fboundp 'w32-application-type))
134 (shell-command-to-string (format "cvs -Q -d:local:%s co module"
135 tmp-dir))
136 (let ((cvs-prog (executable-find "cvs"))
137 (tdir tmp-dir))
138 ;; If CVS executable is an MSYS program, reformat the file
139 ;; name of TMP-DIR to have the /d/foo/bar form supported by
140 ;; MSYS programs. (FIXME: What about Cygwin cvs.exe?)
141 (if (eq (w32-application-type cvs-prog) 'msys)
142 (setq tdir
143 (concat "/" (substring tmp-dir 0 1) (substring tmp-dir 2))))
144 (shell-command-to-string (format "cvs -Q -d:local:%s co module"
145 tdir))))
134 (rename-file "module/CVS" default-directory) 146 (rename-file "module/CVS" default-directory)
135 (delete-directory "module" 'recursive) 147 (delete-directory "module" 'recursive)
136 ;; We must cleanup the "remote" CVS repo as well. 148 ;; We must cleanup the "remote" CVS repo as well.