mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
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.
This commit is contained in:
parent
6b4043833c
commit
cd339e85a6
6 changed files with 12 additions and 19 deletions
|
|
@ -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.5.1-pre
|
||||
@set trampver 2.5.1
|
||||
@set trampurl https://www.gnu.org/software/tramp/
|
||||
@set tramp-bug-report-address tramp-devel@@gnu.org
|
||||
@set emacsver 25.1
|
||||
|
|
|
|||
|
|
@ -549,8 +549,7 @@ But handle the case, if the \"test\" command is not available."
|
|||
(when (and append (file-exists-p filename))
|
||||
(copy-file filename tmpfile 'ok)
|
||||
(set-file-modes tmpfile (logior (or (file-modes tmpfile) 0) #o0600)))
|
||||
(tramp-run-real-handler
|
||||
#'write-region (list start end tmpfile append 'no-message lockname))
|
||||
(write-region start end tmpfile append 'no-message lockname)
|
||||
(with-tramp-progress-reporter
|
||||
v 3 (format-message
|
||||
"Moving tmp file `%s' to `%s'" tmpfile filename)
|
||||
|
|
|
|||
|
|
@ -3225,7 +3225,6 @@ implementation will be used."
|
|||
(run-hooks 'tramp-handle-file-local-copy-hook)
|
||||
tmpfile)))
|
||||
|
||||
;; CCC grok LOCKNAME
|
||||
(defun tramp-sh-handle-write-region
|
||||
(start end filename &optional append visit lockname mustbenew)
|
||||
"Like `write-region' for Tramp files."
|
||||
|
|
@ -3254,9 +3253,7 @@ implementation will be used."
|
|||
(or (file-directory-p localname)
|
||||
(file-writable-p localname)))))
|
||||
;; Short track: if we are on the local host, we can run directly.
|
||||
(tramp-run-real-handler
|
||||
#'write-region
|
||||
(list start end localname append 'no-message lockname))
|
||||
(write-region start end localname append 'no-message lockname)
|
||||
|
||||
(let* ((modes (tramp-default-file-modes
|
||||
filename (and (eq mustbenew 'excl) 'nofollow)))
|
||||
|
|
@ -3289,13 +3286,10 @@ implementation will be used."
|
|||
;; file. We call `set-visited-file-modtime' ourselves later
|
||||
;; on. We must ensure that `file-coding-system-alist'
|
||||
;; matches `tmpfile'.
|
||||
(let (file-name-handler-alist
|
||||
(file-coding-system-alist
|
||||
(let ((file-coding-system-alist
|
||||
(tramp-find-file-name-coding-system-alist filename tmpfile)))
|
||||
(condition-case err
|
||||
(tramp-run-real-handler
|
||||
#'write-region
|
||||
(list start end tmpfile append 'no-message lockname))
|
||||
(write-region start end tmpfile append 'no-message lockname)
|
||||
((error quit)
|
||||
(setq tramp-temp-buffer-file-name nil)
|
||||
(delete-file tmpfile)
|
||||
|
|
|
|||
|
|
@ -4393,8 +4393,7 @@ of."
|
|||
;; We say `no-message' here because we don't want the visited file
|
||||
;; modtime data to be clobbered from the temp file. We call
|
||||
;; `set-visited-file-modtime' ourselves later on.
|
||||
(tramp-run-real-handler
|
||||
#'write-region (list start end tmpfile append 'no-message lockname))
|
||||
(write-region start end tmpfile append 'no-message lockname)
|
||||
(condition-case nil
|
||||
(rename-file tmpfile filename 'ok-if-already-exists)
|
||||
(error
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
|
||||
;; Keywords: comm, processes
|
||||
;; Package: tramp
|
||||
;; Version: 2.5.1-pre
|
||||
;; Version: 2.5.1
|
||||
;; 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 "2.5.1-pre"
|
||||
(defconst tramp-version "2.5.1"
|
||||
"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 2.5.1-pre is not fit for %s"
|
||||
(format "Tramp 2.5.1 is not fit for %s"
|
||||
(replace-regexp-in-string "\n" "" (emacs-version))))))
|
||||
(unless (string-equal "ok" x) (error "%s" x)))
|
||||
|
||||
|
|
|
|||
|
|
@ -6280,8 +6280,9 @@ Use the `ls' command."
|
|||
x ""))
|
||||
(not (string-empty-p x))
|
||||
;; ?\n and ?/ shouldn't be part of any file name. ?\t,
|
||||
;; ?. and ?? do not work for "smb" method.
|
||||
(replace-regexp-in-string "[\t\n/.?]" "" x)))
|
||||
;; ?. and ?? do not work for "smb" method. " " does not
|
||||
;; work at begin or end of the string for MS Windows.
|
||||
(replace-regexp-in-string "[ \t\n/.?]" "" x)))
|
||||
language-info-alist)))))))
|
||||
|
||||
(ert-deftest tramp-test41-utf8 ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue