Commit b0dbf4c0 authored by Michael Albinus's avatar Michael Albinus

Sync with Tramp repository

* doc/misc/tramp.texi (Configuration): Note, that Tramp must be
required prior changing its configuration.
(Connection caching, Predefined connection information)
(Remote shell setup): Fix typos.
(Predefined connection information): Describe, how to overwrite
parameters of `tramp-methods'.
(Remote programs, Remote processes, Traces and Profiles):
Simplify example.
(Remote programs): Remove superfluous comment.

* doc/misc/trampver.texi: Update release number.

* lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun.
(tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it.
(tramp-gvfs-handle-make-directory): Reimplement PARENTS handling,
"gvfs-mkdir -p ..." does not work robust.
(tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call.

* lisp/net/tramp-sh.el (tramp-methods):
Add `tramp-remote-shell-login' parameter where it fits.
(tramp-get-remote-path): Use it.
(tramp-make-copy-program-file-name): Fix quoting for "psftp" method.
(all): Adapt `tramp-get-method-parameter' calls.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-get-method-parameter): Replace argument METHOD by VEC.
Check also for hits in `tramp-connection-properties'.  Adapt docstring.
(tramp-get-remote-tmpdir): Cache only the local name of tmpdir.
(all): Adapt `tramp-get-method-parameter' calls.

* lisp/net/trampver.el Update release number.

* test/automated/tramp-tests.el (tramp--instrument-test-case):
Add "^make-symbolic-link not supported$" to `debug-ignored-errors'.
(tramp-test13-make-directory, tramp--test-adb-p)
(tramp--test-smb-or-windows-nt-p): Simplify.
(tramp--test-ftp-p, tramp--test-gvfs-p): New defuns.
(tramp--test-special-characters): Fix docstring.  Add gvfs and ftp tests.
(tramp--test-utf8): Fix docstring.
parent b6ac30ab
......@@ -217,7 +217,7 @@ Configuring @value{tramp} for use
* Connection caching:: Reusing connection related information.
* Predefined connection information::
Setting own connection related information.
* Remote Programs:: How @value{tramp} finds and uses programs on the remote host.
* Remote programs:: How @value{tramp} finds and uses programs on the remote host.
* Remote shell setup:: Remote shell setup hints.
* Android shell setup:: Android shell setup hints.
* Auto-save and Backup:: Auto-save and Backup.
......@@ -524,6 +524,15 @@ can use to connect to remote hosts and transfer files
If you don't know which method is right for you, see @xref{Default
Method}.
@strong{Note:} In the following description, setting of user options
or variables is explained. Not all of them are autoloaded by
@value{emacsname}. All examples expect, that you have loaded
@value{tramp} first:
@lisp
(require 'tramp)
@end lisp
@menu
* Connection types:: Types of connections made to remote hosts.
......@@ -548,7 +557,7 @@ Method}.
* Connection caching:: Reusing connection related information.
* Predefined connection information::
Setting own connection related information.
* Remote Programs:: How @value{tramp} finds and uses programs on the remote host.
* Remote programs:: How @value{tramp} finds and uses programs on the remote host.
* Remote shell setup:: Remote shell setup hints.
* Android shell setup:: Android shell setup hints.
* Auto-save and Backup:: Auto-save and Backup.
......@@ -622,7 +631,7 @@ it may require access to external commands to perform that task.
@command{mimencode} (part of the @command{metamail} package) or
@command{uuencode} on the remote host. The first reliable command
will be used. The search path can be customized, see @ref{Remote
Programs}.
programs}.
If both commands aren't available on the remote host, @value{tramp}
transfers a small piece of Perl code to the remote host, and tries to
......@@ -1726,10 +1735,10 @@ Using such persistent information can be disabled by setting
@code{tramp-persistency-file-name} to @code{nil}.
Once consequence of reusing connection related information is that
@var{tramp} needs to distinguish hosts. If you, for example, run a
@value{tramp} needs to distinguish hosts. If you, for example, run a
local @code{sshd} on port 3001, which tunnels @command{ssh} to another
host, you could access both @file{@trampfn{ssh, , localhost,}} and
@file{@trampfn{ssh, , localhost#3001,}}. @var{tramp} would use the
@file{@trampfn{ssh, , localhost#3001,}}. @value{tramp} would use the
same host related information (like paths, Perl variants, etc) for
both connections, although the information is valid only for one of
them.
......@@ -1748,10 +1757,11 @@ connection again.
@node Predefined connection information
@section Setting own connection related information
Sometimes, @var{tramp} is not able to detect correct connection
related information. In such cases, you could tell @var{tramp} which
value it has to take. Since this could result in errors, it has to be
used with care.
Sometimes, method specific arguments in @code{tramp-methods} do not
fit your needs. Sometimes, @value{tramp} is not able to detect
correct connection related information. In such cases, you could tell
@value{tramp} which value it has to take. Since this could result in
errors, it has to be used with care.
@vindex tramp-connection-properties
Such settings can be performed via the list
......@@ -1759,13 +1769,35 @@ Such settings can be performed via the list
form @code{(@var{regexp} @var{property} @var{value})}. @var{regexp}
matches remote file names for which a property shall be predefined.
It can be @code{nil}. @var{property} is a string, and @var{value} the
corresponding value. @var{property} could be any property found in
the file @code{tramp-persistency-file-name}.
corresponding value.
A special property is @code{"busybox"}. This must be set, if the
remote host runs a very restricted busybox as shell, which closes the
@var{property} could be any method specific parameter found in
@code{tramp-methods}. The parameter key in @code{tramp-methods} is a
symbol name @code{tramp-<foo>}. In order to overwrite it,
@var{property} must be the string @samp{<foo>}. If you, for example,
want to change the remote shell to be used on a remote machine, you
could apply
@lisp
(add-to-list 'tramp-connection-properties
(list (regexp-quote "@trampfn{ssh, user, randomhost.your.domain,}")
"remote-shell" "/bin/ksh"))
(add-to-list 'tramp-connection-properties
(list (regexp-quote "@trampfn{ssh, user, randomhost.your.domain,}")
"remote-shell-login" '("-")))
@end lisp
This would overwrite the @code{tramp-remote-shell} and
@code{tramp-remote-shell-login} parameters in @code{tramp-methods}, to
be used on that remote host.
@var{property} could also be any property found in the file
@code{tramp-persistency-file-name}.
A special property is @samp{busybox}. This must be set, if the remote
host runs a very restricted busybox as shell, which closes the
connection at will. Since there is no reliable test for this,
@var{tramp} must be indicated this way. Example:
@value{tramp} must be indicated this way. Example:
@lisp
(add-to-list 'tramp-connection-properties
......@@ -1774,7 +1806,7 @@ connection at will. Since there is no reliable test for this,
@end lisp
@node Remote Programs
@node Remote programs
@section How @value{tramp} finds and uses programs on the remote host
@value{tramp} depends on a number of programs on the remote host in order to
......@@ -1821,9 +1853,6 @@ To add a directory to the remote search path, you could use code such
as:
@lisp
@i{;; We load @value{tramp} to define the variable.}
(require 'tramp)
@i{;; We have @command{perl} in "/usr/local/perl/bin"}
(add-to-list 'tramp-remote-path "/usr/local/perl/bin")
@end lisp
......@@ -1892,7 +1921,7 @@ to be set correctly to recognize the shell prompt on the remote host.
Note that @value{tramp} requires the match for @code{shell-prompt-pattern}
to be at the end of the buffer. Many people have something like the
following as the value for the variable: @code{"^[^>$][>$] *"}. Now
following as the value for the variable: @samp{^[^>$][>$] *}. Now
suppose your shell prompt is @code{a <b> c $ }. In this case,
@value{tramp} recognizes the @code{>} character as the end of the prompt,
but it is not at the end of the buffer.
......@@ -2688,7 +2717,7 @@ this is welcome!
When your program is not found in the default search path
@value{tramp} sets on the remote host, you should either use an
absolute path, or extend @code{tramp-remote-path} (see @ref{Remote
Programs}):
programs}):
@lisp
(add-to-list 'tramp-remote-path "~/bin")
......@@ -2698,8 +2727,8 @@ Programs}):
The environment for your program can be adapted by customizing
@code{tramp-remote-process-environment}. This variable is a list of
strings. It is structured like @code{process-environment}. Each
element is a string of the form @code{"ENVVARNAME=VALUE"}. An entry
@code{"ENVVARNAME="} disables the corresponding environment variable,
element is a string of the form @samp{ENVVARNAME=VALUE}. An entry
@samp{ENVVARNAME=} disables the corresponding environment variable,
which might have been set in your init file like @file{~/.profile}.
@noindent
......@@ -3930,7 +3959,6 @@ Sometimes, it might be even necessary to step through @value{tramp}
function call traces. Such traces are enabled by the following code:
@lisp
(require 'tramp)
(require 'trace)
(dolist (elt (all-completions "tramp-" obarray 'functionp))
(trace-function-background (intern elt)))
......
......@@ -8,7 +8,7 @@
@c In the Tramp GIT, the version number is auto-frobbed from
@c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number.
@set trampver 2.2.12
@set trampver 2.2.13-pre
@c Other flags from configuration
@set instprefix /usr/local
......
......@@ -66,7 +66,8 @@
Every entry has the form (REGEXP PROPERTY VALUE). The regexp
matches remote file names. It can be nil. PROPERTY is a string,
and VALUE the corresponding value. They are used, if there is no
matching entry for PROPERTY in `tramp-cache-data'."
matching entry for PROPERTY in `tramp-cache-data'. For more
details see the info pages."
:group 'tramp
:version "24.4"
:type '(repeat (list (choice :tag "File Name regexp" regexp (const nil))
......
......@@ -582,62 +582,127 @@ is no information where to trace the message.")
;; File name primitives.
(defun tramp-gvfs-do-copy-or-rename-file
(op filename newname &optional ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes)
"Copy or rename a remote file.
OP must be `copy' or `rename' and indicates the operation to perform.
FILENAME specifies the file to copy or rename, NEWNAME is the name of
the new file (for copy) or the new name of the file (for rename).
OK-IF-ALREADY-EXISTS means don't barf if NEWNAME exists already.
KEEP-DATE means to make sure that NEWNAME has the same timestamp
as FILENAME. PRESERVE-UID-GID, when non-nil, instructs to keep
the uid and gid if both files are on the same host.
PRESERVE-EXTENDED-ATTRIBUTES is ignored.
This function is invoked by `tramp-gvfs-handle-copy-file' and
`tramp-gvfs-handle-rename-file'. It is an error if OP is neither
of `copy' and `rename'. FILENAME and NEWNAME must be absolute
file names."
(unless (memq op '(copy rename))
(error "Unknown operation `%s', must be `copy' or `rename'" op))
(let ((t1 (tramp-tramp-file-p filename))
(t2 (tramp-tramp-file-p newname))
(equal-remote (tramp-equal-remote filename newname))
(file-operation (intern (format "%s-file" op)))
(gvfs-operation (if (eq op 'copy) "gvfs-copy" "gvfs-move"))
(msg-operation (if (eq op 'copy) "Copying" "Renaming")))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error
v 'file-already-exists "File %s already exists" newname))
(if (or (and equal-remote
(tramp-get-connection-property v "direct-copy-failed" nil))
(and t1 (not (tramp-gvfs-file-name-p filename)))
(and t2 (not (tramp-gvfs-file-name-p newname))))
;; We cannot copy or rename directly.
(let ((tmpfile (tramp-compat-make-temp-file filename)))
(cond
(preserve-extended-attributes
(tramp-compat-funcall
file-operation
filename tmpfile t keep-date preserve-uid-gid
preserve-extended-attributes))
(preserve-uid-gid
(tramp-compat-funcall
file-operation filename tmpfile t keep-date preserve-uid-gid))
(t
(tramp-compat-funcall
file-operation filename tmpfile t keep-date)))
(rename-file tmpfile newname ok-if-already-exists))
;; Direct action.
(with-tramp-progress-reporter
v 0 (format "%s %s to %s" msg-operation filename newname)
(unless
(apply
'tramp-gvfs-send-command v gvfs-operation
(append
(and (eq op 'copy) (or keep-date preserve-uid-gid)
(list "--preserve"))
(list
(tramp-gvfs-url-file-name filename)
(tramp-gvfs-url-file-name newname))))
(if (or (not equal-remote)
(and equal-remote
(tramp-get-connection-property
v "direct-copy-failed" nil)))
;; Propagate the error.
(with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-min))
(tramp-error-with-buffer
nil v 'file-error
"%s failed, see buffer `%s' for details."
msg-operation (buffer-name)))
;; Some WebDAV server, like the one from QNAP, do not
;; support direct copy/move. Try a fallback.
(tramp-set-connection-property v "direct-copy-failed" t)
(tramp-gvfs-do-copy-or-rename-file
op filename newname ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes))))
(when (and t1 (eq op 'rename))
(with-parsed-tramp-file-name filename nil
(tramp-flush-file-property v (file-name-directory localname))
(tramp-flush-file-property v localname)))
(when t2
(with-parsed-tramp-file-name newname nil
(tramp-flush-file-property v (file-name-directory localname))
(tramp-flush-file-property v localname)))))))
(defun tramp-gvfs-handle-copy-file
(filename newname &optional ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes)
"Like `copy-file' for Tramp files."
(with-parsed-tramp-file-name
(if (tramp-tramp-file-p filename) filename newname) nil
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error
v 'file-already-exists "File %s already exists" newname))
(if (or (and (tramp-tramp-file-p filename)
(not (tramp-gvfs-file-name-p filename)))
(and (tramp-tramp-file-p newname)
(not (tramp-gvfs-file-name-p newname))))
;; We cannot call `copy-file' directly. Use
;; `tramp-compat-funcall' for backward compatibility (number
;; of arguments).
(let ((tmpfile (tramp-compat-make-temp-file filename)))
(cond
(preserve-extended-attributes
(tramp-compat-funcall
'copy-file
filename tmpfile t keep-date preserve-uid-gid
preserve-extended-attributes))
(preserve-uid-gid
(tramp-compat-funcall
'copy-file filename tmpfile t keep-date preserve-uid-gid))
(t
(copy-file filename tmpfile t keep-date)))
(rename-file tmpfile newname ok-if-already-exists))
;; Direct copy.
(with-tramp-progress-reporter
v 0 (format "Copying %s to %s" filename newname)
(unless
(let ((args
(append (if (or keep-date preserve-uid-gid)
(list "--preserve")
nil)
(list
(tramp-gvfs-url-file-name filename)
(tramp-gvfs-url-file-name newname)))))
(apply 'tramp-gvfs-send-command v "gvfs-copy" args))
;; Propagate the error.
(with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-min))
(tramp-error-with-buffer
nil v 'file-error
"Copying failed, see buffer `%s' for details." (buffer-name)))))
(when (tramp-tramp-file-p newname)
(with-parsed-tramp-file-name newname nil
(tramp-flush-file-property v (file-name-directory localname))
(tramp-flush-file-property v localname))))))
(setq filename (expand-file-name filename))
(setq newname (expand-file-name newname))
(cond
;; At least one file a Tramp file?
((or (tramp-tramp-file-p filename)
(tramp-tramp-file-p newname))
(tramp-gvfs-do-copy-or-rename-file
'copy filename newname ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes))
;; Compat section.
(preserve-extended-attributes
(tramp-run-real-handler
'copy-file
(list filename newname ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes)))
(preserve-uid-gid
(tramp-run-real-handler
'copy-file
(list filename newname ok-if-already-exists keep-date preserve-uid-gid)))
(t
(tramp-run-real-handler
'copy-file (list filename newname ok-if-already-exists keep-date)))))
(defun tramp-gvfs-handle-delete-directory (directory &optional recursive trash)
"Like `delete-directory' for Tramp files."
......@@ -1016,60 +1081,35 @@ is no information where to trace the message.")
(defun tramp-gvfs-handle-make-directory (dir &optional parents)
"Like `make-directory' for Tramp files."
(setq dir (directory-file-name (expand-file-name dir)))
(with-parsed-tramp-file-name dir nil
(unless
(apply
'tramp-gvfs-send-command v "gvfs-mkdir"
(if parents
(list "-p" (tramp-gvfs-url-file-name dir))
(list (tramp-gvfs-url-file-name dir))))
;; Propagate the error.
(tramp-error v 'file-error "Couldn't make directory %s" dir))))
(tramp-flush-file-property v (file-name-directory localname))
(tramp-flush-directory-property v localname)
(save-match-data
(let ((ldir (file-name-directory dir)))
;; Make missing directory parts. "gvfs-mkdir -p ..." does not
;; work robust.
(when (and parents (not (file-directory-p ldir)))
(make-directory ldir parents))
;; Just do it.
(unless (tramp-gvfs-send-command
v "gvfs-mkdir" (tramp-gvfs-url-file-name dir))
(tramp-error v 'file-error "Couldn't make directory %s" dir))))))
(defun tramp-gvfs-handle-rename-file
(filename newname &optional ok-if-already-exists)
"Like `rename-file' for Tramp files."
(with-parsed-tramp-file-name
(if (tramp-tramp-file-p filename) filename newname) nil
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error
v 'file-already-exists "File %s already exists" newname))
(if (or (and (tramp-tramp-file-p filename)
(not (tramp-gvfs-file-name-p filename)))
(and (tramp-tramp-file-p newname)
(not (tramp-gvfs-file-name-p newname))))
;; We cannot move directly.
(let ((tmpfile (tramp-compat-make-temp-file filename)))
(rename-file filename tmpfile t)
(rename-file tmpfile newname ok-if-already-exists))
;; Direct move.
(with-tramp-progress-reporter
v 0 (format "Renaming %s to %s" filename newname)
(unless
(tramp-gvfs-send-command
v "gvfs-move"
(tramp-gvfs-url-file-name filename)
(tramp-gvfs-url-file-name newname))
;; Propagate the error.
(with-current-buffer (tramp-get-buffer v)
(goto-char (point-min))
(tramp-error-with-buffer
nil v 'file-error
"Renaming failed, see buffer `%s' for details." (buffer-name)))))
(when (tramp-tramp-file-p filename)
(with-parsed-tramp-file-name filename nil
(tramp-flush-file-property v (file-name-directory localname))
(tramp-flush-file-property v localname)))
(when (tramp-tramp-file-p newname)
(with-parsed-tramp-file-name newname nil
(tramp-flush-file-property v (file-name-directory localname))
(tramp-flush-file-property v localname))))))
;; Check if both files are local -- invoke normal rename-file.
;; Otherwise, use Tramp from local system.
(setq filename (expand-file-name filename))
(setq newname (expand-file-name newname))
;; At least one file a Tramp file?
(if (or (tramp-tramp-file-p filename)
(tramp-tramp-file-p newname))
(tramp-gvfs-do-copy-or-rename-file
'rename filename newname ok-if-already-exists t t)
(tramp-run-real-handler
'rename-file (list filename newname ok-if-already-exists))))
(defun tramp-gvfs-handle-write-region
(start end filename &optional append visit lockname confirm)
......@@ -1530,7 +1570,7 @@ connection if a previous connection has died for some reason."
;; indicated by the "mounted" signal, i.e. the "fuse-mountpoint"
;; file property.
(with-timeout
((or (tramp-get-method-parameter method 'tramp-connection-timeout)
((or (tramp-get-method-parameter vec 'tramp-connection-timeout)
tramp-connection-timeout)
(if (zerop (length (tramp-file-name-user vec)))
(tramp-error
......
......@@ -135,6 +135,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "rsh")
(tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "rcp")
(tramp-copy-args (("-p" "%k") ("-r")))
......@@ -146,6 +147,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "remsh")
(tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "rcp")
(tramp-copy-args (("-p" "%k")))
......@@ -158,6 +160,7 @@ The string is used in `tramp-methods'.")
("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "scp")
(tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r") ("%c")))
......@@ -175,6 +178,7 @@ The string is used in `tramp-methods'.")
("-e" "none") ("-t" "-t") ("%h") ("/bin/sh")))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "scp")
(tramp-copy-args (("-P" "%p") ("-p" "%k")
......@@ -193,6 +197,7 @@ The string is used in `tramp-methods'.")
("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "rsync")
(tramp-copy-args (("-t" "%k") ("-r")))
......@@ -206,6 +211,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "rsh")
(tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
;;;###tramp-autoload
(add-to-list 'tramp-methods
......@@ -213,6 +219,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "remsh")
(tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
;;;###tramp-autoload
(add-to-list 'tramp-methods
......@@ -222,6 +229,7 @@ The string is used in `tramp-methods'.")
("-e" "none") ("%h")))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null")
("-o" "UserKnownHostsFile=/dev/null")
......@@ -235,6 +243,7 @@ The string is used in `tramp-methods'.")
("-e" "none") ("-t" "-t") ("%h") ("/bin/sh")))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null")
("-o" "UserKnownHostsFile=/dev/null")
......@@ -246,6 +255,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "telnet")
(tramp-login-args (("%h") ("%p") ("2>/dev/null")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-default-port 23)))
;;;###tramp-autoload
......@@ -254,6 +264,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "telnet")
(tramp-login-args (("%h") ("%p") ("2>/dev/null")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "nc")
;; We use "-v" for better error tracking.
......@@ -270,6 +281,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "su")
(tramp-login-args (("-") ("%u")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
;;;###tramp-autoload
......@@ -280,6 +292,7 @@ The string is used in `tramp-methods'.")
;; Local $SHELL could be a nasty one, like zsh or fish. Let's override it.
(tramp-login-env (("SHELL") ("/bin/sh")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
;;;###tramp-autoload
......@@ -288,6 +301,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "ksu")
(tramp-login-args (("%u") ("-q")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
;;;###tramp-autoload
......@@ -296,6 +310,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "krlogin")
(tramp-login-args (("%h") ("-l" "%u") ("-x")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
;;;###tramp-autoload
(add-to-list 'tramp-methods
......@@ -310,6 +325,7 @@ The string is used in `tramp-methods'.")
tramp-initial-end-of-output))
("/bin/sh") ("\"")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-default-port 22)))
;;;###tramp-autoload
......@@ -323,6 +339,7 @@ The string is used in `tramp-methods'.")
tramp-initial-end-of-output))
("/bin/sh") ("\"")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
;;;###tramp-autoload
(add-to-list 'tramp-methods
......@@ -336,6 +353,7 @@ The string is used in `tramp-methods'.")
tramp-initial-end-of-output))
("/bin/sh") ("\"")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "pscp")
(tramp-copy-args (("-l" "%u") ("-P" "%p") ("-scp") ("-p" "%k")
......@@ -355,6 +373,7 @@ The string is used in `tramp-methods'.")
tramp-initial-end-of-output))
("/bin/sh") ("\"")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "pscp")
(tramp-copy-args (("-l" "%u") ("-P" "%p") ("-sftp") ("-p" "%k")
......@@ -367,6 +386,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "fsh")
(tramp-login-args (("%h") ("-l" "%u") ("sh" "-i")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-i") ("-c"))
(tramp-copy-program "fcp")
(tramp-copy-args (("-p" "%k")))
......@@ -1957,7 +1977,7 @@ tramp-sh-handle-file-name-all-completions: internal error accessing `%s': `%s'"
(t2 (tramp-tramp-file-p newname)))
(with-parsed-tramp-file-name (if t1 dirname newname) nil
(if (and (not copy-contents)
(tramp-get-method-parameter method 'tramp-copy-recursive)
(tramp-get-method-parameter v 'tramp-copy-recursive)
;; When DIRNAME and NEWNAME are remote, they must have
;; the same method.
(or (null t1) (null t2)
......@@ -2379,7 +2399,7 @@ The method used must be an out-of-band method."
(tramp-get-connection-property v "login-as" nil)))
;; Check for listener port.
(when (tramp-get-method-parameter method 'tramp-remote-copy-args)
(when (tramp-get-method-parameter v 'tramp-remote-copy-args)
(setq listener (number-to-string (+ 50000 (random 10000))))
(while
(zerop (tramp-call-process v "nc" nil nil nil "-z" host listener))
......@@ -2396,10 +2416,9 @@ The method used must be an out-of-band method."
spec (format-spec-make
?h host ?u user ?p port ?r listener ?c options
?k (if keep-date " " ""))
copy-program (tramp-get-method-parameter
method 'tramp-copy-program)
copy-program (tramp-get-method-parameter v 'tramp-copy-program)
copy-keep-date (tramp-get-method-parameter
method 'tramp-copy-keep-date)
v 'tramp-copy-keep-date)
copy-args
(delete
......@@ -2408,9 +2427,7 @@ The method used must be an out-of-band method."
;; for the whole keep-date sublist.
" "
(dolist
(x
(tramp-get-method-parameter method 'tramp-copy-args)
copy-args)
(x (tramp-get-method-parameter v 'tramp-copy-args) copy-args)
(setq copy-args
(append