[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tramp 35c25d03c7: Tramp ELPA version 2.5.2.5 released
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tramp 35c25d03c7: Tramp ELPA version 2.5.2.5 released |
Date: |
Mon, 30 May 2022 05:58:04 -0400 (EDT) |
branch: externals/tramp
commit 35c25d03c7bb27dc1f606d1cb9273c303e2f4659
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Tramp ELPA version 2.5.2.5 released
---
README | 4 ++--
test/tramp-tests.el | 21 +++++++++++++++------
texi/trampver.texi | 2 +-
tramp-adb.el | 4 ++--
tramp-cmds.el | 2 ++
tramp-fuse.el | 43 ++++++++++++++++++++++++++++---------------
tramp-gvfs.el | 36 ++++++++++++++++++++----------------
tramp-sh.el | 51 ++++++++++++++++++++++++++++++++++++++++++++-------
tramp.el | 5 ++++-
trampver.el | 6 +++---
10 files changed, 121 insertions(+), 53 deletions(-)
diff --git a/README b/README
index 54c4e722e6..95c732e3aa 100644
--- a/README
+++ b/README
@@ -22,11 +22,11 @@ installed with, you must recompile the package:
* Remove all byte-compiled Tramp files
- $ rm -f ~/.emacs.d/elpa/tramp-2.5.2.4/tramp*.elc
+ $ rm -f ~/.emacs.d/elpa/tramp-2.5.2.5/tramp*.elc
* Start Emacs with Tramp's source files
- $ emacs -L ~/.emacs.d/elpa/tramp-2.5.2.4 -l tramp
+ $ emacs -L ~/.emacs.d/elpa/tramp-2.5.2.5 -l tramp
This should not give you the error.
diff --git a/test/tramp-tests.el b/test/tramp-tests.el
index 8b999a6e34..61fa6a5ae4 100644
--- a/test/tramp-tests.el
+++ b/test/tramp-tests.el
@@ -68,6 +68,7 @@
(defvar tramp-connection-properties)
(defvar tramp-copy-size-limit)
(defvar tramp-display-escape-sequence-regexp)
+(defvar tramp-fuse-remove-hidden-files)
(defvar tramp-fuse-unmount-on-cleanup)
(defvar tramp-inline-compress-start-size)
(defvar tramp-persistency-file-name)
@@ -2997,7 +2998,8 @@ This tests also `file-directory-p' and
`file-accessible-directory-p'."
(skip-unless (tramp--test-enabled))
(dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
- (let* ((tmp-name1 (tramp--test-make-temp-name nil quoted))
+ (let* ((tramp-fuse-remove-hidden-files t)
+ (tmp-name1 (tramp--test-make-temp-name nil quoted))
(tmp-name2 (expand-file-name "bla" tmp-name1))
(tmp-name3 (expand-file-name "foo" tmp-name1)))
(unwind-protect
@@ -3041,7 +3043,8 @@ This tests also `file-directory-p' and
`file-accessible-directory-p'."
(skip-unless (tramp--test-enabled))
(dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
- (let* ((tmp-name1 (tramp--test-make-temp-name nil quoted))
+ (let* ((tramp-fuse-remove-hidden-files t)
+ (tmp-name1 (tramp--test-make-temp-name nil quoted))
(tmp-name2 (expand-file-name "foo" tmp-name1))
(tmp-name3 (expand-file-name "bar" tmp-name1))
(tmp-name4 (expand-file-name "baz" tmp-name1))
@@ -4303,7 +4306,8 @@ This tests also `make-symbolic-link', `file-truename' and
`add-name-to-file'."
;; Method and host name in completion mode. This kind of completion
;; does not work on MS Windows.
(when (not (memq system-type '(cygwin windows-nt)))
- (let ((method (file-remote-p tramp-test-temporary-file-directory 'method))
+ (let ((tramp-fuse-remove-hidden-files t)
+ (method (file-remote-p tramp-test-temporary-file-directory 'method))
(host (file-remote-p tramp-test-temporary-file-directory 'host))
(orig-syntax tramp-syntax))
(when (and (stringp host) (string-match tramp-host-with-port-regexp
host))
@@ -4355,7 +4359,8 @@ This tests also `make-symbolic-link', `file-truename' and
`add-name-to-file'."
(dolist (non-essential '(nil t))
(dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
- (let ((tmp-name (tramp--test-make-temp-name nil quoted)))
+ (let ((tramp-fuse-remove-hidden-files t)
+ (tmp-name (tramp--test-make-temp-name nil quoted)))
(unwind-protect
(progn
@@ -4425,7 +4430,9 @@ This tests also `make-symbolic-link', `file-truename' and
`add-name-to-file'."
(let ((tmp-name (tramp--test-make-temp-name nil quoted)))
(unwind-protect
(progn
- (load tmp-name 'noerror 'nomessage)
+ ;; Ange-FTP does not tolerate a missing file, even with `noerror'.
+ (unless (tramp--test-ange-ftp-p)
+ (load tmp-name 'noerror 'nomessage))
(should-not (featurep 'tramp-test-load))
(write-region "(provide 'tramp-test-load)" nil tmp-name)
;; `load' in lread.c does not pass `must-suffix'. Why?
@@ -5012,6 +5019,7 @@ If UNSTABLE is non-nil, the test is tagged as
`:unstable'."
'(:unstable)))
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
+ (skip-unless (not (tramp--test-windows-nt-p)))
(skip-unless (not (tramp--test-crypt-p)))
;; Since Emacs 26.1.
(skip-unless (boundp 'interrupt-process-functions))
@@ -6461,6 +6469,7 @@ This requires restrictions of file name syntax."
;; would let the test fail.
(let* ((tramp-test-temporary-file-directory
(file-truename tramp-test-temporary-file-directory))
+ (tramp-fuse-remove-hidden-files t)
(tmp-name1 (tramp--test-make-temp-name nil quoted))
(tmp-name2 (tramp--test-make-temp-name 'local quoted))
(files
@@ -6634,7 +6643,7 @@ This requires restrictions of file name syntax."
(delete-file file2)
(should-not (file-exists-p file2))
- (delete-directory file1)
+ (delete-directory file1 'recursive)
(should-not (file-exists-p file1))))
;; Check, that environment variables are set correctly.
diff --git a/texi/trampver.texi b/texi/trampver.texi
index 11fac9a961..bf8a943c05 100644
--- a/texi/trampver.texi
+++ b/texi/trampver.texi
@@ -8,7 +8,7 @@
@c In the Tramp GIT, the version numbers are auto-frobbed from
@c tramp.el, and the bug report address is auto-frobbed from
@c configure.ac.
-@set trampver 2.5.2.4
+@set trampver 2.5.2.5
@set trampurl https://www.gnu.org/software/tramp/
@set tramp-bug-report-address tramp-devel@@gnu.org
@set emacsver 25.1
diff --git a/tramp-adb.el b/tramp-adb.el
index aa0f558a2b..1fe10a560b 100644
--- a/tramp-adb.el
+++ b/tramp-adb.el
@@ -1112,9 +1112,9 @@ E.g. a host name \"192.168.1.1#5555\" returns
\"192.168.1.1:5555\"
tramp-prefix-port-format ":"
(cond ((member host devices) host)
;; This is the case when the host is connected to the default port.
- ((member (format "%s%s%d" host tramp-prefix-port-format port)
+ ((member (format "%s%s%s" host tramp-prefix-port-format port)
devices)
- (format "%s:%d" host port))
+ (format "%s:%s" host port))
;; An empty host name shall be mapped as well, when there
;; is exactly one entry in `devices'.
((and (zerop (length host)) (= (length devices) 1))
diff --git a/tramp-cmds.el b/tramp-cmds.el
index 43aed62555..8e359c382b 100644
--- a/tramp-cmds.el
+++ b/tramp-cmds.el
@@ -51,6 +51,7 @@ SYNTAX can be one of the symbols `default' (default),
(when syntax
(customize-set-variable 'tramp-syntax syntax)))
+;;;###tramp-autoload
(defun tramp-list-tramp-buffers ()
"Return a list of all Tramp connection buffers."
(append
@@ -61,6 +62,7 @@ SYNTAX can be one of the symbols `default' (default),
(all-completions
"*trace tramp" (mapcar #'list (mapcar #'buffer-name (buffer-list))))))
+;;;###tramp-autoload
(defun tramp-list-remote-buffers ()
"Return a list of all buffers with remote `default-directory'."
(delq
diff --git a/tramp-fuse.el b/tramp-fuse.el
index 17d419f853..7344c3c730 100644
--- a/tramp-fuse.el
+++ b/tramp-fuse.el
@@ -44,6 +44,17 @@
(delete-file (tramp-fuse-local-file-name filename) trash)
(tramp-flush-file-properties v localname)))
+(defvar tramp-fuse-remove-hidden-files nil
+ "Remove hidden files from directory listings.")
+
+(defsubst tramp-fuse-remove-hidden-files (files)
+ "Remove hidden files from FILES."
+ (if tramp-fuse-remove-hidden-files
+ (cl-remove-if
+ (lambda (x) (and (stringp x) (string-match-p "\\.fuse_hidden" x)))
+ files)
+ files))
+
(defun tramp-fuse-handle-directory-files
(directory &optional full match nosort count)
"Like `directory-files' for Tramp files."
@@ -75,7 +86,8 @@
result)))
(setq result (cons item result))))
;; Return result.
- (if nosort result (sort result #'string<))))))
+ (tramp-fuse-remove-hidden-files
+ (if nosort result (sort result #'string<)))))))
(defun tramp-fuse-handle-file-attributes (filename &optional id-format)
"Like `file-attributes' for Tramp files."
@@ -92,20 +104,21 @@
(defun tramp-fuse-handle-file-name-all-completions (filename directory)
"Like `file-name-all-completions' for Tramp files."
- (all-completions
- filename
- (delete-dups
- (append
- (file-name-all-completions
- filename (tramp-fuse-local-file-name directory))
- ;; Some storage systems do not return "." and "..".
- (let (result)
- (dolist (item '(".." ".") result)
- (when (string-prefix-p filename item)
- (catch 'match
- (dolist (elt completion-regexp-list)
- (unless (string-match-p elt item) (throw 'match nil)))
- (setq result (cons (concat item "/") result))))))))))
+ (tramp-fuse-remove-hidden-files
+ (all-completions
+ filename
+ (delete-dups
+ (append
+ (file-name-all-completions
+ filename (tramp-fuse-local-file-name directory))
+ ;; Some storage systems do not return "." and "..".
+ (let (result)
+ (dolist (item '(".." ".") result)
+ (when (string-prefix-p filename item)
+ (catch 'match
+ (dolist (elt completion-regexp-list)
+ (unless (string-match-p elt item) (throw 'match nil)))
+ (setq result (cons (concat item "/") result)))))))))))
(defun tramp-fuse-handle-file-readable-p (filename)
"Like `file-readable-p' for Tramp files."
diff --git a/tramp-gvfs.el b/tramp-gvfs.el
index c09c016e64..3a5041c491 100644
--- a/tramp-gvfs.el
+++ b/tramp-gvfs.el
@@ -1774,22 +1774,26 @@ a downcased host name only."
(list
t ;; handled.
nil ;; no abort of D-Bus.
- (with-tramp-connection-property (tramp-get-process v) message
- ;; In theory, there can be several choices.
- ;; Until now, there is only the question whether
- ;; to accept an unknown host signature or certificate.
- (with-temp-buffer
- ;; Preserve message for `progress-reporter'.
- (with-temp-message ""
- (insert message)
- (goto-char (point-max))
- (if noninteractive
- (message "%s" message)
- (pop-to-buffer (current-buffer)))
- (if (yes-or-no-p
- (buffer-substring
- (line-beginning-position) (point)))
- 0 1)))))
+ ;; Preserve message for `progress-reporter'.
+ (with-temp-message ""
+ (if noninteractive
+ ;; Keep regression tests running.
+ (progn
+ (message "%s" message)
+ 0)
+ (with-tramp-connection-property (tramp-get-process v)
message
+ ;; In theory, there can be several choices.
+ ;; Until now, there is only the question
+ ;; whether to accept an unknown host
+ ;; signature or certificate.
+ (with-temp-buffer
+ (insert message)
+ (goto-char (point-max))
+ (pop-to-buffer (current-buffer))
+ (if (yes-or-no-p
+ (buffer-substring
+ (line-beginning-position) (point)))
+ 0 1))))))
;; When QUIT is raised, we shall return this
;; information to D-Bus.
diff --git a/tramp-sh.el b/tramp-sh.el
index 67f5519bbf..b0e98a31e1 100644
--- a/tramp-sh.el
+++ b/tramp-sh.el
@@ -115,7 +115,7 @@ configuration."
"Which ssh Control* arguments to use.
If it is a string, it should have the form
-\"-o ControlMaster=auto -o ControlPath=\\='tramp.%%r@%%h:%%p\\='
+\"-o ControlMaster=auto -o ControlPath=tramp.%%C
-o ControlPersist=no\". Percent characters in the ControlPath
spec must be doubled, because the string is used as format string.
@@ -134,6 +134,15 @@ be auto-detected by Tramp.
The string is used in `tramp-methods'.")
+(defvar tramp-scp-force-scp-protocol nil
+ "Force scp protocol.
+
+It is the string \"-O\" if supported by the local scp (since
+release 8.6), otherwise the string \"\". If it is nil, it will
+be auto-detected by Tramp.
+
+The string is used in `tramp-methods'.")
+
;; Initialize `tramp-methods' with the supported methods.
;;;###tramp-autoload
(tramp--with-startup
@@ -170,7 +179,7 @@ The string is used in `tramp-methods'.")
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "scp")
(tramp-copy-args (("-P" "%p") ("-p" "%k")
- ("%x") ("-q") ("-r") ("%c")))
+ ("%x") ("%y") ("-q") ("-r")
("%c")))
(tramp-copy-keep-date t)
(tramp-copy-recursive t)))
(add-to-list 'tramp-methods
@@ -186,7 +195,7 @@ The string is used in `tramp-methods'.")
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "scp")
(tramp-copy-args (("-P" "%p") ("-p" "%k")
- ("%x") ("-q") ("-r") ("%c")))
+ ("%x") ("%y") ("-q") ("-r")
("%c")))
(tramp-copy-keep-date t)
(tramp-copy-recursive t)))
(add-to-list 'tramp-methods
@@ -2311,7 +2320,8 @@ The method used must be an out-of-band method."
?h (or host "") ?u (or user "") ?p (or port "")
?r listener ?c options ?k (if keep-date " " "")
?n (concat "2>" (tramp-get-remote-null-device v))
- ?x (tramp-scp-strict-file-name-checking v))
+ ?x (tramp-scp-strict-file-name-checking v)
+ ?y (tramp-scp-force-scp-protocol v))
copy-program (tramp-get-method-parameter v 'tramp-copy-program)
copy-keep-date (tramp-get-method-parameter
v 'tramp-copy-keep-date)
@@ -4775,13 +4785,13 @@ Goes through the list `tramp-inline-compress-commands'."
(if (zerop
(tramp-call-process
vec "ssh" nil nil nil
- "-G" "-o" "ControlPath='tramp.%C'" "0.0.0.1"))
+ "-G" "-o" "ControlPath=tramp.%C" "0.0.0.1"))
(setq tramp-ssh-controlmaster-options
(concat tramp-ssh-controlmaster-options
- " -o ControlPath='tramp.%%C'"))
+ " -o ControlPath=tramp.%%C"))
(setq tramp-ssh-controlmaster-options
(concat tramp-ssh-controlmaster-options
- " -o ControlPath='tramp.%%r@%%h:%%p'")))
+ " -o ControlPath=tramp.%%r@%%h:%%p")))
(when (zerop
(tramp-call-process
vec "ssh" nil nil nil
@@ -4818,6 +4828,33 @@ Goes through the list `tramp-inline-compress-commands'."
(setq tramp-scp-strict-file-name-checking "-T")))))))
tramp-scp-strict-file-name-checking)))
+(defun tramp-scp-force-scp-protocol (vec)
+ "Return the force scp protocol argument of the local scp."
+ (cond
+ ;; No options to be computed.
+ ((null (assoc "%y" (tramp-get-method-parameter vec 'tramp-copy-args)))
+ "")
+
+ ;; There is already a value to be used.
+ ((stringp tramp-scp-force-scp-protocol)
+ tramp-scp-force-scp-protocol)
+
+ ;; Determine the options.
+ (t (setq tramp-scp-force-scp-protocol "")
+ (let ((case-fold-search t))
+ (ignore-errors
+ (when (executable-find "scp")
+ (with-tramp-progress-reporter
+ vec 4 "Computing force scp protocol argument"
+ (with-temp-buffer
+ (tramp-call-process vec "scp" nil t nil "-O")
+ (goto-char (point-min))
+ (unless
+ (search-forward-regexp
+ "\\(illegal\\|unknown\\) option -- O" nil t)
+ (setq tramp-scp-force-scp-protocol "-O")))))))
+ tramp-scp-force-scp-protocol)))
+
(defun tramp-timeout-session (vec)
"Close the connection VEC after a session timeout.
If there is just some editing, retry it after 5 seconds."
diff --git a/tramp.el b/tramp.el
index 8baf72464d..3ee1169139 100644
--- a/tramp.el
+++ b/tramp.el
@@ -255,6 +255,8 @@ pair of the form (KEY VALUE). The following KEYs are
defined:
- \"%n\" expands to \"2>/dev/null\".
- \"%x\" is replaced by the `tramp-scp-strict-file-name-checking'
argument if it is supported.
+ - \"%y\" is replaced by the `tramp-scp-force-scp-protocol'
+ argument if it is supported.
The existence of `tramp-login-args', combined with the
absence of `tramp-copy-args', is an indication that the
@@ -495,7 +497,8 @@ interpreted as a regular expression which always matches."
;; either lower case or upper case letters. See
;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38079#20>.
(defcustom tramp-restricted-shell-hosts-alist
- (when (eq system-type 'windows-nt)
+ (when (and (eq system-type 'windows-nt)
+ (not (string-match-p "sh$" tramp-encoding-shell)))
(list (format "\\`\\(%s\\|%s\\)\\'"
(regexp-quote (downcase tramp-system-name))
(regexp-quote (upcase tramp-system-name)))))
diff --git a/trampver.el b/trampver.el
index 482c505c6e..5e0e582f86 100644
--- a/trampver.el
+++ b/trampver.el
@@ -7,7 +7,7 @@
;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
;; Package: tramp
-;; Version: 2.5.2.4
+;; Version: 2.5.2.5
;; Package-Requires: ((emacs "25.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.5.2.4"
+(defconst tramp-version "2.5.2.5"
"This version of Tramp.")
;;;###tramp-autoload
@@ -76,7 +76,7 @@
;; Check for Emacs version.
(let ((x (if (not (string-lessp emacs-version "25.1"))
"ok"
- (format "Tramp 2.5.2.4 is not fit for %s"
+ (format "Tramp 2.5.2.5 is not fit for %s"
(replace-regexp-in-string "\n" "" (emacs-version))))))
(unless (string-equal "ok" x) (error "%s" x)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/tramp 35c25d03c7: Tramp ELPA version 2.5.2.5 released,
ELPA Syncer <=