emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/tramp 0670be7423: Tramp ELPA version 2.5.2 released


From: ELPA Syncer
Subject: [elpa] externals/tramp 0670be7423: Tramp ELPA version 2.5.2 released
Date: Thu, 30 Dec 2021 04:58:02 -0500 (EST)

branch: externals/tramp
commit 0670be7423165441a6effbcb006f74c06bca153b
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Tramp ELPA version 2.5.2 released
---
 README              |   4 +-
 test/tramp-tests.el | 371 +++++++++++++++++++++-------------------------------
 texi/tramp.texi     |   2 +-
 texi/trampver.texi  |   2 +-
 tramp-archive.el    |   2 +-
 tramp-cache.el      |   6 +-
 tramp-compat.el     |  25 ----
 tramp-ftp.el        |  16 +--
 tramp-gvfs.el       |   3 -
 tramp-rclone.el     |   4 -
 tramp-sh.el         |   4 +
 tramp-sshfs.el      |   3 -
 tramp-sudoedit.el   |   5 +-
 tramp.el            | 211 +++++++++++++-----------------
 trampver.el         |   9 +-
 15 files changed, 260 insertions(+), 407 deletions(-)

diff --git a/README b/README
index 68e8a75508..50f84d46b7 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.1.5/tramp*.elc
+          $ rm -f ~/.emacs.d/elpa/tramp-2.5.2/tramp*.elc
 
    * Start Emacs with Tramp's source files
 
-          $ emacs -L ~/.emacs.d/elpa/tramp-2.5.1.5 -l tramp
+          $ emacs -L ~/.emacs.d/elpa/tramp-2.5.2 -l tramp
 
      This should not give you the error.
 
diff --git a/test/tramp-tests.el b/test/tramp-tests.el
index b7fc9f1e2c..8a1176f032 100644
--- a/test/tramp-tests.el
+++ b/test/tramp-tests.el
@@ -160,13 +160,6 @@ being the result.")
   ;; Return result.
   (cdr tramp--test-enabled-checked))
 
