branch: externals/tramp commit c37e5fa5f4e60a19b38089672fbad377035a33a2 Author: Michael Albinus <michael.albi...@gmx.de> Commit: Michael Albinus <michael.albi...@gmx.de>
Tramp ELPA version 2.7.2.4 released --- README | 6 +++--- test/tramp-tests.el | 53 +++++++++++++++++++++++++++++++++++----------------- texi/trampver.texi | 2 +- tramp-integration.el | 8 +++++--- tramp-sh.el | 7 ++++++- tramp.el | 7 ++++--- trampver.el | 8 ++++---- 7 files changed, 59 insertions(+), 32 deletions(-) diff --git a/README b/README index 0561aa4a0c..9b534ddf5f 100644 --- a/README +++ b/README @@ -32,11 +32,11 @@ Emacs 28 or older • Remove all byte-compiled Tramp files - $ rm -f ~/.emacs.d/elpa/tramp-2.7.2.3.1/tramp*.elc + $ rm -f ~/.emacs.d/elpa/tramp-2.7.2.4/tramp*.elc • Start Emacs with Tramp's source files - $ emacs -L ~/.emacs.d/elpa/tramp-2.7.2.3.1 -l tramp + $ emacs -L ~/.emacs.d/elpa/tramp-2.7.2.4 -l tramp This should not give you the error. @@ -50,7 +50,7 @@ Mitigation of a bug in Emacs 29.1 --------------------------------- Due to a bug in Emacs 29.1, you must apply the following change prior -installation or upgrading Tramp 2.7.2.3.1 from GNU ELPA: +installation or upgrading Tramp 2.7.2.4 from GNU ELPA: (when (string-equal emacs-version "29.1") (with-current-buffer diff --git a/test/tramp-tests.el b/test/tramp-tests.el index e22f1afc18..4fe3fca0df 100644 --- a/test/tramp-tests.el +++ b/test/tramp-tests.el @@ -5083,14 +5083,20 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ipv6-postfix tramp-postfix-host-format))) ;; The hop string fits only the initial syntax. (hop (and (eq tramp-syntax orig-syntax) hop)) + ;; Needed for host name completion. + (default-user + (file-remote-p + (concat tramp-prefix-format hop method-string host-string) + 'user)) + (default-user-string + (unless (tramp-string-empty-or-nil-p default-user) + (concat default-user tramp-postfix-user-format))) test result completions) (dolist (test-and-result ;; These are triples of strings (TEST-STRING - ;; RESULT-CHECK COMPLETION-CHECK). RESULT-CHECK - ;; could be not unique, in this case it is a list - ;; (RESULT1 RESULT2 ...). + ;; RESULT-CHECK COMPLETION-CHECK). (append ;; Complete method name. (unless (string-empty-p tramp-method-regexp) @@ -5116,11 +5122,9 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ipv6-prefix (substring-no-properties host 0 (min 2 (length host)))) - (,(concat - tramp-prefix-format hop method-string host-string) - ,(concat - tramp-prefix-format hop method-string - user-string host-string)) + ,(concat + tramp-prefix-format hop method-string + default-user-string host-string) ,host-string))) ;; Complete user and host name. (unless (or (tramp-string-empty-or-nil-p user) @@ -5161,14 +5165,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; (tramp--test-message ;; "syntax: %s style: %s test: %s result: %s" ;; syntax style test result) - (if (stringp (cadr test-and-result)) - (should - (string-prefix-p (cadr test-and-result) result)) - (should - (let (res) - (dolist (elem (cadr test-and-result) res) - (setq - res (or res (string-prefix-p elem result)))))))) + (should (string-prefix-p (cadr test-and-result) result))) (with-current-buffer "*Completions*" ;; We must remove leading `default-directory'. @@ -5401,6 +5398,12 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (with-timeout (10 (tramp--test-timeout-handler)) (while (< (- (point-max) (point-min)) (length "foo")) (while (accept-process-output proc 0 nil t)))) + ;; Some `cat' implementations do not support the `cat -' + ;; call. We skip then. + (skip-unless + (not + (string-match-p (rx "cat: -: input file is output file\n") + (buffer-string)))) (should (string-match-p "foo" (buffer-string)))) ;; Cleanup. @@ -5595,6 +5598,12 @@ If UNSTABLE is non-nil, the test is tagged as `:unstable'." (with-timeout (10 (tramp--test-timeout-handler)) (while (< (- (point-max) (point-min)) (length "foo")) (while (accept-process-output proc 0 nil t)))) + ;; Some `cat' implementations do not support the `cat -' + ;; call. We skip then. + (skip-unless + (not + (string-match-p (rx "cat: -: input file is output file\n") + (buffer-string)))) (should (string-match-p "foo" (buffer-string)))) ;; Cleanup. @@ -7359,7 +7368,7 @@ This does not support external Emacs calls." (tramp-method-out-of-band-p tramp-test-vec 1)) (defun tramp--test-putty-p () - "Check, whether the method method usaes PuTTY. + "Check, whether the method uses PuTTY. This does not support connection share for more than two connections." (member (file-remote-p ert-remote-temporary-file-directory 'method) @@ -7376,6 +7385,15 @@ This does not support special file names." (string-equal "rsync" (file-remote-p ert-remote-temporary-file-directory 'method))) +(defun tramp--test-scp-p () + "Check, whether an scp method is used. +This does not support quoted special characters in recent sshd +implementations." + ;; Detected with OpenSSH_9.9p1. + (member + (file-remote-p ert-remote-temporary-file-directory 'method) + '("pscp" "scp" "scpx"))) + (defun tramp--test-sh-p () "Check, whether the remote host runs a based method from tramp-sh.el." (tramp-sh-file-name-handler-p tramp-test-vec)) @@ -7748,6 +7766,7 @@ This requires restrictions of file name syntax." (skip-unless (not (getenv "EMACS_HYDRA_CI"))) ; SLOW ~ 620s (skip-unless (not (tramp--test-container-p))) (skip-unless (not (tramp--test-rsync-p))) + (skip-unless (not (tramp--test-scp-p))) (skip-unless (not (tramp--test-windows-nt-and-out-of-band-p))) (skip-unless (not (tramp--test-ksh-p))) (skip-unless (not (tramp--test-gdrive-p))) diff --git a/texi/trampver.texi b/texi/trampver.texi index 4a6742568f..f708c21879 100644 --- a/texi/trampver.texi +++ b/texi/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.2.3.1 +@set trampver 2.7.2.4 @set trampurl https://www.gnu.org/software/tramp/ @set tramp-bug-report-address tramp-devel@@gnu.org @set emacsver 27.1 diff --git a/tramp-integration.el b/tramp-integration.el index 552d52835e..6df9b17cdc 100644 --- a/tramp-integration.el +++ b/tramp-integration.el @@ -59,8 +59,9 @@ ;;; Fontification of `read-file-name': -(defvar tramp-rfn-eshadow-overlay) -(make-variable-buffer-local 'tramp-rfn-eshadow-overlay) +;; An overlay covering the shadowed part of the filename (local to the +;; minibuffer). +(defvar-local tramp-rfn-eshadow-overlay nil) (defun tramp-rfn-eshadow-setup-minibuffer () "Set up a minibuffer for `file-name-shadow-mode'. @@ -104,7 +105,8 @@ been set up by `rfn-eshadow-setup-minibuffer'." (minibuffer-prompt-end))) ;; We do not want to send any remote command. (non-essential t)) - (when (tramp-tramp-file-p (buffer-substring end (point-max))) + (when (and (tramp-tramp-file-p (buffer-substring end (point-max))) + (not (file-name-quoted-p (buffer-substring end (point-max))))) (save-excursion (save-restriction (narrow-to-region diff --git a/tramp-sh.el b/tramp-sh.el index 9d74c2fd08..046eef791a 100644 --- a/tramp-sh.el +++ b/tramp-sh.el @@ -3115,7 +3115,9 @@ will be used." (let ((pid (tramp-send-command-and-read v "echo $$"))) (setq p (tramp-get-connection-process v)) (process-put p 'remote-pid pid)) - (when (memq connection-type '(nil pipe)) + (when + (or (memq connection-type '(nil pipe)) + (tramp-check-remote-uname v tramp-sunos-unames)) ;; Disable carriage return to newline ;; translation. This does not work on ;; macOS, see Bug#50748. @@ -3131,6 +3133,9 @@ will be used." ;; should set a timeout ;; instead. See `tramp-pipe-stty-settings'. ;; (Bug#62093) + ;; On Solaris, the maximum line length + ;; depends also on MAX_CANON (256). So we + ;; disable buffering as well. ;; FIXME: Shall we rather use "stty raw"? (tramp-send-command v (format diff --git a/tramp.el b/tramp.el index 0acb613324..85bb480be3 100644 --- a/tramp.el +++ b/tramp.el @@ -7,7 +7,7 @@ ;; Maintainer: Michael Albinus <michael.albi...@gmx.de> ;; Keywords: comm, processes ;; Package: tramp -;; Version: 2.7.2.3.1 +;; Version: 2.7.2.4 ;; Package-Requires: ((emacs "27.1")) ;; Package-Type: multi ;; URL: https://www.gnu.org/software/tramp/ @@ -4076,6 +4076,7 @@ Let-bind it when necessary.") ;; Otherwise, remove any trailing slash from localname component. ;; Method, host, etc, are unchanged. (while (with-parsed-tramp-file-name directory nil + (setq localname (file-name-unquote localname)) (and (tramp-compat-length> localname 0) (eq (aref localname (1- (length localname))) ?/) (not (string= localname "/")))) @@ -4164,8 +4165,8 @@ Let-bind it when necessary.") (eq (file-attribute-type (file-attributes (file-truename filename))) t))) (defun tramp-handle-file-equal-p (filename1 filename2) - "Like `file-equalp-p' for Tramp files." - ;; Native `file-equalp-p' calls `file-truename', which requires a + "Like `file-equal-p' for Tramp files." + ;; Native `file-equal-p' calls `file-truename', which requires a ;; remote connection. This can be avoided, if FILENAME1 and ;; FILENAME2 are not located on the same remote host. (when (tramp-equal-remote diff --git a/trampver.el b/trampver.el index 32837c5384..dc05844f63 100644 --- a/trampver.el +++ b/trampver.el @@ -7,7 +7,7 @@ ;; Maintainer: Michael Albinus <michael.albi...@gmx.de> ;; Keywords: comm, processes ;; Package: tramp -;; Version: 2.7.2.3.1 +;; Version: 2.7.2.4 ;; 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.2.3.1" +(defconst tramp-version "2.7.2.4" "This version of Tramp.") ;;;###tramp-autoload @@ -76,7 +76,7 @@ ;; Check for Emacs version. (let ((x (if (not (string-version-lessp emacs-version "27.1")) "ok" - (format "Tramp 2.7.2.3.1 is not fit for %s" + (format "Tramp 2.7.2.4 is not fit for %s" (replace-regexp-in-string "\n" "" (emacs-version)))))) (unless (string-equal "ok" x) (error "%s" x))) @@ -105,7 +105,7 @@ ("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.3" . "29.4") - ("2.7.1.30.1" . "30.1"))) + ("2.7.1.30.1" . "30.1") ("2.7.3.30.2" . "30.2"))) (add-hook 'tramp-unload-hook (lambda ()