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.
This commit is contained in:
parent
a5726782d0
commit
f0a4879975
5 changed files with 63 additions and 17 deletions
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
@c In the Tramp GIT, the version number and the bug report address
|
@c In the Tramp GIT, the version number and the bug report address
|
||||||
@c are auto-frobbed from configure.ac.
|
@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 trampurl https://www.gnu.org/software/tramp/
|
||||||
@set tramp-bug-report-address tramp-devel@@gnu.org
|
@set tramp-bug-report-address tramp-devel@@gnu.org
|
||||||
@set emacsver 27.1
|
@set emacsver 27.1
|
||||||
|
|
|
@ -46,17 +46,21 @@
|
||||||
|
|
||||||
(unless (= emacs-major-version
|
(unless (= emacs-major-version
|
||||||
(car (version-to-list tramp-compat-emacs-compiled-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))
|
tramp-compat-emacs-compiled-version emacs-version))
|
||||||
|
|
||||||
(with-eval-after-load 'docker-tramp
|
(with-eval-after-load 'docker-tramp
|
||||||
(warn (concat "Package `docker-tramp' has been obsoleted, "
|
(lwarn 'tramp :warning
|
||||||
|
(concat "Package `docker-tramp' has been obsoleted, "
|
||||||
"please use integrated package `tramp-container'")))
|
"please use integrated package `tramp-container'")))
|
||||||
(with-eval-after-load 'kubernetes-tramp
|
(with-eval-after-load 'kubernetes-tramp
|
||||||
(warn (concat "Package `kubernetes-tramp' has been obsoleted, "
|
(lwarn 'tramp :warning
|
||||||
|
(concat "Package `kubernetes-tramp' has been obsoleted, "
|
||||||
"please use integrated package `tramp-container'")))
|
"please use integrated package `tramp-container'")))
|
||||||
(with-eval-after-load 'tramp-nspawn
|
(with-eval-after-load 'tramp-nspawn
|
||||||
(warn (concat "Package `tramp-nspawn' has been obsoleted, "
|
(lwarn 'tramp :warning
|
||||||
|
(concat "Package `tramp-nspawn' has been obsoleted, "
|
||||||
"please use integrated package `tramp-container'")))
|
"please use integrated package `tramp-container'")))
|
||||||
|
|
||||||
;; For not existing functions, obsolete functions, or functions with a
|
;; For not existing functions, obsolete functions, or functions with a
|
||||||
|
|
|
@ -468,8 +468,7 @@ to `tramp-message'."
|
||||||
(declare (tramp-suppress-trace t))
|
(declare (tramp-suppress-trace t))
|
||||||
(let (signal-hook-function)
|
(let (signal-hook-function)
|
||||||
(apply 'tramp-message vec-or-proc 2 fmt-string arguments)
|
(apply 'tramp-message vec-or-proc 2 fmt-string arguments)
|
||||||
(display-warning
|
(lwarn 'tramp :warning fmt-string arguments)))
|
||||||
'tramp (apply #'format-message fmt-string arguments) :warning)))
|
|
||||||
|
|
||||||
(defun tramp-test-message (fmt-string &rest arguments)
|
(defun tramp-test-message (fmt-string &rest arguments)
|
||||||
"Emit a Tramp message according `default-directory'."
|
"Emit a Tramp message according `default-directory'."
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
|
;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
|
||||||
;; Keywords: comm, processes
|
;; Keywords: comm, processes
|
||||||
;; Package: tramp
|
;; Package: tramp
|
||||||
;; Version: 2.7.1-pre
|
;; Version: 2.7.1
|
||||||
;; Package-Requires: ((emacs "27.1"))
|
;; Package-Requires: ((emacs "27.1"))
|
||||||
;; Package-Type: multi
|
;; Package-Type: multi
|
||||||
;; URL: https://www.gnu.org/software/tramp/
|
;; URL: https://www.gnu.org/software/tramp/
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
;; ./configure" to change them.
|
;; ./configure" to change them.
|
||||||
|
|
||||||
;;;###tramp-autoload
|
;;;###tramp-autoload
|
||||||
(defconst tramp-version "2.7.1-pre"
|
(defconst tramp-version "2.7.1"
|
||||||
"This version of Tramp.")
|
"This version of Tramp.")
|
||||||
|
|
||||||
;;;###tramp-autoload
|
;;;###tramp-autoload
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
;; Check for Emacs version.
|
;; Check for Emacs version.
|
||||||
(let ((x (if (not (string-version-lessp emacs-version "27.1"))
|
(let ((x (if (not (string-version-lessp emacs-version "27.1"))
|
||||||
"ok"
|
"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))))))
|
(replace-regexp-in-string "\n" "" (emacs-version))))))
|
||||||
(unless (string-equal "ok" x) (error "%s" x)))
|
(unless (string-equal "ok" x) (error "%s" x)))
|
||||||
|
|
||||||
|
@ -106,7 +106,8 @@
|
||||||
("2.4.3.27.1" . "27.1") ("2.4.5.27.2" . "27.2")
|
("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.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.6.3" . "29.4")
|
||||||
|
("2.7.1" . "30.1")))
|
||||||
|
|
||||||
(add-hook 'tramp-unload-hook
|
(add-hook 'tramp-unload-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|
|
@ -3904,12 +3904,44 @@ The test is derived from TEST and COMMAND."
|
||||||
(funcall (ert-test-body ert-test)))
|
(funcall (ert-test-body ert-test)))
|
||||||
(ert-skip (format "Test `%s' must run before" ',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-stat tramp-test18-file-attributes)
|
||||||
|
|
||||||
(tramp--test-deftest-with-perl 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-with-ls tramp-test18-file-attributes)
|
||||||
|
|
||||||
|
(tramp--test-deftest-without-file-attributes tramp-test18-file-attributes)
|
||||||
|
|
||||||
(defvar tramp--test-start-time nil
|
(defvar tramp--test-start-time nil
|
||||||
"Keep the start time of the current test, a float number.")
|
"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-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 ()
|
(ert-deftest tramp-test20-file-modes ()
|
||||||
"Check `file-modes'.
|
"Check `file-modes'.
|
||||||
This tests also `file-executable-p', `file-writable-p' and `set-file-modes'."
|
This tests also `file-executable-p', `file-writable-p' and `set-file-modes'."
|
||||||
|
@ -6839,7 +6874,8 @@ INPUT, if non-nil, is a string sent to the process."
|
||||||
(set-visited-file-name tmp-name1)
|
(set-visited-file-name tmp-name1)
|
||||||
(insert "foo")
|
(insert "foo")
|
||||||
(should (buffer-modified-p))
|
(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)
|
(cl-letf (((symbol-function #'read-from-minibuffer)
|
||||||
(lambda (&rest _args) "yes")))
|
(lambda (&rest _args) "yes")))
|
||||||
(kill-buffer)))
|
(kill-buffer)))
|
||||||
|
@ -7561,6 +7597,8 @@ This requires restrictions of file name syntax."
|
||||||
|
|
||||||
(tramp--test-deftest-with-ls tramp-test41-special-characters)
|
(tramp--test-deftest-with-ls tramp-test41-special-characters)
|
||||||
|
|
||||||
|
(tramp--test-deftest-without-file-attributes tramp-test41-special-characters)
|
||||||
|
|
||||||
(ert-deftest tramp-test42-utf8 ()
|
(ert-deftest tramp-test42-utf8 ()
|
||||||
"Check UTF8 encoding in file names and file contents."
|
"Check UTF8 encoding in file names and file contents."
|
||||||
(skip-unless (tramp--test-enabled))
|
(skip-unless (tramp--test-enabled))
|
||||||
|
@ -7627,6 +7665,8 @@ This requires restrictions of file name syntax."
|
||||||
|
|
||||||
(tramp--test-deftest-with-ls tramp-test42-utf8)
|
(tramp--test-deftest-with-ls tramp-test42-utf8)
|
||||||
|
|
||||||
|
(tramp--test-deftest-without-file-attributes tramp-test42-utf8)
|
||||||
|
|
||||||
(ert-deftest tramp-test43-file-system-info ()
|
(ert-deftest tramp-test43-file-system-info ()
|
||||||
"Check that `file-system-info' returns proper values."
|
"Check that `file-system-info' returns proper values."
|
||||||
(skip-unless (tramp--test-enabled))
|
(skip-unless (tramp--test-enabled))
|
||||||
|
@ -7864,10 +7904,12 @@ process sentinels. They shall not disturb each other."
|
||||||
(should-not (file-attributes file))
|
(should-not (file-attributes file))
|
||||||
(should (file-attributes file)))
|
(should (file-attributes file)))
|
||||||
;; Send string to process.
|
;; 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))
|
(while (accept-process-output nil 0))
|
||||||
(tramp--test-message
|
(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.
|
;; Regular operation post process action.
|
||||||
(dired-uncache file)
|
(dired-uncache file)
|
||||||
(if (= count 2)
|
(if (= count 2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue