1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

vc-tests: Fix two problems with other working tree tests

* test/lisp/vc/vc-tests/vc-tests.el (project, cl-lib): Require.
(vc-test--other-working-trees): Bind project-list-file to a
writeable file name.
(vc-test-hg07-other-working-trees): Use vc-hg-global-switches to
enable the share extension.
This commit is contained in:
Sean Whitton 2025-07-27 09:24:02 +01:00
parent e104c06e6a
commit eadc36a2af

View file

@ -116,6 +116,8 @@
(require 'ert-x) (require 'ert-x)
(require 'vc) (require 'vc)
(require 'log-edit) (require 'log-edit)
(require 'project)
(require 'cl-lib)
(declare-function w32-application-type "w32proc.c") (declare-function w32-application-type "w32proc.c")
@ -688,7 +690,9 @@ This checks also `vc-backend' and `vc-responsible-backend'."
(expand-file-name "second" default-directory))) (expand-file-name "second" default-directory)))
(third (file-name-as-directory (third (file-name-as-directory
(expand-file-name "third" default-directory))) (expand-file-name "third" default-directory)))
(tmp-name (expand-file-name "foo" first))) (tmp-name (expand-file-name "foo" first))
(project-list-file
(expand-file-name "projects.eld" default-directory)))
;; Set up the first working tree. ;; Set up the first working tree.
(make-directory first t) (make-directory first t)
@ -909,9 +913,13 @@ This checks also `vc-backend' and `vc-responsible-backend'."
(skip-unless (memq ',backend '(Git Hg))) (skip-unless (memq ',backend '(Git Hg)))
(skip-when (skip-when
(and (eq ',backend 'Hg) (and (eq ',backend 'Hg)
(equal (car (process-lines-ignore-status "hg" "share")) (cl-search "failed to import extension"
"hg: unknown command 'share'"))) (car
(vc-test--other-working-trees ',backend)))))) (process-lines-ignore-status
"hg" "--config=extensions.share=" "share")))))
(let ((vc-hg-global-switches (cons "--config=extensions.share="
vc-hg-global-switches)))
(vc-test--other-working-trees ',backend)))))))
(provide 'vc-tests) (provide 'vc-tests)
;;; vc-tests.el ends here ;;; vc-tests.el ends here