aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2021-06-29 17:15:55 +0200
committerMichael Albinus2021-06-29 17:15:55 +0200
commitcd339e85a695f40d93b5ce9f4e65075dd979b25b (patch)
treea776ed047341d35020f7a3784ee28498f9c3bcb1
parent6b4043833cf2e846d41e714e2c72372b60d0d594 (diff)
downloademacs-cd339e85a695f40d93b5ce9f4e65075dd979b25b.tar.gz
emacs-cd339e85a695f40d93b5ce9f4e65075dd979b25b.zip
Sync with Tramp 2.5.1
* doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.5.1". * lisp/tramp.el (tramp-handle-write-region): * lisp/tramp-adb.el (tramp-adb-handle-write-region): * lisp/tramp-sh.el (tramp-sh-handle-write-region): Call local `write-region' directly. * test/lisp/net/tramp-tests.el (tramp--test-utf8): Adapt test for MS Windows.
-rw-r--r--doc/misc/trampver.texi2
-rw-r--r--lisp/net/tramp-adb.el3
-rw-r--r--lisp/net/tramp-sh.el12
-rw-r--r--lisp/net/tramp.el3
-rw-r--r--lisp/net/trampver.el6
-rw-r--r--test/lisp/net/tramp-tests.el5
6 files changed, 12 insertions, 19 deletions
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index 827c4773285..10c951d3ccf 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.1-pre 11@set trampver 2.5.1
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 aacf83e663f..7fb0ff57808 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -549,8 +549,7 @@ But handle the case, if the \"test\" command is not available."
549 (when (and append (file-exists-p filename)) 549 (when (and append (file-exists-p filename))
550 (copy-file filename tmpfile 'ok) 550 (copy-file filename tmpfile 'ok)
551 (set-file-modes tmpfile (logior (or (file-modes tmpfile) 0) #o0600))) 551 (set-file-modes tmpfile (logior (or (file-modes tmpfile) 0) #o0600)))
552 (tramp-run-real-handler 552 (write-region start end tmpfile append 'no-message lockname)
553 #'write-region (list start end tmpfile append 'no-message lockname))
554 (with-tramp-progress-reporter 553 (with-tramp-progress-reporter
555 v 3 (format-message 554 v 3 (format-message
556 "Moving tmp file `%s' to `%s'" tmpfile filename) 555 "Moving tmp file `%s' to `%s'" tmpfile filename)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index b613ad3f8e7..ebd0fbfd2d9 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3225,7 +3225,6 @@ implementation will be used."
3225 (run-hooks 'tramp-handle-file-local-copy-hook) 3225 (run-hooks 'tramp-handle-file-local-copy-hook)
3226 tmpfile))) 3226 tmpfile)))
3227 3227
3228;; CCC grok LOCKNAME
3229(defun tramp-sh-handle-write-region 3228(defun tramp-sh-handle-write-region
3230 (start end filename &optional append visit lockname mustbenew) 3229 (start end filename &optional append visit lockname mustbenew)
3231 "Like `write-region' for Tramp files." 3230 "Like `write-region' for Tramp files."
@@ -3254,9 +3253,7 @@ implementation will be used."
3254 (or (file-directory-p localname) 3253 (or (file-directory-p localname)
3255 (file-writable-p localname))))) 3254 (file-writable-p localname)))))
3256 ;; Short track: if we are on the local host, we can run directly. 3255 ;; Short track: if we are on the local host, we can run directly.
3257 (tramp-run-real-handler 3256 (write-region start end localname append 'no-message lockname)
3258 #'write-region
3259 (list start end localname append 'no-message lockname))
3260 3257
3261 (let* ((modes (tramp-default-file-modes 3258 (let* ((modes (tramp-default-file-modes
3262 filename (and (eq mustbenew 'excl) 'nofollow))) 3259 filename (and (eq mustbenew 'excl) 'nofollow)))
@@ -3289,13 +3286,10 @@ implementation will be used."
3289 ;; file. We call `set-visited-file-modtime' ourselves later 3286 ;; file. We call `set-visited-file-modtime' ourselves later
3290 ;; on. We must ensure that `file-coding-system-alist' 3287 ;; on. We must ensure that `file-coding-system-alist'
3291 ;; matches `tmpfile'. 3288 ;; matches `tmpfile'.
3292 (let (file-name-handler-alist 3289 (let ((file-coding-system-alist
3293 (file-coding-system-alist
3294 (tramp-find-file-name-coding-system-alist filename tmpfile))) 3290 (tramp-find-file-name-coding-system-alist filename tmpfile)))
3295 (condition-case err 3291 (condition-case err
3296 (tramp-run-real-handler 3292 (write-region start end tmpfile append 'no-message lockname)
3297 #'write-region
3298 (list start end tmpfile append 'no-message lockname))
3299 ((error quit) 3293 ((error quit)
3300 (setq tramp-temp-buffer-file-name nil) 3294 (setq tramp-temp-buffer-file-name nil)
3301 (delete-file tmpfile) 3295 (delete-file tmpfile)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index c3b088aebb7..ee7e0cf2c3b 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4393,8 +4393,7 @@ of."
4393 ;; We say `no-message' here because we don't want the visited file 4393 ;; We say `no-message' here because we don't want the visited file
4394 ;; modtime data to be clobbered from the temp file. We call 4394 ;; modtime data to be clobbered from the temp file. We call
4395 ;; `set-visited-file-modtime' ourselves later on. 4395 ;; `set-visited-file-modtime' ourselves later on.
4396 (tramp-run-real-handler 4396 (write-region start end tmpfile append 'no-message lockname)
4397 #'write-region (list start end tmpfile append 'no-message lockname))
4398 (condition-case nil 4397 (condition-case nil
4399 (rename-file tmpfile filename 'ok-if-already-exists) 4398 (rename-file tmpfile filename 'ok-if-already-exists)
4400 (error 4399 (error
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index abd92219b27..e6cf4c6ac53 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.1-pre 10;; Version: 2.5.1
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.1-pre" 43(defconst tramp-version "2.5.1"
44 "This version of Tramp.") 44 "This version of Tramp.")
45 45
46;;;###tramp-autoload 46;;;###tramp-autoload
@@ -76,7 +76,7 @@
76;; Check for Emacs version. 76;; Check for Emacs version.
77(let ((x (if (not (string-lessp emacs-version "25.1")) 77(let ((x (if (not (string-lessp emacs-version "25.1"))
78 "ok" 78 "ok"
79 (format "Tramp 2.5.1-pre is not fit for %s" 79 (format "Tramp 2.5.1 is not fit for %s"
80 (replace-regexp-in-string "\n" "" (emacs-version)))))) 80 (replace-regexp-in-string "\n" "" (emacs-version))))))
81 (unless (string-equal "ok" x) (error "%s" x))) 81 (unless (string-equal "ok" x) (error "%s" x)))
82 82
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 37cd7011618..6aa8629f334 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -6280,8 +6280,9 @@ Use the `ls' command."
6280 x "")) 6280 x ""))
6281 (not (string-empty-p x)) 6281 (not (string-empty-p x))
6282 ;; ?\n and ?/ shouldn't be part of any file name. ?\t, 6282 ;; ?\n and ?/ shouldn't be part of any file name. ?\t,
6283 ;; ?. and ?? do not work for "smb" method. 6283 ;; ?. and ?? do not work for "smb" method. " " does not
6284 (replace-regexp-in-string "[\t\n/.?]" "" x))) 6284 ;; work at begin or end of the string for MS Windows.
6285 (replace-regexp-in-string "[ \t\n/.?]" "" x)))
6285 language-info-alist))))))) 6286 language-info-alist)))))))
6286 6287
6287(ert-deftest tramp-test41-utf8 () 6288(ert-deftest tramp-test41-utf8 ()