diff options
| author | Michael Albinus | 2022-09-17 17:50:38 +0200 |
|---|---|---|
| committer | Michael Albinus | 2022-09-17 17:50:38 +0200 |
| commit | e2c3ce24023f8daee32d49b3724adbf43de9fc92 (patch) | |
| tree | c092f1fdf2da5fe85ad20a62b85663a1b03979e8 | |
| parent | 320f0cac8008a54b988c0166dbfd195f5de8790f (diff) | |
| download | emacs-e2c3ce24023f8daee32d49b3724adbf43de9fc92.tar.gz emacs-e2c3ce24023f8daee32d49b3724adbf43de9fc92.zip | |
Sync with Tramp 2.5.3.2. Don't merge with master
* doc/misc/tramp.texi (Android shell setup): Rework.
(Frequently Asked Questions): Improve recommendations for speeding up.
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.4-pre".
* lisp/net/tramp-adb.el (tramp-methods): Use "%d".
(tramp-adb-handle-directory-files-and-attributes): Fix "." and
".." in listing.
(tramp-adb-handle-file-attributes)
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-file-name-all-completions): Pipe "ls" output
through "cat", in order to avoid quoting special characters.
(tramp-adb-maybe-open-connection): Compute args from `tramp-login-args'.
* lisp/net/tramp-compat.el (tramp-compat-replace-regexp-in-region):
New defalias.
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Adapt check for proper remote command.
* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-handle-make-process): Check for adb device if indicated.
(tramp-get-remote-tmpdir): Cache result in temporary connection
property.
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory)
(tramp-test22-file-times, tramp--test-utf8): Adapt tests.
(tramp--test-shell-file-name): Do not depend on `tramp--test-adb-p'.
(tramp-test46-unload): Ignore autoload functions in
`tramp-file-name' structure tests, since `tramp-file-name-handler'
is also autoloaded in Emacs 29.
| -rw-r--r-- | doc/misc/tramp.texi | 53 | ||||
| -rw-r--r-- | doc/misc/trampver.texi | 2 | ||||
| -rw-r--r-- | lisp/net/tramp-adb.el | 29 | ||||
| -rw-r--r-- | lisp/net/tramp-compat.el | 23 | ||||
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 14 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 11 | ||||
| -rw-r--r-- | lisp/net/trampver.el | 6 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 48 |
8 files changed, 132 insertions, 54 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 3dc6da6e7d0..8ab678a1e10 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -2704,14 +2704,31 @@ where @samp{192.168.0.26} is the Android device's IP address. | |||
| 2704 | (@pxref{Predefined connection information}). | 2704 | (@pxref{Predefined connection information}). |
| 2705 | 2705 | ||
| 2706 | @item | 2706 | @item |
| 2707 | @value{tramp} requires preserving @env{PATH} environment variable from | 2707 | On the Android device the directory names are prefixed with an |
| 2708 | user settings. Android devices prefer @file{/system/xbin} path over | 2708 | application specific prefix, which is |
| 2709 | @file{/system/bin}. Both of these are set as follows: | 2709 | @file{/data/data/com.termux/files/usr/bin} instead of @file{/usr/bin} |
| 2710 | in the @code{Termux} case. You must adapt the file names in | ||
| 2711 | @code{tramp-remote-path}, for example via connection-local | ||
| 2712 | @ifinfo | ||
| 2713 | settings (@pxref{Connection Variables, , , emacs}): | ||
| 2714 | @end ifinfo | ||
| 2715 | @ifnotinfo | ||
| 2716 | settings: | ||
| 2717 | @end ifnotinfo | ||
| 2710 | 2718 | ||
| 2711 | @lisp | 2719 | @lisp |
| 2712 | @group | 2720 | @group |
| 2713 | (add-to-list 'tramp-remote-path 'tramp-own-remote-path) | 2721 | (connection-local-set-profile-variables |
| 2714 | (add-to-list 'tramp-remote-path "/system/xbin") | 2722 | 'tramp-connection-local-termux-profile |
| 2723 | `((tramp-remote-path | ||
| 2724 | . ,(mapcar | ||
| 2725 | (lambda (x) | ||
| 2726 | (if (stringp x) (concat "/data/data/com.termux/files" x) x)) | ||
| 2727 | (copy-tree tramp-remote-path))))) | ||
| 2728 | |||
| 2729 | (connection-local-set-profiles | ||
| 2730 | '(:application tramp :machine "192.168.0.26") | ||
| 2731 | 'tramp-connection-local-termux-profile) | ||
| 2715 | @end group | 2732 | @end group |
| 2716 | @end lisp | 2733 | @end lisp |
| 2717 | 2734 | ||
| @@ -2720,7 +2737,9 @@ When the Android device is not @samp{rooted}, specify a writable | |||
| 2720 | directory for temporary files: | 2737 | directory for temporary files: |
| 2721 | 2738 | ||
| 2722 | @lisp | 2739 | @lisp |
| 2723 | (add-to-list 'tramp-remote-process-environment "TMPDIR=$HOME") | 2740 | (add-to-list 'tramp-connection-properties |
| 2741 | (list (regexp-quote "192.168.0.26") | ||
| 2742 | "tmpdir" "/data/data/com.termux/files/home/tmp")) | ||
| 2724 | @end lisp | 2743 | @end lisp |
| 2725 | 2744 | ||
| 2726 | @item | 2745 | @item |
| @@ -2748,11 +2767,17 @@ the previous example, fix the connection properties as follows: | |||
| 2748 | @group | 2767 | @group |
| 2749 | (add-to-list 'tramp-connection-properties | 2768 | (add-to-list 'tramp-connection-properties |
| 2750 | (list (regexp-quote "android") "remote-shell" "sh")) | 2769 | (list (regexp-quote "android") "remote-shell" "sh")) |
| 2770 | (add-to-list 'tramp-connection-properties | ||
| 2771 | (list (regexp-quote "android") | ||
| 2772 | "tmpdir" "/data/data/com.termux/files/home/tmp")) | ||
| 2773 | (connection-local-set-profiles | ||
| 2774 | '(:application tramp :machine "android") | ||
| 2775 | 'tramp-connection-local-termux-profile) | ||
| 2751 | @end group | 2776 | @end group |
| 2752 | @end lisp | 2777 | @end lisp |
| 2753 | 2778 | ||
| 2754 | @noindent | 2779 | @noindent |
| 2755 | Open a remote connection with a more concise command @kbd{C-x C-f | 2780 | Open a remote connection with the more concise command @kbd{C-x C-f |
| 2756 | @trampfn{ssh,android,} @key{RET}}. | 2781 | @trampfn{ssh,android,} @key{RET}}. |
| 2757 | @end itemize | 2782 | @end itemize |
| 2758 | 2783 | ||
| @@ -4385,9 +4410,12 @@ authentication delays. During these operations, @value{tramp}'s | |||
| 4385 | responsiveness slows down. Some suggestions within the scope of | 4410 | responsiveness slows down. Some suggestions within the scope of |
| 4386 | @value{tramp}'s settings include: | 4411 | @value{tramp}'s settings include: |
| 4387 | 4412 | ||
| 4413 | @itemize @minus | ||
| 4414 | @item | ||
| 4388 | Use an external method, such as @option{scp}, which are faster than | 4415 | Use an external method, such as @option{scp}, which are faster than |
| 4389 | internal methods. | 4416 | internal methods for large files. |
| 4390 | 4417 | ||
| 4418 | @item | ||
| 4391 | Keep the file @code{tramp-persistency-file-name}, which is where | 4419 | Keep the file @code{tramp-persistency-file-name}, which is where |
| 4392 | @value{tramp} caches remote information about hosts and files. Caching | 4420 | @value{tramp} caches remote information about hosts and files. Caching |
| 4393 | is enabled by default. Don't disable it. | 4421 | is enabled by default. Don't disable it. |
| @@ -4398,6 +4426,7 @@ files are not independently updated outside @value{tramp}'s control. | |||
| 4398 | That cache cleanup will be necessary if the remote directories or | 4426 | That cache cleanup will be necessary if the remote directories or |
| 4399 | files are updated independent of @value{tramp}. | 4427 | files are updated independent of @value{tramp}. |
| 4400 | 4428 | ||
| 4429 | @item | ||
| 4401 | Disable version control to avoid delays: | 4430 | Disable version control to avoid delays: |
| 4402 | 4431 | ||
| 4403 | @lisp | 4432 | @lisp |
| @@ -4417,9 +4446,17 @@ about, for example: | |||
| 4417 | (setq vc-handled-backends '(SVN Git)) | 4446 | (setq vc-handled-backends '(SVN Git)) |
| 4418 | @end lisp | 4447 | @end lisp |
| 4419 | 4448 | ||
| 4449 | @item | ||
| 4450 | @vindex remote-file-name-inhibit-locks | ||
| 4451 | Disable file locks. Set @code{remote-file-name-inhibit-locks} to | ||
| 4452 | @code{t} if you know that different Emacs sessions are not modifying | ||
| 4453 | the same remote file. | ||
| 4454 | |||
| 4455 | @item | ||
| 4420 | Disable excessive traces. Set @code{tramp-verbose} to 3 or lower, | 4456 | Disable excessive traces. Set @code{tramp-verbose} to 3 or lower, |
| 4421 | default being 3. Increase trace levels temporarily when hunting for | 4457 | default being 3. Increase trace levels temporarily when hunting for |
| 4422 | bugs. | 4458 | bugs. |
| 4459 | @end itemize | ||
| 4423 | 4460 | ||
| 4424 | 4461 | ||
| 4425 | @item | 4462 | @item |
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 8352fed1b70..6aa5ffe1b3a 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | @c In the Tramp GIT, the version numbers are auto-frobbed from | 8 | @c In the Tramp GIT, the version numbers are auto-frobbed from |
| 9 | @c tramp.el, and the bug report address is auto-frobbed from | 9 | @c tramp.el, and the bug report address is auto-frobbed from |
| 10 | @c configure.ac. | 10 | @c configure.ac. |
| 11 | @set trampver 2.5.3.28.2 | 11 | @set trampver 2.5.4-pre |
| 12 | @set trampurl https://www.gnu.org/software/tramp/ | 12 | @set trampurl https://www.gnu.org/software/tramp/ |
| 13 | @set tramp-bug-report-address tramp-devel@@gnu.org | 13 | @set tramp-bug-report-address tramp-devel@@gnu.org |
| 14 | @set emacsver 25.1 | 14 | @set emacsver 25.1 |
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 1fe10a560b1..53796503bcd 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -95,7 +95,7 @@ It is used for TCP/IP devices." | |||
| 95 | (add-to-list 'tramp-methods | 95 | (add-to-list 'tramp-methods |
| 96 | `(,tramp-adb-method | 96 | `(,tramp-adb-method |
| 97 | (tramp-login-program ,tramp-adb-program) | 97 | (tramp-login-program ,tramp-adb-program) |
| 98 | (tramp-login-args (("shell"))) | 98 | (tramp-login-args (("-s" "%d") ("shell"))) |
| 99 | (tramp-direct-async t) | 99 | (tramp-direct-async t) |
| 100 | (tramp-tmpdir "/data/local/tmp") | 100 | (tramp-tmpdir "/data/local/tmp") |
| 101 | (tramp-default-port 5555))) | 101 | (tramp-default-port 5555))) |
| @@ -256,7 +256,7 @@ arguments to pass to the OPERATION." | |||
| 256 | v localname (format "file-attributes-%s" id-format) | 256 | v localname (format "file-attributes-%s" id-format) |
| 257 | (and | 257 | (and |
| 258 | (tramp-adb-send-command-and-check | 258 | (tramp-adb-send-command-and-check |
| 259 | v (format "%s -d -l %s" | 259 | v (format "%s -d -l %s | cat" |
| 260 | (tramp-adb-get-ls-command v) | 260 | (tramp-adb-get-ls-command v) |
| 261 | (tramp-shell-quote-argument localname))) | 261 | (tramp-shell-quote-argument localname))) |
| 262 | (with-current-buffer (tramp-get-buffer v) | 262 | (with-current-buffer (tramp-get-buffer v) |
| @@ -315,20 +315,25 @@ arguments to pass to the OPERATION." | |||
| 315 | full match id-format nosort count) | 315 | full match id-format nosort count) |
| 316 | (with-current-buffer (tramp-get-buffer v) | 316 | (with-current-buffer (tramp-get-buffer v) |
| 317 | (when (tramp-adb-send-command-and-check | 317 | (when (tramp-adb-send-command-and-check |
| 318 | v (format "%s -a -l %s" | 318 | v (format "%s -a -l %s | cat" |
| 319 | (tramp-adb-get-ls-command v) | 319 | (tramp-adb-get-ls-command v) |
| 320 | (tramp-shell-quote-argument localname))) | 320 | (tramp-shell-quote-argument localname))) |
| 321 | ;; We insert also filename/. and filename/.., because "ls" doesn't. | 321 | ;; We insert also filename/. and filename/.., because |
| 322 | ;; Looks like it does include them in toybox, since Android 6. | 322 | ;; "ls" doesn't on some file systems, like "sdcard". |
| 323 | (unless (re-search-backward "\\.$" nil t) | 323 | (unless (re-search-backward "\\.$" nil t) |
| 324 | (narrow-to-region (point-max) (point-max)) | 324 | (narrow-to-region (point-max) (point-max)) |
| 325 | (tramp-adb-send-command | 325 | (tramp-adb-send-command |
| 326 | v (format "%s -d -a -l %s %s" | 326 | v (format "%s -d -a -l %s %s | cat" |
| 327 | (tramp-adb-get-ls-command v) | 327 | (tramp-adb-get-ls-command v) |
| 328 | (tramp-shell-quote-argument | 328 | (tramp-shell-quote-argument |
| 329 | (tramp-compat-file-name-concat localname ".")) | 329 | (tramp-compat-file-name-concat localname ".")) |
| 330 | (tramp-shell-quote-argument | 330 | (tramp-shell-quote-argument |
| 331 | (tramp-compat-file-name-concat localname "..")))) | 331 | (tramp-compat-file-name-concat localname "..")))) |
| 332 | (tramp-compat-replace-regexp-in-region | ||
| 333 | (regexp-quote | ||
| 334 | (tramp-compat-file-name-unquote | ||
| 335 | (file-name-as-directory localname))) | ||
| 336 | "" (point-min)) | ||
| 332 | (widen))) | 337 | (widen))) |
| 333 | (tramp-adb-sh-fix-ls-output) | 338 | (tramp-adb-sh-fix-ls-output) |
| 334 | (let ((result (tramp-do-parse-file-attributes-with-ls | 339 | (let ((result (tramp-do-parse-file-attributes-with-ls |
| @@ -474,7 +479,7 @@ Emacs dired can't find files." | |||
| 474 | (with-parsed-tramp-file-name (expand-file-name directory) nil | 479 | (with-parsed-tramp-file-name (expand-file-name directory) nil |
| 475 | (with-tramp-file-property v localname "file-name-all-completions" | 480 | (with-tramp-file-property v localname "file-name-all-completions" |
| 476 | (tramp-adb-send-command | 481 | (tramp-adb-send-command |
| 477 | v (format "%s -a %s" | 482 | v (format "%s -a %s | cat" |
| 478 | (tramp-adb-get-ls-command v) | 483 | (tramp-adb-get-ls-command v) |
| 479 | (tramp-shell-quote-argument localname))) | 484 | (tramp-shell-quote-argument localname))) |
| 480 | (mapcar | 485 | (mapcar |
| @@ -485,9 +490,8 @@ Emacs dired can't find files." | |||
| 485 | (with-current-buffer (tramp-get-buffer v) | 490 | (with-current-buffer (tramp-get-buffer v) |
| 486 | (delete-dups | 491 | (delete-dups |
| 487 | (append | 492 | (append |
| 488 | ;; In older Android versions, "." and ".." are not | 493 | ;; On some file systems like "sdcard", "." and ".." are |
| 489 | ;; included. In newer versions (toybox, since Android 6) | 494 | ;; not included. We fix this by `delete-dups'. |
| 490 | ;; they are. We fix this by `delete-dups'. | ||
| 491 | '("." "..") | 495 | '("." "..") |
| 492 | (delq | 496 | (delq |
| 493 | nil | 497 | nil |
| @@ -1270,9 +1274,8 @@ connection if a previous connection has died for some reason." | |||
| 1270 | (with-tramp-progress-reporter vec 3 "Opening adb shell connection" | 1274 | (with-tramp-progress-reporter vec 3 "Opening adb shell connection" |
| 1271 | (let* ((coding-system-for-read 'utf-8-dos) ; Is this correct? | 1275 | (let* ((coding-system-for-read 'utf-8-dos) ; Is this correct? |
| 1272 | (process-connection-type tramp-process-connection-type) | 1276 | (process-connection-type tramp-process-connection-type) |
| 1273 | (args (if (> (length host) 0) | 1277 | (args (tramp-expand-args |
| 1274 | (list "-s" device "shell") | 1278 | vec 'tramp-login-args ?d (or device ""))) |
| 1275 | (list "shell"))) | ||
| 1276 | (p (let ((default-directory | 1279 | (p (let ((default-directory |
| 1277 | tramp-compat-temporary-file-directory)) | 1280 | tramp-compat-temporary-file-directory)) |
| 1278 | (apply #'start-process (tramp-get-connection-name vec) buf | 1281 | (apply #'start-process (tramp-get-connection-name vec) buf |
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index aead1dedd24..91c450eee4e 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el | |||
| @@ -398,6 +398,29 @@ CONDITION can also be a list of error conditions." | |||
| 398 | (car components)) | 398 | (car components)) |
| 399 | (cdr components))))))) | 399 | (cdr components))))))) |
| 400 | 400 | ||
| 401 | ;; Function `replace-regexp-in-region' is new in Emacs 28.1. | ||
| 402 | (defalias 'tramp-compat-replace-regexp-in-region | ||
| 403 | (if (fboundp 'replace-regexp-in-region) | ||
| 404 | #'replace-regexp-in-region | ||
| 405 | (lambda (regexp replacement &optional start end) | ||
| 406 | (if start | ||
| 407 | (when (< start (point-min)) | ||
| 408 | (error "Start before start of buffer")) | ||
| 409 | (setq start (point))) | ||
| 410 | (if end | ||
| 411 | (when (> end (point-max)) | ||
| 412 | (error "End after end of buffer")) | ||
| 413 | (setq end (point-max))) | ||
| 414 | (save-excursion | ||
| 415 | (let ((matches 0) | ||
| 416 | (case-fold-search nil)) | ||
| 417 | (goto-char start) | ||
| 418 | (while (re-search-forward regexp end t) | ||
| 419 | (replace-match replacement t) | ||
| 420 | (setq matches (1+ matches))) | ||
| 421 | (and (not (zerop matches)) | ||
| 422 | matches)))))) | ||
| 423 | |||
| 401 | (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) | 424 | (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) |
| 402 | (put (intern elt) 'tramp-suppress-trace t)) | 425 | (put (intern elt) 'tramp-suppress-trace t)) |
| 403 | 426 | ||
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index e0b786f015a..207e588f347 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el | |||
| @@ -1053,12 +1053,14 @@ file names." | |||
| 1053 | ;; code in case of direct copy/move. Apply | 1053 | ;; code in case of direct copy/move. Apply |
| 1054 | ;; sanity checks. | 1054 | ;; sanity checks. |
| 1055 | (or (not equal-remote) | 1055 | (or (not equal-remote) |
| 1056 | (tramp-gvfs-send-command | 1056 | (and |
| 1057 | v "gvfs-info" (tramp-gvfs-url-file-name newname)) | 1057 | (tramp-gvfs-send-command |
| 1058 | (eq op 'copy) | 1058 | v "gvfs-info" |
| 1059 | (not (tramp-gvfs-send-command | 1059 | (tramp-gvfs-url-file-name newname)) |
| 1060 | v "gvfs-info" | 1060 | (or (eq op 'copy) |
| 1061 | (tramp-gvfs-url-file-name filename))))) | 1061 | (not (tramp-gvfs-send-command |
| 1062 | v "gvfs-info" | ||
| 1063 | (tramp-gvfs-url-file-name filename))))))) | ||
| 1062 | 1064 | ||
| 1063 | (if (or (not equal-remote) | 1065 | (if (or (not equal-remote) |
| 1064 | (and equal-remote | 1066 | (and equal-remote |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 95d674911f3..f7243625c7c 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -257,6 +257,7 @@ pair of the form (KEY VALUE). The following KEYs are defined: | |||
| 257 | argument if it is supported. | 257 | argument if it is supported. |
| 258 | - \"%y\" is replaced by the `tramp-scp-force-scp-protocol' | 258 | - \"%y\" is replaced by the `tramp-scp-force-scp-protocol' |
| 259 | argument if it is supported. | 259 | argument if it is supported. |
| 260 | - \"%d\" is replaced by the device detected by `tramp-adb-get-device'. | ||
| 260 | 261 | ||
| 261 | The existence of `tramp-login-args', combined with the | 262 | The existence of `tramp-login-args', combined with the |
| 262 | absence of `tramp-copy-args', is an indication that the | 263 | absence of `tramp-copy-args', is an indication that the |
| @@ -4244,6 +4245,8 @@ substitution. SPEC-LIST is a list of char/value pairs used for | |||
| 4244 | ;; is different between tramp-sh.el, and tramp-adb.el or | 4245 | ;; is different between tramp-sh.el, and tramp-adb.el or |
| 4245 | ;; tramp-sshfs.el. | 4246 | ;; tramp-sshfs.el. |
| 4246 | (let* ((sh-file-name-handler-p (tramp-sh-file-name-handler-p v)) | 4247 | (let* ((sh-file-name-handler-p (tramp-sh-file-name-handler-p v)) |
| 4248 | (adb-file-name-handler-p | ||
| 4249 | (tramp-adb-file-name-p (tramp-make-tramp-file-name v))) | ||
| 4247 | (login-program | 4250 | (login-program |
| 4248 | (tramp-get-method-parameter v 'tramp-login-program)) | 4251 | (tramp-get-method-parameter v 'tramp-login-program)) |
| 4249 | ;; We don't create the temporary file. In fact, it | 4252 | ;; We don't create the temporary file. In fact, it |
| @@ -4263,6 +4266,10 @@ substitution. SPEC-LIST is a list of char/value pairs used for | |||
| 4263 | (when sh-file-name-handler-p | 4266 | (when sh-file-name-handler-p |
| 4264 | (tramp-compat-funcall | 4267 | (tramp-compat-funcall |
| 4265 | 'tramp-ssh-controlmaster-options v))) | 4268 | 'tramp-ssh-controlmaster-options v))) |
| 4269 | (device | ||
| 4270 | (when adb-file-name-handler-p | ||
| 4271 | (tramp-compat-funcall | ||
| 4272 | 'tramp-adb-get-device v))) | ||
| 4266 | login-args p) | 4273 | login-args p) |
| 4267 | 4274 | ||
| 4268 | ;; Replace `login-args' place holders. Split | 4275 | ;; Replace `login-args' place holders. Split |
| @@ -4279,7 +4286,7 @@ substitution. SPEC-LIST is a list of char/value pairs used for | |||
| 4279 | v 'tramp-login-args | 4286 | v 'tramp-login-args |
| 4280 | ?h (or host "") ?u (or user "") ?p (or port "") | 4287 | ?h (or host "") ?u (or user "") ?p (or port "") |
| 4281 | ?c (format-spec (or options "") (format-spec-make ?t tmpfile)) | 4288 | ?c (format-spec (or options "") (format-spec-make ?t tmpfile)) |
| 4282 | ?l "")))) | 4289 | ?d (or device "") ?l "")))) |
| 4283 | p (make-process | 4290 | p (make-process |
| 4284 | :name name :buffer buffer | 4291 | :name name :buffer buffer |
| 4285 | :command (append `(,login-program) login-args command) | 4292 | :command (append `(,login-program) login-args command) |
| @@ -5451,7 +5458,7 @@ This handles also chrooted environments, which are not regarded as local." | |||
| 5451 | 5458 | ||
| 5452 | (defun tramp-get-remote-tmpdir (vec) | 5459 | (defun tramp-get-remote-tmpdir (vec) |
| 5453 | "Return directory for temporary files on the remote host identified by VEC." | 5460 | "Return directory for temporary files on the remote host identified by VEC." |
| 5454 | (with-tramp-connection-property vec "tmpdir" | 5461 | (with-tramp-connection-property (tramp-get-process vec) "remote-tmpdir" |
| 5455 | (let ((dir | 5462 | (let ((dir |
| 5456 | (tramp-make-tramp-file-name | 5463 | (tramp-make-tramp-file-name |
| 5457 | vec (or (tramp-get-method-parameter vec 'tramp-tmpdir) "/tmp")))) | 5464 | vec (or (tramp-get-method-parameter vec 'tramp-tmpdir) "/tmp")))) |
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index e14c26d8999..80a533cb992 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ;; Maintainer: Michael Albinus <michael.albinus@gmx.de> | 7 | ;; Maintainer: Michael Albinus <michael.albinus@gmx.de> |
| 8 | ;; Keywords: comm, processes | 8 | ;; Keywords: comm, processes |
| 9 | ;; Package: tramp | 9 | ;; Package: tramp |
| 10 | ;; Version: 2.5.3.28.2 | 10 | ;; Version: 2.5.4-pre |
| 11 | ;; Package-Requires: ((emacs "25.1")) | 11 | ;; Package-Requires: ((emacs "25.1")) |
| 12 | ;; Package-Type: multi | 12 | ;; Package-Type: multi |
| 13 | ;; URL: https://www.gnu.org/software/tramp/ | 13 | ;; URL: https://www.gnu.org/software/tramp/ |
| @@ -40,7 +40,7 @@ | |||
| 40 | ;; ./configure" to change them. | 40 | ;; ./configure" to change them. |
| 41 | 41 | ||
| 42 | ;;;###tramp-autoload | 42 | ;;;###tramp-autoload |
| 43 | (defconst tramp-version "2.5.3.28.2" | 43 | (defconst tramp-version "2.5.4-pre" |
| 44 | "This version of Tramp.") | 44 | "This version of Tramp.") |
| 45 | 45 | ||
| 46 | ;;;###tramp-autoload | 46 | ;;;###tramp-autoload |
| @@ -78,7 +78,7 @@ | |||
| 78 | ;; Check for Emacs version. | 78 | ;; Check for Emacs version. |
| 79 | (let ((x (if (not (string-lessp emacs-version "25.1")) | 79 | (let ((x (if (not (string-lessp emacs-version "25.1")) |
| 80 | "ok" | 80 | "ok" |
| 81 | (format "Tramp 2.5.3.28.2 is not fit for %s" | 81 | (format "Tramp 2.5.4-pre is not fit for %s" |
| 82 | (replace-regexp-in-string "\n" "" (emacs-version)))))) | 82 | (replace-regexp-in-string "\n" "" (emacs-version)))))) |
| 83 | (unless (string-equal "ok" x) (error "%s" x))) | 83 | (unless (string-equal "ok" x) (error "%s" x))) |
| 84 | 84 | ||
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index cee3651f213..06920ad5343 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -3138,20 +3138,21 @@ This tests also `file-directory-p' and `file-accessible-directory-p'." | |||
| 3138 | (goto-char (point-min)) | 3138 | (goto-char (point-min)) |
| 3139 | (should | 3139 | (should |
| 3140 | (looking-at-p (format "^.+ %s/$" (regexp-quote tmp-name1))))) | 3140 | (looking-at-p (format "^.+ %s/$" (regexp-quote tmp-name1))))) |
| 3141 | (with-temp-buffer | 3141 | (let ((directory-files (directory-files tmp-name1))) |
| 3142 | (insert-directory | 3142 | (with-temp-buffer |
| 3143 | (file-name-as-directory tmp-name1) "-al" nil 'full-directory-p) | 3143 | (insert-directory |
| 3144 | (goto-char (point-min)) | 3144 | (file-name-as-directory tmp-name1) "-al" nil 'full-directory-p) |
| 3145 | (should | 3145 | (goto-char (point-min)) |
| 3146 | (looking-at-p | 3146 | (should |
| 3147 | (concat | 3147 | (looking-at-p |
| 3148 | ;; There might be a summary line. | 3148 | (concat |
| 3149 | "\\(total.+[[:digit:]]+ ?[kKMGTPEZY]?i?B?\n\\)?" | 3149 | ;; There might be a summary line. |
| 3150 | ;; We don't know in which order ".", ".." and "foo" appear. | 3150 | "\\(total.+[[:digit:]]+ ?[kKMGTPEZY]?i?B?\n\\)?" |
| 3151 | (format | 3151 | ;; We don't know in which order ".", ".." and "foo" appear. |
| 3152 | "\\(.+ %s\\( ->.+\\)?\n\\)\\{%d\\}" | 3152 | (format |
| 3153 | (regexp-opt (directory-files tmp-name1)) | 3153 | "\\(.+ %s\\( ->.+\\)?\n\\)\\{%d\\}" |
| 3154 | (length (directory-files tmp-name1))))))) | 3154 | (regexp-opt directory-files) |
| 3155 | (length directory-files))))))) | ||
| 3155 | 3156 | ||
| 3156 | ;; Check error cases. | 3157 | ;; Check error cases. |
| 3157 | (when (and (tramp--test-supports-set-file-modes-p) | 3158 | (when (and (tramp--test-supports-set-file-modes-p) |
| @@ -4005,7 +4006,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4005 | (file-attributes tmp-name1)))) | 4006 | (file-attributes tmp-name1)))) |
| 4006 | ;; Skip the test, if the remote handler is not able to set | 4007 | ;; Skip the test, if the remote handler is not able to set |
| 4007 | ;; the correct time. | 4008 | ;; the correct time. |
| 4008 | (skip-unless (set-file-times tmp-name1 (seconds-to-time 1))) | 4009 | ;; Some remote machines cannot resolve seconds. So we use a minute. |
| 4010 | (skip-unless (set-file-times tmp-name1 (seconds-to-time 60))) | ||
| 4009 | ;; Dumb remote shells without perl(1) or stat(1) are not | 4011 | ;; Dumb remote shells without perl(1) or stat(1) are not |
| 4010 | ;; able to return the date correctly. They say "don't know". | 4012 | ;; able to return the date correctly. They say "don't know". |
| 4011 | (unless (tramp-compat-time-equal-p | 4013 | (unless (tramp-compat-time-equal-p |
| @@ -4016,7 +4018,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4016 | (tramp-compat-time-equal-p | 4018 | (tramp-compat-time-equal-p |
| 4017 | (tramp-compat-file-attribute-modification-time | 4019 | (tramp-compat-file-attribute-modification-time |
| 4018 | (file-attributes tmp-name1)) | 4020 | (file-attributes tmp-name1)) |
| 4019 | (seconds-to-time 1))) | 4021 | (seconds-to-time 60))) |
| 4020 | (write-region "bla" nil tmp-name2) | 4022 | (write-region "bla" nil tmp-name2) |
| 4021 | (should (file-exists-p tmp-name2)) | 4023 | (should (file-exists-p tmp-name2)) |
| 4022 | (should (file-newer-than-file-p tmp-name2 tmp-name1)) | 4024 | (should (file-newer-than-file-p tmp-name2 tmp-name1)) |
| @@ -4027,12 +4029,12 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4027 | ;; regular files, there shouldn't be a difference. | 4029 | ;; regular files, there shouldn't be a difference. |
| 4028 | (when (tramp--test-emacs28-p) | 4030 | (when (tramp--test-emacs28-p) |
| 4029 | (with-no-warnings | 4031 | (with-no-warnings |
| 4030 | (set-file-times tmp-name1 (seconds-to-time 1) 'nofollow) | 4032 | (set-file-times tmp-name1 (seconds-to-time 60) 'nofollow) |
| 4031 | (should | 4033 | (should |
| 4032 | (tramp-compat-time-equal-p | 4034 | (tramp-compat-time-equal-p |
| 4033 | (tramp-compat-file-attribute-modification-time | 4035 | (tramp-compat-file-attribute-modification-time |
| 4034 | (file-attributes tmp-name1)) | 4036 | (file-attributes tmp-name1)) |
| 4035 | (seconds-to-time 1))))))) | 4037 | (seconds-to-time 60))))))) |
| 4036 | 4038 | ||
| 4037 | ;; Cleanup. | 4039 | ;; Cleanup. |
| 4038 | (ignore-errors | 4040 | (ignore-errors |
| @@ -4439,7 +4441,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4439 | 4441 | ||
| 4440 | (defun tramp--test-shell-file-name () | 4442 | (defun tramp--test-shell-file-name () |
| 4441 | "Return default remote shell." | 4443 | "Return default remote shell." |
| 4442 | (if (tramp--test-adb-p) "/system/bin/sh" "/bin/sh")) | 4444 | (if (file-exists-p |
| 4445 | (concat | ||
| 4446 | (file-remote-p tramp-test-temporary-file-directory) "/system/bin/sh")) | ||
| 4447 | "/system/bin/sh" "/bin/sh")) | ||
| 4443 | 4448 | ||
| 4444 | (ert-deftest tramp-test28-process-file () | 4449 | (ert-deftest tramp-test28-process-file () |
| 4445 | "Check `process-file'." | 4450 | "Check `process-file'." |
| @@ -6815,7 +6820,8 @@ Use the \"ls\" command." | |||
| 6815 | "银河系漫游指南系列" | 6820 | "银河系漫游指南系列" |
| 6816 | "Автостопом по гала́ктике" | 6821 | "Автостопом по гала́ктике" |
| 6817 | ;; Use codepoints without a name. See Bug#31272. | 6822 | ;; Use codepoints without a name. See Bug#31272. |
| 6818 | "bung" | 6823 | ;; Works on some Android systems only. |
| 6824 | (unless (tramp--test-adb-p) "bung") | ||
| 6819 | ;; Use codepoints from Supplementary Multilingual Plane (U+10000 | 6825 | ;; Use codepoints from Supplementary Multilingual Plane (U+10000 |
| 6820 | ;; to U+1FFFF). | 6826 | ;; to U+1FFFF). |
| 6821 | "🌈🍒👋") | 6827 | "🌈🍒👋") |
| @@ -7354,7 +7360,7 @@ Since it unloads Tramp, it shall be the last test to run." | |||
| 7354 | (should-not (cl--find-class 'tramp-file-name)) | 7360 | (should-not (cl--find-class 'tramp-file-name)) |
| 7355 | (mapatoms | 7361 | (mapatoms |
| 7356 | (lambda (x) | 7362 | (lambda (x) |
| 7357 | (and (functionp x) | 7363 | (and (functionp x) (null (autoloadp (symbol-function x))) |
| 7358 | (string-match-p "tramp-file-name" (symbol-name x)) | 7364 | (string-match-p "tramp-file-name" (symbol-name x)) |
| 7359 | (ert-fail (format "Structure function `%s' still exists" x))))) | 7365 | (ert-fail (format "Structure function `%s' still exists" x))))) |
| 7360 | 7366 | ||