1 new commit in tramp:
https://bitbucket.org/xemacs/tramp/commits/2a6a5aaac4f9/
Changeset: 2a6a5aaac4f9
User: albinus
Date: 2014-06-15 18:28:15
Summary: Sync with Tramp 2.2.10.
Affected #: 17 files
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r
2a6a5aaac4f982497ce8c38509396c9008aa0dd6 ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-15 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * Makefile (AUTHOR_VERSION): Bump to 2.2.10.
+
2014-06-02 Jerry James <james(a)xemacs.org>
* .hgignore: Fix paths to _pkg.el, auto-autoloads.el,
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r
2a6a5aaac4f982497ce8c38509396c9008aa0dd6 ChangeLog.upstream
--- a/ChangeLog.upstream
+++ b/ChangeLog.upstream
@@ -1,3 +1,26 @@
+2014-06-15 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Version 2.2.10 released.
+
+ * configure.ac: Bump version.
+
+2014-05-05 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * CONTRIBUTORS: Removed, file is out-of-date.
+
+ * Makefile.in (XEMACS_FILES):
+ * README: Remove CONTRIBUTORS.
+
+2014-02-28 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * Makefile.in (test): New target.
+ (.PHONY): Add it.
+
+2014-02-19 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * configure.ac: Bump version (to 2.2.10-pre). Update merge
+ version to 2.2.9.
+
2014-02-16 Michael Albinus <michael.albinus(a)gmx.de>
Version 2.2.9 released.
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r
2a6a5aaac4f982497ce8c38509396c9008aa0dd6 Makefile
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@
# Boston, MA 02111-1307, USA.
VERSION = 1.50
-AUTHOR_VERSION = 2.2.9
+AUTHOR_VERSION = 2.2.10
MAINTAINER = Michael Albinus <michael.albinus(a)gmx.de>
PACKAGE = tramp
PKG_TYPE = regular
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r
2a6a5aaac4f982497ce8c38509396c9008aa0dd6 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,4 +1,89 @@
-2014-05-20 Michael Albinus <michael.albinus(a)gmx.de>
+2014-06-15 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Version 2.2.10 released.
+
+ * tramp.el (tramp-check-cached-permissions): Use
+ `tramp-compat-file-attributes'.
+
+ * tramp-cache.el (tramp-flush-file-function): Do not flush file
+ properties of temporary buffers.
+
+ * tramp-sh.el (tramp-call-local-coding-command): Use nil as
+ argument of `tramp-call-process'.
+
+2014-06-13 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-call-process): Add new argument VEC.
+ (tramp-set-completion-function, tramp-parse-putty)
+ * tramp-adb.el (tramp-adb-execute-adb-command)
+ * tramp-sh.el (tramp-sh-handle-set-file-times)
+ (tramp-set-file-uid-gid, tramp-do-copy-or-rename-file-out-of-band)
+ (tramp-sh-handle-write-region, tramp-call-local-coding-command):
+ Adapt callees.
+
+ * tramp-adb.el (tramp-adb-maybe-open-connection): Don't set
+ `tramp-current-*' variables.
+
+ * tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
+ Use "-h" option for "gvfs-ls".
+ (tramp-gvfs-send-command): Simplify traces.
+
+ * tramp-smb.el (tramp-smb-handle-insert-directory): Use progress
+ reporter.
+
+2014-06-03 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-ssh-controlmaster-options): Improve search
+ regexp. (Bug#17653)
+
+2014-06-02 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-call-process): Add traces.
+ (tramp-handle-unhandled-file-name-directory): Return "/".
+
+2014-05-31 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-adb.el (tramp-adb-handle-write-region): Improve messages.
+
+ * tramp-efs.el (top):
+ * tramp-ftp.el (top): Remove special handling for URL syntax.
+
+ * tramp-gvfs.el (tramp-gvfs-handle-delete-file): Flush file
+ properties, not directory properties.
+
+ * tramp-smb.el (tramp-smb-handle-copy-directory)
+ (tramp-smb-handle-set-file-acl): Use `start-process'.
+ (tramp-smb-handle-rename-file): Flush also file properties of
+ FILENAME.
+
+2014-05-26 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add.
+ (tramp-gvfs-handle-file-attributes): Use `string-to-number' when
+ reading "unix::mode".
+ (tramp-gvfs-url-file-name): `user' and `localname' could be nil.
+
+ * tramp-sh.el (tramp-methods) <sftp>: Remove. It has never worked
+ satisfactorily.
+ (top): Remove completion function for "sftp".
+
+2014-05-17 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-find-inline-encoding): Do not match "%%t" for
+ a temporary file name.
+
+2014-05-13 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-methods) <plinkx>: Reinsert. There are
+ cases, where "plink -ssh" is not desired.
+ (top): Reinsert completion function for "plinkx".
+
+2014-05-12 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-handle-file-accessible-directory-p): Check for
+ `file-readable-p' instead of `file-executable-p'.
+
+2014-05-06 Michael Albinus <michael.albinus(a)gmx.de>
* tramp-sh.el (tramp-uudecode): Replace the hard-coded temporary
file name by a format specifier.
@@ -7,6 +92,266 @@
name. (Bug#17415)
This is CVE-2014-3424.
+2014-05-05 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-remote-process-environment): Change :version
+ to "24.4".
+ (tramp-open-shell): Do not let-bind `tramp-end-of-output'.
+
+2014-04-22 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-name-all-completions):
+ Set IFS=" when using read builtin, in order to preserve spaces in
+ the file name.
+
+2014-04-16 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-run-real-handler, tramp-file-name-handler):
+ Do not autoload.
+ (tramp-file-name-handler, tramp-completion-file-name-handler):
+ Revert patch from 2014-04-10, it isn't necessary anymore.
+ (tramp-autoload-file-name-handler)
+ (tramp-register-autoload-file-name-handlers): New defuns.
+ (top): Autoload call of `tramp-register-autoload-file-name-handlers'.
+ (tramp-register-file-name-handlers): Remove also
+ `tramp-autoload-file-name-handler' from `file-name-handler-list'.
+ Do not autoload its invocation, but eval it after loading of 'tramp.
+
+2014-04-13 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-truename): Revert previous
+ patch, there are new problems with file names containing spaces.
+ Get rid of backticks. (Bug#17238)
+
+2014-04-11 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-truename): Quote the file name
+ twice due to backticks. (Bug#17238)
+ (tramp-sh-handle-expand-file-name): Tweak docstring.
+
+2014-04-10 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-methods): Tweak docstring.
+ (tramp-file-name-handler, tramp-completion-file-name-handler):
+ Avoid recursive loading.
+
+ * tramp-adb.el (tramp-unload-hook): Unload `tramp-adb'.
+
+ * tramp-compat.el (tramp-unload-hook): Unload `tramp-loaddefs'.
+
+ * tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
+ Tweak docstring.
+ (tramp-sh-handle-write-region): Tweak error message.
+ (tramp-make-copy-program-file-name): Tweak docstring. Quote
+ result also locally.
+
+2014-03-31 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-remote-process-environment): Remove HISTFILE
+ and HISTSIZE; it's too late to set them here. Add :version entry.
+ (tramp-open-shell): Add "HISTFILE=/dev/null" to the shell's env
+ arguments. Do not send extra "PSx=..." commands.
+ (tramp-maybe-open-connection): Setenv HISTFILE to /dev/null.
+
+2014-03-25 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-connection-timeout): Fix docstring.
+
+ * tramp-sh.el (tramp-sh-handle-vc-registered): Revert change from
+ 2014-03-07, it decreases performance unnecessarily. Let-bind
+ `remote-file-name-inhibit-cache' to nil in the second pass.
+ (tramp-do-copy-or-rename-file-directly): In the `rename' case,
+ check whether source directory has set the sticky bit.
+
+2014-03-24 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-methods) <plinkx>: Remove. Use its
+ `tramp-login-args' for "plink", "pscp" and "psftp".
+ (top): Remove completion function for "plinkx". Completion
+ function for "psftp" is `tramp-completion-function-alist-ssh'.
+ (tramp-find-executable): Do not call "which" on SunOS.
+
+2014-03-23 Thierry Volpiatto <thierry.volpiatto(a)gmail.com>
+
+ * tramp.el (tramp-read-passwd): Suspend the timers while reading
+ the password.
+
+2014-03-21 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-methods): Add docstring for `tramp-login-env'
+ and `tramp-copy-env'.
+
+ * tramp-sh.el (tramp-methods) <sudo>: Add `tramp-login-env'.
+ (tramp-maybe-open-connection): Handle `tramp-login-env'.
+
+2014-03-20 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (vc-handled-backends, vc-bzr-program)
+ (vc-git-program, vc-hg-program): Declare.
+ (tramp-sh-handle-vc-registered): Remove backends when the remote
+ binary does not exist.
+
+2014-03-17 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-action-out-of-band): Read pending output.
+
+ * tramp-sh.el (tramp-methods) <telnet, nc>: Redirect stderr to
+ "/dev/null".
+ (tramp-do-copy-or-rename-file-out-of-band): Simplify assembling of
+ remote command.
+ (tramp-find-inline-encoding): Do not raise an error.
+ (tramp-send-command-and-check): Fix docstring.
+
+2014-03-16 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-methods) <nc>: Tune `tramp-remote-copy-*'.
+ (tramp-do-copy-or-rename-file-out-of-band): Fiddle with the remote
+ commands.
+
+2014-03-14 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-methods): Add docstring for
+ `tramp-remote-copy-program' and `tramp-remote-copy-args'.
+
+ * tramp-sh.el (tramp-methods) <nc>: Add `tramp-remote-copy-*'.
+ (tramp-do-copy-or-rename-file-out-of-band): Merge
+ `tramp-do-copy-or-rename-file-with-nc'.
+ (tramp-do-copy-or-rename-file-with-nc, tramp-get-remote-nc): Remove.
+ (tramp-make-copy-program-file-name): Handle also the "nc" case.
+
+2014-03-13 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-methods): Fix docstring for `tramp-copy-program'.
+ (tramp-call-process): Trace also DESTINATION.
+
+ * tramp-sh.el (tramp-methods, tramp-default-user-alist): Add "nc".
+ (top): Completion function for "nc" is
+ `tramp-completion-function-alist-telnet'.
+ (tramp-do-copy-or-rename-file-out-of-band): Call function if
+ adviced in `tramp-methods'. Do not set `default-directory' for
+ `start-process-shell-command' call, not needed anymore.
+ (tramp-do-copy-or-rename-file-with-nc, tramp-get-remote-nc): New defuns.
+
+2014-03-10 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-open-connection-setup-interactive-shell):
+ Do not add nil to the environment, when there's no remote `locale'.
+ (tramp-find-inline-encoding): Check, that the remote host has
+ installed perl, before sending scripts.
+
+2014-03-07 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-vc-registered): Run first pass only
+ when `remote-file-name-inhibit-cache' is nil.
+ (tramp-sh-file-name-handler): Use `tramp-error'. Simplify code.
+
+2014-03-06 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-error): VEC-OR-PROC can be nil.
+ (tramp-action-password): Clear password cache if needed.
+ (tramp-read-passwd): Do not clear password cache.
+
+ * tramp-gvfs.el (tramp-gvfs-handler-askpassword): Clear password
+ cache unless it is the first password request.
+
+2014-03-04 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-vc-registered): Do not call
+ `tramp-send-command-and-check'.
+
+2014-02-28 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-adb.el (tramp-adb-parse-device-names):
+ Use `accept-process-output'.
+ (tramp-adb-handle-file-truename): Cache the localname only.
+ (tramp-adb-handle-make-directory)
+ (tramp-adb-handle-delete-directory): Flush file properties correctly.
+ (tramp-adb-handle-set-file-modes): Do not raise an error when file
+ modes cannot be changed.
+
+ * tramp-cache.el (tramp-flush-directory-property): Remove also
+ file properties of symlinks.
+
+2014-02-27 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-call-process): Improve trace message.
+ (tramp-handle-insert-file-contents): Trace error case.
+
+ * tramp-adb.el (tramp-adb-file-name-handler-alist)
+ <insert-directory>: Use `tramp-handle-insert-directory'.
+ (tramp-adb-handle-insert-directory): Remove function.
+ (tramp-adb-send-command-and-check): New defun, replacing
+ `tramp-adb-command-exit-status'. Change all callees.
+ (tramp-adb-handle-file-attributes)
+ (tramp-adb-handle-directory-files-and-attributes): Use it.
+ (tramp-adb-ls-output-name-less-p): Use
+ `directory-listing-before-filename-regexp'.
+ (tramp-adb-handle-delete-directory): Flush also file properties of
+ the truename of directory.
+ (tramp-adb-handle-file-name-all-completions): Add "./" and "../".
+ (tramp-adb-handle-file-local-copy): Make the local copy readable.
+ (tramp-adb-handle-write-region): Implement APPEND.
+ (tramp-adb-handle-rename-file): Make it more robust. Flush file
+ properties correctly.
+ (tramp-adb-maybe-open-connection): Set `tramp-current-*'
+ variables. Check for connected devices only when needed.
+
+2014-02-27 Daniel Colascione <dancol(a)dancol.org>
+
+ * tramp-sh.el (tramp-get-remote-path): Don't signal error when
+ explicit tramp path is empty.
+
+2014-02-24 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-truename): Improve last fix.
+
+2014-02-23 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-truename):
+ Preserve trailing "/". (Bug#16851)
+
+2014-02-21 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-check-cached-permissions):
+ Call `file-attributes' with `suffix' being a symbol but a string.
+
+2014-02-20 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (ls-lisp-use-insert-directory-program): Declare.
+ (tramp-handle-insert-directory): New defun, taken from tramp-gvfs.el.
+
+ * tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
+ <insert-directory>: Use `tramp-handle-insert-directory'.
+ (tramp-gvfs-handle-insert-directory): Remove function.
+
+ * tramp-sh.el (tramp-sh-handle-insert-directory):
+ Call `tramp-handle-insert-directory'.
+
+2014-02-19 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-handle-make-symbolic-link): New defun.
+ (tramp-check-cached-permissions): Call `file-attributes' if the
+ cache is empty.
+
+ * tramp-adb.el (tramp-adb-file-name-handler-alist)
+ <make-symbolic-link>: Use `tramp-handle-make-symbolic-link'.
+
+ * tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
+ <make-symbolic-link>: Use `tramp-handle-make-symbolic-link'.
+ (tramp-gvfs-maybe-open-connection): Set always connection
+ properties, even if target is mounted already.
+
+ * tramp-sh.el (tramp-color-escape-sequence-regexp):
+ Set tramp-autoload cookie.
+ (tramp-get-remote-touch): New defun.
+ (tramp-sh-handle-set-file-times): Use it.
+ (tramp-sh-handle-directory-files-and-attributes):
+ Use `tramp-handle-directory-files-and-attributes' if neither stat
+ nor perl are available on the remote host.
+
+ * tramp-smb.el (tramp-smb-handle-insert-directory): Mark trailing
+ "/". Write long listing only when "l" belongs to the switches.
+
2014-02-16 Michael Albinus <michael.albinus(a)gmx.de>
Version 2.2.9 released.
@@ -213,7 +558,7 @@
* tramp-smb.el (tramp-smb-acl-program): New customer option.
(tramp-smb-errors): Add error messages.
(tramp-smb-actions-with-acl): New defconst.
- (tramp-smb-file-name-handler-alist) [set-file-acl]: Add handler.
+ (tramp-smb-file-name-handler-alist) <set-file-acl>: Add handler.
(tramp-smb-action-with-acl, tramp-smb-handle-set-file-acl): New defuns.
(tramp-smb-handle-file-acl): Rewrite, using "smbcacls".
(tramp-smb-handle-file-attributes): Simplify test for "stat" capability.
@@ -483,18 +828,18 @@
* tramp-adb.el (tramp-adb-file-name-handler-alist): Order
alphabetically.
- [access-file, add-name-to-file, dired-call-process]:
- [dired-compress-file, file-acl, file-notify-rm-watch]:
- [file-ownership-preserved-p, file-selinux-context]:
- [make-directory-internal, make-symbolic-link, set-file-acl]:
- [set-file-selinux-context, set-visited-file-modtime]:
- [verify-visited-file-modtime]: Add handler.
+ <access-file, add-name-to-file, dired-call-process>:
+ <dired-compress-file, file-acl, file-notify-rm-watch>:
+ <file-ownership-preserved-p, file-selinux-context>:
+ <make-directory-internal, make-symbolic-link, set-file-acl>:
+ <set-file-selinux-context, set-visited-file-modtime>:
+ <verify-visited-file-modtime>: Add handler.
(tramp-adb-handle-write-region): Apply `set-visited-file-modtime'.
* tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
- [file-notify-add-watch, file-notify-rm-watch]:
- [set-file-times, set-visited-file-modtime]:
- [verify-visited-file-modtime]: Add handler.
+ <file-notify-add-watch, file-notify-rm-watch>:
+ <set-file-times, set-visited-file-modtime>:
+ <verify-visited-file-modtime>: Add handler.
(with-tramp-gvfs-error-message)
(tramp-gvfs-handle-set-visited-file-modtime)
(tramp-gvfs-fuse-file-name): Remove.
@@ -504,8 +849,8 @@
* tramp-sh.el (tramp-sh-file-name-handler-alist): Order
alphabetically.
- [file-notify-rm-watch ]: Use default Tramp handler.
- [executable-find]: Remove private handler.
+ <file-notify-rm-watch>: Use default Tramp handler.
+ <executable-find>: Remove private handler.
(tramp-do-copy-or-rename-file-out-of-band): Do not bind
`default-directory'.
(tramp-sh-handle-executable-find)
@@ -515,8 +860,8 @@
Do not use `format' in `tramp-message'.
* tramp-smb.el (tramp-smb-file-name-handler-alist)
- [file-notify-rm-watch, set-visited-file-modtime]:
- [verify-visited-file-modtime]: Add handler.
+ <file-notify-rm-watch, set-visited-file-modtime>:
+ <verify-visited-file-modtime>: Add handler.
(tramp-smb-call-winexe): Do not bind `default-directory'.
2013-07-29 Michael Albinus <michael.albinus(a)gmx.de>
@@ -574,7 +919,7 @@
* tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* tramp-sh.el (tramp-maybe-open-connection):
Use `tramp-connection-timeout'.
- (tramp-methods) [su, sudo, ksu]: Add method specific timeouts.
+ (tramp-methods) <su, sudo, ksu>: Add method specific timeouts.
2013-07-10 Michael Albinus <michael.albinus(a)gmx.de>
@@ -718,13 +1063,13 @@
(tramp-gvfs-methods-mounttracker, tramp-gvfs-listmounts)
(tramp-gvfs-mountlocation, tramp-gvfs-mountlocation-signature):
New defconst.
- (tramp-gvfs-file-name-handler-alist) [directory-files]:
- [directory-files-and-attributes, file-exists-p, file-modes]: Use
+ (tramp-gvfs-file-name-handler-alist) <directory-files>:
+ <directory-files-and-attributes, file-exists-p, file-modes>: Use
Tramp default handler.
- [file-acl, file-selinux-context, process-file, set-file-acl]:
- [set-file-modes, set-file-selinux-context, shell-command]:
- [start-file-process ]: Remove handler.
- [verify-visited-file-modtime]: New handler.
+ <file-acl, file-selinux-context, process-file, set-file-acl>:
+ <set-file-modes, set-file-selinux-context, shell-command>:
+ <start-file-process>: Remove handler.
+ <verify-visited-file-modtime>: New handler.
(tramp-gvfs-dbus-string-to-byte-array)
(tramp-gvfs-dbus-byte-array-to-string): New defuns. Replace all
calls of `dbus-string-to-byte-array' and
@@ -801,7 +1146,7 @@
(tramp-find-method): Check for obsolete methods. Map them to a
replacement method if appropriate.
- * tramp-sh.el (tramp-methods) [scp1, scp2, ssh1, ssh2, plink1]:
+ * tramp-sh.el (tramp-methods) <scp1, scp2, ssh1, ssh2, plink1>:
Remove methods.
(top): Remove completion functions for "scp1", "scp2",
"ssh1",
"ssh2" and "plink1".
@@ -901,10 +1246,10 @@
replacing `tramp-detect-ssh-controlmaster'.
(tramp-default-method): Use it.
- * tramp-sh.el (tramp-methods) [scp, scp1, scp2, scpx, sftp]:
- [rsync, ssh, ssh1, ssh2, sshx]: Add ControlPath and ControlMaster
+ * tramp-sh.el (tramp-methods) <scp, scp1, scp2, scpx, sftp>:
+ <rsync, ssh, ssh1, ssh2, sshx>: Add ControlPath and ControlMaster
arguments.
- [scpc, rsyncc]: Remove methods.
+ <scpc, rsyncc>: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc",
"ssh1_old"
and "ssh2_old".
(tramp-do-copy-or-rename-file-out-of-band): Change trace level.
@@ -5541,7 +5886,7 @@
macros by their implementations where necessary. Requested by
Richard Stallman <rms(a)gnu.org>.
- * tramp.el (tramp-file-name-p, tramp-file-name-method,
+ * tramp.el (tramp-file-name-p, tramp-file-name-method)
(tramp-file-name-user, tramp-file-name-host)
(tramp-file-name-localname): New defuns, replacing defstruct
`tramp-file-name'.
@@ -6664,7 +7009,7 @@
2006-01-27 Michael Albinus <michael.albinus(a)gmx.de>
- * tramp.el, tramp-cache.el, tramp-ftp.el, tramp-util.el,
+ * tramp.el, tramp-cache.el, tramp-ftp.el, tramp-util.el:
* tramp-vc.el: Add code for unloading Tramp. See comment before
`tramp-unload-tramp' for checklist.
@@ -10246,8 +10591,8 @@
Version 2.0.10 released.
- * tramp.el (tramp-perl-encode-with-module,
- tramp-perl-decode-with-module)
+ * tramp.el (tramp-perl-encode-with-module)
+ (tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode): Doc fix. From Andreas
Schwab.
(tramp-bug): New variables to report.
@@ -11281,8 +11626,8 @@
meridian-enviro dot com.
(tramp-find-executable): Use a shell-based implementation for
tramp-find-executable. Suggestion from Francesco Potortì.
- (tramp-buffer-name, tramp-buffer-name-multi-method,
- tramp-debug-buffer-name): Better buffer name format for omitted
+ (tramp-buffer-name, tramp-buffer-name-multi-method)
+ (tramp-debug-buffer-name): Better buffer name format for omitted
user names.
2001-01-19 Kai Großjohann <Kai.Grossjohann(a)CS.Uni-Dortmund.DE>
@@ -11292,9 +11637,9 @@
2001-01-18 Kai Großjohann <Kai.Grossjohann(a)CS.Uni-Dortmund.DE>
- * tramp.el (tramp-open-connection-telnet,
- tramp-open-connection-rsh, tramp-open-connection-su,
- tramp-open-connection-multi): Locally bind TERM env var to "dumb"
+ * tramp.el (tramp-open-connection-telnet)
+ (tramp-open-connection-rsh, tramp-open-connection-su)
+ (tramp-open-connection-multi): Locally bind TERM env var to "dumb"
before starting the login on the remote host.
2001-01-13 Kai Großjohann <Kai.Grossjohann(a)CS.Uni-Dortmund.DE>
@@ -11352,8 +11697,8 @@
2000-11-01 Kai Großjohann <Kai.Grossjohann(a)CS.Uni-Dortmund.DE>
* tramp.el (tramp-dos-coding-system): New variable.
- (tramp-open-connection-telnet, tramp-open-connection-rsh,
- tramp-open-connection-su, tramp-open-connection-multi): Use it.
+ (tramp-open-connection-telnet, tramp-open-connection-rsh)
+ (tramp-open-connection-su, tramp-open-connection-multi): Use it.
(tramp-coding-system-change-eol-conversion): New compat function.
(tramp-open-connection-setup-interactive-shell): Use it.
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r
2a6a5aaac4f982497ce8c38509396c9008aa0dd6 lisp/tramp-adb.el
--- a/lisp/tramp-adb.el
+++ b/lisp/tramp-adb.el
@@ -38,7 +38,6 @@
;; Pacify byte-compiler.
(defvar directory-sep-char)
-(defvar dired-move-to-filename-regexp)
(defcustom tramp-adb-program "adb"
"Name of the Android Debug Bridge program."
@@ -134,13 +133,13 @@
(find-backup-file-name . tramp-handle-find-backup-file-name)
;; `find-file-noselect' performed by default handler.
;; `get-file-buffer' performed by default handler.
- (insert-directory . tramp-adb-handle-insert-directory)
+ (insert-directory . tramp-handle-insert-directory)
(insert-file-contents . tramp-handle-insert-file-contents)
(load . tramp-handle-load)
(make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
(make-directory . tramp-adb-handle-make-directory)
(make-directory-internal . ignore)
- (make-symbolic-link . ignore)
+ (make-symbolic-link . tramp-handle-make-symbolic-link)
(process-file . tramp-adb-handle-process-file)
(rename-file . tramp-adb-handle-rename-file)
(set-file-acl . ignore)
@@ -187,7 +186,8 @@
result)
(tramp-compat-set-process-query-on-exit-flag p nil)
(while (eq 'run (process-status p))
- (sleep-for 0.1))
+ (accept-process-output p 0.1))
+ (accept-process-output p 0.1)
(goto-char (point-min))
(while (search-forward-regexp "^\\(\\S-+\\)[[:space:]]+device$" nil t)
(add-to-list 'result (list nil (match-string 1))))
@@ -228,98 +228,105 @@
;; code could be shared?
(defun tramp-adb-handle-file-truename (filename)
"Like `file-truename' for Tramp files."
- (with-parsed-tramp-file-name (expand-file-name filename) nil
- (with-tramp-file-property v localname "file-truename"
- (let ((result nil)) ; result steps in reverse order
- (tramp-message v 4 "Finding true name for `%s'" filename)
- (let* ((directory-sep-char ?/)
- (steps (tramp-compat-split-string localname "/"))
- (localnamedir (tramp-run-real-handler
- 'file-name-as-directory (list localname)))
- (is-dir (string= localname localnamedir))
- (thisstep nil)
- (numchase 0)
- ;; Don't make the following value larger than
- ;; necessary. People expect an error message in a
- ;; timely fashion when something is wrong; otherwise
- ;; they might think that Emacs is hung. Of course,
- ;; correctness has to come first.
- (numchase-limit 20)
- symlink-target)
- (while (and steps (< numchase numchase-limit))
- (setq thisstep (pop steps))
- (tramp-message
- v 5 "Check %s"
- (mapconcat 'identity
- (append '("") (reverse result) (list thisstep))
- "/"))
- (setq symlink-target
- (nth 0 (file-attributes
- (tramp-make-tramp-file-name
- method user host
- (mapconcat 'identity
- (append '("")
- (reverse result)
- (list thisstep))
- "/")))))
- (cond ((string= "." thisstep)
- (tramp-message v 5 "Ignoring step `.'"))
- ((string= ".." thisstep)
- (tramp-message v 5 "Processing step `..'")
- (pop result))
- ((stringp symlink-target)
- ;; It's a symlink, follow it.
- (tramp-message v 5 "Follow symlink to %s" symlink-target)
- (setq numchase (1+ numchase))
- (when (file-name-absolute-p symlink-target)
- (setq result nil))
- ;; If the symlink was absolute, we'll get a string
- ;; like "/user@host:/some/target"; extract the
- ;; "/some/target" part from it.
- (when (tramp-tramp-file-p symlink-target)
- (unless (tramp-equal-remote filename symlink-target)
- (tramp-error
- v 'file-error
- "Symlink target `%s' on wrong host" symlink-target))
- (setq symlink-target localname))
- (setq steps
- (append (tramp-compat-split-string
- symlink-target "/")
- steps)))
- (t
- ;; It's a file.
- (setq result (cons thisstep result)))))
- (when (>= numchase numchase-limit)
- (tramp-error
- v 'file-error
- "Maximum number (%d) of symlinks exceeded" numchase-limit))
- (setq result (reverse result))
- ;; Combine list to form string.
- (setq result
- (if result
- (mapconcat 'identity (cons "" result) "/")
- "/"))
- (when (and is-dir (or (string= "" result)
- (not (string= (substring result -1) "/"))))
- (setq result (concat result "/"))))
+ (format
+ "%s%s"
+ (with-parsed-tramp-file-name (expand-file-name filename) nil
+ (tramp-make-tramp-file-name
+ method user host
+ (with-tramp-file-property v localname "file-truename"
+ (let ((result nil)) ; result steps in reverse order
+ (tramp-message v 4 "Finding true name for `%s'" filename)
+ (let* ((directory-sep-char ?/)
+ (steps (tramp-compat-split-string localname "/"))
+ (localnamedir (tramp-run-real-handler
+ 'file-name-as-directory (list localname)))
+ (is-dir (string= localname localnamedir))
+ (thisstep nil)
+ (numchase 0)
+ ;; Don't make the following value larger than
+ ;; necessary. People expect an error message in a
+ ;; timely fashion when something is wrong; otherwise
+ ;; they might think that Emacs is hung. Of course,
+ ;; correctness has to come first.
+ (numchase-limit 20)
+ symlink-target)
+ (while (and steps (< numchase numchase-limit))
+ (setq thisstep (pop steps))
+ (tramp-message
+ v 5 "Check %s"
+ (mapconcat 'identity
+ (append '("") (reverse result) (list thisstep))
+ "/"))
+ (setq symlink-target
+ (nth 0 (file-attributes
+ (tramp-make-tramp-file-name
+ method user host
+ (mapconcat 'identity
+ (append '("")
+ (reverse result)
+ (list thisstep))
+ "/")))))
+ (cond ((string= "." thisstep)
+ (tramp-message v 5 "Ignoring step `.'"))
+ ((string= ".." thisstep)
+ (tramp-message v 5 "Processing step `..'")
+ (pop result))
+ ((stringp symlink-target)
+ ;; It's a symlink, follow it.
+ (tramp-message v 5 "Follow symlink to %s" symlink-target)
+ (setq numchase (1+ numchase))
+ (when (file-name-absolute-p symlink-target)
+ (setq result nil))
+ ;; If the symlink was absolute, we'll get a string
+ ;; like "/user@host:/some/target"; extract the
+ ;; "/some/target" part from it.
+ (when (tramp-tramp-file-p symlink-target)
+ (unless (tramp-equal-remote filename symlink-target)
+ (tramp-error
+ v 'file-error
+ "Symlink target `%s' on wrong host" symlink-target))
+ (setq symlink-target localname))
+ (setq steps
+ (append (tramp-compat-split-string
+ symlink-target "/")
+ steps)))
+ (t
+ ;; It's a file.
+ (setq result (cons thisstep result)))))
+ (when (>= numchase numchase-limit)
+ (tramp-error
+ v 'file-error
+ "Maximum number (%d) of symlinks exceeded" numchase-limit))
+ (setq result (reverse result))
+ ;; Combine list to form string.
+ (setq result
+ (if result
+ (mapconcat 'identity (cons "" result) "/")
+ "/"))
+ (when (and is-dir (or (string= "" result)
+ (not (string= (substring result -1) "/"))))
+ (setq result (concat result "/"))))
- (tramp-message v 4 "True name of `%s' is `%s'" filename
result)
- (tramp-make-tramp-file-name method user host result)))))
+ (tramp-message v 4 "True name of `%s' is `%s'" localname result)
+ result))))
+
+ ;; Preserve trailing "/".
+ (if (string-equal (file-name-nondirectory filename) "") "/"
"")))
(defun tramp-adb-handle-file-attributes (filename &optional id-format)
"Like `file-attributes' for Tramp files."
(unless id-format (setq id-format 'integer))
- (ignore-errors
- (with-parsed-tramp-file-name filename nil
- (with-tramp-file-property
- v localname (format "file-attributes-%s" id-format)
- (tramp-adb-barf-unless-okay
- v (format "%s -d -l %s"
- (tramp-adb-get-ls-command v)
- (tramp-shell-quote-argument localname)) "")
- (with-current-buffer (tramp-get-buffer v)
- (tramp-adb-sh-fix-ls-output)
- (cdar (tramp-do-parse-file-attributes-with-ls v id-format)))))))
+ (with-parsed-tramp-file-name filename nil
+ (with-tramp-file-property
+ v localname (format "file-attributes-%s" id-format)
+ (and
+ (tramp-adb-send-command-and-check
+ v (format "%s -d -l %s"
+ (tramp-adb-get-ls-command v)
+ (tramp-shell-quote-argument localname)))
+ (with-current-buffer (tramp-get-buffer v)
+ (tramp-adb-sh-fix-ls-output)
+ (cdar (tramp-do-parse-file-attributes-with-ls v id-format)))))))
(defun tramp-do-parse-file-attributes-with-ls (vec &optional id-format)
"Parse `file-attributes' for Tramp files using the ls(1) command."
@@ -366,11 +373,19 @@
(with-tramp-file-property
v localname (format "directory-files-attributes-%s-%s-%s-%s"
full match id-format nosort)
- (tramp-adb-barf-unless-okay
- v (format "%s -a -l %s"
- (tramp-adb-get-ls-command v)
- (tramp-shell-quote-argument localname)) "")
(with-current-buffer (tramp-get-buffer v)
+ (when (tramp-adb-send-command-and-check
+ v (format "%s -a -l %s"
+ (tramp-adb-get-ls-command v)
+ (tramp-shell-quote-argument localname)))
+ ;; We insert also filename/. and filename/.., because "ls" doesn't.
+ (narrow-to-region (point) (point))
+ (tramp-adb-send-command
+ v (format "%s -d -a -l %s %s"
+ (tramp-adb-get-ls-command v)
+ (concat (file-name-as-directory localname) ".")
+ (concat (file-name-as-directory localname) "..")))
+ (widen))
(tramp-adb-sh-fix-ls-output)
(let ((result (tramp-do-parse-file-attributes-with-ls
v (or id-format 'integer))))
@@ -392,8 +407,7 @@
(defun tramp-adb-get-ls-command (vec)
(with-tramp-connection-property vec "ls"
(tramp-message vec 5 "Finding a suitable `ls' command")
- (if (zerop (tramp-adb-command-exit-status
- vec "ls --color=never -al /dev/null"))
+ (if (tramp-adb-send-command-and-check vec "ls --color=never -al
/dev/null")
;; On CyanogenMod based system BusyBox is used and "ls" output
;; coloring is enabled by default. So we try to disable it
;; when possible.
@@ -417,35 +431,6 @@
(and (not (string-match "\\(^--\\|^[^-]\\)" s)) s))
switches))))))
-(defun tramp-adb-handle-insert-directory
- (filename switches &optional _wildcard _full-directory-p)
- "Like `insert-directory' for Tramp files."
- (when (stringp switches)
- (setq switches (tramp-adb--gnu-switches-to-ash (split-string switches))))
- (with-parsed-tramp-file-name (file-truename filename) nil
- (with-current-buffer (tramp-get-buffer v)
- (let ((name (tramp-shell-quote-argument (directory-file-name localname)))
- (switch-d (member "-d" switches))
- (switch-t (member "-t" switches))
- (switches (mapconcat 'identity (remove "-t" switches) "
")))
- (tramp-adb-barf-unless-okay
- v (format "%s %s %s" (tramp-adb-get-ls-command v) switches name)
- "Cannot insert directory listing: %s" filename)
- (unless switch-d
- ;; We insert also filename/. and filename/.., because "ls" doesn't.
- (narrow-to-region (point) (point))
- (ignore-errors
- (tramp-adb-barf-unless-okay
- v (format "%s -d %s %s %s"
- (tramp-adb-get-ls-command v)
- switches
- (concat (file-name-as-directory name) ".")
- (concat (file-name-as-directory name) ".."))
- "Cannot insert directory listing: %s" filename))
- (widen))
- (tramp-adb-sh-fix-ls-output switch-t)))
- (insert-buffer-substring (tramp-get-buffer v))))
-
(defun tramp-adb-sh-fix-ls-output (&optional sort-by-time)
"Insert dummy 0 in empty size columns.
Androids \"ls\" command doesn't insert size column for directories:
@@ -489,9 +474,9 @@
(defun tramp-adb-ls-output-name-less-p (a b)
"Sort \"ls\" output by name, ascending."
(let (posa posb)
- (string-match dired-move-to-filename-regexp a)
+ (string-match directory-listing-before-filename-regexp a)
(setq posa (match-end 0))
- (string-match dired-move-to-filename-regexp b)
+ (string-match directory-listing-before-filename-regexp b)
(setq posb (match-end 0))
(string-lessp (substring a posa) (substring b posb))))
@@ -506,7 +491,8 @@
(tramp-adb-barf-unless-okay
v (format "mkdir %s" (tramp-shell-quote-argument localname))
"Couldn't make directory %s" dir)
- (tramp-flush-directory-property v (file-name-directory localname))))
+ (tramp-flush-file-property v (file-name-directory localname))
+ (tramp-flush-directory-property v localname)))
(defun tramp-adb-handle-delete-directory (directory &optional recursive)
"Like `delete-directory' for Tramp files."
@@ -538,20 +524,22 @@
(with-tramp-file-property v localname "file-name-all-completions"
(save-match-data
(tramp-adb-send-command
- v (format "%s %s"
+ v (format "%s -a %s"
(tramp-adb-get-ls-command v)
(tramp-shell-quote-argument localname)))
(mapcar
(lambda (f)
- (if (file-directory-p f)
+ (if (file-directory-p (expand-file-name f directory))
(file-name-as-directory f)
f))
(with-current-buffer (tramp-get-buffer v)
- (delq
- nil
- (mapcar
- (lambda (l) (and (not (string-match "^[[:space:]]*$" l)) l))
- (split-string (buffer-string) "\n"))))))))))
+ (append
+ '("." "..")
+ (delq
+ nil
+ (mapcar
+ (lambda (l) (and (not (string-match "^[[:space:]]*$" l)) l))
+ (split-string (buffer-string) "\n")))))))))))
(defun tramp-adb-handle-file-local-copy (filename)
"Like `file-local-copy' for Tramp files."
@@ -567,7 +555,10 @@
(delete-file tmpfile)
(tramp-error
v 'file-error "Cannot make local copy of file `%s'" filename))
- (set-file-modes tmpfile (file-modes filename)))
+ (set-file-modes
+ tmpfile
+ (logior (or (file-modes filename) 0)
+ (tramp-compat-octal-to-decimal "0400"))))
tmpfile)))
(defun tramp-adb-handle-file-writable-p (filename)
@@ -577,9 +568,8 @@
(with-tramp-file-property v localname "file-writable-p"
(if (tramp-adb-find-test-command v)
(if (file-exists-p filename)
- (zerop
- (tramp-adb-command-exit-status
- v (format "test -w %s" (tramp-shell-quote-argument localname))))
+ (tramp-adb-send-command-and-check
+ v (format "test -w %s" (tramp-shell-quote-argument localname)))
(and
(file-directory-p (file-name-directory filename))
(file-writable-p (file-name-directory filename))))
@@ -599,9 +589,6 @@
"Like `write-region' for Tramp files."
(setq filename (expand-file-name filename))
(with-parsed-tramp-file-name filename nil
- (when append
- (tramp-error
- v 'file-error "Cannot append to file using Tramp (`%s')"
filename))
(when (and confirm (file-exists-p filename))
(unless (y-or-n-p (format "File %s exists; overwrite anyway? "
filename))
@@ -612,14 +599,20 @@
(tramp-flush-file-property v localname)
(let* ((curbuf (current-buffer))
(tmpfile (tramp-compat-make-temp-file filename)))
+ (when (and append (file-exists-p filename))
+ (copy-file filename tmpfile 'ok)
+ (set-file-modes
+ tmpfile
+ (logior (or (file-modes tmpfile) 0)
+ (tramp-compat-octal-to-decimal "0600"))))
(tramp-run-real-handler
'write-region
(list start end tmpfile append 'no-message lockname confirm))
(with-tramp-progress-reporter
- v 3 (format "Moving tmp file %s to %s" tmpfile filename)
+ v 3 (format "Moving tmp file `%s' to `%s'" tmpfile filename)
(unwind-protect
(when (tramp-adb-execute-adb-command v "push" tmpfile localname)
- (tramp-error v 'file-error "Cannot write: `%s' filename"))
+ (tramp-error v 'file-error "Cannot write: `%s'" filename))
(delete-file tmpfile)))
(when (or (eq visit t) (stringp visit))
@@ -634,9 +627,8 @@
"Like `set-file-modes' for Tramp files."
(with-parsed-tramp-file-name filename nil
(tramp-flush-file-property v localname)
- (tramp-adb-barf-unless-okay
- v (format "chmod %s %s" (tramp-compat-decimal-to-octal mode) localname)
- "Error while changing file's mode %s" filename)))
+ (tramp-adb-send-command-and-check
+ v (format "chmod %s %s" (tramp-compat-decimal-to-octal mode)
localname))))
(defun tramp-adb-handle-set-file-times (filename &optional time)
"Like `set-file-times' for Tramp files."
@@ -645,8 +637,8 @@
(let ((time (if (or (null time) (equal time '(0 0)))
(current-time)
time)))
- (tramp-adb-command-exit-status
- ;; use shell arithmetic because of Emacs integer size limit
+ (tramp-adb-send-command-and-check
+ ;; Use shell arithmetic because of Emacs integer size limit.
v (format "touch -t $(( %d * 65536 + %d )) %s"
(car time) (cadr time)
(tramp-shell-quote-argument localname))))))
@@ -704,32 +696,36 @@
(setq filename (expand-file-name filename)
newname (expand-file-name newname))
- (with-parsed-tramp-file-name
- (if (tramp-tramp-file-p filename) filename newname) nil
- (with-tramp-progress-reporter
- v 0 (format "Renaming %s to %s" newname filename)
+ (let ((t1 (tramp-tramp-file-p filename))
+ (t2 (tramp-tramp-file-p newname)))
+ (with-parsed-tramp-file-name (if t1 filename newname) nil
+ (with-tramp-progress-reporter
+ v 0 (format "Renaming %s to %s" filename newname)
- (if (and (tramp-equal-remote filename newname)
- (not (file-directory-p filename)))
- (progn
- (when (and (not ok-if-already-exists)
- (file-exists-p newname))
- (tramp-error v 'file-already-exists newname))
- ;; We must also flush the cache of the directory, because
- ;; `file-attributes' reads the values from there.
- (tramp-flush-file-property v (file-name-directory localname))
- (tramp-flush-file-property v localname)
- ;; Short track.
- (tramp-adb-barf-unless-okay
- v (format
- "mv %s %s"
- (tramp-file-name-handler 'file-remote-p filename 'localname)
- localname)
- "Error renaming %s to %s" filename newname))
+ (if (and t1 t2
+ (tramp-equal-remote filename newname)
+ (not (file-directory-p filename)))
+ (let ((l1 (tramp-file-name-handler
+ 'file-remote-p filename 'localname))
+ (l2 (tramp-file-name-handler
+ 'file-remote-p newname 'localname)))
+ (when (and (not ok-if-already-exists)
+ (file-exists-p newname))
+ (tramp-error v 'file-already-exists newname))
+ ;; We must also flush the cache of the directory, because
+ ;; `file-attributes' reads the values from there.
+ (tramp-flush-file-property v (file-name-directory l1))
+ (tramp-flush-file-property v l1)
+ (tramp-flush-file-property v (file-name-directory l2))
+ (tramp-flush-file-property v l2)
+ ;; Short track.
+ (tramp-adb-barf-unless-okay
+ v (format "mv %s %s" l1 l2)
+ "Error renaming %s to %s" filename newname))
- ;; Rename by copy.
- (copy-file filename newname ok-if-already-exists t t)
- (delete-file filename)))))
+ ;; Rename by copy.
+ (copy-file filename newname ok-if-already-exists t t)
+ (delete-file filename))))))
(defun tramp-adb-handle-process-file
(program &optional infile destination display &rest args)
@@ -1002,7 +998,8 @@
(with-temp-buffer
(prog1
(unless
- (zerop (apply 'tramp-call-process tramp-adb-program nil t nil args))
+ (zerop
+ (apply 'tramp-call-process vec tramp-adb-program nil t nil args))
(buffer-string))
(tramp-message vec 6 "%s" (buffer-string)))))
@@ -1010,7 +1007,7 @@
"Checks, whether the ash has a builtin \"test\" command.
This happens for Android >= 4.0."
(with-tramp-connection-property vec "test"
- (zerop (tramp-adb-command-exit-status vec "type test"))))
+ (tramp-adb-send-command-and-check vec "type test")))
;; Connection functions
@@ -1033,9 +1030,9 @@
(while (re-search-forward "\r+$" nil t)
(replace-match "" nil nil)))))
-(defun tramp-adb-command-exit-status
+(defun tramp-adb-send-command-and-check
(vec command)
- "Run COMMAND and return its exit status.
+ "Run COMMAND and and check its exit status.
Sends `echo $?' along with the COMMAND for checking the exit status. If
COMMAND is nil, just sends `echo $?'. Returns the exit status found."
(tramp-adb-send-command
@@ -1049,14 +1046,14 @@
vec 'file-error "Couldn't find exit status of `%s'"
command))
(skip-chars-forward "^ ")
(prog1
- (read (current-buffer))
+ (zerop (read (current-buffer)))
(let (buffer-read-only)
(delete-region (match-beginning 0) (point-max))))))
(defun tramp-adb-barf-unless-okay (vec command fmt &rest args)
"Run COMMAND, check exit status, throw error if exit status not okay.
FMT and ARGS are passed to `error'."
- (unless (zerop (tramp-adb-command-exit-status vec command))
+ (unless (tramp-adb-send-command-and-check vec command)
(apply 'tramp-error vec 'file-error fmt args)))
(defun tramp-adb-wait-for-output (proc &optional timeout)
@@ -1099,7 +1096,7 @@
(p (get-buffer-process buf))
(host (tramp-file-name-host vec))
(user (tramp-file-name-user vec))
- (devices (mapcar 'cadr (tramp-adb-parse-device-names nil))))
+ devices)
;; Maybe we know already that "su" is not supported. We cannot
;; use a connection property, because we have not checked yet
@@ -1111,6 +1108,7 @@
(and p (processp p) (memq (process-status p) '(run open)))
(save-match-data
(when (and p (processp p)) (delete-process p))
+ (setq devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))
(if (not devices)
(tramp-error vec 'file-error "No device connected"))
(if (and (> (length host) 0) (not (member host devices)))
@@ -1165,7 +1163,7 @@
;; Change user if indicated.
(when user
(tramp-adb-send-command vec (format "su %s" user))
- (unless (zerop (tramp-adb-command-exit-status vec nil))
+ (unless (tramp-adb-send-command-and-check vec nil)
(delete-process p)
(tramp-set-file-property vec "" "su-command-p" nil)
(tramp-error
@@ -1183,5 +1181,9 @@
(read (current-buffer)))
":" 'omit-nulls))))))))
+(add-hook 'tramp-unload-hook
+ (lambda ()
+ (unload-feature 'tramp-adb 'force)))
+
(provide 'tramp-adb)
;;; tramp-adb.el ends here
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r
2a6a5aaac4f982497ce8c38509396c9008aa0dd6 lisp/tramp-cache.el
--- a/lisp/tramp-cache.el
+++ b/lisp/tramp-cache.el
@@ -168,7 +168,7 @@
;;;###tramp-autoload
(defun tramp-flush-file-property (key file)
"Remove all properties of FILE in the cache context of KEY."
- ;; Remove file property of symlinks.
+ ;; Remove file properties of symlinks.
(let ((truename (tramp-get-file-property key file "file-truename" nil)))
(when (and (stringp truename)
(not (string-equal file truename)))
@@ -183,8 +183,13 @@
(defun tramp-flush-directory-property (key directory)
"Remove all properties of DIRECTORY in the cache context of KEY.
Remove also properties of all files in subdirectories."
- (let ((directory (tramp-run-real-handler
- 'directory-file-name (list directory))))
+ (let* ((directory (tramp-run-real-handler
+ 'directory-file-name (list directory)))
+ (truename (tramp-get-file-property key directory "file-truename" nil)))
+ ;; Remove file properties of symlinks.
+ (when (and (stringp truename)
+ (not (string-equal directory truename)))
+ (tramp-flush-directory-property key truename))
(tramp-message key 8 "%s" directory)
(maphash
(lambda (key _value)
@@ -198,13 +203,15 @@
;; not show proper directory contents when a file has been copied or
;; deleted before.
(defun tramp-flush-file-function ()
- "Flush all Tramp cache properties from `buffer-file-name'."
- (let ((bfn (if (stringp (buffer-file-name))
- (buffer-file-name)
- default-directory)))
- (when (tramp-tramp-file-p bfn)
- (with-parsed-tramp-file-name bfn nil
- (tramp-flush-file-property v localname)))))
+ "Flush all Tramp cache properties from `buffer-file-name'.
+This is suppressed for temporary buffers."
+ (unless (string-match "^ \\*temp\\*" (or (buffer-name) ""))
+ (let ((bfn (if (stringp (buffer-file-name))
+ (buffer-file-name)
+ default-directory)))
+ (when (tramp-tramp-file-p bfn)
+ (with-parsed-tramp-file-name bfn nil
+ (tramp-flush-file-property v localname))))))
(add-hook 'before-revert-hook 'tramp-flush-file-function)
(add-hook 'eshell-pre-command-hook 'tramp-flush-file-function)
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r
2a6a5aaac4f982497ce8c38509396c9008aa0dd6 lisp/tramp-compat.el
--- a/lisp/tramp-compat.el
+++ b/lisp/tramp-compat.el
@@ -587,6 +587,7 @@
(add-hook 'tramp-unload-hook
(lambda ()
+ (unload-feature 'tramp-loaddefs 'force)
(unload-feature 'tramp-compat 'force)))
(provide 'tramp-compat)
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r
2a6a5aaac4f982497ce8c38509396c9008aa0dd6 lisp/tramp-efs.el
--- a/lisp/tramp-efs.el
+++ b/lisp/tramp-efs.el
@@ -171,10 +171,6 @@
tramp-efs-method
'((tramp-parse-netrc "~/.netrc"))))
-;; If there is URL syntax, `substitute-in-file-name' needs special
-;; handling.
-(put 'substitute-in-file-name 'efs 'tramp-handle-substitute-in-file-name)
-
;;;###tramp-autoload
(defun tramp-efs-file-name-handler (operation &rest args)
"Invoke the EFS handler for OPERATION.
This diff is so big that we needed to truncate the remainder.
Repository URL:
https://bitbucket.org/xemacs/tramp/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches