aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2019-12-29 13:53:06 +0100
committerMichael Albinus2019-12-30 18:55:39 +0100
commit248c5e103d61af4352e2c8d9b810babdd4cd6ddf (patch)
tree46d9a74882b02f3069888eff457535db4cd64696
parent90083b7d78df1b8a054f3028cc9eb8c55a632b1e (diff)
downloademacs-248c5e103d61af4352e2c8d9b810babdd4cd6ddf.tar.gz
emacs-248c5e103d61af4352e2c8d9b810babdd4cd6ddf.zip
Sync with Tramp 2.4.3
* doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.3". * lisp/net/tramp.el: Bump version. (tramp-handle-shell-command): The temp file for error-buffer is remote. * test/lisp/net/tramp-tests.el (tramp-test30-make-process): Simplify buffer generation. (tramp-test32-shell-command): Extend test. (cherry picked from commit d6922db49dea33ac2bca8b33d24763cc7b2e4cd7)
-rw-r--r--doc/misc/trampver.texi2
-rw-r--r--lisp/net/tramp.el9
-rw-r--r--lisp/net/trampver.el4
-rw-r--r--test/lisp/net/tramp-tests.el34
4 files changed, 29 insertions, 20 deletions
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index c34d28d3137..be35101e78c 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.4.3-pre 11@set trampver 2.4.3
12@set tramp-bug-report-address tramp-devel@@gnu.org 12@set tramp-bug-report-address tramp-devel@@gnu.org
13@set emacsver 24.4 13@set emacsver 24.4
14 14
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 36bfe5ef865..cf39aa5ddd4 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -7,8 +7,9 @@
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.4.3-pre 10;; Version: 2.4.3
11;; Package-Requires: ((emacs "24.4")) 11;; Package-Requires: ((emacs "24.4"))
12;; Package-Type: multi
12;; URL: https://savannah.gnu.org/projects/tramp 13;; URL: https://savannah.gnu.org/projects/tramp
13 14
14;; This file is part of GNU Emacs. 15;; This file is part of GNU Emacs.
@@ -3681,7 +3682,9 @@ support symbolic links."
3681 3682
3682 (setq buffer (if (and (not asynchronous) error-buffer) 3683 (setq buffer (if (and (not asynchronous) error-buffer)
3683 (with-parsed-tramp-file-name default-directory nil 3684 (with-parsed-tramp-file-name default-directory nil
3684 (list output-buffer (tramp-make-tramp-temp-file v))) 3685 (list output-buffer
3686 (tramp-make-tramp-file-name
3687 v (tramp-make-tramp-temp-file v))))
3685 output-buffer)) 3688 output-buffer))
3686 3689
3687 (if current-buffer-p 3690 (if current-buffer-p
@@ -3735,7 +3738,7 @@ support symbolic links."
3735 3738
3736(defun tramp-handle-start-file-process (name buffer program &rest args) 3739(defun tramp-handle-start-file-process (name buffer program &rest args)
3737 "Like `start-file-process' for Tramp files." 3740 "Like `start-file-process' for Tramp files."
3738 ;; `make-process' knows the `:file-error' argument since Emacs 27.1. 3741 ;; `make-process' knows the `:file-handler' argument since Emacs 27.1 only.
3739 (tramp-file-name-handler 3742 (tramp-file-name-handler
3740 'make-process 3743 'make-process
3741 :name name 3744 :name name
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 49eab7fbc86..9c04b6110eb 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -39,7 +39,7 @@
39(defvar inhibit-message) 39(defvar inhibit-message)
40 40
41;;;###tramp-autoload 41;;;###tramp-autoload
42(defconst tramp-version "2.4.3-pre" 42(defconst tramp-version "2.4.3"
43 "This version of Tramp.") 43 "This version of Tramp.")
44 44
45;;;###tramp-autoload 45;;;###tramp-autoload
@@ -73,7 +73,7 @@
73;; Check for Emacs version. 73;; Check for Emacs version.
74(let ((x (if (not (string-lessp emacs-version "24.4")) 74(let ((x (if (not (string-lessp emacs-version "24.4"))
75 "ok" 75 "ok"
76 (format "Tramp 2.4.3-pre is not fit for %s" 76 (format "Tramp 2.4.3 is not fit for %s"
77 (replace-regexp-in-string "\n" "" (emacs-version)))))) 77 (replace-regexp-in-string "\n" "" (emacs-version))))))
78 (unless (string-equal "ok" x) (error "%s" x))) 78 (unless (string-equal "ok" x) (error "%s" x)))
79 79
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 77b3ea0ad21..cb52d40f8be 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2902,8 +2902,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
2902 (sort (copy-sequence `(,tmp-name3 ,tmp-name4)) 'string<)))) 2902 (sort (copy-sequence `(,tmp-name3 ,tmp-name4)) 'string<))))
2903 2903
2904 ;; Cleanup. 2904 ;; Cleanup.
2905 (ignore-errors 2905 (ignore-errors (delete-directory tmp-name1 'recursive))))))
2906 (delete-directory tmp-name1 'recursive))))))
2907 2906
2908(ert-deftest tramp-test17-insert-directory () 2907(ert-deftest tramp-test17-insert-directory ()
2909 "Check `insert-directory'." 2908 "Check `insert-directory'."
@@ -4354,8 +4353,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4354 4353
4355 ;; Process with stderr. tramp-adb.el doesn't support it (yet). 4354 ;; Process with stderr. tramp-adb.el doesn't support it (yet).
4356 (unless (tramp--test-adb-p) 4355 (unless (tramp--test-adb-p)
4357 (let ((stderr 4356 (let ((stderr (generate-new-buffer "*stderr*")))
4358 (generate-new-buffer (generate-new-buffer-name "stderr"))))
4359 (unwind-protect 4357 (unwind-protect
4360 (with-temp-buffer 4358 (with-temp-buffer
4361 (setq proc 4359 (setq proc
@@ -4458,6 +4456,20 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4458 ;; Cleanup. 4456 ;; Cleanup.
4459 (ignore-errors (delete-file tmp-name))) 4457 (ignore-errors (delete-file tmp-name)))
4460 4458
4459 ;; Test `shell-command' with error buffer.
4460 (let ((stderr (generate-new-buffer "*stderr*")))
4461 (unwind-protect
4462 (with-temp-buffer
4463 (shell-command "error" (current-buffer) stderr)
4464 (should (= (point-min) (point-max)))
4465 (should
4466 (string-match
4467 "error:.+not found"
4468 (with-current-buffer stderr (buffer-string)))))
4469
4470 ;; Cleanup.
4471 (ignore-errors (kill-buffer stderr))))
4472
4461 ;; Test ordinary `async-shell-command'. 4473 ;; Test ordinary `async-shell-command'.
4462 (unwind-protect 4474 (unwind-protect
4463 (with-temp-buffer 4475 (with-temp-buffer
@@ -4475,10 +4487,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4475 (while 4487 (while
4476 (re-search-forward tramp-display-escape-sequence-regexp nil t) 4488 (re-search-forward tramp-display-escape-sequence-regexp nil t)
4477 (replace-match "" nil nil)) 4489 (replace-match "" nil nil))
4478 ;; There might be a nasty "Process *Async Shell* finished" message.
4479 (goto-char (point-min))
4480 (forward-line)
4481 (narrow-to-region (point-min) (point))
4482 (should 4490 (should
4483 (string-equal 4491 (string-equal
4484 (format "%s\n" (file-name-nondirectory tmp-name)) 4492 (format "%s\n" (file-name-nondirectory tmp-name))
@@ -4505,13 +4513,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4505 (while 4513 (while
4506 (re-search-forward tramp-display-escape-sequence-regexp nil t) 4514 (re-search-forward tramp-display-escape-sequence-regexp nil t)
4507 (replace-match "" nil nil)) 4515 (replace-match "" nil nil))
4508 ;; There might be a nasty "Process *Async Shell* finished" message. 4516 ;; We cannot use `string-equal', because tramp-adb.el
4509 (goto-char (point-min)) 4517 ;; echoes also the sent string.
4510 (forward-line)
4511 (narrow-to-region (point-min) (point))
4512 (should 4518 (should
4513 (string-equal 4519 (string-match
4514 (format "%s\n" (file-name-nondirectory tmp-name)) 4520 (format "\\`%s" (regexp-quote (file-name-nondirectory tmp-name)))
4515 (buffer-string)))) 4521 (buffer-string))))
4516 4522
4517 ;; Cleanup. 4523 ;; Cleanup.