aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2014-06-15 17:47:35 +0200
committerMichael Albinus2014-06-15 17:47:35 +0200
commit493ce45c928cb843e7e7a1decf8b5d31360ec450 (patch)
tree321cd41204230b3a3e77580906e36d940bb411ab
parent6e71bf1600f46ad9ccbf116e12faead1db4334cc (diff)
downloademacs-493ce45c928cb843e7e7a1decf8b5d31360ec450.tar.gz
emacs-493ce45c928cb843e7e7a1decf8b5d31360ec450.zip
Sync with Tramp 2.2.10.
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * lisp/net/tramp-cache.el (tramp-flush-file-function): Do not flush file properties of temporary buffers. * lisp/net/tramp-ftp.el (top): Remove special handling for URL syntax. * lisp/net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * lisp/net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-do-copy-or-rename-file-out-of-band): Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * lisp/net/tramp.el (tramp-methods): Tweak docstring. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * lisp/net/trampver.el: Update release number.
-rw-r--r--lisp/net/tramp-adb.el12
-rw-r--r--lisp/net/tramp-cache.el16
-rw-r--r--lisp/net/tramp-ftp.el11
-rw-r--r--lisp/net/tramp-gvfs.el37
-rw-r--r--lisp/net/tramp-sh.el300
-rw-r--r--lisp/net/tramp-smb.el191
-rw-r--r--lisp/net/tramp.el27
-rw-r--r--lisp/net/trampver.el4
8 files changed, 350 insertions, 248 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 53888473217..f38cecb1c62 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -609,10 +609,10 @@ But handle the case, if the \"test\" command is not available."
609 'write-region 609 'write-region
610 (list start end tmpfile append 'no-message lockname confirm)) 610 (list start end tmpfile append 'no-message lockname confirm))
611 (with-tramp-progress-reporter 611 (with-tramp-progress-reporter
612 v 3 (format "Moving tmp file %s to %s" tmpfile filename) 612 v 3 (format "Moving tmp file `%s' to `%s'" tmpfile filename)
613 (unwind-protect 613 (unwind-protect
614 (when (tramp-adb-execute-adb-command v "push" tmpfile localname) 614 (when (tramp-adb-execute-adb-command v "push" tmpfile localname)
615 (tramp-error v 'file-error "Cannot write: `%s' filename")) 615 (tramp-error v 'file-error "Cannot write: `%s'" filename))
616 (delete-file tmpfile))) 616 (delete-file tmpfile)))
617 617
618 (when (or (eq visit t) (stringp visit)) 618 (when (or (eq visit t) (stringp visit))
@@ -998,7 +998,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
998 (with-temp-buffer 998 (with-temp-buffer
999 (prog1 999 (prog1
1000 (unless 1000 (unless
1001 (zerop (apply 'tramp-call-process tramp-adb-program nil t nil args)) 1001 (zerop
1002 (apply 'tramp-call-process vec tramp-adb-program nil t nil args))
1002 (buffer-string)) 1003 (buffer-string))
1003 (tramp-message vec 6 "%s" (buffer-string))))) 1004 (tramp-message vec 6 "%s" (buffer-string)))))
1004 1005
@@ -1107,10 +1108,7 @@ connection if a previous connection has died for some reason."
1107 (and p (processp p) (memq (process-status p) '(run open))) 1108 (and p (processp p) (memq (process-status p) '(run open)))
1108 (save-match-data 1109 (save-match-data
1109 (when (and p (processp p)) (delete-process p)) 1110 (when (and p (processp p)) (delete-process p))
1110 (setq tramp-current-method (tramp-file-name-method vec) 1111 (setq devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))
1111 tramp-current-user (tramp-file-name-user vec)
1112 tramp-current-host (tramp-file-name-host vec)
1113 devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))
1114 (if (not devices) 1112 (if (not devices)
1115 (tramp-error vec 'file-error "No device connected")) 1113 (tramp-error vec 'file-error "No device connected"))
1116 (if (and (> (length host) 0) (not (member host devices))) 1114 (if (and (> (length host) 0) (not (member host devices)))
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index be66f18d9e4..b5ef8c28d2d 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -203,13 +203,15 @@ Remove also properties of all files in subdirectories."
203;; not show proper directory contents when a file has been copied or 203;; not show proper directory contents when a file has been copied or
204;; deleted before. 204;; deleted before.
205(defun tramp-flush-file-function () 205(defun tramp-flush-file-function ()
206 "Flush all Tramp cache properties from `buffer-file-name'." 206 "Flush all Tramp cache properties from `buffer-file-name'.
207 (let ((bfn (if (stringp (buffer-file-name)) 207This is suppressed for temporary buffers."
208 (buffer-file-name) 208 (unless (string-match "^ \\*temp\\*" (or (buffer-name) ""))
209 default-directory))) 209 (let ((bfn (if (stringp (buffer-file-name))
210 (when (tramp-tramp-file-p bfn) 210 (buffer-file-name)
211 (with-parsed-tramp-file-name bfn nil 211 default-directory)))
212 (tramp-flush-file-property v localname))))) 212 (when (tramp-tramp-file-p bfn)
213 (with-parsed-tramp-file-name bfn nil
214 (tramp-flush-file-property v localname))))))
213 215
214(add-hook 'before-revert-hook 'tramp-flush-file-function) 216(add-hook 'before-revert-hook 'tramp-flush-file-function)
215(add-hook 'eshell-pre-command-hook 'tramp-flush-file-function) 217(add-hook 'eshell-pre-command-hook 'tramp-flush-file-function)
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index dc84a524ba0..d98f6d74a6a 100644
--- a/lisp/net/tramp-ftp.el
+++ b/lisp/net/tramp-ftp.el
@@ -120,17 +120,6 @@ present for backward compatibility."
120 tramp-ftp-method 120 tramp-ftp-method
121 '((tramp-parse-netrc "~/.netrc")))) 121 '((tramp-parse-netrc "~/.netrc"))))
122 122
123;; If there is URL syntax, `substitute-in-file-name' needs special
124;; handling.
125(put 'substitute-in-file-name 'ange-ftp 'tramp-handle-substitute-in-file-name)
126(add-hook 'tramp-ftp-unload-hook
127 (lambda ()
128 (setplist 'substitute-in-file-name
129 (delete 'ange-ftp
130 (delete 'tramp-handle-substitute-in-file-name
131 (symbol-plist
132 'substitute-in-file-name))))))
133
134;;;###tramp-autoload 123;;;###tramp-autoload
135(defun tramp-ftp-file-name-handler (operation &rest args) 124(defun tramp-ftp-file-name-handler (operation &rest args)
136 "Invoke the Ange-FTP handler for OPERATION. 125 "Invoke the Ange-FTP handler for OPERATION.
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 52189e091fb..5d6447609fa 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -49,14 +49,14 @@
49 49
50;; The customer option `tramp-gvfs-methods' contains the list of 50;; The customer option `tramp-gvfs-methods' contains the list of
51;; supported connection methods. Per default, these are "dav", 51;; supported connection methods. Per default, these are "dav",
52;; "davs", "obex" and "synce". Note that with "obex" it might be 52;; "davs", "obex", "sftp" and "synce". Note that with "obex" it might
53;; necessary to pair with the other bluetooth device, if it hasn't 53;; be necessary to pair with the other bluetooth device, if it hasn't
54;; been done already. There might be also some few seconds delay in 54;; been done already. There might be also some few seconds delay in
55;; discovering available bluetooth devices. 55;; discovering available bluetooth devices.
56 56
57;; Other possible connection methods are "ftp", "sftp" and "smb". 57;; Other possible connection methods are "ftp" and "smb". When one of
58;; When one of these methods is added to the list, the remote access 58;; these methods is added to the list, the remote access for that
59;; for that method is performed via GVFS instead of the native Tramp 59;; method is performed via GVFS instead of the native Tramp
60;; implementation. 60;; implementation.
61 61
62;; GVFS offers even more connection methods. The complete list of 62;; GVFS offers even more connection methods. The complete list of
@@ -110,7 +110,7 @@
110 (require 'custom)) 110 (require 'custom))
111 111
112;;;###tramp-autoload 112;;;###tramp-autoload
113(defcustom tramp-gvfs-methods '("dav" "davs" "obex" "synce") 113(defcustom tramp-gvfs-methods '("dav" "davs" "obex" "sftp" "synce")
114 "List of methods for remote files, accessed with GVFS." 114 "List of methods for remote files, accessed with GVFS."
115 :group 'tramp 115 :group 'tramp
116 :version "23.2" 116 :version "23.2"
@@ -661,7 +661,7 @@ is no information where to trace the message.")
661 "Like `delete-file' for Tramp files." 661 "Like `delete-file' for Tramp files."
662 (with-parsed-tramp-file-name filename nil 662 (with-parsed-tramp-file-name filename nil
663 (tramp-flush-file-property v (file-name-directory localname)) 663 (tramp-flush-file-property v (file-name-directory localname))
664 (tramp-flush-directory-property v localname) 664 (tramp-flush-file-property v localname)
665 (unless 665 (unless
666 (tramp-gvfs-send-command 666 (tramp-gvfs-send-command
667 v (if (and trash delete-by-moving-to-trash) "gvfs-trash" "gvfs-rm") 667 v (if (and trash delete-by-moving-to-trash) "gvfs-trash" "gvfs-rm")
@@ -794,7 +794,8 @@ is no information where to trace the message.")
794 (goto-char (point-min)) 794 (goto-char (point-min))
795 (setq res-filemodes 795 (setq res-filemodes
796 (if (re-search-forward "unix::mode:\\s-+\\([0-9]+\\)" nil t) 796 (if (re-search-forward "unix::mode:\\s-+\\([0-9]+\\)" nil t)
797 (tramp-file-mode-from-int (match-string 1)) 797 (tramp-file-mode-from-int
798 (string-to-number (match-string 1)))
798 (if dirp "drwx------" "-rwx------"))) 799 (if dirp "drwx------" "-rwx------")))
799 ;; ... inode and device 800 ;; ... inode and device
800 (goto-char (point-min)) 801 (goto-char (point-min))
@@ -899,7 +900,7 @@ is no information where to trace the message.")
899 entry) 900 entry)
900 ;; Get a list of directories and files. 901 ;; Get a list of directories and files.
901 (tramp-gvfs-send-command 902 (tramp-gvfs-send-command
902 v "gvfs-ls" (tramp-gvfs-url-file-name directory)) 903 v "gvfs-ls" "-h" (tramp-gvfs-url-file-name directory))
903 904
904 ;; Now grab the output. 905 ;; Now grab the output.
905 (with-temp-buffer 906 (with-temp-buffer
@@ -1118,9 +1119,9 @@ is no information where to trace the message.")
1118 (setq user 1119 (setq user
1119 (concat (match-string 2 user) ";" (match-string 1 user)))) 1120 (concat (match-string 2 user) ";" (match-string 1 user))))
1120 (url-parse-make-urlobj 1121 (url-parse-make-urlobj
1121 method (url-hexify-string user) nil 1122 method (and user (url-hexify-string user)) nil
1122 (tramp-file-name-real-host v) (tramp-file-name-port v) 1123 (tramp-file-name-real-host v) (tramp-file-name-port v)
1123 (url-hexify-string localname) nil nil t)) 1124 (and localname (url-hexify-string localname)) nil nil t))
1124 (url-parse-make-urlobj 1125 (url-parse-make-urlobj
1125 "file" nil nil nil nil 1126 "file" nil nil nil nil
1126 (url-hexify-string (file-truename filename)) nil nil t)))) 1127 (url-hexify-string (file-truename filename)) nil nil t))))
@@ -1555,14 +1556,10 @@ connection if a previous connection has died for some reason."
1555 "Send the COMMAND with its ARGS to connection VEC. 1556 "Send the COMMAND with its ARGS to connection VEC.
1556COMMAND is usually a command from the gvfs-* utilities. 1557COMMAND is usually a command from the gvfs-* utilities.
1557`call-process' is applied, and it returns `t' if the return code is zero." 1558`call-process' is applied, and it returns `t' if the return code is zero."
1558 (let (result) 1559 (with-current-buffer (tramp-get-connection-buffer vec)
1559 (with-current-buffer (tramp-get-connection-buffer vec) 1560 (tramp-gvfs-maybe-open-connection vec)
1560 (tramp-gvfs-maybe-open-connection vec) 1561 (erase-buffer)
1561 (erase-buffer) 1562 (zerop (apply 'tramp-call-process vec command nil t nil args))))
1562 (tramp-message vec 6 "%s %s" command (mapconcat 'identity args " "))
1563 (setq result (apply 'tramp-call-process command nil t nil args))
1564 (tramp-message vec 6 "\n%s" (buffer-string))
1565 (zerop result))))
1566 1563
1567 1564
1568;; D-Bus BLUEZ functions. 1565;; D-Bus BLUEZ functions.
@@ -1671,7 +1668,7 @@ be used."
1671 (list user host))) 1668 (list user host)))
1672 (zeroconf-list-services "_webdav._tcp"))) 1669 (zeroconf-list-services "_webdav._tcp")))
1673 1670
1674;; Add completion function for DAV and DAVS methods. 1671;; Add completion function for SFTP, DAV and DAVS methods.
1675(when (and tramp-gvfs-enabled 1672(when (and tramp-gvfs-enabled
1676 (member zeroconf-service-avahi (dbus-list-known-names :system))) 1673 (member zeroconf-service-avahi (dbus-list-known-names :system)))
1677 (zeroconf-init tramp-gvfs-zeroconf-domain) 1674 (zeroconf-init tramp-gvfs-zeroconf-domain)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 15aa1329817..a6771cd306f 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -35,6 +35,10 @@
35(defvar directory-sep-char) 35(defvar directory-sep-char)
36(defvar tramp-gw-tunnel-method) 36(defvar tramp-gw-tunnel-method)
37(defvar tramp-gw-socks-method) 37(defvar tramp-gw-socks-method)
38(defvar vc-handled-backends)
39(defvar vc-bzr-program)
40(defvar vc-git-program)
41(defvar vc-hg-program)
38 42
39(defcustom tramp-inline-compress-start-size 4096 43(defcustom tramp-inline-compress-start-size 4096
40 "The minimum size of compressing where inline transfer. 44 "The minimum size of compressing where inline transfer.
@@ -142,17 +146,6 @@ detected as prompt when being sent on echoing hosts, therefore.")
142 (tramp-default-port 22))) 146 (tramp-default-port 22)))
143;;;###tramp-autoload 147;;;###tramp-autoload
144(add-to-list 'tramp-methods 148(add-to-list 'tramp-methods
145 '("sftp"
146 (tramp-login-program "ssh")
147 (tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
148 ("-e" "none") ("%h")))
149 (tramp-async-args (("-q")))
150 (tramp-remote-shell "/bin/sh")
151 (tramp-remote-shell-args ("-c"))
152 (tramp-copy-program "sftp")
153 (tramp-copy-args ("%c"))))
154 ;;;###tramp-autoload
155(add-to-list 'tramp-methods
156 '("rsync" 149 '("rsync"
157 (tramp-login-program "ssh") 150 (tramp-login-program "ssh")
158 (tramp-login-args (("-l" "%u") ("-p" "%p") ("%c") 151 (tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
@@ -210,12 +203,26 @@ detected as prompt when being sent on echoing hosts, therefore.")
210(add-to-list 'tramp-methods 203(add-to-list 'tramp-methods
211 '("telnet" 204 '("telnet"
212 (tramp-login-program "telnet") 205 (tramp-login-program "telnet")
213 (tramp-login-args (("%h") ("%p"))) 206 (tramp-login-args (("%h") ("%p") ("2>/dev/null")))
214 (tramp-remote-shell "/bin/sh") 207 (tramp-remote-shell "/bin/sh")
215 (tramp-remote-shell-args ("-c")) 208 (tramp-remote-shell-args ("-c"))
216 (tramp-default-port 23))) 209 (tramp-default-port 23)))
217;;;###tramp-autoload 210;;;###tramp-autoload
218(add-to-list 'tramp-methods 211(add-to-list 'tramp-methods
212 '("nc"
213 (tramp-login-program "telnet")
214 (tramp-login-args (("%h") ("%p") ("2>/dev/null")))
215 (tramp-remote-shell "/bin/sh")
216 (tramp-remote-shell-args ("-c"))
217 (tramp-copy-program "nc")
218 ;; We use "-v" for better error tracking.
219 (tramp-copy-args (("-w" "1") ("-v") ("%h") ("%r")))
220 (tramp-remote-copy-program "nc")
221 ;; We use "-p" as required for busyboxes.
222 (tramp-remote-copy-args (("-l") ("-p" "%r")))
223 (tramp-default-port 23)))
224;;;###tramp-autoload
225(add-to-list 'tramp-methods
219 '("su" 226 '("su"
220 (tramp-login-program "su") 227 (tramp-login-program "su")
221 (tramp-login-args (("-") ("%u"))) 228 (tramp-login-args (("-") ("%u")))
@@ -249,9 +256,16 @@ detected as prompt when being sent on echoing hosts, therefore.")
249 (tramp-remote-shell-args ("-c")))) 256 (tramp-remote-shell-args ("-c"))))
250;;;###tramp-autoload 257;;;###tramp-autoload
251(add-to-list 'tramp-methods 258(add-to-list 'tramp-methods
252 '("plink" 259 `("plink"
253 (tramp-login-program "plink") 260 (tramp-login-program "plink")
254 (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h"))) 261 ;; ("%h") must be a single element, see `tramp-compute-multi-hops'.
262 (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
263 ("%h") ("\"")
264 (,(format
265 "env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
266 tramp-terminal-type
267 tramp-initial-end-of-output))
268 ("/bin/sh") ("\"")))
255 (tramp-remote-shell "/bin/sh") 269 (tramp-remote-shell "/bin/sh")
256 (tramp-remote-shell-args ("-c")) 270 (tramp-remote-shell-args ("-c"))
257 (tramp-default-port 22))) 271 (tramp-default-port 22)))
@@ -259,21 +273,25 @@ detected as prompt when being sent on echoing hosts, therefore.")
259(add-to-list 'tramp-methods 273(add-to-list 'tramp-methods
260 `("plinkx" 274 `("plinkx"
261 (tramp-login-program "plink") 275 (tramp-login-program "plink")
262 ;; ("%h") must be a single element, see 276 (tramp-login-args (("-load") ("%h") ("-t") ("\"")
263 ;; `tramp-compute-multi-hops'.
264 (tramp-login-args (("-load") ("%h") ("-t")
265 (,(format 277 (,(format
266 "env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'" 278 "env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
267 tramp-terminal-type 279 tramp-terminal-type
268 tramp-initial-end-of-output)) 280 tramp-initial-end-of-output))
269 ("/bin/sh"))) 281 ("/bin/sh") ("\"")))
270 (tramp-remote-shell "/bin/sh") 282 (tramp-remote-shell "/bin/sh")
271 (tramp-remote-shell-args ("-c")))) 283 (tramp-remote-shell-args ("-c"))))
272;;;###tramp-autoload 284;;;###tramp-autoload
273(add-to-list 'tramp-methods 285(add-to-list 'tramp-methods
274 '("pscp" 286 `("pscp"
275 (tramp-login-program "plink") 287 (tramp-login-program "plink")
276 (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h"))) 288 (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
289 ("%h") ("\"")
290 (,(format
291 "env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
292 tramp-terminal-type
293 tramp-initial-end-of-output))
294 ("/bin/sh") ("\"")))
277 (tramp-remote-shell "/bin/sh") 295 (tramp-remote-shell "/bin/sh")
278 (tramp-remote-shell-args ("-c")) 296 (tramp-remote-shell-args ("-c"))
279 (tramp-copy-program "pscp") 297 (tramp-copy-program "pscp")
@@ -284,9 +302,15 @@ detected as prompt when being sent on echoing hosts, therefore.")
284 (tramp-default-port 22))) 302 (tramp-default-port 22)))
285;;;###tramp-autoload 303;;;###tramp-autoload
286(add-to-list 'tramp-methods 304(add-to-list 'tramp-methods
287 '("psftp" 305 `("psftp"
288 (tramp-login-program "plink") 306 (tramp-login-program "plink")
289 (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h"))) 307 (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
308 ("%h") ("\"")
309 (,(format
310 "env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
311 tramp-terminal-type
312 tramp-initial-end-of-output))
313 ("/bin/sh") ("\"")))
290 (tramp-remote-shell "/bin/sh") 314 (tramp-remote-shell "/bin/sh")
291 (tramp-remote-shell-args ("-c")) 315 (tramp-remote-shell-args ("-c"))
292 (tramp-copy-program "pscp") 316 (tramp-copy-program "pscp")
@@ -319,7 +343,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
319(add-to-list 'tramp-default-user-alist 343(add-to-list 'tramp-default-user-alist
320 `(,(concat 344 `(,(concat
321 "\\`" 345 "\\`"
322 (regexp-opt '("rcp" "remcp" "rsh" "telnet" "krlogin" "fcp")) 346 (regexp-opt
347 '("rcp" "remcp" "rsh" "telnet" "nc" "krlogin" "fcp"))
323 "\\'") 348 "\\'")
324 nil ,(user-login-name))) 349 nil ,(user-login-name)))
325 350
@@ -370,7 +395,6 @@ detected as prompt when being sent on echoing hosts, therefore.")
370 (tramp-set-completion-function "remcp" tramp-completion-function-alist-rsh) 395 (tramp-set-completion-function "remcp" tramp-completion-function-alist-rsh)
371 (tramp-set-completion-function "scp" tramp-completion-function-alist-ssh) 396 (tramp-set-completion-function "scp" tramp-completion-function-alist-ssh)
372 (tramp-set-completion-function "scpx" tramp-completion-function-alist-ssh) 397 (tramp-set-completion-function "scpx" tramp-completion-function-alist-ssh)
373 (tramp-set-completion-function "sftp" tramp-completion-function-alist-ssh)
374 (tramp-set-completion-function "rsync" tramp-completion-function-alist-ssh) 398 (tramp-set-completion-function "rsync" tramp-completion-function-alist-ssh)
375 (tramp-set-completion-function "rsh" tramp-completion-function-alist-rsh) 399 (tramp-set-completion-function "rsh" tramp-completion-function-alist-rsh)
376 (tramp-set-completion-function "remsh" tramp-completion-function-alist-rsh) 400 (tramp-set-completion-function "remsh" tramp-completion-function-alist-rsh)
@@ -378,6 +402,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
378 (tramp-set-completion-function "sshx" tramp-completion-function-alist-ssh) 402 (tramp-set-completion-function "sshx" tramp-completion-function-alist-ssh)
379 (tramp-set-completion-function 403 (tramp-set-completion-function
380 "telnet" tramp-completion-function-alist-telnet) 404 "telnet" tramp-completion-function-alist-telnet)
405 (tramp-set-completion-function "nc" tramp-completion-function-alist-telnet)
381 (tramp-set-completion-function "su" tramp-completion-function-alist-su) 406 (tramp-set-completion-function "su" tramp-completion-function-alist-su)
382 (tramp-set-completion-function "sudo" tramp-completion-function-alist-su) 407 (tramp-set-completion-function "sudo" tramp-completion-function-alist-su)
383 (tramp-set-completion-function "ksu" tramp-completion-function-alist-su) 408 (tramp-set-completion-function "ksu" tramp-completion-function-alist-su)
@@ -387,6 +412,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
387 (tramp-set-completion-function 412 (tramp-set-completion-function
388 "plinkx" tramp-completion-function-alist-putty) 413 "plinkx" tramp-completion-function-alist-putty)
389 (tramp-set-completion-function "pscp" tramp-completion-function-alist-ssh) 414 (tramp-set-completion-function "pscp" tramp-completion-function-alist-ssh)
415 (tramp-set-completion-function "psftp" tramp-completion-function-alist-ssh)
390 (tramp-set-completion-function "fcp" tramp-completion-function-alist-ssh))) 416 (tramp-set-completion-function "fcp" tramp-completion-function-alist-ssh)))
391 417
392;; "getconf PATH" yields: 418;; "getconf PATH" yields:
@@ -1346,7 +1372,7 @@ of."
1346 ;; We are local, so we don't need the UTC settings. 1372 ;; We are local, so we don't need the UTC settings.
1347 (zerop 1373 (zerop
1348 (tramp-call-process 1374 (tramp-call-process
1349 "touch" nil nil nil "-t" 1375 nil "touch" nil nil nil "-t"
1350 (format-time-string "%Y%m%d%H%M.%S" time) 1376 (format-time-string "%Y%m%d%H%M.%S" time)
1351 (tramp-shell-quote-argument filename))))) 1377 (tramp-shell-quote-argument filename)))))
1352 1378
@@ -1380,7 +1406,7 @@ be non-negative integers."
1380 (let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer))) 1406 (let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer)))
1381 (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer)))) 1407 (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer))))
1382 (tramp-call-process 1408 (tramp-call-process
1383 "chown" nil nil nil 1409 nil "chown" nil nil nil
1384 (format "%d:%d" uid gid) (tramp-shell-quote-argument filename)))))) 1410 (format "%d:%d" uid gid) (tramp-shell-quote-argument filename))))))
1385 1411
1386(defun tramp-remote-selinux-p (vec) 1412(defun tramp-remote-selinux-p (vec)
@@ -1542,7 +1568,7 @@ be non-negative integers."
1542(defun tramp-sh-handle-file-directory-p (filename) 1568(defun tramp-sh-handle-file-directory-p (filename)
1543 "Like `file-directory-p' for Tramp files." 1569 "Like `file-directory-p' for Tramp files."
1544 (with-parsed-tramp-file-name filename nil 1570 (with-parsed-tramp-file-name filename nil
1545 ;; `file-directory-p' is used as predicate for filename completion. 1571 ;; `file-directory-p' is used as predicate for file name completion.
1546 ;; Sometimes, when a connection is not established yet, it is 1572 ;; Sometimes, when a connection is not established yet, it is
1547 ;; desirable to return t immediately for "/method:foo:". It can 1573 ;; desirable to return t immediately for "/method:foo:". It can
1548 ;; be expected that this is always a directory. 1574 ;; be expected that this is always a directory.
@@ -1644,10 +1670,10 @@ be non-negative integers."
1644 vec 1670 vec
1645 (format 1671 (format
1646 (concat 1672 (concat
1647 ;; We must care about filenames with spaces, or starting with 1673 ;; We must care about file names with spaces, or starting with
1648 ;; "-"; this would confuse xargs. "ls -aQ" might be a solution, 1674 ;; "-"; this would confuse xargs. "ls -aQ" might be a solution,
1649 ;; but it does not work on all remote systems. Therefore, we 1675 ;; but it does not work on all remote systems. Therefore, we
1650 ;; quote the filenames via sed. 1676 ;; quote the file names via sed.
1651 "cd %s; echo \"(\"; (%s -a | sed -e s/\\$/\\\"/g -e s/^/\\\"/g | " 1677 "cd %s; echo \"(\"; (%s -a | sed -e s/\\$/\\\"/g -e s/^/\\\"/g | "
1652 "xargs %s -c " 1678 "xargs %s -c "
1653 "'(\"%%n\" (\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 -1)'" 1679 "'(\"%%n\" (\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 -1)'"
@@ -1670,15 +1696,15 @@ be non-negative integers."
1670 (mapcar 1696 (mapcar
1671 'list 1697 'list
1672 (or 1698 (or
1673 ;; Try cache entries for filename, filename with last 1699 ;; Try cache entries for `filename', `filename' with last
1674 ;; character removed, filename with last two characters 1700 ;; character removed, `filename' with last two characters
1675 ;; removed, ..., and finally the empty string - all 1701 ;; removed, ..., and finally the empty string - all
1676 ;; concatenated to the local directory name. 1702 ;; concatenated to the local directory name.
1677 (let ((remote-file-name-inhibit-cache 1703 (let ((remote-file-name-inhibit-cache
1678 (or remote-file-name-inhibit-cache 1704 (or remote-file-name-inhibit-cache
1679 tramp-completion-reread-directory-timeout))) 1705 tramp-completion-reread-directory-timeout)))
1680 1706
1681 ;; This is inefficient for very long filenames, pity 1707 ;; This is inefficient for very long file names, pity
1682 ;; `reduce' is not available... 1708 ;; `reduce' is not available...
1683 (car 1709 (car
1684 (apply 1710 (apply
@@ -1742,7 +1768,7 @@ be non-negative integers."
1742 (tramp-shell-quote-argument localname) 1768 (tramp-shell-quote-argument localname)
1743 (tramp-get-ls-command v) 1769 (tramp-get-ls-command v)
1744 ;; When `filename' is empty, just `ls' without 1770 ;; When `filename' is empty, just `ls' without
1745 ;; filename argument is more efficient than `ls *' 1771 ;; `filename' argument is more efficient than `ls *'
1746 ;; for very large directories and might avoid the 1772 ;; for very large directories and might avoid the
1747 ;; `Argument list too long' error. 1773 ;; `Argument list too long' error.
1748 ;; 1774 ;;
@@ -1981,7 +2007,7 @@ file names."
1981 ;; create a new buffer, insert the contents of the 2007 ;; create a new buffer, insert the contents of the
1982 ;; source file into it, then write out the buffer to 2008 ;; source file into it, then write out the buffer to
1983 ;; the target file. The advantage is that it doesn't 2009 ;; the target file. The advantage is that it doesn't
1984 ;; matter which filename handlers are used for the 2010 ;; matter which file name handlers are used for the
1985 ;; source and target file. 2011 ;; source and target file.
1986 (t 2012 (t
1987 (tramp-do-copy-or-rename-file-via-buffer 2013 (tramp-do-copy-or-rename-file-via-buffer
@@ -2212,19 +2238,19 @@ the uid and gid from FILENAME."
2212 (set-file-modes newname file-modes)))))) 2238 (set-file-modes newname file-modes))))))
2213 2239
2214(defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date) 2240(defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date)
2215 "Invoke rcp program to copy. 2241 "Invoke `scp' program to copy.
2216The method used must be an out-of-band method." 2242The method used must be an out-of-band method."
2217 (let* ((t1 (tramp-tramp-file-p filename)) 2243 (let* ((t1 (tramp-tramp-file-p filename))
2218 (t2 (tramp-tramp-file-p newname)) 2244 (t2 (tramp-tramp-file-p newname))
2219 (orig-vec (tramp-dissect-file-name (if t1 filename newname))) 2245 (orig-vec (tramp-dissect-file-name (if t1 filename newname)))
2220 copy-program copy-args copy-env copy-keep-date port spec 2246 copy-program copy-args copy-env copy-keep-date port listener spec
2221 options source target) 2247 options source target remote-copy-program remote-copy-args)
2222 2248
2223 (with-parsed-tramp-file-name (if t1 filename newname) nil 2249 (with-parsed-tramp-file-name (if t1 filename newname) nil
2224 (if (and t1 t2) 2250 (if (and t1 t2)
2225 2251
2226 ;; Both are Tramp files. We shall optimize it when the 2252 ;; Both are Tramp files. We shall optimize it when the
2227 ;; methods for filename and newname are the same. 2253 ;; methods for FILENAME and NEWNAME are the same.
2228 (let* ((dir-flag (file-directory-p filename)) 2254 (let* ((dir-flag (file-directory-p filename))
2229 (tmpfile (tramp-compat-make-temp-file localname dir-flag))) 2255 (tmpfile (tramp-compat-make-temp-file localname dir-flag)))
2230 (if dir-flag 2256 (if dir-flag
@@ -2285,6 +2311,13 @@ The method used must be an out-of-band method."
2285 (setq user (or (tramp-file-name-user v) 2311 (setq user (or (tramp-file-name-user v)
2286 (tramp-get-connection-property v "login-as" nil))) 2312 (tramp-get-connection-property v "login-as" nil)))
2287 2313
2314 ;; Check for listener port.
2315 (when (tramp-get-method-parameter method 'tramp-remote-copy-args)
2316 (setq listener (number-to-string (+ 50000 (random 10000))))
2317 (while
2318 (zerop (tramp-call-process v "nc" nil nil nil "-z" host listener))
2319 (setq listener (number-to-string (+ 50000 (random 10000))))))
2320
2288 ;; Compose copy command. 2321 ;; Compose copy command.
2289 (setq host (or host "") 2322 (setq host (or host "")
2290 user (or user "") 2323 user (or user "")
@@ -2297,7 +2330,7 @@ The method used must be an out-of-band method."
2297 tramp-ssh-controlmaster-options "") 2330 tramp-ssh-controlmaster-options "")
2298 spec) 2331 spec)
2299 spec (format-spec-make 2332 spec (format-spec-make
2300 ?h host ?u user ?p port ?c options 2333 ?h host ?u user ?p port ?r listener ?c options
2301 ?k (if keep-date " " "")) 2334 ?k (if keep-date " " ""))
2302 copy-program (tramp-get-method-parameter 2335 copy-program (tramp-get-method-parameter
2303 method 'tramp-copy-program) 2336 method 'tramp-copy-program)
@@ -2325,12 +2358,57 @@ The method used must be an out-of-band method."
2325 (lambda (x) 2358 (lambda (x)
2326 (setq x (mapcar (lambda (y) (format-spec y spec)) x)) 2359 (setq x (mapcar (lambda (y) (format-spec y spec)) x))
2327 (unless (member "" x) (mapconcat 'identity x " "))) 2360 (unless (member "" x) (mapconcat 'identity x " ")))
2328 (tramp-get-method-parameter method 'tramp-copy-env)))) 2361 (tramp-get-method-parameter method 'tramp-copy-env)))
2362 remote-copy-program (tramp-get-method-parameter
2363 method 'tramp-remote-copy-program)
2364 remote-copy-args
2365 (delete
2366 ;; " " has either been a replacement of "%k" (when
2367 ;; keep-date argument is non-nil), or a replacement
2368 ;; for the whole keep-date sublist.
2369 " "
2370 (dolist
2371 (x
2372 (tramp-get-method-parameter method 'tramp-remote-copy-args)
2373 remote-copy-args)
2374 (setq remote-copy-args
2375 (append
2376 remote-copy-args
2377 (let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
2378 (if (member "" y) '(" ") y)))))))
2329 2379
2330 ;; Check for program. 2380 ;; Check for local copy program.
2331 (unless (executable-find copy-program) 2381 (unless (executable-find copy-program)
2332 (tramp-error 2382 (tramp-error
2333 v 'file-error "Cannot find copy program: %s" copy-program)) 2383 v 'file-error "Cannot find local copy program: %s" copy-program))
2384
2385 ;; Install listener on the remote side. The prompt must be
2386 ;; consumed later on, when the process does not listen anymore.
2387 (when remote-copy-program
2388 (unless (with-tramp-connection-property
2389 v (concat "remote-copy-program-" remote-copy-program)
2390 (tramp-find-executable
2391 v remote-copy-program (tramp-get-remote-path v)))
2392 (tramp-error
2393 v 'file-error
2394 "Cannot find remote listener: %s" remote-copy-program))
2395 (setq remote-copy-program
2396 (mapconcat
2397 'identity
2398 (append
2399 (list remote-copy-program) remote-copy-args
2400 (list (if t1 (concat "<" source) (concat ">" target)) "&"))
2401 " "))
2402 (tramp-send-command v remote-copy-program)
2403 (with-timeout
2404 (1 (tramp-error
2405 v 'file-error
2406 "Listener process not running on remote host: `%s'"
2407 remote-copy-program))
2408 (tramp-send-command v (format "netstat -l | grep -q :%s" listener))
2409 (while (not (tramp-send-command-and-check v nil))
2410 (tramp-send-command
2411 v (format "netstat -l | grep -q :%s" listener)))))
2334 2412
2335 (with-temp-buffer 2413 (with-temp-buffer
2336 (unwind-protect 2414 (unwind-protect
@@ -2347,24 +2425,26 @@ The method used must be an out-of-band method."
2347 (tramp-message 2425 (tramp-message
2348 orig-vec 6 "%s=\"%s\"" (car copy-env) (cadr copy-env)) 2426 orig-vec 6 "%s=\"%s\"" (car copy-env) (cadr copy-env))
2349 (setenv (pop copy-env) (pop copy-env))) 2427 (setenv (pop copy-env) (pop copy-env)))
2428 (setq
2429 copy-args
2430 (append
2431 copy-args
2432 (if remote-copy-program
2433 (list (if t1 (concat ">" target) (concat "<" source)))
2434 (list source target))))
2350 2435
2351 ;; Use an asynchronous process. By this, password can 2436 ;; Use an asynchronous process. By this, password can
2352 ;; be handled. The default directory must be local, in 2437 ;; be handled. We don't set a timeout, because the
2353 ;; order to apply the correct `copy-program'. We don't 2438 ;; copying of large files can last longer than 60
2354 ;; set a timeout, because the copying of large files can 2439 ;; secs.
2355 ;; last longer than 60 secs. 2440 (let ((p (apply 'start-process-shell-command
2356 (let ((p (let ((default-directory 2441 (tramp-get-connection-name v)
2357 (tramp-compat-temporary-file-directory))) 2442 (tramp-get-connection-buffer v)
2358 (apply 'start-process-shell-command 2443 copy-program
2359 (tramp-get-connection-name v) 2444 (append
2360 (tramp-get-connection-buffer v) 2445 copy-args
2361 copy-program 2446 (list "&&" "echo" "tramp_exit_status" "0"
2362 (append 2447 "||" "echo" "tramp_exit_status" "1")))))
2363 copy-args
2364 (list
2365 source target
2366 "&&" "echo" "tramp_exit_status" "0"
2367 "||" "echo" "tramp_exit_status" "1"))))))
2368 (tramp-message 2448 (tramp-message
2369 orig-vec 6 "%s" 2449 orig-vec 6 "%s"
2370 (mapconcat 'identity (process-command p) " ")) 2450 (mapconcat 'identity (process-command p) " "))
@@ -2391,7 +2471,14 @@ The method used must be an out-of-band method."
2391 2471
2392 ;; Reset the transfer process properties. 2472 ;; Reset the transfer process properties.
2393 (tramp-set-connection-property v "process-name" nil) 2473 (tramp-set-connection-property v "process-name" nil)
2394 (tramp-set-connection-property v "process-buffer" nil))) 2474 (tramp-set-connection-property v "process-buffer" nil)
2475 ;; Clear the remote prompt.
2476 (when (and remote-copy-program
2477 (not (tramp-send-command-and-check v nil)))
2478 ;; Houston, we have a problem! Likely, the listener is
2479 ;; still running, so let's clear everything (but the
2480 ;; cached password).
2481 (tramp-cleanup-connection v 'keep-debug 'keep-password))))
2395 2482
2396 ;; Handle KEEP-DATE argument. 2483 ;; Handle KEEP-DATE argument.
2397 (when (and keep-date (not copy-keep-date)) 2484 (when (and keep-date (not copy-keep-date))
@@ -2621,7 +2708,8 @@ This is like `dired-recursive-delete-directory' for Tramp files."
2621 (delete-region (match-beginning 0) (point))) 2708 (delete-region (match-beginning 0) (point)))
2622 2709
2623 ;; Some busyboxes are reluctant to discard colors. 2710 ;; Some busyboxes are reluctant to discard colors.
2624 (unless (string-match "color" (tramp-get-connection-property v "ls" "")) 2711 (unless
2712 (string-match "color" (tramp-get-connection-property v "ls" ""))
2625 (goto-char beg) 2713 (goto-char beg)
2626 (while (re-search-forward tramp-color-escape-sequence-regexp nil t) 2714 (while (re-search-forward tramp-color-escape-sequence-regexp nil t)
2627 (replace-match ""))) 2715 (replace-match "")))
@@ -2651,9 +2739,9 @@ This is like `dired-recursive-delete-directory' for Tramp files."
2651 2739
2652(defun tramp-sh-handle-expand-file-name (name &optional dir) 2740(defun tramp-sh-handle-expand-file-name (name &optional dir)
2653 "Like `expand-file-name' for Tramp files. 2741 "Like `expand-file-name' for Tramp files.
2654If the localname part of the given filename starts with \"/../\" then 2742If the localname part of the given file name starts with \"/../\" then
2655the result will be a local, non-Tramp, filename." 2743the result will be a local, non-Tramp, file name."
2656 ;; If DIR is not given, use DEFAULT-DIRECTORY or "/". 2744 ;; If DIR is not given, use `default-directory' or "/".
2657 (setq dir (or dir default-directory "/")) 2745 (setq dir (or dir default-directory "/"))
2658 ;; Unless NAME is absolute, concat DIR and NAME. 2746 ;; Unless NAME is absolute, concat DIR and NAME.
2659 (unless (file-name-absolute-p name) 2747 (unless (file-name-absolute-p name)
@@ -3133,7 +3221,7 @@ the result will be a local, non-Tramp, filename."
3133 (symbol-value 'last-coding-system-used)))) 3221 (symbol-value 'last-coding-system-used))))
3134 3222
3135 ;; The permissions of the temporary file should be set. If 3223 ;; The permissions of the temporary file should be set. If
3136 ;; filename does not exist (eq modes nil) it has been 3224 ;; FILENAME does not exist (eq modes nil) it has been
3137 ;; renamed to the backup file. This case `save-buffer' 3225 ;; renamed to the backup file. This case `save-buffer'
3138 ;; handles permissions. 3226 ;; handles permissions.
3139 ;; Ensure that it is still readable. 3227 ;; Ensure that it is still readable.
@@ -3144,7 +3232,7 @@ the result will be a local, non-Tramp, filename."
3144 3232
3145 ;; This is a bit lengthy due to the different methods 3233 ;; This is a bit lengthy due to the different methods
3146 ;; possible for file transfer. First, we check whether the 3234 ;; possible for file transfer. First, we check whether the
3147 ;; method uses an rcp program. If so, we call it. 3235 ;; method uses an scp program. If so, we call it.
3148 ;; Otherwise, both encoding and decoding command must be 3236 ;; Otherwise, both encoding and decoding command must be
3149 ;; specified. However, if the method _also_ specifies an 3237 ;; specified. However, if the method _also_ specifies an
3150 ;; encoding function, then that is used for encoding the 3238 ;; encoding function, then that is used for encoding the
@@ -3238,7 +3326,7 @@ the result will be a local, non-Tramp, filename."
3238 (erase-buffer) 3326 (erase-buffer)
3239 (and 3327 (and
3240 ;; cksum runs locally, if possible. 3328 ;; cksum runs locally, if possible.
3241 (zerop (tramp-call-process "cksum" tmpfile t)) 3329 (zerop (tramp-call-process v "cksum" tmpfile t))
3242 ;; cksum runs remotely. 3330 ;; cksum runs remotely.
3243 (tramp-send-command-and-check 3331 (tramp-send-command-and-check
3244 v 3332 v
@@ -3264,7 +3352,7 @@ the result will be a local, non-Tramp, filename."
3264 (tramp-error 3352 (tramp-error
3265 v 'file-error 3353 v 'file-error
3266 (concat "Method `%s' should specify both encoding and " 3354 (concat "Method `%s' should specify both encoding and "
3267 "decoding command or an rcp program") 3355 "decoding command or an scp program")
3268 method)))) 3356 method))))
3269 3357
3270 ;; Make `last-coding-system-used' have the right value. 3358 ;; Make `last-coding-system-used' have the right value.
@@ -3281,7 +3369,7 @@ the result will be a local, non-Tramp, filename."
3281 (when (or (eq visit t) (stringp visit)) 3369 (when (or (eq visit t) (stringp visit))
3282 (let ((file-attr (tramp-compat-file-attributes filename 'integer))) 3370 (let ((file-attr (tramp-compat-file-attributes filename 'integer)))
3283 (set-visited-file-modtime 3371 (set-visited-file-modtime
3284 ;; We must pass modtime explicitly, because filename can 3372 ;; We must pass modtime explicitly, because FILENAME can
3285 ;; be different from (buffer-file-name), f.e. if 3373 ;; be different from (buffer-file-name), f.e. if
3286 ;; `file-precious-flag' is set. 3374 ;; `file-precious-flag' is set.
3287 (nth 5 file-attr)) 3375 (nth 5 file-attr))
@@ -3369,7 +3457,28 @@ the result will be a local, non-Tramp, filename."
3369 ;; calls shall be answered from the file cache. We unset 3457 ;; calls shall be answered from the file cache. We unset
3370 ;; `process-file-side-effects' and `remote-file-name-inhibit-cache' 3458 ;; `process-file-side-effects' and `remote-file-name-inhibit-cache'
3371 ;; in order to keep the cache. 3459 ;; in order to keep the cache.
3372 (let (remote-file-name-inhibit-cache process-file-side-effects) 3460 (let ((vc-handled-backends vc-handled-backends)
3461 remote-file-name-inhibit-cache process-file-side-effects)
3462 ;; Reduce `vc-handled-backends' in order to minimize process calls.
3463 (when (and (memq 'Bzr vc-handled-backends)
3464 (boundp 'vc-bzr-program)
3465 (not (with-tramp-connection-property v vc-bzr-program
3466 (tramp-find-executable
3467 v vc-bzr-program (tramp-get-remote-path v)))))
3468 (setq vc-handled-backends (delq 'Bzr vc-handled-backends)))
3469 (when (and (memq 'Git vc-handled-backends)
3470 (boundp 'vc-git-program)
3471 (not (with-tramp-connection-property v vc-git-program
3472 (tramp-find-executable
3473 v vc-git-program (tramp-get-remote-path v)))))
3474 (setq vc-handled-backends (delq 'Git vc-handled-backends)))
3475 (when (and (memq 'Hg vc-handled-backends)
3476 (boundp 'vc-hg-program)
3477 (not (with-tramp-connection-property v vc-hg-program
3478 (tramp-find-executable
3479 v vc-hg-program (tramp-get-remote-path v)))))
3480 (setq vc-handled-backends (delq 'Hg vc-handled-backends)))
3481 ;; Run.
3373 (ignore-errors 3482 (ignore-errors
3374 (tramp-run-real-handler 'vc-registered (list file)))))))) 3483 (tramp-run-real-handler 'vc-registered (list file))))))))
3375 3484
@@ -4010,7 +4119,7 @@ FORMAT is symbol describing the encoding/decoding format. It can be
4010ENCODING and DECODING can be strings, giving commands, or symbols, 4119ENCODING and DECODING can be strings, giving commands, or symbols,
4011giving functions. If they are strings, then they can contain 4120giving functions. If they are strings, then they can contain
4012the \"%s\" format specifier. If that specifier is present, the input 4121the \"%s\" format specifier. If that specifier is present, the input
4013filename will be put into the command line at that spot. If the 4122file name will be put into the command line at that spot. If the
4014specifier is not present, the input should be read from standard 4123specifier is not present, the input should be read from standard
4015input. 4124input.
4016 4125
@@ -4045,7 +4154,7 @@ FORMAT is a symbol describing the encoding/decoding format. It can be
4045ENCODING and DECODING can be strings, giving commands, or symbols, 4154ENCODING and DECODING can be strings, giving commands, or symbols,
4046giving variables. If they are strings, then they can contain 4155giving variables. If they are strings, then they can contain
4047the \"%s\" format specifier. If that specifier is present, the input 4156the \"%s\" format specifier. If that specifier is present, the input
4048filename will be put into the command line at that spot. If the 4157file name will be put into the command line at that spot. If the
4049specifier is not present, the input should be read from standard 4158specifier is not present, the input should be read from standard
4050input. 4159input.
4051 4160
@@ -4171,32 +4280,28 @@ Goes through the list `tramp-local-coding-commands' and
4171 (setq rem-dec (nth 2 ritem)) 4280 (setq rem-dec (nth 2 ritem))
4172 (setq found t))))))) 4281 (setq found t)))))))
4173 4282
4174 ;; Did we find something? 4283 (when found
4175 (unless found 4284 ;; Set connection properties. Since the commands are risky
4176 (tramp-error 4285 ;; (due to output direction), we cache them in the process cache.
4177 vec 'file-error "Couldn't find an inline transfer encoding")) 4286 (tramp-message vec 5 "Using local encoding `%s'" loc-enc)
4178 4287 (tramp-set-connection-property p "local-encoding" loc-enc)
4179 ;; Set connection properties. Since the commands are risky (due 4288 (tramp-message vec 5 "Using local decoding `%s'" loc-dec)
4180 ;; to output direction), we cache them in the process cache. 4289 (tramp-set-connection-property p "local-decoding" loc-dec)
4181 (tramp-message vec 5 "Using local encoding `%s'" loc-enc) 4290 (tramp-message vec 5 "Using remote encoding `%s'" rem-enc)
4182 (tramp-set-connection-property p "local-encoding" loc-enc) 4291 (tramp-set-connection-property p "remote-encoding" rem-enc)
4183 (tramp-message vec 5 "Using local decoding `%s'" loc-dec) 4292 (tramp-message vec 5 "Using remote decoding `%s'" rem-dec)
4184 (tramp-set-connection-property p "local-decoding" loc-dec) 4293 (tramp-set-connection-property p "remote-decoding" rem-dec)))))
4185 (tramp-message vec 5 "Using remote encoding `%s'" rem-enc)
4186 (tramp-set-connection-property p "remote-encoding" rem-enc)
4187 (tramp-message vec 5 "Using remote decoding `%s'" rem-dec)
4188 (tramp-set-connection-property p "remote-decoding" rem-dec))))
4189 4294
4190(defun tramp-call-local-coding-command (cmd input output) 4295(defun tramp-call-local-coding-command (cmd input output)
4191 "Call the local encoding or decoding command. 4296 "Call the local encoding or decoding command.
4192If CMD contains \"%s\", provide input file INPUT there in command. 4297If CMD contains \"%s\", provide input file INPUT there in command.
4193Otherwise, INPUT is passed via standard input. 4298Otherwise, INPUT is passed via standard input.
4194INPUT can also be nil which means `/dev/null'. 4299INPUT can also be nil which means `/dev/null'.
4195OUTPUT can be a string (which specifies a filename), or t (which 4300OUTPUT can be a string (which specifies a file name), or t (which
4196means standard output and thus the current buffer), or nil (which 4301means standard output and thus the current buffer), or nil (which
4197means discard it)." 4302means discard it)."
4198 (tramp-call-process 4303 (tramp-call-process
4199 tramp-encoding-shell 4304 nil tramp-encoding-shell
4200 (when (and input (not (string-match "%s" cmd))) input) 4305 (when (and input (not (string-match "%s" cmd))) input)
4201 (if (eq output t) t nil) 4306 (if (eq output t) t nil)
4202 nil 4307 nil
@@ -4844,15 +4949,18 @@ Return ATTR."
4844 "")) 4949 ""))
4845 4950
4846(defun tramp-make-copy-program-file-name (vec) 4951(defun tramp-make-copy-program-file-name (vec)
4847 "Create a file name suitable to be passed to `rcp' and workalikes." 4952 "Create a file name suitable to be passed to `scp' or `nc' and workalikes."
4848 (let ((user (tramp-file-name-user vec)) 4953 (let ((method (tramp-file-name-method vec))
4954 (user (tramp-file-name-user vec))
4849 (host (tramp-file-name-real-host vec)) 4955 (host (tramp-file-name-real-host vec))
4850 (localname (tramp-shell-quote-argument 4956 (localname (tramp-shell-quote-argument
4851 (tramp-file-name-localname vec)))) 4957 (tramp-file-name-localname vec))))
4852 (shell-quote-argument 4958 (cond
4853 (if (not (zerop (length user))) 4959 ((tramp-get-method-parameter method 'tramp-remote-copy-program)
4854 (format "%s@%s:%s" user host localname) 4960 localname)
4855 (format "%s:%s" host localname))))) 4961 ((not (zerop (length user)))
4962 (shell-quote-argument (format "%s@%s:%s" user host localname)))
4963 (t (shell-quote-argument (format "%s:%s" host localname))))))
4856 4964
4857(defun tramp-method-out-of-band-p (vec size) 4965(defun tramp-method-out-of-band-p (vec size)
4858 "Return t if this is an out-of-band method, nil otherwise." 4966 "Return t if this is an out-of-band method, nil otherwise."
@@ -5371,9 +5479,5 @@ function cell is returned to be applied on a buffer."
5371;; rsync). 5479;; rsync).
5372;; * Keep a second connection open for out-of-band methods like scp or 5480;; * Keep a second connection open for out-of-band methods like scp or
5373;; rsync. 5481;; rsync.
5374;; * Try telnet+curl as new method. It might be useful for busybox,
5375;; without built-in uuencode/uudecode.
5376;; * Try telnet+nc as new method. It might be useful for busybox,
5377;; without built-in uuencode/uudecode.
5378 5482
5379;;; tramp-sh.el ends here 5483;;; tramp-sh.el ends here
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 43e2c494ece..aa44b8dbf4b 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -447,8 +447,7 @@ pass to the OPERATION."
447 (expand-file-name 447 (expand-file-name
448 tramp-temp-name-prefix 448 tramp-temp-name-prefix
449 (tramp-compat-temporary-file-directory)))) 449 (tramp-compat-temporary-file-directory))))
450 (args (list tramp-smb-program 450 (args (list (concat "//" real-host "/" share) "-E")))
451 (concat "//" real-host "/" share) "-E")))
452 451
453 (if (not (zerop (length real-user))) 452 (if (not (zerop (length real-user)))
454 (setq args (append args (list "-U" real-user))) 453 (setq args (append args (list "-U" real-user)))
@@ -495,10 +494,11 @@ pass to the OPERATION."
495 ;; Use an asynchronous processes. By this, 494 ;; Use an asynchronous processes. By this,
496 ;; password can be handled. 495 ;; password can be handled.
497 (let* ((default-directory tmpdir) 496 (let* ((default-directory tmpdir)
498 (p (start-process-shell-command 497 (p (apply
498 'start-process
499 (tramp-get-connection-name v) 499 (tramp-get-connection-name v)
500 (tramp-get-connection-buffer v) 500 (tramp-get-connection-buffer v)
501 (mapconcat 'identity args " ")))) 501 tramp-smb-program args)))
502 502
503 (tramp-message 503 (tramp-message
504 v 6 "%s" (mapconcat 'identity (process-command p) " ")) 504 v 6 "%s" (mapconcat 'identity (process-command p) " "))
@@ -938,99 +938,100 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
938 (setq filename (file-name-as-directory filename)) 938 (setq filename (file-name-as-directory filename))
939 (setq filename (directory-file-name filename))) 939 (setq filename (directory-file-name filename)))
940 (with-parsed-tramp-file-name filename nil 940 (with-parsed-tramp-file-name filename nil
941 (save-match-data 941 (with-tramp-progress-reporter v 0 (format "Opening directory %s" filename)
942 (let ((base (file-name-nondirectory filename)) 942 (save-match-data
943 ;; We should not destroy the cache entry. 943 (let ((base (file-name-nondirectory filename))
944 (entries (copy-sequence 944 ;; We should not destroy the cache entry.
945 (tramp-smb-get-file-entries 945 (entries (copy-sequence
946 (file-name-directory filename))))) 946 (tramp-smb-get-file-entries
947 947 (file-name-directory filename)))))
948 (when wildcard 948
949 (string-match "\\." base) 949 (when wildcard
950 (setq base (replace-match "\\\\." nil nil base)) 950 (string-match "\\." base)
951 (string-match "\\*" base) 951 (setq base (replace-match "\\\\." nil nil base))
952 (setq base (replace-match ".*" nil nil base)) 952 (string-match "\\*" base)
953 (string-match "\\?" base) 953 (setq base (replace-match ".*" nil nil base))
954 (setq base (replace-match ".?" nil nil base))) 954 (string-match "\\?" base)
955 955 (setq base (replace-match ".?" nil nil base)))
956 ;; Filter entries. 956
957 (setq entries 957 ;; Filter entries.
958 (delq 958 (setq entries
959 nil 959 (delq
960 (if (or wildcard (zerop (length base))) 960 nil
961 ;; Check for matching entries. 961 (if (or wildcard (zerop (length base)))
962 (mapcar 962 ;; Check for matching entries.
963 (lambda (x) 963 (mapcar
964 (when (string-match 964 (lambda (x)
965 (format "^%s" base) (nth 0 x)) 965 (when (string-match
966 x)) 966 (format "^%s" base) (nth 0 x))
967 entries) 967 x))
968 ;; We just need the only and only entry FILENAME. 968 entries)
969 (list (assoc base entries))))) 969 ;; We just need the only and only entry FILENAME.
970 970 (list (assoc base entries)))))
971 ;; Sort entries. 971
972 (setq entries 972 ;; Sort entries.
973 (sort 973 (setq entries
974 entries 974 (sort
975 (lambda (x y) 975 entries
976 (if (string-match "t" switches) 976 (lambda (x y)
977 ;; Sort by date. 977 (if (string-match "t" switches)
978 (tramp-time-less-p (nth 3 y) (nth 3 x)) 978 ;; Sort by date.
979 ;; Sort by name. 979 (tramp-time-less-p (nth 3 y) (nth 3 x))
980 (string-lessp (nth 0 x) (nth 0 y)))))) 980 ;; Sort by name.
981 981 (string-lessp (nth 0 x) (nth 0 y))))))
982 ;; Handle "-F" switch. 982
983 (when (string-match "F" switches) 983 ;; Handle "-F" switch.
984 (when (string-match "F" switches)
985 (mapc
986 (lambda (x)
987 (when (not (zerop (length (car x))))
988 (cond
989 ((char-equal ?d (string-to-char (nth 1 x)))
990 (setcar x (concat (car x) "/")))
991 ((char-equal ?x (string-to-char (nth 1 x)))
992 (setcar x (concat (car x) "*"))))))
993 entries))
994
995 ;; Print entries.
984 (mapc 996 (mapc
985 (lambda (x) 997 (lambda (x)
986 (when (not (zerop (length (car x)))) 998 (when (not (zerop (length (nth 0 x))))
987 (cond 999 (when (string-match "l" switches)
988 ((char-equal ?d (string-to-char (nth 1 x))) 1000 (let ((attr
989 (setcar x (concat (car x) "/"))) 1001 (when (tramp-smb-get-stat-capability v)
990 ((char-equal ?x (string-to-char (nth 1 x))) 1002 (ignore-errors
991 (setcar x (concat (car x) "*")))))) 1003 (file-attributes filename 'string)))))
992 entries)) 1004 (insert
993 1005 (format
994 ;; Print entries. 1006 "%10s %3d %-8s %-8s %8s %s "
995 (mapc 1007 (or (nth 8 attr) (nth 1 x)) ; mode
996 (lambda (x) 1008 (or (nth 1 attr) 1) ; inode
997 (when (not (zerop (length (nth 0 x)))) 1009 (or (nth 2 attr) "nobody") ; uid
998 (when (string-match "l" switches) 1010 (or (nth 3 attr) "nogroup") ; gid
999 (let ((attr 1011 (or (nth 7 attr) (nth 2 x)) ; size
1000 (when (tramp-smb-get-stat-capability v) 1012 (format-time-string
1001 (ignore-errors 1013 (if (tramp-time-less-p
1002 (file-attributes filename 'string))))) 1014 (tramp-time-subtract (current-time) (nth 3 x))
1015 tramp-half-a-year)
1016 "%b %e %R"
1017 "%b %e %Y")
1018 (nth 3 x)))))) ; date
1019
1020 ;; We mark the file name. The inserted name could be
1021 ;; from somewhere else, so we use the relative file name
1022 ;; of `default-directory'.
1023 (let ((start (point)))
1003 (insert 1024 (insert
1004 (format 1025 (format
1005 "%10s %3d %-8s %-8s %8s %s " 1026 "%s\n"
1006 (or (nth 8 attr) (nth 1 x)) ; mode 1027 (file-relative-name
1007 (or (nth 1 attr) 1) ; inode 1028 (expand-file-name
1008 (or (nth 2 attr) "nobody") ; uid 1029 (nth 0 x) (file-name-directory filename))
1009 (or (nth 3 attr) "nogroup") ; gid 1030 (when full-directory-p (file-name-directory filename)))))
1010 (or (nth 7 attr) (nth 2 x)) ; size 1031 (put-text-property start (1- (point)) 'dired-filename t))
1011 (format-time-string 1032 (forward-line)
1012 (if (tramp-time-less-p 1033 (beginning-of-line)))
1013 (tramp-time-subtract (current-time) (nth 3 x)) 1034 entries))))))
1014 tramp-half-a-year)
1015 "%b %e %R"
1016 "%b %e %Y")
1017 (nth 3 x)))))) ; date
1018
1019 ;; We mark the file name. The inserted name could be
1020 ;; from somewhere else, so we use the relative file name
1021 ;; of `default-directory'.
1022 (let ((start (point)))
1023 (insert
1024 (format
1025 "%s\n"
1026 (file-relative-name
1027 (expand-file-name
1028 (nth 0 x) (file-name-directory filename))
1029 (when full-directory-p (file-name-directory filename)))))
1030 (put-text-property start (1- (point)) 'dired-filename t))
1031 (forward-line)
1032 (beginning-of-line)))
1033 entries)))))
1034 1035
1035(defun tramp-smb-handle-make-directory (dir &optional parents) 1036(defun tramp-smb-handle-make-directory (dir &optional parents)
1036 "Like `make-directory' for Tramp files." 1037 "Like `make-directory' for Tramp files."
@@ -1277,6 +1278,8 @@ target of the symlink differ."
1277 1278
1278 ;; We must also flush the cache of the directory, because 1279 ;; We must also flush the cache of the directory, because
1279 ;; `file-attributes' reads the values from there. 1280 ;; `file-attributes' reads the values from there.
1281 (tramp-flush-file-property v1 (file-name-directory v1-localname))
1282 (tramp-flush-file-property v1 v1-localname)
1280 (tramp-flush-file-property v2 (file-name-directory v2-localname)) 1283 (tramp-flush-file-property v2 (file-name-directory v2-localname))
1281 (tramp-flush-file-property v2 v2-localname) 1284 (tramp-flush-file-property v2 v2-localname)
1282 (unless (tramp-smb-get-share v2) 1285 (unless (tramp-smb-get-share v2)
@@ -1349,7 +1352,7 @@ target of the symlink differ."
1349 ;; Use an asynchronous processes. By this, password can 1352 ;; Use an asynchronous processes. By this, password can
1350 ;; be handled. 1353 ;; be handled.
1351 (let ((p (apply 1354 (let ((p (apply
1352 'start-process-shell-command 1355 'start-process
1353 (tramp-get-connection-name v) 1356 (tramp-get-connection-name v)
1354 (tramp-get-connection-buffer v) 1357 (tramp-get-connection-buffer v)
1355 tramp-smb-acl-program args))) 1358 tramp-smb-acl-program args)))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 307e89dbd3b..6be737eb3f0 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -240,7 +240,7 @@ pair of the form (KEY VALUE). The following KEYs are defined:
240 tamper the process output. 240 tamper the process output.
241 * `tramp-copy-program' 241 * `tramp-copy-program'
242 This specifies the name of the program to use for remotely copying 242 This specifies the name of the program to use for remotely copying
243 the file; this might be the absolute filename of rcp or the name of 243 the file; this might be the absolute filename of scp or the name of
244 a workalike program. It is always applied on the local host. 244 a workalike program. It is always applied on the local host.
245 * `tramp-copy-args' 245 * `tramp-copy-args'
246 This specifies the list of parameters to pass to the above mentioned 246 This specifies the list of parameters to pass to the above mentioned
@@ -248,6 +248,13 @@ pair of the form (KEY VALUE). The following KEYs are defined:
248 * `tramp-copy-env' 248 * `tramp-copy-env'
249 A list of environment variables and their values, which will 249 A list of environment variables and their values, which will
250 be set when calling `tramp-copy-program'. 250 be set when calling `tramp-copy-program'.
251 * `tramp-remote-copy-program'
252 The listener program to be applied on remote side, if needed.
253 * `tramp-remote-copy-args'
254 The list of parameters to pass to the listener program, the hints
255 for `tramp-login-args' also apply here. Additionally, \"%r\" could
256 be used here and in `tramp-copy-args'. It denotes a randomly
257 chosen port for the remote listener.
251 * `tramp-copy-keep-date' 258 * `tramp-copy-keep-date'
252 This specifies whether the copying program when the preserves the 259 This specifies whether the copying program when the preserves the
253 timestamp of the original file. 260 timestamp of the original file.
@@ -275,7 +282,7 @@ pair of the form (KEY VALUE). The following KEYs are defined:
275What does all this mean? Well, you should specify `tramp-login-program' 282What does all this mean? Well, you should specify `tramp-login-program'
276for all methods; this program is used to log in to the remote site. Then, 283for all methods; this program is used to log in to the remote site. Then,
277there are two ways to actually transfer the files between the local and the 284there are two ways to actually transfer the files between the local and the
278remote side. One way is using an additional rcp-like program. If you want 285remote side. One way is using an additional scp-like program. If you want
279to do this, set `tramp-copy-program' in the method. 286to do this, set `tramp-copy-program' in the method.
280 287
281Another possibility for file transfer is inline transfer, i.e. the 288Another possibility for file transfer is inline transfer, i.e. the
@@ -1762,7 +1769,7 @@ Example:
1762 (and (memq system-type '(cygwin windows-nt)) 1769 (and (memq system-type '(cygwin windows-nt))
1763 (zerop 1770 (zerop
1764 (tramp-call-process 1771 (tramp-call-process
1765 "reg" nil nil nil "query" (nth 1 (car v))))) 1772 v "reg" nil nil nil "query" (nth 1 (car v)))))
1766 ;; Configuration file. 1773 ;; Configuration file.
1767 (file-exists-p (nth 1 (car v))))) 1774 (file-exists-p (nth 1 (car v)))))
1768 (setq r (delete (car v) r))) 1775 (setq r (delete (car v) r)))
@@ -2816,7 +2823,7 @@ User is always nil."
2816 (if (memq system-type '(windows-nt)) 2823 (if (memq system-type '(windows-nt))
2817 (with-temp-buffer 2824 (with-temp-buffer
2818 (when (zerop (tramp-call-process 2825 (when (zerop (tramp-call-process
2819 "reg" nil t nil "query" registry-or-dirname)) 2826 nil "reg" nil t nil "query" registry-or-dirname))
2820 (goto-char (point-min)) 2827 (goto-char (point-min))
2821 (loop while (not (eobp)) collect 2828 (loop while (not (eobp)) collect
2822 (tramp-parse-putty-group registry-or-dirname)))) 2829 (tramp-parse-putty-group registry-or-dirname))))
@@ -2895,7 +2902,7 @@ User is always nil."
2895(defun tramp-handle-file-accessible-directory-p (filename) 2902(defun tramp-handle-file-accessible-directory-p (filename)
2896 "Like `file-accessible-directory-p' for Tramp files." 2903 "Like `file-accessible-directory-p' for Tramp files."
2897 (and (file-directory-p filename) 2904 (and (file-directory-p filename)
2898 (file-executable-p filename))) 2905 (file-readable-p filename)))
2899 2906
2900(defun tramp-handle-file-exists-p (filename) 2907(defun tramp-handle-file-exists-p (filename)
2901 "Like `file-exists-p' for Tramp files." 2908 "Like `file-exists-p' for Tramp files."
@@ -3906,7 +3913,7 @@ be granted."
3906 (tramp-get-file-property 3913 (tramp-get-file-property
3907 vec (tramp-file-name-localname vec) 3914 vec (tramp-file-name-localname vec)
3908 (concat "file-attributes-" suffix) nil) 3915 (concat "file-attributes-" suffix) nil)
3909 (file-attributes 3916 (tramp-compat-file-attributes
3910 (tramp-make-tramp-file-name 3917 (tramp-make-tramp-file-name
3911 (tramp-file-name-method vec) 3918 (tramp-file-name-method vec)
3912 (tramp-file-name-user vec) 3919 (tramp-file-name-user vec)
@@ -4118,14 +4125,16 @@ ALIST is of the form ((FROM . TO) ...)."
4118;;; Compatibility functions section: 4125;;; Compatibility functions section:
4119 4126
4120(defun tramp-call-process 4127(defun tramp-call-process
4121 (program &optional infile destination display &rest args) 4128 (vec program &optional infile destination display &rest args)
4122 "Calls `call-process' on the local host. 4129 "Calls `call-process' on the local host.
4123This is needed because for some Emacs flavors Tramp has 4130This is needed because for some Emacs flavors Tramp has
4124defadvised `call-process' to behave like `process-file'. The 4131defadvised `call-process' to behave like `process-file'. The
4125Lisp error raised when PROGRAM is nil is trapped also, returning 1. 4132Lisp error raised when PROGRAM is nil is trapped also, returning 1.
4126Furthermore, traces are written with verbosity of 6." 4133Furthermore, traces are written with verbosity of 6."
4127 (let ((v (vector tramp-current-method tramp-current-user tramp-current-host 4134 (let ((v (or vec
4128 nil nil)) 4135 (vector tramp-current-method tramp-current-user
4136 tramp-current-host nil nil)))
4137 (destination (if (eq destination t) (current-buffer) destination))
4129 result) 4138 result)
4130 (tramp-message 4139 (tramp-message
4131 v 6 "`%s %s' %s %s" 4140 v 6 "`%s %s' %s %s"
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 1ee6e6ad025..9c0beb114bc 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -31,7 +31,7 @@
31;; should be changed only there. 31;; should be changed only there.
32 32
33;;;###tramp-autoload 33;;;###tramp-autoload
34(defconst tramp-version "2.2.9-24.4" 34(defconst tramp-version "2.2.10"
35 "This version of Tramp.") 35 "This version of Tramp.")
36 36
37;;;###tramp-autoload 37;;;###tramp-autoload
@@ -44,7 +44,7 @@
44 (= emacs-major-version 21) 44 (= emacs-major-version 21)
45 (>= emacs-minor-version 4))) 45 (>= emacs-minor-version 4)))
46 "ok" 46 "ok"
47 (format "Tramp 2.2.9-24.4 is not fit for %s" 47 (format "Tramp 2.2.10 is not fit for %s"
48 (when (string-match "^.*$" (emacs-version)) 48 (when (string-match "^.*$" (emacs-version))
49 (match-string 0 (emacs-version))))))) 49 (match-string 0 (emacs-version)))))))
50 (unless (string-match "\\`ok\\'" x) (error "%s" x))) 50 (unless (string-match "\\`ok\\'" x) (error "%s" x)))