;; Expand default-directory because svn gets confused by eg
;; file://~/path/to/file. (Bug#15446).
(vc-svn-command "*vc*" 0 "." "checkout"
- (concat "file://" (expand-file-name default-directory) "SVN")))
+ (let ((defdir (expand-file-name default-directory)))
+ (concat (if (and (stringp defdir)
+ (eq (aref defdir 0) ?/))
+ "file://"
+ ;; MS-Windows files d:/foo/bar need to
+ ;; begin with 3 leading slashes.
+ "file:///")
+ defdir
+ "SVN"))))
(autoload 'vc-switches "vc")
(make-temp-name "vc-test") temporary-file-directory)))
(make-directory (expand-file-name "module" tmp-dir) 'parents)
(make-directory (expand-file-name "CVSROOT" tmp-dir) 'parents)
- (shell-command-to-string (format "cvs -Q -d:local:%s co module" tmp-dir))
+ (if (not (fboundp 'w32-application-type))
+ (shell-command-to-string (format "cvs -Q -d:local:%s co module"
+ tmp-dir))
+ (let ((cvs-prog (executable-find "cvs"))
+ (tdir tmp-dir))
+ ;; If CVS executable is an MSYS program, reformat the file
+ ;; name of TMP-DIR to have the /d/foo/bar form supported by
+ ;; MSYS programs. (FIXME: What about Cygwin cvs.exe?)
+ (if (eq (w32-application-type cvs-prog) 'msys)
+ (setq tdir
+ (concat "/" (substring tmp-dir 0 1) (substring tmp-dir 2))))
+ (shell-command-to-string (format "cvs -Q -d:local:%s co module"
+ tdir))))
(rename-file "module/CVS" default-directory)
(delete-directory "module" 'recursive)
;; We must cleanup the "remote" CVS repo as well.