]> git.eshelyaron.com Git - emacs.git/commitdiff
Sync with Tramp 2.4.3
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 29 Dec 2019 12:53:06 +0000 (13:53 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 30 Dec 2019 17:55:39 +0000 (18:55 +0100)
* 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)

doc/misc/trampver.texi
lisp/net/tramp.el
lisp/net/trampver.el
test/lisp/net/tramp-tests.el

index c34d28d313725c3342595dd6272ca54308afaf66..be35101e78c34ab8ccc3e8721da179a3c8d7d8c7 100644 (file)
@@ -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.4.3-pre
+@set trampver 2.4.3
 @set tramp-bug-report-address tramp-devel@@gnu.org
 @set emacsver 24.4
 
index 36bfe5ef865cca765a95191bbbb9a983d004b2da..cf39aa5ddd4dc683a079a4f665716e5fa7f99810 100644 (file)
@@ -7,8 +7,9 @@
 ;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
 ;; Package: tramp
-;; Version: 2.4.3-pre
+;; Version: 2.4.3
 ;; Package-Requires: ((emacs "24.4"))
+;; Package-Type: multi
 ;; URL: https://savannah.gnu.org/projects/tramp
 
 ;; This file is part of GNU Emacs.
@@ -3681,7 +3682,9 @@ support symbolic links."
 
     (setq buffer (if (and (not asynchronous) error-buffer)
                     (with-parsed-tramp-file-name default-directory nil
-                      (list output-buffer (tramp-make-tramp-temp-file v)))
+                      (list output-buffer
+                            (tramp-make-tramp-file-name
+                             v (tramp-make-tramp-temp-file v))))
                   output-buffer))
 
     (if current-buffer-p
@@ -3735,7 +3738,7 @@ support symbolic links."
 
 (defun tramp-handle-start-file-process (name buffer program &rest args)
   "Like `start-file-process' for Tramp files."
-  ;; `make-process' knows the `:file-error' argument since Emacs 27.1.
+  ;; `make-process' knows the `:file-handler' argument since Emacs 27.1 only.
   (tramp-file-name-handler
    'make-process
    :name name
index 49eab7fbc861c0f7ce3dce71a25c5b7d3b357189..9c04b6110eb025455b8328dc3b7fdd343c1a0e38 100644 (file)
@@ -39,7 +39,7 @@
 (defvar inhibit-message)
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.4.3-pre"
+(defconst tramp-version "2.4.3"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -73,7 +73,7 @@
 ;; Check for Emacs version.
 (let ((x   (if (not (string-lessp emacs-version "24.4"))
       "ok"
-    (format "Tramp 2.4.3-pre is not fit for %s"
+    (format "Tramp 2.4.3 is not fit for %s"
             (replace-regexp-in-string "\n" "" (emacs-version))))))
   (unless (string-equal "ok" x) (error "%s" x)))
 
index 77b3ea0ad21ef9f9f31db3fdddd680f881624af7..cb52d40f8be7e22e98cf1e9ab74c48f91aa8d3df 100644 (file)
@@ -2902,8 +2902,7 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
              (sort (copy-sequence `(,tmp-name3 ,tmp-name4)) 'string<))))
 
        ;; Cleanup.
-       (ignore-errors
-         (delete-directory tmp-name1 'recursive))))))
+       (ignore-errors (delete-directory tmp-name1 'recursive))))))
 
 (ert-deftest tramp-test17-insert-directory ()
   "Check `insert-directory'."
@@ -4354,8 +4353,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
 
       ;; Process with stderr.  tramp-adb.el doesn't support it (yet).
       (unless (tramp--test-adb-p)
-       (let ((stderr
-              (generate-new-buffer (generate-new-buffer-name "stderr"))))
+       (let ((stderr (generate-new-buffer "*stderr*")))
          (unwind-protect
              (with-temp-buffer
                (setq proc
@@ -4458,6 +4456,20 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
        ;; Cleanup.
        (ignore-errors (delete-file tmp-name)))
 
+      ;; Test `shell-command' with error buffer.
+      (let ((stderr (generate-new-buffer "*stderr*")))
+       (unwind-protect
+           (with-temp-buffer
+             (shell-command "error" (current-buffer) stderr)
+             (should (= (point-min) (point-max)))
+             (should
+              (string-match
+               "error:.+not found"
+               (with-current-buffer stderr (buffer-string)))))
+
+         ;; Cleanup.
+         (ignore-errors (kill-buffer stderr))))
+
       ;; Test ordinary `async-shell-command'.
       (unwind-protect
          (with-temp-buffer
@@ -4475,10 +4487,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
            (while
                (re-search-forward tramp-display-escape-sequence-regexp nil t)
              (replace-match "" nil nil))
-           ;; There might be a nasty "Process *Async Shell* finished" message.
-           (goto-char (point-min))
-           (forward-line)
-           (narrow-to-region (point-min) (point))
            (should
             (string-equal
              (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'."
            (while
                (re-search-forward tramp-display-escape-sequence-regexp nil t)
              (replace-match "" nil nil))
-           ;; There might be a nasty "Process *Async Shell* finished" message.
-           (goto-char (point-min))
-           (forward-line)
-           (narrow-to-region (point-min) (point))
+           ;; We cannot use `string-equal', because tramp-adb.el
+           ;; echoes also the sent string.
            (should
-            (string-equal
-             (format "%s\n" (file-name-nondirectory tmp-name))
+            (string-match
+             (format "\\`%s" (regexp-quote (file-name-nondirectory tmp-name)))
              (buffer-string))))
 
        ;; Cleanup.