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

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

[elpa] externals/tramp 87a80fe: Tramp ELPA version 2.5.0 released


From: Michael Albinus
Subject: [elpa] externals/tramp 87a80fe: Tramp ELPA version 2.5.0 released
Date: Tue, 29 Dec 2020 10:09:36 -0500 (EST)

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

    Tramp ELPA version 2.5.0 released
---
 test/tramp-tests.el | 54 ++++++++++++++++++++++++++++++-----------------------
 texi/tramp.texi     | 18 +++++++++---------
 texi/trampver.texi  |  2 +-
 tramp-adb.el        |  7 +++++++
 tramp-gvfs.el       | 26 +++++++++++++-------------
 trampver.el         |  6 +++---
 6 files changed, 64 insertions(+), 49 deletions(-)

diff --git a/test/tramp-tests.el b/test/tramp-tests.el
index 13bbb02..c709337 100644
--- a/test/tramp-tests.el
+++ b/test/tramp-tests.el
@@ -4475,23 +4475,30 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
   "Define ert test `TEST-direct-async' for direct async processes.
 If UNSTABLE is non-nil, the test is tagged as `:unstable'."
   (declare (indent 1))
-  `(ert-deftest ,(intern (concat (symbol-name test) "-direct-async")) ()
-     ,docstring
-     :tags (if ,unstable '(:expensive-test :unstable) '(:expensive-test))
-     (skip-unless (tramp--test-enabled))
-     (let ((default-directory  tramp-test-temporary-file-directory)
-          (ert-test (ert-get-test ',test))
-          (tramp-connection-properties
-           (cons '(nil "direct-async-process" t) tramp-connection-properties)))
-       (skip-unless (tramp-direct-async-process-p))
-       ;; For whatever reason, it doesn't cooperate with the "mock" method.
-       (skip-unless (not (tramp--test-mock-p)))
-       ;; We do expect an established connection already,
-       ;; `file-truename' does it by side-effect.  Suppress
-       ;; `tramp--test-enabled', in order to keep the connection.
-       (cl-letf (((symbol-function #'tramp--test-enabled) (lambda nil t)))
-        (file-truename tramp-test-temporary-file-directory)
-        (funcall (ert-test-body ert-test))))))
+  ;; `make-process' supports file name handlers since Emacs 27.
+  (when (let ((file-name-handler-alist '(("" . (lambda (&rest _) t)))))
+         (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))
+       (skip-unless (tramp--test-enabled))
+       (let ((default-directory tramp-test-temporary-file-directory)
+            (ert-test (ert-get-test ',test))
+            (tramp-connection-properties
+             (cons '(nil "direct-async-process" t)
+                   tramp-connection-properties)))
+        (skip-unless (tramp-direct-async-process-p))
+        ;; For whatever reason, it doesn't cooperate with the "mock" method.
+        (skip-unless (not (tramp--test-mock-p)))
+        ;; We do expect an established connection already,
+        ;; `file-truename' does it by side-effect.  Suppress
+        ;; `tramp--test-enabled', in order to keep the connection.
+        ;; Suppress "Process ... finished" messages.
+        (cl-letf (((symbol-function #'tramp--test-enabled) (lambda nil t))
+                  ((symbol-function #'internal-default-process-sentinel)
+                   #'ignore))
+          (file-truename tramp-test-temporary-file-directory)
+          (funcall (ert-test-body ert-test)))))))
 
 (tramp--test--deftest-direct-async-process tramp-test29-start-file-process
   "Check direct async `start-file-process'.")
@@ -4663,7 +4670,8 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
 
 (ert-deftest tramp-test31-interrupt-process ()
   "Check `interrupt-process'."
-  :tags '(:expensive-test)
+  :tags (if (getenv "EMACS_EMBA_CI")
+           '(:expensive-test :unstable) '(:expensive-test))
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-sh-p))
   (skip-unless (not (tramp--test-crypt-p)))
@@ -4703,8 +4711,7 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
     (command output-buffer &optional error-buffer input)
   "Like `async-shell-command', reading the output.
 INPUT, if non-nil, is a string sent to the process."
-  (async-shell-command command output-buffer error-buffer)
-  (let ((proc (get-buffer-process output-buffer))
+  (let ((proc (async-shell-command command output-buffer error-buffer))
        (delete-exited-processes t))
     (cl-letf (((symbol-function #'shell-command-sentinel) #'ignore))
       (when (stringp input)
@@ -4817,7 +4824,7 @@ INPUT, if non-nil, is a string sent to the process."
        (should (= cols async-shell-command-width))))))
 
 (tramp--test--deftest-direct-async-process tramp-test32-shell-command
-  "Check direct async `shell-command'.")
+  "Check direct async `shell-command'." 'unstable)
 
 ;; This test is inspired by Bug#39067.
 (ert-deftest tramp-test32-shell-command-dont-erase-buffer ()
@@ -6254,7 +6261,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 '(:expensive-test)
+  :tags (if (getenv "EMACS_EMBA_CI")
+           '(:expensive-test :unstable) '(:expensive-test))
   (skip-unless (tramp--test-enabled))
   ;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
   ;; remote processes in Emacs.  That doesn't work for tramp-adb.el.
@@ -6450,7 +6458,7 @@ process sentinels.  They shall not disturb each other."
         (ignore-errors (delete-directory tmp-name 'recursive))))))
 
 ;; (tramp--test--deftest-direct-async-process 
tramp-test43-asynchronous-requests
-;;   "Check parallel direct asynchronous requests.")
+;;   "Check parallel direct asynchronous requests." 'unstable)
 
 (ert-deftest tramp-test44-threads ()
   "Check that Tramp cooperates with threads."
diff --git a/texi/tramp.texi b/texi/tramp.texi
index 9430362..087074e 100644
--- a/texi/tramp.texi
+++ b/texi/tramp.texi
@@ -558,8 +558,8 @@ of the local file name is the share exported by the remote 
host,
 @cindex method @option{davs}
 @cindex @option{dav} method
 @cindex @option{davs} method
-@cindex method @option{media}
-@cindex @option{media} method
+@cindex method @option{mtp}
+@cindex @option{mtp} method
 
 On systems, which have installed @acronym{GVFS, the GNOME Virtual File
 System}, its offered methods could be used by @value{tramp}.  Examples
@@ -567,7 +567,7 @@ are @file{@trampfn{sftp,user@@host,/path/to/file}},
 @file{@trampfn{afp,user@@host,/path/to/file}} (accessing Apple's AFP
 file system), @file{@trampfn{dav,user@@host,/path/to/file}},
 @file{@trampfn{davs,user@@host,/path/to/file}} (for WebDAV shares) and
-@file{@trampfn{media,device,/path/to/file}} (for media devices).
+@file{@trampfn{mtp,device,/path/to/file}} (for media devices).
 
 
 @anchor{Quick Start Guide: GNOME Online Accounts based methods}
@@ -1246,13 +1246,13 @@ Since Google Drive uses cryptic blob file names 
internally,
 could produce unexpected behavior in case two files in the same
 directory have the same @code{display-name}, such a situation must be avoided.
 
-@item @option{media}
-@cindex method @option{media}
-@cindex @option{media} method
+@item @option{mtp}
+@cindex method @option{mtp}
+@cindex @option{mtp} method
 @cindex media
 
 Media devices, like cell phones, tablets, cameras, can be accessed via
-the @option{media} method.  Just the device name is needed in order to
+the @option{mtp} method.  Just the device name is needed in order to
 specify the host in the file name.  However, the device must already
 be connected via USB, before accessing it.  Possible device names are
 visible via host name completion, @ref{File name completion}.
@@ -1263,7 +1263,7 @@ different parts of their file system.
 
 @value{tramp} does not require a host name as part of the remote file
 name when a single media device is connected.  @value{tramp} instead
-uses @file{@trampfn{media,,}} as the default name.
+uses @file{@trampfn{mtp,,}} as the default name.
 
 @item @option{nextcloud}
 @cindex method @option{nextcloud}
@@ -1289,7 +1289,7 @@ that for security reasons refuse @command{ssh} 
connections.
 @defopt tramp-gvfs-methods
 This user option is a list of external methods for @acronym{GVFS}@.
 By default, this list includes @option{afp}, @option{dav},
-@option{davs}, @option{gdrive}, @option{media}, @option{nextcloud} and
+@option{davs}, @option{gdrive}, @option{mtp}, @option{nextcloud} and
 @option{sftp}.  Other methods to include are @option{ftp},
 @option{http}, @option{https} and @option{smb}.  These methods are not
 intended to be used directly as @acronym{GVFS}-based method.  Instead,
diff --git a/texi/trampver.texi b/texi/trampver.texi
index 4d0d84b..ba98a7e 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 0
+@set trampver 2.5.0
 @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 9ea7266..2d702b6 100644
--- a/tramp-adb.el
+++ b/tramp-adb.el
@@ -1131,6 +1131,13 @@ This happens for Android >= 4.0."
   (if (string-match-p "[[:multibyte:]]" command)
       ;; Multibyte codepoints with four bytes are not supported at
       ;; least by toybox.
+
+      ;; 
<https://android.stackexchange.com/questions/226638/how-to-use-multibyte-file-names-in-adb-shell/232379#232379>
+      ;; mksh uses UTF-8 internally, but is currently limited to the
+      ;; BMP (basic multilingua plane), which means U+0000 to
+      ;; U+FFFD. If you want to use SMP codepoints (U-00010000 to
+      ;; U-0010FFFD) on the input line, you currently have to disable
+      ;; the UTF-8 mode (sorry).
       (tramp-adb-execute-adb-command vec "shell" command)
 
     (unless neveropen (tramp-adb-maybe-open-connection vec))
diff --git a/tramp-gvfs.el b/tramp-gvfs.el
index 1722c53..fa1a90b 100644
--- a/tramp-gvfs.el
+++ b/tramp-gvfs.el
@@ -49,12 +49,12 @@
 
 ;; The user option `tramp-gvfs-methods' contains the list of supported
 ;; connection methods.  Per default, these are "afp", "dav", "davs",
-;; "gdrive", "media", "nextcloud" and "sftp".
+;; "gdrive", "mtp", "nextcloud" and "sftp".
 
 ;; "gdrive" and "nextcloud" connection methods require a respective
 ;; account in GNOME Online Accounts, with enabled "Files" service.
 
-;; The "media" connection method is responsible for media devices,
+;; The "mtp" connection method is responsible for media devices,
 ;; like cell phones, tablets, cameras etc.  The device must already be
 ;; connected via USB, before accessing it.
 
@@ -131,7 +131,7 @@
 
 ;;;###tramp-autoload
 (defcustom tramp-gvfs-methods
-  '("afp" "dav" "davs" "gdrive" "media" "nextcloud" "sftp")
+  '("afp" "dav" "davs" "gdrive" "mtp" "nextcloud" "sftp")
   "List of methods for remote files, accessed with GVFS."
   :group 'tramp
   :version "28.1"
@@ -142,7 +142,7 @@
                         (const "gdrive")
                         (const "http")
                         (const "https")
-                        (const "media")
+                        (const "mtp")
                         (const "nextcloud")
                         (const "sftp")
                         (const "smb"))))
@@ -159,7 +159,7 @@
 
 ;;;###tramp-autoload
 (defvar tramp-media-methods '("afc" "gphoto2" "mtp")
-  "List of GVFS methods which are covered by the \"media\" method.
+  "List of GVFS methods which are covered by the \"mtp\" method.
 They are checked during start up via
 `tramp-gvfs-interface-remotevolumemonitor'.")
 
@@ -1639,7 +1639,7 @@ ID-FORMAT valid values are `string' and `integer'."
   (if (tramp-tramp-file-p filename)
       (with-parsed-tramp-file-name filename nil
        ;; Ensure that media devices are cached.
-       (when (string-equal method "media")
+       (when (string-equal method "mtp")
          (tramp-get-media-device v))
        (with-tramp-connection-property v "activation-uri"
          (setq localname "/")
@@ -1649,7 +1649,7 @@ ID-FORMAT valid values are `string' and `integer'."
            (setq method "davs"
                  localname
                  (concat (tramp-gvfs-get-remote-prefix v) localname)))
-         (when (string-equal "media" method)
+         (when (string-equal "mtp" method)
            (when-let
                ((media (tramp-get-connection-property v "media-device" nil)))
              (setq method (tramp-media-device-method media)
@@ -2058,7 +2058,7 @@ and \"org.gtk.Private.RemoteVolumeMonitor.VolumeRemoved\" 
signals."
           (uri (url-generic-parse-url (nth 5 volume)))
           (method (url-type uri))
           (vec (make-tramp-file-name
-                :method "media"
+                :method "mtp"
                 ;; A host name cannot contain spaces.
                 :host (tramp-compat-string-replace " " "_" (nth 1 volume))))
           (media (make-tramp-media-device
@@ -2363,7 +2363,7 @@ VEC is used only for traces."
                              tramp-gvfs-interface-remotevolumemonitor "List")))
        (let* ((uri (url-generic-parse-url (nth 5 volume)))
               (vec (make-tramp-file-name
-                    :method "media"
+                    :method "mtp"
                     ;; A host name cannot contain spaces.
                     :host (tramp-compat-string-replace " " "_" (nth 1 
volume))))
               (media (make-tramp-media-device
@@ -2376,12 +2376,12 @@ VEC is used only for traces."
          (tramp-set-connection-property vec "media-device" media)
          (tramp-set-connection-property media "vector" vec))))
 
-    ;; Adapt default host name, supporting /media:: when possible.
+    ;; Adapt default host name, supporting /mtp:: when possible.
     (setq tramp-default-host-alist
          (append
-          `(("media" nil ,(if (= (length devices) 1) (car devices) "")))
+          `(("mtp" nil ,(if (= (length devices) 1) (car devices) "")))
           (delete
-           (assoc "media" tramp-default-host-alist)
+           (assoc "mtp" tramp-default-host-alist)
            tramp-default-host-alist)))))
 
 (defun tramp-parse-media-names (service)
@@ -2498,7 +2498,7 @@ This uses \"avahi-browse\" in case D-Bus is not enabled 
in Avahi."
     ;; Add completion functions for media devices.
     (tramp-get-media-devices nil)
     (tramp-set-completion-function
-     "media"
+     "mtp"
      (mapcar
       (lambda (method) `(tramp-parse-media-names ,(format "_%s._tcp" method)))
       tramp-media-methods))))
diff --git a/trampver.el b/trampver.el
index 85a2964..f4e470e 100644
--- a/trampver.el
+++ b/trampver.el
@@ -7,7 +7,7 @@
 ;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
 ;; Package: tramp
-;; Version: 0
+;; Version: 2.5.0
 ;; 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 "0"
+(defconst tramp-version "2.5.0"
   "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 0 is not fit for %s"
+    (format "Tramp 2.5.0 is not fit for %s"
             (replace-regexp-in-string "\n" "" (emacs-version))))))
   (unless (string-equal "ok" x) (error "%s" x)))
 



reply via email to

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