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 ...@@ -217,7 +217,7 @@ Configuring @value{tramp} for use
* Connection caching:: Reusing connection related information. * Connection caching:: Reusing connection related information.
* Predefined connection information:: * Predefined connection information::
Setting own connection related 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. * Remote shell setup:: Remote shell setup hints.
* Android shell setup:: Android shell setup hints. * Android shell setup:: Android shell setup hints.
* Auto-save and Backup:: Auto-save and Backup. * Auto-save and Backup:: Auto-save and Backup.
...@@ -524,6 +524,15 @@ can use to connect to remote hosts and transfer files ...@@ -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 If you don't know which method is right for you, see @xref{Default
Method}. 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 @menu
* Connection types:: Types of connections made to remote hosts. * Connection types:: Types of connections made to remote hosts.
...@@ -548,7 +557,7 @@ Method}. ...@@ -548,7 +557,7 @@ Method}.
* Connection caching:: Reusing connection related information. * Connection caching:: Reusing connection related information.
* Predefined connection information:: * Predefined connection information::
Setting own connection related 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. * Remote shell setup:: Remote shell setup hints.
* Android shell setup:: Android shell setup hints. * Android shell setup:: Android shell setup hints.
* Auto-save and Backup:: Auto-save and Backup. * Auto-save and Backup:: Auto-save and Backup.
...@@ -622,7 +631,7 @@ it may require access to external commands to perform that task. ...@@ -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{mimencode} (part of the @command{metamail} package) or
@command{uuencode} on the remote host. The first reliable command @command{uuencode} on the remote host. The first reliable command
will be used. The search path can be customized, see @ref{Remote 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} 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 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 ...@@ -1726,10 +1735,10 @@ Using such persistent information can be disabled by setting
@code{tramp-persistency-file-name} to @code{nil}. @code{tramp-persistency-file-name} to @code{nil}.
Once consequence of reusing connection related information is that 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 local @code{sshd} on port 3001, which tunnels @command{ssh} to another
host, you could access both @file{@trampfn{ssh, , localhost,}} and 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 same host related information (like paths, Perl variants, etc) for
both connections, although the information is valid only for one of both connections, although the information is valid only for one of
them. them.
...@@ -1748,10 +1757,11 @@ connection again. ...@@ -1748,10 +1757,11 @@ connection again.
@node Predefined connection information @node Predefined connection information
@section Setting own connection related information @section Setting own connection related information
Sometimes, @var{tramp} is not able to detect correct connection Sometimes, method specific arguments in @code{tramp-methods} do not
related information. In such cases, you could tell @var{tramp} which fit your needs. Sometimes, @value{tramp} is not able to detect
value it has to take. Since this could result in errors, it has to be correct connection related information. In such cases, you could tell
used with care. @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 @vindex tramp-connection-properties
Such settings can be performed via the list Such settings can be performed via the list
...@@ -1759,13 +1769,35 @@ 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} form @code{(@var{regexp} @var{property} @var{value})}. @var{regexp}
matches remote file names for which a property shall be predefined. 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 It can be @code{nil}. @var{property} is a string, and @var{value} the
corresponding value. @var{property} could be any property found in corresponding value.
the file @code{tramp-persistency-file-name}.
A special property is @code{"busybox"}. This must be set, if the @var{property} could be any method specific parameter found in
remote host runs a very restricted busybox as shell, which closes the @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, 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 @lisp
(add-to-list 'tramp-connection-properties (add-to-list 'tramp-connection-properties
...@@ -1774,7 +1806,7 @@ connection at will. Since there is no reliable test for this, ...@@ -1774,7 +1806,7 @@ connection at will. Since there is no reliable test for this,
@end lisp @end lisp
@node Remote Programs @node Remote programs
@section How @value{tramp} finds and uses programs on the remote host @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 @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 ...@@ -1821,9 +1853,6 @@ To add a directory to the remote search path, you could use code such
as: as:
@lisp @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") (add-to-list 'tramp-remote-path "/usr/local/perl/bin")
@end lisp @end lisp
...@@ -1892,7 +1921,7 @@ to be set correctly to recognize the shell prompt on the remote host. ...@@ -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} 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 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, suppose your shell prompt is @code{a <b> c $ }. In this case,
@value{tramp} recognizes the @code{>} character as the end of the prompt, @value{tramp} recognizes the @code{>} character as the end of the prompt,
but it is not at the end of the buffer. but it is not at the end of the buffer.
...@@ -2688,7 +2717,7 @@ this is welcome! ...@@ -2688,7 +2717,7 @@ this is welcome!
When your program is not found in the default search path When your program is not found in the default search path
@value{tramp} sets on the remote host, you should either use an @value{tramp} sets on the remote host, you should either use an
absolute path, or extend @code{tramp-remote-path} (see @ref{Remote absolute path, or extend @code{tramp-remote-path} (see @ref{Remote
Programs}): programs}):
@lisp @lisp
(add-to-list 'tramp-remote-path "~/bin") (add-to-list 'tramp-remote-path "~/bin")
...@@ -2698,8 +2727,8 @@ Programs}): ...@@ -2698,8 +2727,8 @@ Programs}):
The environment for your program can be adapted by customizing The environment for your program can be adapted by customizing
@code{tramp-remote-process-environment}. This variable is a list of @code{tramp-remote-process-environment}. This variable is a list of
strings. It is structured like @code{process-environment}. Each strings. It is structured like @code{process-environment}. Each
element is a string of the form @code{"ENVVARNAME=VALUE"}. An entry element is a string of the form @samp{ENVVARNAME=VALUE}. An entry
@code{"ENVVARNAME="} disables the corresponding environment variable, @samp{ENVVARNAME=} disables the corresponding environment variable,
which might have been set in your init file like @file{~/.profile}. which might have been set in your init file like @file{~/.profile}.
@noindent @noindent
...@@ -3930,7 +3959,6 @@ Sometimes, it might be even necessary to step through @value{tramp} ...@@ -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: function call traces. Such traces are enabled by the following code:
@lisp @lisp
(require 'tramp)
(require 'trace) (require 'trace)
(dolist (elt (all-completions "tramp-" obarray 'functionp)) (dolist (elt (all-completions "tramp-" obarray 'functionp))
(trace-function-background (intern elt))) (trace-function-background (intern elt)))
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
@c In the Tramp GIT, the version number is auto-frobbed from @c In the Tramp GIT, the version number is auto-frobbed from
@c configure.ac, so you should edit that file and run @c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number. @c "autoconf && ./configure" to change the version number.
@set trampver 2.2.12 @set trampver 2.2.13-pre
@c Other flags from configuration @c Other flags from configuration
@set instprefix /usr/local @set instprefix /usr/local
......
...@@ -66,7 +66,8 @@ ...@@ -66,7 +66,8 @@
Every entry has the form (REGEXP PROPERTY VALUE). The regexp Every entry has the form (REGEXP PROPERTY VALUE). The regexp
matches remote file names. It can be nil. PROPERTY is a string, matches remote file names. It can be nil. PROPERTY is a string,
and VALUE the corresponding value. They are used, if there is no 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 :group 'tramp
:version "24.4" :version "24.4"
:type '(repeat (list (choice :tag "File Name regexp" regexp (const nil)) :type '(repeat (list (choice :tag "File Name regexp" regexp (const nil))
......
...@@ -582,62 +582,127 @@ is no information where to trace the message.") ...@@ -582,62 +582,127 @@ is no information where to trace the message.")
;; File name primitives. ;; 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 (defun tramp-gvfs-handle-copy-file
(filename newname &optional ok-if-already-exists keep-date (filename newname &optional ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes) preserve-uid-gid preserve-extended-attributes)
"Like `copy-file' for Tramp files." "Like `copy-file' for Tramp files."
(with-parsed-tramp-file-name (setq filename (expand-file-name filename))
(if (tramp-tramp-file-p filename) filename newname) nil (setq newname (expand-file-name newname))
(cond
(when (and (not ok-if-already-exists) (file-exists-p newname)) ;; At least one file a Tramp file?
(tramp-error ((or (tramp-tramp-file-p filename)
v 'file-already-exists "File %s already exists" newname)) (tramp-tramp-file-p newname))
(tramp-gvfs-do-copy-or-rename-file
(if (or (and (tramp-tramp-file-p filename) 'copy filename newname ok-if-already-exists keep-date
(not (tramp-gvfs-file-name-p filename))) preserve-uid-gid preserve-extended-attributes))
(and (tramp-tramp-file-p newname) ;; Compat section.
(not (tramp-gvfs-file-name-p newname)))) (preserve-extended-attributes
(tramp-run-real-handler
;; We cannot call `copy-file' directly. Use 'copy-file
;; `tramp-compat-funcall' for backward compatibility (number (list filename newname ok-if-already-exists keep-date
;; of arguments). preserve-uid-gid preserve-extended-attributes)))
(let ((tmpfile (tramp-compat-make-temp-file filename))) (preserve-uid-gid
(cond (tramp-run-real-handler
(preserve-extended-attributes 'copy-file
(tramp-compat-funcall (list filename newname ok-if-already-exists keep-date preserve-uid-gid)))
'copy-file (t
filename tmpfile t keep-date preserve-uid-gid (tramp-run-real-handler
preserve-extended-attributes)) 'copy-file (list filename newname ok-if-already-exists keep-date)))))
(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))))))
(defun tramp-gvfs-handle-delete-directory (directory &optional recursive trash) (defun tramp-gvfs-handle-delete-directory (directory &optional recursive trash)
"Like `delete-directory' for Tramp files." "Like `delete-directory' for Tramp files."
...@@ -1016,60 +1081,35 @@ is no information where to trace the message.") ...@@ -1016,60 +1081,35 @@ is no information where to trace the message.")
(defun tramp-gvfs-handle-make-directory (dir &optional parents) (defun tramp-gvfs-handle-make-directory (dir &optional parents)
"Like `make-directory' for Tramp files." "Like `make-directory' for Tramp files."
(setq dir (directory-file-name (expand-file-name dir)))
(with-parsed-tramp-file-name dir nil (with-parsed-tramp-file-name dir nil
(unless (tramp-flush-file-property v (file-name-directory localname))
(apply (tramp-flush-directory-property v localname)
'tramp-gvfs-send-command v "gvfs-mkdir" (save-match-data
(if parents (let ((ldir (file-name-directory dir)))
(list "-p" (tramp-gvfs-url-file-name dir)) ;; Make missing directory parts. "gvfs-mkdir -p ..." does not
(list (tramp-gvfs-url-file-name dir)))) ;; work robust.
;; Propagate the error. (when (and parents (not (file-directory-p ldir)))
(tramp-error v 'file-error "Couldn't make directory %s" dir)))) (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 (defun tramp-gvfs-handle-rename-file
(filename newname &optional ok-if-already-exists) (filename newname &optional ok-if-already-exists)
"Like `rename-file' for Tramp files." "Like `rename-file' for Tramp files."
(with-parsed-tramp-file-name ;; Check if both files are local -- invoke normal rename-file.
(if (tramp-tramp-file-p filename) filename newname) nil ;; Otherwise, use Tramp from local system.
(setq filename (expand-file-name filename))
(when (and (not ok-if-already-exists) (file-exists-p newname)) (setq newname (expand-file-name newname))
(tramp-error ;; At least one file a Tramp file?
v 'file-already-exists "File %s already exists" newname)) (if (or (tramp-tramp-file-p filename)
(tramp-tramp-file-p newname))
(if (or (and (tramp-tramp-file-p filename) (tramp-gvfs-do-copy-or-rename-file
(not (tramp-gvfs-file-name-p filename))) 'rename filename newname ok-if-already-exists t t)
(and (tramp-tramp-file-p newname) (tramp-run-real-handler
(not (tramp-gvfs-file-name-p newname)))) 'rename-file (list filename newname ok-if-already-exists))))
;; 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))))))
(defun tramp-gvfs-handle-write-region (defun tramp-gvfs-handle-write-region
(start end filename &optional append visit lockname confirm) (start end filename &optional append visit lockname confirm)
...@@ -1530,7 +1570,7 @@ connection if a previous connection has died for some reason." ...@@ -1530,7 +1570,7 @@ connection if a previous connection has died for some reason."
;; indicated by the "mounted" signal, i.e. the "fuse-mountpoint" ;; indicated by the "mounted" signal, i.e. the "fuse-mountpoint"
;; file property. ;; file property.
(with-timeout (with-timeout
((or (tramp-get-method-parameter method 'tramp-connection-timeout) ((or (tramp-get-method-parameter vec 'tramp-connection-timeout)
tramp-connection-timeout) tramp-connection-timeout)
(if (zerop (length (tramp-file-name-user vec))) (if (zerop (length (tramp-file-name-user vec)))
(tramp-error (tramp-error
......
...@@ -135,6 +135,7 @@ The string is used in `tramp-methods'.") ...@@ -135,6 +135,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "rsh") (tramp-login-program "rsh")
(tramp-login-args (("%h") ("-l" "%u"))) (tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell "/bin/sh") (tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c")) (tramp-remote-shell-args ("-c"))
(tramp-copy-program "rcp") (tramp-copy-program "rcp")
(tramp-copy-args (("-p" "%k") ("-r"))) (tramp-copy-args (("-p" "%k") ("-r")))
...@@ -146,6 +147,7 @@ The string is used in `tramp-methods'.") ...@@ -146,6 +147,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "remsh") (tramp-login-program "remsh")
(tramp-login-args (("%h") ("-l" "%u"))) (tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell "/bin/sh") (tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c")) (tramp-remote-shell-args ("-c"))
(tramp-copy-program "rcp") (tramp-copy-program "rcp")
(tramp-copy-args (("-p" "%k"))) (tramp-copy-args (("-p" "%k")))
...@@ -158,6 +160,7 @@ The string is used in `tramp-methods'.") ...@@ -158,6 +160,7 @@ The string is used in `tramp-methods'.")
("-e" "none") ("%h"))) ("-e" "none") ("%h")))
(tramp-async-args (("-q"))) (tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh") (tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c")) (tramp-remote-shell-args ("-c"))
(tramp-copy-program "scp") (tramp-copy-program "scp")
(tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r") ("%c"))) (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r") ("%c")))
...@@ -175,6 +178,7 @@ The string is used in `tramp-methods'.") ...@@ -175,6 +178,7 @@ The string is used in `tramp-methods'.")
("-e" "none") ("-t" "-t") ("%h") ("/bin/sh"))) ("-e" "none") ("-t" "-t") ("%h") ("/bin/sh")))
(tramp-async-args (("-q"))) (tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh") (tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c")) (tramp-remote-shell-args ("-c"))
(tramp-copy-program "scp") (tramp-copy-program "scp")
(tramp-copy-args (("-P" "%p") ("-p" "%k") (tramp-copy-args (("-P" "%p") ("-p" "%k")
...@@ -193,6 +197,7 @@ The string is used in `tramp-methods'.") ...@@ -193,6 +197,7 @@ The string is used in `tramp-methods'.")
("-e" "none") ("%h"))) ("-e" "none") ("%h")))
(tramp-async-args (("-q"))) (tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh") (tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c")) (tramp-remote-shell-args ("-c"))
(tramp-copy-program "rsync") (tramp-copy-program "rsync")
(tramp-copy-args (("-t" "%k") ("-r"))) (tramp-copy-args (("-t" "%k") ("-r")))
...@@ -206,6 +211,7 @@ The string is used in `tramp-methods'.") ...@@ -206,6 +211,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "rsh") (tramp-login-program "rsh")
(tramp-login-args (("%h") ("-l" "%u"))) (tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell "/bin/sh") (tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c")))) (tramp-remote-shell-args ("-c"))))
;;;###tramp-autoload ;;;###tramp-autoload
(add-to-list 'tramp-methods (add-to-list 'tramp-methods
...@@ -213,6 +219,7 @@ The string is used in `tramp-methods'.") ...@@ -213,6 +219,7 @@ The string is used in `tramp-methods'.")
(tramp-login-program "remsh") (tramp-login-program "remsh")
(tramp-login-args (("%h") ("-l" "%u"))) (tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell "/bin/sh") (tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c")))) (tramp-remote-shell-args ("-c"))))
;;;###tramp-autoload ;;;###tramp-autoload
(add-to-list 'tramp-methods (add-to-list 'tramp-methods
...@@ -222,6 +229,7 @@ The string is used in `tramp-methods'.") ...@@ -222,6 +229,7 @@ The string is used in `tramp-methods'.")
("-e" "none") ("%h"))) ("-e" "none") ("%h")))
(tramp-async-args (("-q"))) (tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh") (tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c")) (tramp-remote-shell-args ("-c"))
(tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null")