1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Tramp code cleanup

* lisp/net/tramp-sh.el (tramp-find-shell, tramp-find-inline-compress)
(tramp-get-remote-path):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
Use `tramp-warning'.

* test/lisp/net/tramp-tests.el (tramp--test-container-p):
Add "kubernetes", "run0" and "nspawn".
(tramp--test-toolbox-p): New defun.
(tramp-test45-asynchronous-requests): Use it.
(tramp--test-check-files): Adapt regexp.
This commit is contained in:
Michael Albinus 2024-05-20 16:22:17 +02:00
parent 9db24de481
commit 3c238f7c50
4 changed files with 24 additions and 14 deletions

View file

@ -4468,8 +4468,8 @@ file exists and nonzero exit status otherwise."
;; Maybe it works at least for some other commands.
(prog1
default-shell
(tramp-message
vec 2
(tramp-warning
vec
(concat
"Couldn't find a remote shell which groks tilde "
"expansion, using `%s'")
@ -5003,8 +5003,8 @@ Goes through the list `tramp-inline-compress-commands'."
(tramp-set-connection-property p "inline-compress" nil)
(tramp-set-connection-property p "inline-decompress" nil)
(tramp-message
vec 2 "Couldn't find an inline transfer compress command")))))
(tramp-warning
vec "Couldn't find an inline transfer compress command")))))
(defun tramp-ssh-option-exists-p (vec option)
"Check, whether local ssh OPTION is applicable."
@ -5714,8 +5714,8 @@ Nonexistent directories are removed from spec."
(tramp-shell-quote-argument tramp-end-of-heredoc))
'noerror (rx (literal tramp-end-of-heredoc)))
(progn
(tramp-message
vec 2 "Could not retrieve `tramp-own-remote-path'")
(tramp-warning
vec "Could not retrieve `tramp-own-remote-path'")
nil)))))
;; Replace place holder `tramp-default-remote-path'.

View file

@ -1231,7 +1231,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
((car destination)
(setq outbuf (current-buffer))))
;; stderr.
(tramp-message v 2 "%s" "STDERR not supported"))
(tramp-warning v "%s" "STDERR not supported"))
;; 't
(destination
(setq outbuf (current-buffer))))

View file

@ -4862,10 +4862,11 @@ should be set conmnection-local.")
(when (and (not (tramp-compat-connection-local-p
tramp-direct-async-process))
(tramp-connection-property-p v "direct-async-process"))
(let ((msg (concat "Connection property \"direct-async-process\" is deprecated, "
"use connection-local variable `tramp-direct-async-process'\n"
"See (info \"(tramp) Improving performance of "
"asynchronous remote processes\")")))
(let ((msg (concat
"Connection property \"direct-async-process\" is deprecated, "
"use connection-local variable `tramp-direct-async-process'\n"
"See (info \"(tramp) Improving performance of "
"asynchronous remote processes\")")))
(if (tramp-get-connection-property
tramp-null-hop "direct-async-process-warned")
(tramp-message v 2 msg)