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.
This commit is contained in:
parent
31807189b5
commit
7baae81165
2 changed files with 22 additions and 2 deletions
|
@ -279,7 +279,15 @@ RESULT is a list of conses (FILE . STATE) for directory DIR."
|
|||
;; 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")
|
||||
|
||||
|
|
|
@ -130,7 +130,19 @@ For backends which dont support it, it is emulated."
|
|||
(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.
|
||||
|
|
Loading…
Add table
Reference in a new issue