-(defsubst tramp--test-expensive-test ()
-  "Whether expensive tests are run."
-  (ert-select-tests
-   (ert--stats-selector ert--current-run-stats)
-   (list (make-ert-test :name (ert-test-name (ert-running-test))
-                        :body nil :tags '(:expensive-test)))))
-
 (defun tramp--test-make-temp-name (&optional local quoted)
   "Return a temporary file name for test.
 If LOCAL is non-nil, a local file name is returned.
@@ -2298,7 +2291,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
   "Check `file-exist-p', `write-region' and `delete-file'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name (tramp--test-make-temp-name nil quoted)))
       (should-not (file-exists-p tmp-name))
       (write-region "foo" nil tmp-name)
@@ -2306,8 +2299,10 @@ This checks also `file-name-as-directory', 
`file-name-directory',
       (delete-file tmp-name)
       (should-not (file-exists-p tmp-name))
 
-      ;; Trashing files doesn't work on MS Windows, and for crypted remote 
files.
-      (unless (or (tramp--test-windows-nt-p) (tramp--test-crypt-p))
+      ;; Trashing files doesn't work when `system-move-file-to-trash'
+      ;; is defined (on MS Windows and macOS), and for crypted remote
+      ;; files.
+      (unless (or (fboundp 'system-move-file-to-trash) (tramp--test-crypt-p))
        (let ((trash-directory (tramp--test-make-temp-name 'local quoted))
              (delete-by-moving-to-trash t))
          (make-directory trash-directory)
@@ -2331,7 +2326,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
   "Check `file-local-copy'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          tmp-name2)
       (unwind-protect
@@ -2363,7 +2358,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
   "Check `insert-file-contents'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name (tramp--test-make-temp-name nil quoted)))
       (unwind-protect
          (with-temp-buffer
@@ -2400,7 +2395,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
   "Check `write-region'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name (tramp--test-make-temp-name nil quoted))
           (inhibit-message t))
       (unwind-protect
@@ -2541,8 +2536,9 @@ This checks also `file-name-as-directory', 
`file-name-directory',
   (skip-unless (tramp--test-enabled))
 
   ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
-  (dolist (quoted (if (and (tramp--test-expensive-test) 
(tramp--test-emacs27-p))
-                     '(nil t) '(nil)))
+  (dolist (quoted
+          (if (and (tramp--test-expensive-test-p) (tramp--test-emacs27-p))
+              '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          (tmp-name3 (tramp--test-make-temp-name 'local quoted)))
@@ -2569,7 +2565,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
                (with-temp-buffer
                  (insert-file-contents target)
                  (should (string-equal (buffer-string) "foo")))
-               (when (tramp--test-expensive-test)
+               (when (tramp--test-expensive-test-p)
                  (should-error
                   (copy-file source target)
                   :type 'file-already-exists))
@@ -2588,7 +2584,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
                (make-directory target)
                (should (file-directory-p target))
                ;; This has been changed in Emacs 26.1.
-               (when (and (tramp--test-expensive-test) (tramp--test-emacs26-p))
+               (when (and (tramp--test-expensive-test-p)
+                          (tramp--test-emacs26-p))
                  (should-error
                   (copy-file source target)
                   :type 'file-already-exists)
@@ -2653,8 +2650,9 @@ This checks also `file-name-as-directory', 
`file-name-directory',
   (skip-unless (tramp--test-enabled))
 
   ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
-  (dolist (quoted (if (and (tramp--test-expensive-test) 
(tramp--test-emacs27-p))
-                     '(nil t) '(nil)))
+  (dolist (quoted
+          (if (and (tramp--test-expensive-test-p) (tramp--test-emacs27-p))
+              '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          (tmp-name3 (tramp--test-make-temp-name 'local quoted)))
@@ -2684,7 +2682,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
                  (should (string-equal (buffer-string) "foo")))
                (write-region "foo" nil source)
                (should (file-exists-p source))
-               (when (tramp--test-expensive-test)
+               (when (tramp--test-expensive-test-p)
                  (should-error
                   (rename-file source target)
                   :type 'file-already-exists))
@@ -2703,7 +2701,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
                (make-directory target)
                (should (file-directory-p target))
                ;; This has been changed in Emacs 26.1.
-               (when (and (tramp--test-expensive-test) (tramp--test-emacs26-p))
+               (when (and (tramp--test-expensive-test-p)
+                          (tramp--test-emacs26-p))
                  (should-error
                   (rename-file source target)
                   :type 'file-already-exists)
@@ -2771,7 +2770,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
 This tests also `file-directory-p' and `file-accessible-directory-p'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let* ((tmp-name1 (tramp--test-make-temp-name nil quoted))
           (tmp-name2 (expand-file-name "foo/bar" tmp-name1))
           (unusual-file-mode-1 #o740)
@@ -2809,7 +2808,7 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
   "Check `delete-directory'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let* ((tmp-name1 (tramp--test-make-temp-name nil quoted))
           (tmp-name2 (expand-file-name "foo" tmp-name1)))
       ;; Delete empty directory.
@@ -2833,9 +2832,12 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
       (should-not (file-directory-p tmp-name1))
 
       ;; Trashing directories works only since Emacs 27.1.  It doesn't
-      ;; work on MS Windows, for crypted remote directories and for ange-ftp.
-      (when (and (not  (tramp--test-windows-nt-p)) (not (tramp--test-crypt-p))
-                (not (tramp--test-ftp-p)) (tramp--test-emacs27-p))
+      ;; work when `system-move-file-to-trash' is defined (on MS
+      ;; Windows and macOS), for crypted remote directories and for
+      ;; ange-ftp.
+      (when (and (not (fboundp 'system-move-file-to-trash))
+                (not (tramp--test-crypt-p)) (not (tramp--test-ftp-p))
+                (tramp--test-emacs27-p))
        (let ((trash-directory (tramp--test-make-temp-name 'local quoted))
              (delete-by-moving-to-trash t))
          (make-directory trash-directory)
@@ -2883,7 +2885,7 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
   (skip-unless (tramp--test-enabled))
   (skip-unless (or (tramp--test-emacs26-p) (not (tramp--test-rclone-p))))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let* ((tmp-name1 (tramp--test-make-temp-name nil quoted))
           (tmp-name2 (tramp--test-make-temp-name nil quoted))
           (tmp-name3 (expand-file-name
@@ -2994,7 +2996,7 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
   "Check `directory-files'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let* ((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)))
@@ -3038,7 +3040,7 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
   "Check `file-expand-wildcards'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let* ((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))
@@ -3108,7 +3110,7 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
   ;; Emacs 27.1.
   (skip-unless (or (not (tramp--test-crypt-p)) (tramp--test-emacs27-p)))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let* ((tmp-name1
             (expand-file-name (tramp--test-make-temp-name nil quoted)))
           (tmp-name2 (expand-file-name "foo" tmp-name1))
@@ -3193,7 +3195,7 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
   ;; Since Emacs 26.1.
   (skip-unless (fboundp 'insert-directory-wildcard-in-dir-p))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let* ((tmp-name1
            (expand-file-name (tramp--test-make-temp-name nil quoted)))
           (tmp-name2
@@ -3297,7 +3299,7 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
   ;; Relative file names in dired are not supported in tramp-crypt.el.
   (skip-unless (not (tramp--test-crypt-p)))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let* ((tmp-name1
            (expand-file-name (tramp--test-make-temp-name nil quoted)))
           (tmp-name2 (expand-file-name "foo" tmp-name1))
@@ -3351,7 +3353,7 @@ This tests also `access-file', `file-readable-p',
 `file-regular-p' and `file-ownership-preserved-p'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     ;; We must use `file-truename' for the temporary directory,
     ;; because it could be located on a symlinked directory.  This
     ;; would let the test fail.
@@ -3570,7 +3572,7 @@ They might differ only in time attributes or directory 
size."
   "Check `directory-files-and-attributes'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     ;; `directory-files-and-attributes' contains also values for
     ;; "../".  Ensure that this doesn't change during tests, for
     ;; example due to handling temporary files.
@@ -3628,7 +3630,7 @@ This tests also `file-executable-p', `file-writable-p' 
and `set-file-modes'."
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-set-file-modes-p))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted)))
 
@@ -3723,7 +3725,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
   ;; older Emacsen, therefore.
   (skip-unless (tramp--test-emacs26-p))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     ;; We must use `file-truename' for the temporary directory,
     ;; because it could be located on a symlinked directory.  This
     ;; would let the test fail.
@@ -3748,11 +3750,11 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
               (if quoted #'tramp-compat-file-name-unquote #'identity)
               (file-remote-p tmp-name1 'localname))
              (file-symlink-p tmp-name2)))
-           (when (tramp--test-expensive-test)
+           (when (tramp--test-expensive-test-p)
              (should-error
               (make-symbolic-link tmp-name1 tmp-name2)
               :type 'file-already-exists))
-           (when (tramp--test-expensive-test)
+           (when (tramp--test-expensive-test-p)
              ;; A number means interactive case.
              (cl-letf (((symbol-function #'yes-or-no-p) #'ignore))
                (should-error
@@ -3792,7 +3794,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
               (string-equal tmp-name1 (file-symlink-p tmp-name3))))
            ;; Check directory as newname.
            (make-directory tmp-name4)
-           (when (tramp--test-expensive-test)
+           (when (tramp--test-expensive-test-p)
              (should-error
               (make-symbolic-link tmp-name1 tmp-name4)
               :type 'file-already-exists))
@@ -3820,7 +3822,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
 
       ;; Check `add-name-to-file'.
       (unwind-protect
-         (when (tramp--test-expensive-test)
+         (when (tramp--test-expensive-test-p)
            (tramp--test-ignore-add-name-to-file-error
             (write-region "foo" nil tmp-name1)
             (should (file-exists-p tmp-name1))
@@ -3935,11 +3937,11 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
               (string-equal
                (file-truename tmp-name2)
                (file-truename tmp-name3)))
-             (when (tramp--test-expensive-test)
+             (when (tramp--test-expensive-test-p)
                (should-error
                 (with-temp-buffer (insert-file-contents tmp-name2))
                 :type tramp-file-missing))
-             (when (tramp--test-expensive-test)
+             (when (tramp--test-expensive-test-p)
                (should-error
                 (with-temp-buffer (insert-file-contents tmp-name3))
                 :type tramp-file-missing))
@@ -3957,7 +3959,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
 
       ;; Detect cyclic symbolic links.
       (unwind-protect
-         (when (tramp--test-expensive-test)
+         (when (tramp--test-expensive-test-p)
            (tramp--test-ignore-make-symbolic-link-error
             (make-symbolic-link tmp-name2 tmp-name1)
             (should (file-symlink-p tmp-name1))
@@ -3995,7 +3997,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
    (or (tramp--test-adb-p) (tramp--test-gvfs-p)
        (tramp--test-sh-p) (tramp--test-sudoedit-p)))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          (tmp-name3 (tramp--test-make-temp-name nil quoted)))
@@ -4045,7 +4047,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
   "Check `set-visited-file-modtime' and `verify-visited-file-modtime'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name (tramp--test-make-temp-name nil quoted)))
       (unwind-protect
          (progn
@@ -4078,8 +4080,9 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
   (skip-unless (not (tramp--test-crypt-p)))
 
   ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
-  (dolist (quoted (if (and (tramp--test-expensive-test) 
(tramp--test-emacs27-p))
-                     '(nil t) '(nil)))
+  (dolist (quoted
+          (if (and (tramp--test-expensive-test-p) (tramp--test-emacs27-p))
+              '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          (tmp-name3 (tramp--test-make-temp-name 'local quoted)))
@@ -4157,8 +4160,9 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
   (skip-unless (not (tramp--test-crypt-p)))
 
   ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
-  (dolist (quoted (if (and (tramp--test-expensive-test) 
(tramp--test-emacs27-p))
-                     '(nil t) '(nil)))
+  (dolist (quoted
+          (if (and (tramp--test-expensive-test-p) (tramp--test-emacs27-p))
+              '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          (tmp-name3 (tramp--test-make-temp-name 'local quoted)))
@@ -4305,7 +4309,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
       (unwind-protect
           (dolist
              (syntax
-              (if (tramp--test-expensive-test)
+              (if (tramp--test-expensive-test-p)
                   (tramp-syntax-values) `(,orig-syntax)))
             (tramp-change-syntax syntax)
            ;; This has cleaned up all connection data, which are used
@@ -4347,7 +4351,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
         (tramp-change-syntax orig-syntax))))
 
   (dolist (non-essential '(nil t))
-    (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+    (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
       (let ((tmp-name (tramp--test-make-temp-name nil quoted)))
 
        (unwind-protect
@@ -4414,7 +4418,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
   "Check `load'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name (tramp--test-make-temp-name nil quoted)))
       (unwind-protect
          (progn
@@ -4443,7 +4447,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let* ((tmp-name (tramp--test-make-temp-name nil quoted))
           (fnnd (file-name-nondirectory tmp-name))
           (default-directory tramp-test-temporary-file-directory)
@@ -4519,11 +4523,11 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
 
 (ert-deftest tramp-test29-start-file-process ()
   "Check `start-file-process'."
-  :tags '(:expensive-test)
+  :tags '(:expensive-test :tramp-asynchronous-processes)
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((default-directory tramp-test-temporary-file-directory)
          (tmp-name (tramp--test-make-temp-name nil quoted))
          kill-buffer-query-functions proc)
@@ -4586,8 +4590,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
        ;; Cleanup.
        (ignore-errors (delete-process proc)))
 
-      ;; "telnet" and "sshfs" do not cooperate with disabled filter.
-      (unless (or (tramp--test-telnet-p) (tramp--test-sshfs-p))
+      ;; Disabled process filter.  "sshfs" does not cooperate.
+      (unless (tramp--test-sshfs-p)
        (unwind-protect
            (with-temp-buffer
              (setq proc (start-file-process "test3" (current-buffer) "cat"))
@@ -4596,8 +4600,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
              (set-process-filter proc t)
              (process-send-string proc "foo\n")
              (process-send-eof proc)
-             ;; Read output.
-             (with-timeout (10 (tramp--test-timeout-handler))
+             ;; Read output.  There shouldn't be any.
+             (with-timeout (10)
                (while (process-live-p proc)
                  (while (accept-process-output proc 0 nil t))))
              ;; No output due to process filter.
@@ -4675,7 +4679,8 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
          (ignore-errors (make-process :file-handler t)))
     `(ert-deftest ,(intern (concat (symbol-name test) "-direct-async")) ()
        ,docstring
-       :tags (if ,unstable '(:expensive-test :unstable) '(:expensive-test))
+       :tags (append '(:expensive-test :tramp-asynchronous-processes)
+                    (and ,unstable '(:unstable)))
        (skip-unless (tramp--test-enabled))
        (let ((default-directory tramp-test-temporary-file-directory)
             (ert-test (ert-get-test ',test))
@@ -4698,13 +4703,13 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
 
 (ert-deftest tramp-test30-make-process ()
   "Check `make-process'."
-  :tags '(:expensive-test)
+  :tags '(:expensive-test :tramp-asynchronous-processes)
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
   ;; `make-process' supports file name handlers since Emacs 27.
   (skip-unless (tramp--test-emacs27-p))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((default-directory tramp-test-temporary-file-directory)
          (tmp-name (tramp--test-make-temp-name nil quoted))
          kill-buffer-query-functions proc)
@@ -4778,8 +4783,8 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
        ;; Cleanup.
        (ignore-errors (delete-process proc)))
 
-      ;; "telnet" and "sshfs" do not cooperate with disabled filter.
-      (unless (or (tramp--test-telnet-p) (tramp--test-sshfs-p))
+      ;; Disabled process filter.  "sshfs" does not cooperate.
+      (unless (tramp--test-sshfs-p)
        (unwind-protect
            (with-temp-buffer
              (setq proc
@@ -4792,8 +4797,8 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
              (should (equal (process-status proc) 'run))
              (process-send-string proc "foo\n")
              (process-send-eof proc)
-             ;; Read output.
-             (with-timeout (10 (tramp--test-timeout-handler))
+             ;; Read output.  There shouldn't be any.
+             (with-timeout (10)
                (while (process-live-p proc)
                  (while (accept-process-output proc 0 nil t))))
              ;; No output due to process filter.
@@ -4941,8 +4946,9 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
 
 (ert-deftest tramp-test31-interrupt-process ()
   "Check `interrupt-process'."
-  :tags (if (or (getenv "EMACS_HYDRA_CI") (getenv "EMACS_EMBA_CI"))
-           '(:expensive-test :unstable) '(:expensive-test))
+  :tags (append '(:expensive-test :tramp-asynchronous-processes)
+               (and (or (getenv "EMACS_HYDRA_CI") (getenv "EMACS_EMBA_CI"))
+                    '(:unstable)))
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-sh-p))
   (skip-unless (not (tramp--test-crypt-p)))
@@ -5009,7 +5015,7 @@ INPUT, if non-nil, is a string sent to the process."
   (when (tramp--test-adb-p)
     (skip-unless (tramp--test-emacs27-p)))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name (tramp--test-make-temp-name nil quoted))
          (default-directory tramp-test-temporary-file-directory)
          ;; Suppress nasty messages.
@@ -5017,10 +5023,12 @@ INPUT, if non-nil, is a string sent to the process."
          kill-buffer-query-functions)
 
       (dolist (this-shell-command
-              '(;; Synchronously.
-                shell-command
-                ;; Asynchronously.
-                tramp--test-async-shell-command))
+              (append
+               ;; Synchronously.
+               '(shell-command)
+               ;; Asynchronously.
+               (and (tramp--test-asynchronous-processes-p)
+                    '(tramp--test-async-shell-command))))
 
        ;; Test ordinary `{async-}shell-command'.
        (unwind-protect
@@ -5061,31 +5069,34 @@ INPUT, if non-nil, is a string sent to the process."
              (ignore-errors (kill-buffer stderr))))))
 
       ;; Test sending string to `async-shell-command'.
-      (unwind-protect
-         (with-temp-buffer
-           (write-region "foo" nil tmp-name)
-           (should (file-exists-p tmp-name))
-           (tramp--test-async-shell-command
-            "read line; ls $line" (current-buffer) nil
-            ;; String to be sent.
-            (format "%s\n" (file-name-nondirectory tmp-name)))
-           (should
-            (string-equal
-             ;; tramp-adb.el echoes, so we must add the string.
-             (if (and (tramp--test-adb-p) (not (tramp-direct-async-process-p)))
-                 (format
-                  "%s\n%s\n"
-                  (file-name-nondirectory tmp-name)
-                  (file-name-nondirectory tmp-name))
-               (format "%s\n" (file-name-nondirectory tmp-name)))
-             (buffer-string))))
+      (when (tramp--test-asynchronous-processes-p)
+       (unwind-protect
+           (with-temp-buffer
+             (write-region "foo" nil tmp-name)
+             (should (file-exists-p tmp-name))
+             (tramp--test-async-shell-command
+              "read line; ls $line" (current-buffer) nil
+              ;; String to be sent.
+              (format "%s\n" (file-name-nondirectory tmp-name)))
+             (should
+              (string-equal
+               ;; tramp-adb.el echoes, so we must add the string.
+               (if (and (tramp--test-adb-p)
+                        (not (tramp-direct-async-process-p)))
+                   (format
+                    "%s\n%s\n"
+                    (file-name-nondirectory tmp-name)
+                    (file-name-nondirectory tmp-name))
+                 (format "%s\n" (file-name-nondirectory tmp-name)))
+               (buffer-string))))
 
-       ;; Cleanup.
-       (ignore-errors (delete-file tmp-name)))))
+         ;; Cleanup.
+         (ignore-errors (delete-file tmp-name))))))
 
   ;; Test `async-shell-command-width'.  It exists since Emacs 26.1,
   ;; but seems to work since Emacs 27.1 only.
-  (when (and (tramp--test-sh-p) (tramp--test-emacs27-p))
+  (when (and (tramp--test-asynchronous-processes-p)
+            (tramp--test-sh-p) (tramp--test-emacs27-p))
     (let* ((async-shell-command-width 1024)
           (default-directory tramp-test-temporary-file-directory)
           (cols (ignore-errors
@@ -5232,10 +5243,12 @@ INPUT, if non-nil, is a string sent to the process."
   (skip-unless (not (tramp--test-crypt-p)))
 
   (dolist (this-shell-command-to-string
-          '(;; Synchronously.
-            shell-command-to-string
-            ;; Asynchronously.
-            tramp--test-shell-command-to-string-asynchronously))
+          (append
+           ;; Synchronously.
+           '(shell-command-to-string)
+           ;; Asynchronously.
+           (and (tramp--test-asynchronous-processes-p)
+                '(tramp--test-shell-command-to-string-asynchronously))))
 
     (let ((default-directory tramp-test-temporary-file-directory)
          (shell-file-name "/bin/sh")
@@ -5424,7 +5437,7 @@ Use direct async.")
 ;; The functions were introduced in Emacs 26.1.
 (ert-deftest tramp-test34-explicit-shell-file-name ()
   "Check that connection-local `explicit-shell-file-name' is set."
-  :tags '(:expensive-test)
+  :tags '(:expensive-test :tramp-asynchronous-processes)
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
   ;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
@@ -5598,7 +5611,7 @@ Use direct async.")
   (skip-unless (tramp--test-sh-p))
   (skip-unless (not (tramp--test-crypt-p)))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     ;; We must use `file-truename' for the temporary directory, in
     ;; order to establish the connection prior running an asynchronous
     ;; process.
@@ -5668,7 +5681,7 @@ Use direct async.")
   "Check `make-auto-save-file-name'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          tramp-allow-unsafe-temporary-files)
@@ -5791,7 +5804,7 @@ Use direct async.")
   "Check `find-backup-file-name'."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          (ange-ftp-make-backup-files t)
@@ -5943,7 +5956,7 @@ Use direct async.")
   ;; `lock-file', `unlock-file', `file-locked-p' and
   ;; `make-lock-file-name' exists since Emacs 28.1.  We don't want to
   ;; see compiler warnings for older Emacsen.
-  (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          (remote-file-name-inhibit-cache t)
@@ -6131,6 +6144,15 @@ This requires restrictions of file name syntax."
    (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
    'tramp-ftp-file-name-handler))
 
+(defun tramp--test-asynchronous-processes-p ()
+  "Whether asynchronous processes tests are run.
+This is used in tests which we dont't want to tag
+`:tramp-asynchronous-processes' completely."
+  (ert-select-tests
+   (ert--stats-selector ert--current-run-stats)
+   (list (make-ert-test :name (ert-test-name (ert-running-test))
+                        :body nil :tags '(:tramp-asynchronous-processes)))))
+
 (defun tramp--test-crypt-p ()
   "Check, whether the remote directory is crypted."
   (tramp-crypt-file-name-p tramp-test-temporary-file-directory))
@@ -6141,6 +6163,15 @@ This does not support some special file names."
   (string-equal
    "docker" (file-remote-p tramp-test-temporary-file-directory 'method)))
 
+(defun tramp--test-expensive-test-p ()
+  "Whether expensive tests are run.
+This is used in tests which we dont't want to tag `:expensive'
+completely."
+  (ert-select-tests
+   (ert--stats-selector ert--current-run-stats)
+   (list (make-ert-test :name (ert-test-name (ert-running-test))
+                        :body nil :tags '(:expensive-test)))))
+
 (defun tramp--test-ftp-p ()
   "Check, whether an FTP-like method is used.
 This does not support globbing characters in file names (yet)."
@@ -6284,8 +6315,9 @@ This requires restrictions of file name syntax."
 (defun tramp--test-check-files (&rest files)
   "Run a simple but comprehensive test over every file in FILES."
   ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
-  (dolist (quoted (if (and (tramp--test-expensive-test) 
(tramp--test-emacs27-p))
-                     '(nil t) '(nil)))
+  (dolist (quoted
+          (if (and (tramp--test-expensive-test-p) (tramp--test-emacs27-p))
+              '(nil t) '(nil)))
     ;; We must use `file-truename' for the temporary directory,
     ;; because it could be located on a symlinked directory.  This
     ;; would let the test fail.
@@ -6445,7 +6477,7 @@ This requires restrictions of file name syntax."
            ;; Check, that environment variables are set correctly.
             ;; We do not run on macOS due to encoding problems.  See
             ;; Bug#36940.
-           (when (and (tramp--test-expensive-test) (tramp--test-sh-p)
+           (when (and (tramp--test-expensive-test-p) (tramp--test-sh-p)
                       (not (tramp--test-crypt-p))
                       (not (eq system-type 'darwin)))
              (dolist (elt files)
@@ -6527,7 +6559,7 @@ This requires restrictions of file name syntax."
          "{foo}bar{baz}")))
     ;; Simplify test in order to speed up.
     (apply #'tramp--test-check-files
-          (if (tramp--test-expensive-test)
+          (if (tramp--test-expensive-test-p)
               files (list (mapconcat #'identity files ""))))))
 
 ;; These tests are inspired by Bug#17238.
@@ -6626,7 +6658,7 @@ Use the \"ls\" command."
        ;; to U+1FFFF).
        "🌈🍒👋")
 
-      (when (tramp--test-expensive-test)
+      (when (tramp--test-expensive-test-p)
        (delete-dups
         (mapcar
          ;; Use all available language specific snippets.
@@ -6798,8 +6830,8 @@ This is needed in timer functions as well as process 
filters and sentinels."
   "Check parallel asynchronous requests.
 Such requests could arrive from timers, process filters and
 process sentinels.  They shall not disturb each other."
-  :tags (if (getenv "EMACS_EMBA_CI")
-           '(:expensive-test :unstable) '(:expensive-test))
+  :tags (append '(:expensive-test :tramp-asynchronous-processes)
+               (and (getenv "EMACS_HYDRA_CI") '(:unstable)))
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
   ;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
@@ -6997,116 +7029,8 @@ process sentinels.  They shall not disturb each other."
 ;; (tramp--test--deftest-direct-async-process 
tramp-test44-asynchronous-requests
 ;;   "Check parallel direct asynchronous requests." 'unstable)
 
-(ert-deftest tramp-test45-threads ()
-  "Check that Tramp cooperates with threads."
-  (skip-unless (tramp--test-enabled))
-  (skip-unless (featurep 'threads))
-  (skip-unless (= (length (with-no-warnings (all-threads))) 1))
-  (skip-unless (not (with-no-warnings (thread-last-error))))
-  ;; We need the thread features introduced in Emacs 27.
-  (skip-unless (bound-and-true-p main-thread))
-  ;; For the time being it works only in the feature branch.
-  (skip-unless
-   (string-equal
-    (bound-and-true-p emacs-repository-branch) "feature/tramp-thread-safe"))
-
-  (tramp--test-instrument-test-case 0
-  (with-no-warnings
-    (with-timeout (60 (tramp--test-timeout-handler))
-      ;; We cannot bind the variables dynamically; they are used in the 
threads.
-      (defvar tmp-name1 (tramp--test-make-temp-name))
-      (defvar tmp-name2 (tramp--test-make-temp-name))
-      (defvar tmp-mutex (make-mutex "mutex"))
-      (defvar tmp-condvar1 (make-condition-variable tmp-mutex "condvar1"))
-      (defvar tmp-condvar2 (make-condition-variable tmp-mutex "condvar2"))
-
-      ;; Rename simple file.
-      (unwind-protect
-         (let (tmp-thread1 tmp-thread2)
-           (write-region "foo" nil tmp-name1)
-           (should (file-exists-p tmp-name1))
-           (should-not (file-exists-p tmp-name2))
-
-           (should (mutexp tmp-mutex))
-           (should (condition-variable-p tmp-condvar1))
-           (should (condition-variable-p tmp-condvar2))
-
-           ;; This thread renames `tmp-name1' to `tmp-name2' twice.
-           (setq
-            tmp-thread1
-            (make-thread
-             (lambda ()
-               ;; Rename first time.
-               (rename-file tmp-name1 tmp-name2)
-               ;; Notify thread2.
-               (with-mutex (condition-mutex tmp-condvar2)
-                 (condition-notify tmp-condvar2 t))
-               ;; Rename second time, once we've got notification from thread2.
-               (with-mutex (condition-mutex tmp-condvar1)
-                 (condition-wait tmp-condvar1))
-               (rename-file tmp-name1 tmp-name2))
-             "thread1"))
-
-           (should (threadp tmp-thread1))
-           (should (thread-live-p tmp-thread1))
-
-           ;; This thread renames `tmp-name2' to `tmp-name1' twice.
-           (setq
-            tmp-thread2
-            (make-thread
-             (lambda ()
-               ;; Rename first time, once we've got notification from thread1.
-               (with-mutex (condition-mutex tmp-condvar2)
-                 (condition-wait tmp-condvar2))
-               (rename-file tmp-name2 tmp-name1)
-               ;; Notify thread1.
-               (with-mutex (condition-mutex tmp-condvar1)
-                 (condition-notify tmp-condvar1 t))
-               ;; Rename second time, once we've got notification from
-               ;; the main thread.
-               (with-mutex (condition-mutex tmp-condvar2)
-                 (condition-wait tmp-condvar2))
-               (rename-file tmp-name2 tmp-name1))
-             "thread2"))
-
-           (should (threadp tmp-thread2))
-           (should (thread-live-p tmp-thread2))
-           (should (= (length (all-threads)) 3))
-
-           ;; Wait for thread1.
-           (thread-join tmp-thread1)
-           ;; Checks.
-           (should-not (thread-live-p tmp-thread1))
-           (should (= (length (all-threads)) 2))
-           (should-not (thread-last-error))
-           (should (file-exists-p tmp-name2))
-           (should-not (file-exists-p tmp-name1))
-
-           ;; Notify thread2.
-           (with-mutex (condition-mutex tmp-condvar2)
-             (condition-notify tmp-condvar2 t))
-
-           ;; Wait for thread2.
-           (thread-join tmp-thread2)
-           ;; Checks.
-           (should-not (thread-live-p tmp-thread2))
-           (should (= (length (all-threads)) 1))
-           (should-not (thread-last-error))
-           (should (file-exists-p tmp-name1))
-           (should-not (file-exists-p tmp-name2)))
-
-       ;; Cleanup.
-       (ignore-errors (delete-file tmp-name1))
-       (ignore-errors (delete-file tmp-name2))
-       ;; We could have spurious threads still running; wait for them to die.
-       (while (cdr (all-threads))
-         (thread-signal (cadr (all-threads)) 'error nil)
-         (thread-yield))
-       ;; Cleanup errors.
-       (ignore-errors (thread-last-error 'cleanup)))))))
-
 ;; This test is inspired by Bug#29163.
-(ert-deftest tramp-test46-auto-load ()
+(ert-deftest tramp-test45-auto-load ()
   "Check that Tramp autoloads properly."
   ;; If we use another syntax but `default', Tramp is already loaded
   ;; due to the `tramp-change-syntax' call.
@@ -7131,7 +7055,7 @@ process sentinels.  They shall not disturb each other."
        (mapconcat #'shell-quote-argument load-path " -L ")
        (shell-quote-argument code)))))))
 
-(ert-deftest tramp-test46-delay-load ()
+(ert-deftest tramp-test45-delay-load ()
   "Check that Tramp is loaded lazily, only when needed."
   ;; The autoloaded Tramp objects are different since Emacs 26.1.  We
   ;; cannot test older Emacsen, therefore.
@@ -7164,7 +7088,7 @@ process sentinels.  They shall not disturb each other."
          (mapconcat #'shell-quote-argument load-path " -L ")
          (shell-quote-argument (format code tm)))))))))
 
-(ert-deftest tramp-test46-recursive-load ()
+(ert-deftest tramp-test45-recursive-load ()
   "Check that Tramp does not fail due to recursive load."
   (skip-unless (tramp--test-enabled))
 
@@ -7188,7 +7112,7 @@ process sentinels.  They shall not disturb each other."
          (mapconcat #'shell-quote-argument load-path " -L ")
          (shell-quote-argument code))))))))
 
-(ert-deftest tramp-test46-remote-load-path ()
+(ert-deftest tramp-test45-remote-load-path ()
   "Check that Tramp autoloads its packages with remote `load-path'."
   ;; The autoloaded Tramp objects are different since Emacs 26.1.  We
   ;; cannot test older Emacsen, therefore.
@@ -7217,7 +7141,7 @@ process sentinels.  They shall not disturb each other."
        (mapconcat #'shell-quote-argument load-path " -L ")
        (shell-quote-argument code)))))))
 
-(ert-deftest tramp-test47-unload ()
+(ert-deftest tramp-test46-unload ()
   "Check that Tramp and its subpackages unload completely.
 Since it unloads Tramp, it shall be the last test to run."
   :tags '(:expensive-test)
@@ -7301,7 +7225,6 @@ If INTERACTIVE is non-nil, the tests are run 
interactively."
 ;;   for direct async processes.
 ;; * Check, why direct async processes do not work for
 ;;   `tramp-test44-asynchronous-requests'.
-;; * Fix `tramp-test45-threads'.
 
 (provide 'tramp-tests)
 
diff --git a/texi/tramp.texi b/texi/tramp.texi
index c35fc51435..f5ea6e0c15 100644
--- a/texi/tramp.texi
+++ b/texi/tramp.texi
@@ -4228,7 +4228,7 @@ It is even possible to access file archives in file 
archives, as
 (progn
   (url-handler-mode 1)
   (find-file
-   
"http://ftp.debian.org/debian/pool/main/c/coreutils/coreutils_8.28-1_amd64.deb/control.tar.gz/control";))
+   
"https://ftp.debian.org/debian/pool/main/c/coreutils/coreutils_8.28-1_amd64.deb/control.tar.gz/control";))
 @end group
 @end lisp
 
diff --git a/texi/trampver.texi b/texi/trampver.texi
index 83b9db9560..2347264581 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.1.5
+@set trampver 2.5.2
 @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-archive.el b/tramp-archive.el
index 8bf25151df..bd0f82cbad 100644
--- a/tramp-archive.el
+++ b/tramp-archive.el
@@ -103,7 +103,7 @@
 ;; It is even possible to access file archives in file archives, as
 
 ;;   (find-file
-;;    
"http://ftp.debian.org/debian/pool/main/c/coreutils/coreutils_8.28-1_amd64.deb/control.tar.gz/control";)
+;;    
"https://ftp.debian.org/debian/pool/main/c/coreutils/coreutils_8.28-1_amd64.deb/control.tar.gz/control";)
 
 ;;; Code:
 
diff --git a/tramp-cache.el b/tramp-cache.el
index 30408d3ada..8d1ac02660 100644
--- a/tramp-cache.el
+++ b/tramp-cache.el
@@ -49,8 +49,6 @@
 ;;   an open connection.  Examples: "scripts" keeps shell script
 ;;   definitions already sent to the remote shell, "last-cmd-time" is
 ;;   the time stamp a command has been sent to the remote process.
-;;   "lock-pid" is the timestamp a (network) process is created, it is
-;;   used instead of the pid in file locks.
 ;;
 ;; - The key is nil.  These are temporary properties related to the
 ;;   local machine.  Examples: "parse-passwd" and "parse-group" keep
@@ -419,9 +417,7 @@ used to cache connection properties of the local machine."
                       (prin1-to-string key))
                     (if (hash-table-p value)
                         (tramp-cache-print value)
-                      (if (or (bufferp value)
-                              ;; Mutexes have entered Emacs 26.1.
-                              (tramp-compat-funcall 'mutexp value))
+                      (if (bufferp value)
                           (prin1-to-string (prin1-to-string value))
                         (prin1-to-string value))))))
           (setq result (if result (concat result " " tmp) tmp))))
diff --git a/tramp-compat.el b/tramp-compat.el
index adcb7749c8..fbc3d684ce 100644
--- a/tramp-compat.el
+++ b/tramp-compat.el
@@ -251,31 +251,6 @@ NAME is unquoted."
 (defconst tramp-compat-use-url-tramp-p (fboundp 'temporary-file-directory)
   "Whether to use url-tramp.el.")
 
-;; Threads have entered Emacs 26.1, `main-thread' in Emacs 27.1.  But
-;; then, they might not exist when Emacs is configured
-;; --without-threads.
-(defconst tramp-compat-main-thread (bound-and-true-p main-thread)
-  "The main thread of Emacs, if compiled --with-threads.")
-
-(defsubst tramp-compat-current-thread ()
-  "The current thread, or nil if compiled --without-threads."
-  (tramp-compat-funcall 'current-thread))
-
-(defsubst tramp-compat-thread-yield ()
-  "Yield the CPU to another thread."
-  (tramp-compat-funcall 'thread-yield))
-
-;; Mutexes have entered Emacs 26.1.  Once we use only Emacs 26+, we
-;; must check (mutexp mutex), because the other functions might still
-;; not exist when Emacs is configured --without-threads.
-(defmacro tramp-compat-with-mutex (mutex &rest body)
-  "Invoke BODY with MUTEX held, releasing MUTEX when done.
-This is the simplest safe way to acquire and release a mutex."
-  (declare (indent 1) (debug t))
-  `(if (fboundp 'with-mutex)
-       (with-mutex ,mutex ,@body)
-     ,@body))
-
 ;; `exec-path' is new in Emacs 27.1.
 (defalias 'tramp-compat-exec-path
   (if (fboundp 'exec-path)
diff --git a/tramp-ftp.el b/tramp-ftp.el
index c5f61538cc..11ccdc8a4c 100644
--- a/tramp-ftp.el
+++ b/tramp-ftp.el
@@ -31,7 +31,6 @@
 (require 'tramp)
 
 ;; Pacify byte-compiler.
-(declare-function ange-ftp-ftp-process-buffer "ange-ftp")
 (defvar ange-ftp-ftp-name-arg)
 (defvar ange-ftp-ftp-name-res)
 (defvar ange-ftp-name-format)
@@ -126,16 +125,7 @@ pass to the OPERATION."
          ;; "ftp" method is used in the Tramp file name.  So we unset
          ;; those values.
          (ange-ftp-ftp-name-arg "")
-         (ange-ftp-ftp-name-res nil)
-         (v (tramp-dissect-file-name
-             (apply #'tramp-file-name-for-operation operation args) t)))
-      (setf (tramp-file-name-method v) tramp-ftp-method)
-      ;; Set "process-name" for thread support.
-      (tramp-set-connection-property
-       v "process-name"
-       (ange-ftp-ftp-process-buffer
-       (tramp-file-name-host v) (tramp-file-name-user v)))
-
+         (ange-ftp-ftp-name-res nil))
       (cond
        ;; If argument is a symlink, `file-directory-p' and
        ;; `file-exists-p' call the traversed file recursively.  So we
@@ -147,7 +137,9 @@ pass to the OPERATION."
        ;; "~/.netrc".
        ((memq operation '(file-directory-p file-exists-p))
        (if (apply #'ange-ftp-hook-function operation args)
-           (tramp-set-connection-property v "started" t)
+           (let ((v (tramp-dissect-file-name (car args) t)))
+             (setf (tramp-file-name-method v) tramp-ftp-method)
+             (tramp-set-connection-property v "started" t))
          nil))
 
        ;; If the second argument of `copy-file' or `rename-file' is a
diff --git a/tramp-gvfs.el b/tramp-gvfs.el
index cab912bd93..2e1b0826cc 100644
--- a/tramp-gvfs.el
+++ b/tramp-gvfs.el
@@ -2134,9 +2134,6 @@ connection if a previous connection has died for some 
reason."
       (process-put p 'vector vec)
       (set-process-query-on-exit-flag p nil)
 
-      ;; Mark process for filelock.
-      (tramp-set-connection-property p "lock-pid" (truncate (time-to-seconds)))
-
       ;; Set connection-local variables.
       (tramp-set-connection-local-variables vec)))
 
diff --git a/tramp-rclone.el b/tramp-rclone.el
index 812e06f3f1..788da50504 100644
--- a/tramp-rclone.el
+++ b/tramp-rclone.el
@@ -362,10 +362,6 @@ connection if a previous connection has died for some 
reason."
          (process-put p 'vector vec)
          (set-process-query-on-exit-flag p nil)
 
-         ;; Mark process for filelock.
-         (tramp-set-connection-property
-          p "lock-pid" (truncate (time-to-seconds)))
-
          ;; Set connection-local variables.
          (tramp-set-connection-local-variables vec)))
 
diff --git a/tramp-sh.el b/tramp-sh.el
index 6f3b324522..21217381f1 100644
--- a/tramp-sh.el
+++ b/tramp-sh.el
@@ -4585,6 +4585,8 @@ Goes through the list `tramp-local-coding-commands' and
                          (value (symbol-value rem-enc)))
                      (while (string-match "-" name)
                        (setq name (replace-match "_" nil t name)))
+                     (unless (tramp-expand-script vec value)
+                       (throw 'wont-work-remote nil))
                      (tramp-maybe-send-script vec value name)
                      (setq rem-enc name)))
                  (tramp-message
@@ -4602,6 +4604,8 @@ Goes through the list `tramp-local-coding-commands' and
                          (value (symbol-value rem-dec)))
                      (while (string-match "-" name)
                        (setq name (replace-match "_" nil t name)))
+                     (unless (tramp-expand-script vec value)
+                       (throw 'wont-work-remote nil))
                      (tramp-maybe-send-script vec value name)
                      (setq rem-dec name)))
                  (tramp-message
diff --git a/tramp-sshfs.el b/tramp-sshfs.el
index 1886031dec..3562ee8fe2 100644
--- a/tramp-sshfs.el
+++ b/tramp-sshfs.el
@@ -345,9 +345,6 @@ connection if a previous connection has died for some 
reason."
       (process-put p 'vector vec)
       (set-process-query-on-exit-flag p nil)
 
-      ;; Mark process for filelock.
-      (tramp-set-connection-property p "lock-pid" (truncate (time-to-seconds)))
-
       ;; Set connection-local variables.
       (tramp-set-connection-local-variables vec)))
 
diff --git a/tramp-sudoedit.el b/tramp-sudoedit.el
index 845f31d09b..8f54507698 100644
--- a/tramp-sudoedit.el
+++ b/tramp-sudoedit.el
@@ -336,7 +336,7 @@ absolute file names."
     (if (and delete-by-moving-to-trash trash)
        (move-file-to-trash filename)
       (unless (tramp-sudoedit-send-command
-              v "rm" (tramp-compat-file-name-unquote localname))
+              v "rm" "-f" (tramp-compat-file-name-unquote localname))
        ;; Propagate the error.
        (with-current-buffer (tramp-get-connection-buffer v)
          (goto-char (point-min))
@@ -789,9 +789,6 @@ connection if a previous connection has died for some 
reason."
       (process-put p 'vector vec)
       (set-process-query-on-exit-flag p nil)
 
-      ;; Mark process for filelock.
-      (tramp-set-connection-property p "lock-pid" (truncate (time-to-seconds)))
-
       ;; Set connection-local variables.
       (tramp-set-connection-local-variables vec)
 
diff --git a/tramp.el b/tramp.el
index 887087448e..531e147893 100644
--- a/tramp.el
+++ b/tramp.el
@@ -1985,10 +1985,6 @@ ARGUMENTS to actually emit the message (if applicable)."
        (let ((now (current-time)))
          (insert (format-time-string "%T." now))
          (insert (format "%06d " (nth 2 now))))
-       ;; Threads.
-       (unless (or (null tramp-compat-main-thread)
-                   (eq (tramp-compat-current-thread) tramp-compat-main-thread))
-         (insert (format "%s " (tramp-compat-current-thread))))
        ;; Calling Tramp function.  We suppress compat and trace
        ;; functions from being displayed.
        (let ((btn 1) btf fn)
@@ -2190,10 +2186,14 @@ the resulting error message."
 
 (defun tramp-test-message (fmt-string &rest arguments)
   "Emit a Tramp message according `default-directory'."
-  (if (tramp-tramp-file-p default-directory)
-      (apply #'tramp-message
-            (tramp-dissect-file-name default-directory) 0 fmt-string arguments)
-    (apply #'message fmt-string arguments)))
+  (cond
+   ((tramp-tramp-file-p default-directory)
+    (apply #'tramp-message
+          (tramp-dissect-file-name default-directory) 0 fmt-string arguments))
+   ((tramp-file-name-p (car tramp-current-connection))
+    (apply #'tramp-message
+          (car tramp-current-connection) 0 fmt-string arguments))
+   (t (apply #'message fmt-string arguments))))
 
 (put #'tramp-test-message 'tramp-suppress-trace t)
 
@@ -2567,23 +2567,10 @@ Must be handled by the callers."
                res (cdr elt))))
       res)))
 
-;; Mutexes have entered Emacs 26.1.
-(defvar tramp-mutex (tramp-compat-funcall 'make-mutex "tramp")
-  "Global mutex for Tramp threads.")
-
-(defun tramp-get-mutex (vec)
-  "Return the mutex locking Tramp threads for VEC."
-  (if-let ((p (and (tramp-connectable-p vec)
-                  (tramp-get-connection-process vec))))
-      (with-tramp-connection-property p "mutex"
-       (tramp-compat-funcall 'make-mutex (process-name p)))
-    tramp-mutex))
-
 ;; Main function.
 (defun tramp-file-name-handler (operation &rest args)
   "Invoke Tramp file name handler for OPERATION and ARGS.
-Fall back to normal file name handler if no Tramp file name handler exists.
-If Emacs is compiled --with-threads, the body is protected by a mutex."
+Fall back to normal file name handler if no Tramp file name handler exists."
   (let ((filename (apply #'tramp-file-name-for-operation operation args))
        ;; `file-remote-p' is called for everything, even for symbolic
        ;; links which look remote.  We don't want to get an error.
@@ -2592,95 +2579,78 @@ If Emacs is compiled --with-threads, the body is 
protected by a mutex."
        (save-match-data
           (setq filename (tramp-replace-environment-variables filename))
           (with-parsed-tramp-file-name filename nil
-           ;; Give other threads a chance.
-           (tramp-compat-thread-yield)
-           ;; The mutex allows concurrent run of operations.  It
-           ;; guarantees, that the threads are not mixed.
-           (tramp-compat-with-mutex (tramp-get-mutex v)
-             ;; Run only when Emacs is idle.
-             (tramp-compat-funcall 'check-idle-thread)
-             (let ((current-connection tramp-current-connection)
-                   (foreign
-                    (tramp-find-foreign-file-name-handler filename operation))
-                   (signal-hook-function #'tramp-signal-hook-function)
-                   result)
-               ;; Set `tramp-current-connection'.
-               (unless
-                   (tramp-file-name-equal-p v (car tramp-current-connection))
-                 (setq tramp-current-connection (list v)))
-
-               ;; Call the backend function.
-               (unwind-protect
-                   (if foreign
-                       (let ((sf (symbol-function foreign))
-                             p)
-                         ;; Some packages set the default directory
-                         ;; to a remote path, before respective Tramp
-                         ;; packages are already loaded.  This
-                         ;; results in recursive loading.  Therefore,
-                         ;; we load the Tramp packages locally.
-                         (when (autoloadp sf)
-                            ;; FIXME: Not clear why we need these bindings 
here.
-                            ;; The explanation above is not convincing and
-                            ;; the bug#9114 for which it was added doesn't
-                            ;; clarify the core of the problem.
-                           (let ((default-directory
-                                   tramp-compat-temporary-file-directory)
-                                 file-name-handler-alist)
-                             (autoload-do-load sf foreign)))
-                         ;; (tramp-message
-                         ;;  v 4 "Running `%s'..." (cons operation args))
-                         ;; Switch process thread.
-                         (when (and tramp-mutex
-                                    (tramp-connectable-p v)
-                                    (setq p (tramp-get-connection-process v)))
-                           (tramp-compat-funcall
-                            'set-process-thread
-                            p (tramp-compat-current-thread)))
-                         ;; If `non-essential' is non-nil, Tramp
-                         ;; shall not open a new connection.
-                         ;; If Tramp detects that it shouldn't
-                         ;; continue to work, it throws the
-                         ;; `suppress' event.  This could happen for
-                         ;; example, when Tramp tries to open the
-                         ;; same connection twice in a short time
-                         ;; frame.
-                         ;; In both cases, we try the default handler
-                         ;; then.
-                         (setq result
-                               (catch 'non-essential
-                                 (catch 'suppress
-                                   (apply foreign operation args))))
-                         ;; (tramp-message
-                         ;;  v 4 "Running `%s'...`%s'" (cons operation args) 
result)
-                         (cond
-                          ((eq result 'non-essential)
+            (let ((current-connection tramp-current-connection)
+                 (foreign
+                  (tramp-find-foreign-file-name-handler filename operation))
+                 (signal-hook-function #'tramp-signal-hook-function)
+                 result)
+             ;; Set `tramp-current-connection'.
+             (unless
+                 (tramp-file-name-equal-p v (car tramp-current-connection))
+               (setq tramp-current-connection (list v)))
+
+             ;; Call the backend function.
+             (unwind-protect
+                 (if foreign
+                     (let ((sf (symbol-function foreign)))
+                       ;; Some packages set the default directory to
+                       ;; a remote path, before respective Tramp
+                       ;; packages are already loaded.  This results
+                       ;; in recursive loading.  Therefore, we load
+                       ;; the Tramp packages locally.
+                       (when (autoloadp sf)
+                          ;; FIXME: Not clear why we need these bindings here.
+                          ;; The explanation above is not convincing and
+                          ;; the bug#9114 for which it was added doesn't
+                          ;; clarify the core of the problem.
+                         (let ((default-directory
+                                  tramp-compat-temporary-file-directory)
+                               file-name-handler-alist)
+                           (autoload-do-load sf foreign)))
+                        ;; (tramp-message
+                        ;;  v 4 "Running `%s'..." (cons operation args))
+                        ;; If `non-essential' is non-nil, Tramp shall
+                       ;; not open a new connection.
+                       ;; If Tramp detects that it shouldn't continue
+                       ;; to work, it throws the `suppress' event.
+                       ;; This could happen for example, when Tramp
+                       ;; tries to open the same connection twice in
+                       ;; a short time frame.
+                       ;; In both cases, we try the default handler then.
+                       (setq result
+                             (catch 'non-essential
+                               (catch 'suppress
+                                 (apply foreign operation args))))
+                        ;; (tramp-message
+                        ;;  v 4 "Running `%s'...`%s'" (cons operation args) 
result)
+                       (cond
+                        ((eq result 'non-essential)
+                         (tramp-message
+                          v 5 "Non-essential received in operation %s"
+                          (cons operation args))
+                         (tramp-run-real-handler operation args))
+                        ((eq result 'suppress)
+                         (let ((inhibit-message t))
                            (tramp-message
-                            v 5 "Non-essential received in operation %s"
+                            v 1 "Suppress received in operation %s"
                             (cons operation args))
-                           (tramp-run-real-handler operation args))
-                          ((eq result 'suppress)
-                           (let ((inhibit-message t))
-                             (tramp-message
-                              v 1 "Suppress received in operation %s"
-                              (cons operation args))
-                             (tramp-cleanup-connection v t)
-                             (tramp-run-real-handler operation args)))
-                          (t result)))
-
-                     ;; Nothing to do for us.  However, since we are
-                     ;; in `tramp-mode', we must suppress the volume
-                     ;; letter on MS Windows.
-                     (setq result (tramp-run-real-handler operation args))
-                     (if (stringp result)
-                         (tramp-drop-volume-letter result)
-                       result))
-
-                 ;; Reset `tramp-current-connection'.
-                 (unless
-                     (tramp-file-name-equal-p
-                      (car current-connection) (car tramp-current-connection))
-                   (setq tramp-current-connection current-connection)))))))
+                           (tramp-cleanup-connection v t)
+                           (tramp-run-real-handler operation args)))
+                        (t result)))
+
+                   ;; Nothing to do for us.  However, since we are in
+                   ;; `tramp-mode', we must suppress the volume
+                   ;; letter on MS Windows.
+                   (setq result (tramp-run-real-handler operation args))
+                   (if (stringp result)
+                       (tramp-drop-volume-letter result)
+                     result))
+
+               ;; Reset `tramp-current-connection'.
+               (unless
+                   (tramp-file-name-equal-p
+                    (car current-connection) (car tramp-current-connection))
+                 (setq tramp-current-connection current-connection))))))
 
       ;; When `tramp-mode' is not enabled, or the file name is quoted,
       ;; we don't do anything.
@@ -3924,16 +3894,19 @@ Return nil when there is no lockfile."
               (insert-file-contents-literally lockname)
               (buffer-string))))))
 
+(defvar tramp-lock-pid nil
+  "A random nunber local for every connection.
+Do not set it manually, it is used buffer-local in `tramp-get-lock-pid'.")
+
 (defun tramp-get-lock-pid (file)
   "Determine pid for lockfile of FILE."
-  ;; Some Tramp methods do not offer a connection process, but just a
-  ;; network process as a place holder.  Those processes use the
-  ;; "lock-pid" connection property as fake pid, in fact it is the
-  ;; time stamp the process is created.
-  (let ((p (tramp-get-process  (tramp-dissect-file-name file))))
-    (number-to-string
-     (or (process-id p)
-        (tramp-get-connection-property p "lock-pid" (emacs-pid))))))
+  ;; Not all Tramp methods use an own process.  So we use a random
+  ;; number, which is as good as a process id.
+  (with-current-buffer
+      (tramp-get-connection-buffer (tramp-dissect-file-name file))
+    (or tramp-lock-pid
+       (setq-local
+        tramp-lock-pid (number-to-string (random most-positive-fixnum))))))
 
 (defconst tramp-lock-file-info-regexp
   ;; USER@HOST.PID[:BOOT_TIME]
@@ -3944,9 +3917,11 @@ Return nil when there is no lockfile."
   "Like `file-locked-p' for Tramp files."
   (when-let ((info (tramp-get-lock-file file))
             (match (string-match tramp-lock-file-info-regexp info)))
-    (or (and (string-equal (match-string 1 info) (user-login-name))
+    (or ; Locked by me.
+        (and (string-equal (match-string 1 info) (user-login-name))
             (string-equal (match-string 2 info) (system-name))
             (string-equal (match-string 3 info) (tramp-get-lock-pid file)))
+       ; User name.
        (match-string 1 info))))
 
 (defun tramp-handle-lock-file (file)
diff --git a/trampver.el b/trampver.el
index d5f8d0ddf2..2c8752a9ba 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.1.5
+;; Version: 2.5.2
 ;; 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.1.5"
+(defconst tramp-version "2.5.2"
   "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.1.5 is not fit for %s"
+    (format "Tramp 2.5.2 is not fit for %s"
             (replace-regexp-in-string "\n" "" (emacs-version))))))
   (unless (string-equal "ok" x) (error "%s" x)))
 
@@ -101,7 +101,8 @@
         ("2.2.13.25.2" . "25.3")
          ("2.3.3" . "26.1") ("2.3.3.26.1" . "26.1") ("2.3.5.26.2" . "26.2")
          ("2.3.5.26.3" . "26.3")
-         ("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")))
 
 (add-hook 'tramp-unload-hook
          (lambda ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]