Commit 7398933f authored by Michael Albinus's avatar Michael Albinus
Browse files

Sync with Tramp 2.2.0.

* net/tramp.el (tramp-handle-insert-file-contents): Don't use
`file-remote-p' (due to compatibility).

* net/tramp-sh.el (tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band): Use `ignore-errors'.

* net/trampver.el: Update release number.
parent 26214810
2010-11-20 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.0.
* net/tramp.el (tramp-handle-insert-file-contents): Don't use
`file-remote-p' (due to compatibility).
* net/tramp-sh.el (tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band): Use `ignore-errors'.
* net/trampver.el: Update release number.
2010-11-20 Eli Zaretskii <eliz@gnu.org> 2010-11-20 Eli Zaretskii <eliz@gnu.org>
   
* faces.el (glyphless-char): Define value for `pc'. * faces.el (glyphless-char): Define value for `pc'.
......
...@@ -106,7 +106,8 @@ detected as prompt when being sent on echoing hosts, therefore.") ...@@ -106,7 +106,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
;;;###tramp-autoload ;;;###tramp-autoload
(add-to-list (add-to-list
'tramp-methods 'tramp-methods
'("scp" (tramp-login-program "ssh") '("scp"
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("-e" "none") ("%h"))) (tramp-login-args (("-l" "%u") ("-p" "%p") ("-e" "none") ("%h")))
(tramp-async-args (("-q"))) (tramp-async-args (("-q")))
(tramp-remote-sh "/bin/sh") (tramp-remote-sh "/bin/sh")
...@@ -2166,16 +2167,13 @@ the uid and gid from FILENAME." ...@@ -2166,16 +2167,13 @@ the uid and gid from FILENAME."
(list tmpfile localname2 ok-if-already-exists))))) (list tmpfile localname2 ok-if-already-exists)))))
;; Save exit. ;; Save exit.
(condition-case nil (ignore-errors (delete-file tmpfile)))))))))
(delete-file tmpfile)
(error)))))))))
;; Set the time and mode. Mask possible errors. ;; Set the time and mode. Mask possible errors.
(condition-case nil (ignore-errors
(when keep-date (when keep-date
(set-file-times newname file-times) (set-file-times newname file-times)
(set-file-modes newname file-modes)) (set-file-modes newname file-modes))))))
(error)))))
(defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date) (defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date)
"Invoke rcp program to copy. "Invoke rcp program to copy.
...@@ -2203,12 +2201,11 @@ The method used must be an out-of-band method." ...@@ -2203,12 +2201,11 @@ The method used must be an out-of-band method."
(tramp-do-copy-or-rename-file-out-of-band (tramp-do-copy-or-rename-file-out-of-band
'rename tmpfile newname keep-date)) 'rename tmpfile newname keep-date))
;; Save exit. ;; Save exit.
(condition-case nil (ignore-errors
(if dir-flag (if dir-flag
(tramp-compat-delete-directory (tramp-compat-delete-directory
(expand-file-name ".." tmpfile) 'recursive) (expand-file-name ".." tmpfile) 'recursive)
(delete-file tmpfile)) (delete-file tmpfile)))))
(error))))
;; Expand hops. Might be necessary for gateway methods. ;; Expand hops. Might be necessary for gateway methods.
(setq v (car (tramp-compute-multi-hops v))) (setq v (car (tramp-compute-multi-hops v)))
...@@ -5039,6 +5036,5 @@ function cell is returned to be applied on a buffer." ...@@ -5039,6 +5036,5 @@ function cell is returned to be applied on a buffer."
;; rsync. ;; rsync.
;; * Try telnet+curl as new method. It might be useful for busybox, ;; * Try telnet+curl as new method. It might be useful for busybox,
;; without built-in uuencode/uudecode. ;; without built-in uuencode/uudecode.
;; * Try ssh+netcat as out-of-band method.
;;; tramp-sh.el ends here ;;; tramp-sh.el ends here
...@@ -2863,7 +2863,9 @@ User is always nil." ...@@ -2863,7 +2863,9 @@ User is always nil."
(set-visited-file-modtime) (set-visited-file-modtime)
(set-buffer-modified-p nil) (set-buffer-modified-p nil)
;; For root, preserve owner and group when editing files. ;; For root, preserve owner and group when editing files.
(when (string-equal (file-remote-p filename 'user) "root") (when (string-equal
(tramp-file-name-handler 'file-remote-p filename 'user)
"root")
(set (make-local-variable 'backup-by-copying-when-mismatch) t))) (set (make-local-variable 'backup-by-copying-when-mismatch) t)))
(when (and (stringp local-copy) (when (and (stringp local-copy)
(or remote-copy (null tramp-temp-buffer-file-name))) (or remote-copy (null tramp-temp-buffer-file-name)))
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
;; should be changed only there. ;; should be changed only there.
;;;###tramp-autoload ;;;###tramp-autoload
(defconst tramp-version "2.2.0-pre" (defconst tramp-version "2.2.0"
"This version of Tramp.") "This version of Tramp.")
;;;###tramp-autoload ;;;###tramp-autoload
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
(= emacs-major-version 21) (= emacs-major-version 21)
(>= emacs-minor-version 4))) (>= emacs-minor-version 4)))
"ok" "ok"
(format "Tramp 2.2.0-pre is not fit for %s" (format "Tramp 2.2.0 is not fit for %s"
(when (string-match "^.*$" (emacs-version)) (when (string-match "^.*$" (emacs-version))
(match-string 0 (emacs-version))))))) (match-string 0 (emacs-version)))))))
(unless (string-match "\\`ok\\'" x) (error "%s" x))) (unless (string-match "\\`ok\\'" x) (error "%s" x)))
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
(provide 'trampver) (provide 'trampver)
;; arch-tag: 443576ca-f8f1-4bb1-addc-5c70861e93b1
;;; trampver.el ends here ;;; trampver.el ends here
;; Local Variables: ;; Local Variables:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment