From: Michael Albinus Date: Sat, 29 Jun 2024 08:13:32 +0000 (+0200) Subject: Sync with Tramp 2.7.1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6277cf8d81814c5a9b7c9294df41fa18017eba35;p=emacs.git Sync with Tramp 2.7.1 * doc/misc/trampver.texi: * lisp/net/trampver.el (tramp-version): Adapt Tramp versions. (customize-package-emacs-version-alist): Add Tramp version integrated in Emacs 30.1. * lisp/net/tramp-compat.el: * lisp/net/tramp-message.el (tramp-warning): Use `lwarn'. * test/lisp/net/tramp-tests.el (tramp--test-deftest-without-file-attributes): New defmacro. (tramp-test18-file-attributes-without-file-attributes) (tramp-test19-directory-files-and-attributes-without-file-attributes) (tramp-test18-file-attributes-without-file-attributes) (tramp-test42-utf8-without-file-attributes): New tests. (cherry picked from commit f0a487997564fb11dd6e6e8ba2361c9d8fc68f5a) --- diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index bf5c90ee8a9..521fe592e74 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -7,7 +7,7 @@ @c In the Tramp GIT, the version number and the bug report address @c are auto-frobbed from configure.ac. -@set trampver 2.7.1-pre +@set trampver 2.7.1 @set trampurl https://www.gnu.org/software/tramp/ @set tramp-bug-report-address tramp-devel@@gnu.org @set emacsver 27.1 diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 1d6f47dc364..8781230c00c 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -46,18 +46,22 @@ (unless (= emacs-major-version (car (version-to-list tramp-compat-emacs-compiled-version))) - (warn "Tramp has been compiled with Emacs %s, this is Emacs %s" + (lwarn 'tramp :warning + "Tramp has been compiled with Emacs %s, this is Emacs %s" tramp-compat-emacs-compiled-version emacs-version)) (with-eval-after-load 'docker-tramp - (warn (concat "Package `docker-tramp' has been obsoleted, " - "please use integrated package `tramp-container'"))) + (lwarn 'tramp :warning + (concat "Package `docker-tramp' has been obsoleted, " + "please use integrated package `tramp-container'"))) (with-eval-after-load 'kubernetes-tramp - (warn (concat "Package `kubernetes-tramp' has been obsoleted, " - "please use integrated package `tramp-container'"))) + (lwarn 'tramp :warning + (concat "Package `kubernetes-tramp' has been obsoleted, " + "please use integrated package `tramp-container'"))) (with-eval-after-load 'tramp-nspawn - (warn (concat "Package `tramp-nspawn' has been obsoleted, " - "please use integrated package `tramp-container'"))) + (lwarn 'tramp :warning + (concat "Package `tramp-nspawn' has been obsoleted, " + "please use integrated package `tramp-container'"))) ;; For not existing functions, obsolete functions, or functions with a ;; changed argument list, there are compiler warnings. We want to diff --git a/lisp/net/tramp-message.el b/lisp/net/tramp-message.el index 8d6458ce07a..b1f7aa95049 100644 --- a/lisp/net/tramp-message.el +++ b/lisp/net/tramp-message.el @@ -468,8 +468,7 @@ to `tramp-message'." (declare (tramp-suppress-trace t)) (let (signal-hook-function) (apply 'tramp-message vec-or-proc 2 fmt-string arguments) - (display-warning - 'tramp (apply #'format-message fmt-string arguments) :warning))) + (lwarn 'tramp :warning fmt-string arguments))) (defun tramp-test-message (fmt-string &rest arguments) "Emit a Tramp message according `default-directory'." diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 41647d42cc5..8bbfddeaab3 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -7,7 +7,7 @@ ;; Maintainer: Michael Albinus ;; Keywords: comm, processes ;; Package: tramp -;; Version: 2.7.1-pre +;; Version: 2.7.1 ;; Package-Requires: ((emacs "27.1")) ;; Package-Type: multi ;; URL: https://www.gnu.org/software/tramp/ @@ -40,7 +40,7 @@ ;; ./configure" to change them. ;;;###tramp-autoload -(defconst tramp-version "2.7.1-pre" +(defconst tramp-version "2.7.1" "This version of Tramp.") ;;;###tramp-autoload @@ -78,7 +78,7 @@ ;; Check for Emacs version. (let ((x (if (not (string-version-lessp emacs-version "27.1")) "ok" - (format "Tramp 2.7.1-pre is not fit for %s" + (format "Tramp 2.7.1 is not fit for %s" (replace-regexp-in-string "\n" "" (emacs-version)))))) (unless (string-equal "ok" x) (error "%s" x))) @@ -105,7 +105,9 @@ ("2.3.5.26.3" . "26.3") ("2.4.3.27.1" . "27.1") ("2.4.5.27.2" . "27.2") ("2.5.2.28.1" . "28.1") ("2.5.3.28.2" . "28.2") ("2.5.4" . "28.3") - ("2.6.0.29.1" . "29.1") ("2.6.2.29.2" . "29.2") ("2.6.3-pre" . "29.3"))) + ("2.6.0.29.1" . "29.1") ("2.6.2.29.2" . "29.2") ("2.6.3-pre" . "29.3") + ("2.6.3" . "29.4") + ("2.7.1" . "30.1"))) (add-hook 'tramp-unload-hook (lambda () diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 7396efa05c1..d51286d2053 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -3904,12 +3904,44 @@ The test is derived from TEST and COMMAND." (funcall (ert-test-body ert-test))) (ert-skip (format "Test `%s' must run before" ',test))))) +(defmacro tramp--test-deftest-without-file-attributes (test) + "Define ert `TEST-without-file-attributes'." + (declare (indent 1)) + `(ert-deftest + ,(intern (concat (symbol-name test) "-without-file-attributes")) () + :tags '(:expensive-test) + (let ((test-doc + (split-string + (ert-test-documentation (get ',test 'ert--test)) "\n"))) + ;; The first line must be extended. + (setcar + test-doc + (format "%s Don't Use the \"file-attributes\" cache." (car test-doc))) + (setf (ert-test-documentation + (get + (intern (format "%s-without-file-attributes" ',test)) + 'ert--test)) + (string-join test-doc "\n"))) + (skip-unless (tramp--test-enabled)) + (skip-unless + (or (tramp--test-adb-p) (tramp--test-sh-p) (tramp--test-sudoedit-p))) + (if-let ((default-directory ert-remote-temporary-file-directory) + (ert-test (ert-get-test ',test)) + (result (ert-test-most-recent-result ert-test))) + (progn + (skip-unless (< (ert-test-result-duration result) 300)) + (let (tramp-use-file-attributes) + (funcall (ert-test-body ert-test)))) + (ert-skip (format "Test `%s' must run before" ',test))))) + (tramp--test-deftest-with-stat tramp-test18-file-attributes) (tramp--test-deftest-with-perl tramp-test18-file-attributes) (tramp--test-deftest-with-ls tramp-test18-file-attributes) +(tramp--test-deftest-without-file-attributes tramp-test18-file-attributes) + (defvar tramp--test-start-time nil "Keep the start time of the current test, a float number.") @@ -4034,6 +4066,9 @@ They might differ only in time attributes or directory size." (tramp--test-deftest-with-ls tramp-test19-directory-files-and-attributes) +(tramp--test-deftest-without-file-attributes + tramp-test19-directory-files-and-attributes) + (ert-deftest tramp-test20-file-modes () "Check `file-modes'. This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." @@ -6530,7 +6565,8 @@ INPUT, if non-nil, is a string sent to the process." (set-visited-file-name tmp-name1) (insert "foo") (should (buffer-modified-p)) - (tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password) + (tramp-cleanup-connection + tramp-test-vec 'keep-debug 'keep-password) (cl-letf (((symbol-function #'read-from-minibuffer) (lambda (&rest _args) "yes"))) (kill-buffer))) @@ -7255,6 +7291,8 @@ This requires restrictions of file name syntax." (tramp--test-deftest-with-ls tramp-test41-special-characters) +(tramp--test-deftest-without-file-attributes tramp-test41-special-characters) + (ert-deftest tramp-test42-utf8 () "Check UTF8 encoding in file names and file contents." (skip-unless (tramp--test-enabled)) @@ -7321,6 +7359,8 @@ This requires restrictions of file name syntax." (tramp--test-deftest-with-ls tramp-test42-utf8) +(tramp--test-deftest-without-file-attributes tramp-test42-utf8) + (ert-deftest tramp-test43-file-system-info () "Check that `file-system-info' returns proper values." (skip-unless (tramp--test-enabled)) @@ -7558,10 +7598,12 @@ process sentinels. They shall not disturb each other." (should-not (file-attributes file)) (should (file-attributes file))) ;; Send string to process. - (process-send-string proc (format "%s\n" (buffer-name buf))) + (process-send-string + proc (format "%s\n" (buffer-name buf))) (while (accept-process-output nil 0)) (tramp--test-message - "Continue action %d %s %s" count buf (current-time-string)) + "Continue action %d %s %s" + count buf (current-time-string)) ;; Regular operation post process action. (dired-uncache file) (if (= count 2)