]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix VC tests
authorEli Zaretskii <eliz@gnu.org>
Fri, 9 May 2025 11:43:03 +0000 (14:43 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 10 May 2025 08:56:52 +0000 (10:56 +0200)
* test/lisp/vc/vc-tests/vc-tests.el (vc-test-hg06-version-diff):
Skip on MS-Windows in batch mode.

* test/lisp/vc/vc-git-tests.el (vc-git-test--start-branch): More
portable command for showing the current branch ("--show-current"
is only available since Git 2.22).

(cherry picked from commit b87608c9c7fd3a7a2a2fb3803d6038fa888602c4)

test/lisp/vc/vc-git-tests.el
test/lisp/vc/vc-tests/vc-tests.el

index 3cb12d5f86ee2bee2649b060f44e6009fb088d69..eca7baaa88ef67c9a0012d995b66a6bd831f7f2e 100644 (file)
@@ -122,7 +122,7 @@ agnostic of init.defaultbranch."
   (write-region "hello" nil "README")
   (vc-git-test--run "add" "README")
   (vc-git-test--run "commit" "-mFirst")
-  (string-trim (vc-git-test--run "branch" "--show-current")))
+  (string-trim (vc-git-test--run "rev-parse" "--abbrev-ref" "HEAD")))
 
 (defun vc-git-test--dir-headers (headers)
   "Return an alist of header values as they would appear in `vc-dir'.
index e7852d53f99c40a27c17ff12b6e0d959629b950d..632a6a792bd0e75571867d6a94f977cc62bf0df0 100644 (file)
@@ -785,6 +785,11 @@ This checks also `vc-backend' and `vc-responsible-backend'."
           ;; `vc-mtn.el' gives me:
           ;; "Failed (status 1): mtn commit -m Testing vc-version-diff\n\n foo"
           (skip-when (memq ',backend '(Mtn)))
+          ;; `vc-hg.el' gives me, only on MS-Windows and only in batch mode:
+          ;; "Failed (status 255): hg --config ui.report_untrusted=0 commit -m Testing vc-version-diff\n\n foo"
+          (skip-when (and (memq ',backend '(Hg))
+                          (eq system-type 'windows-nt)
+                          noninteractive))
           (vc-test--version-diff ',backend))
         ))))