1 new commit in tramp:
https://bitbucket.org/xemacs/tramp/commits/51acc30e700b/
Changeset: 51acc30e700b
User: albinus
Date: 2013-10-04 11:15:13
Summary: Version 2.2.8 released.
Affected #: 19 files
diff -r 207075d5c8de0360bbd4db340b8db5dc44f5aecc -r
51acc30e700b795edb8d7b4fd020d61ce152dad2 ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-04 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * Makefile (AUTHOR_VERSION): Bump to 2.2.8.
+
2013-03-19 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.45 released.
diff -r 207075d5c8de0360bbd4db340b8db5dc44f5aecc -r
51acc30e700b795edb8d7b4fd020d61ce152dad2 ChangeLog.upstream
--- a/ChangeLog.upstream
+++ b/ChangeLog.upstream
@@ -1,3 +1,22 @@
+2013-10-02 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Version 2.2.8 released.
+
+ * configure.ac: Bump version.
+
+2013-09-08 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * .gitignore: Remove *.elc. Moved to lisp/.gitignore.
+
+2013-08-15 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * .gitignore: Add *.elc.
+
+2013-03-18 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * configure.ac: Bump version (to 2.2.8-pre). Update merge
+ version to 2.2.7.
+
2013-03-15 Michael Albinus <michael.albinus(a)gmx.de>
Version 2.2.7 released.
diff -r 207075d5c8de0360bbd4db340b8db5dc44f5aecc -r
51acc30e700b795edb8d7b4fd020d61ce152dad2 Makefile
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@
# Boston, MA 02111-1307, USA.
VERSION = 1.45
-AUTHOR_VERSION = 2.2.7
+AUTHOR_VERSION = 2.2.8
MAINTAINER = Michael Albinus <michael.albinus(a)gmx.de>
PACKAGE = tramp
PKG_TYPE = regular
diff -r 207075d5c8de0360bbd4db340b8db5dc44f5aecc -r
51acc30e700b795edb8d7b4fd020d61ce152dad2 lisp/.cvsignore
--- a/lisp/.cvsignore
+++ b/lisp/.cvsignore
@@ -0,0 +1,4 @@
+Makefile
+semantic.cache
+tramp-loaddefs.el
+trampver.el
diff -r 207075d5c8de0360bbd4db340b8db5dc44f5aecc -r
51acc30e700b795edb8d7b4fd020d61ce152dad2 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,473 @@
+2013-10-02 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Version 2.2.8 released.
+
+ * tramp-cmds.el (tramp-bug, tramp-append-tramp-buffers):
+ * tramp-cache.el (tramp-cache-print): Use `tramp-compat-funcall'.
+
+2013-09-19 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-get-remote-id): Do not raise an error.
+ (tramp-get-remote-uid-with-id, tramp-get-remote-gid-with-id)
+ (tramp-get-remote-python): New defuns.
+ (tramp-get-remote-uid-with-perl)
+ (tramp-get-remote-gid-with-perl): New defuns. Perl code
+ contributed by yary <not.com(a)gmail.com> (tiny change).
+ (tramp-get-remote-uid-with-python)
+ (tramp-get-remote-gid-with-python): New defuns. Python code
+ contributed by Andrey Tykhonov <atykhonov(a)gmail.com> (tiny change).
+ (tramp-get-remote-uid, tramp-get-remote-gid): Use new defuns.
+
+2013-09-12 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-check-proper-method-and-host): Rename it from
+ `tramp-check-proper-host'. Check for a valid method name.
+
+ * tramp-adb.el (tramp-adb-maybe-open-connection):
+ * tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
+ * tramp-sh.el (tramp-maybe-open-connection):
+ * tramp-smb.el (tramp-smb-maybe-open-connection): Call it.
+
+ * tramp-cache.el (tramp-cache-print): Don't print text properties
+ also for hash values.
+
+2013-09-10 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-cleanup): Remove. Functionality added to
+ `tramp-cleanup-connection'.
+
+ * tramp-cmds.el (tramp-cleanup-connection): Add optional
+ parameters KEEP-DEBUG and KEEP-PASSWORD.
+
+ * tramp.el (tramp-file-name-handler):
+ * tramp-adb.el (tramp-adb-maybe-open-connection):
+ * tramp-sh.el (tramp-open-connection-setup-interactive-shell)
+ (tramp-maybe-open-connection):
+ * tramp-smb.el (tramp-smb-maybe-open-connection): Use
+ `tramp-cleanup-connection'.
+
+2013-09-09 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-open-connection-setup-interactive-shell): Do
+ not clear password when throwing 'uname-changed.
+ (tramp-maybe-open-connection): Catch 'uname-changed inside the
+ progress reporter.
+
+2013-09-08 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Improve compatibility with older Emacsen, and XEmacs.
+
+ * .gitignore: Add files.
+
+ * tramp.el (tramp-find-method, tramp-find-user): Call `propertize'
+ only if it is bound. It isn't for XEmacs.
+ (with-tramp-progress-reporter): Do not let-bind `result'. This
+ yields to scoping errors in XEmacs.
+ (tramp-handle-make-auto-save-file-name): New function, moved from
+ tramp-sh.el.
+
+ * tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler
+ for `make-auto-save-file-name'.
+ (tramp-adb--gnu-switches-to-ash): Use
+ `tramp-compat-replace-regexp-in-string'.
+
+ * tramp-cache.el (tramp-cache-print): Call
+ `substring-no-properties' only if it is bound. It isn't for XEmacs.
+
+ * tramp-cmds.el (tramp-bug): Call `propertize' only if it is
+ bound. It isn't for XEmacs.
+
+ * tramp-compat.el (tramp-compat-copy-file): Catch
+ `wrong-number-of-arguments' error.
+ (tramp-compat-replace-regexp-in-string): New defun.
+
+ * tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler
+ for `make-auto-save-file-name'.
+ (tramp-gvfs-handle-copy-file): Use `tramp-compat-funcall' for
+ `copy-file'.
+ (tramp-gvfs-file-gvfs-monitor-file-process-filter)
+ (tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'.
+ (tramp-synce-list-devices): Use `push' instead of `pushnew'.
+
+ * tramp-gw.el (tramp-gw-open-network-stream): Use
+ `tramp-compat-replace-regexp-in-string'.
+
+ * tramp-sh.el (tramp-sh-file-name-handler-alist): Call
+ `tramp-handle-make-auto-save-file-name'.
+ (tramp-sh-handle-make-auto-save-file-name): Move to tramp.el.
+ (tramp-sh-file-gvfs-monitor-dir-process-filter)
+ (tramp-sh-file-inotifywait-process-filter): Use
+ `tramp-compat-replace-regexp-in-string'.
+ (tramp-compute-multi-hops): Use `push' instead of `pushnew'.
+
+ * tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler
+ for `make-auto-save-file-name'.
+ (tramp-smb-handle-copy-directory): Call
+ `tramp-compat-replace-regexp-in-string'.
+ (tramp-smb-get-file-entries): Use `push' instead of `pushnew'.
+ (tramp-smb-handle-copy-file): Improve error message.
+ (tramp-smb-handle-rename-file): Rename directly only in case
+ `newname' does not exist yet. This is a restriction of smbclient.
+ (tramp-smb-maybe-open-connection): Rerun the function only when
+ `auth-sources' is non-nil.
+
+2013-09-06 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Remove URL syntax.
+
+ * tramp.el (tramp-syntax, tramp-prefix-format)
+ (tramp-postfix-method-format, tramp-prefix-ipv6-format)
+ (tramp-postfix-ipv6-format, tramp-prefix-port-format)
+ (tramp-postfix-host-format, tramp-file-name-regexp)
+ (tramp-completion-file-name-regexp)
+ (tramp-completion-dissect-file-name)
+ (tramp-handle-substitute-in-file-name): Remove 'url case.
+ (tramp-file-name-regexp-url)
+ (tramp-completion-file-name-regexp-url): Remove constants.
+
+2013-09-03 Stefan Monnier <monnier(a)iro.umontreal.ca>
+
+ * tramp.el (with-parsed-tramp-file-name):
+ * tramp-compat.el (tramp-compat-with-temp-message): Silence
+ compiler warnings, and factor out common code.
+
+ * tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices):
+ * tramp-smb.el (tramp-smb-get-file-entries):
+ * tramp-sh.el (tramp-sh-handle-insert-directory)
+ (tramp-compute-multi-hops): Fix misuses of `add-to-list'.
+
+2013-09-02 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-compat.el (tramp-compat-user-error): Move it ...
+ * tramp.el (tramp-user-error): ... here.
+ (tramp-find-method, tramp-check-proper-host)
+ (tramp-dissect-file-name, tramp-debug-message)
+ (tramp-handle-shell-command):
+ * tramp-adb.el (tramp-adb-handle-shell-command):
+ * tramp-gvfs.el (tramp-gvfs-file-name-handler): Adapt callees.
+
+ * tramp-cache.el (tramp-cache-print): Don't print text properties.
+
+2013-08-29 Stefan Monnier <monnier(a)iro.umontreal.ca>
+
+ Misc changes to reduce use of `(lambda...); and other cleanups.
+ * tramp.el (with-tramp-progress-reporter): Avoid setq.
+
+2013-08-26 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-find-method, tramp-find-user): Mark result with
+ text property `tramp-default', if appropriate.
+ (tramp-check-proper-host): New defun.
+ (tramp-dissect-file-name): Do not check hostname. Revert change
+ of 2013-03-18.
+ (tramp-backtrace): Make VEC-OR-PROC optional.
+
+ * tramp-adb.el (tramp-adb-maybe-open-connection):
+ * tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
+ * tramp-sh.el (tramp-maybe-open-connection):
+ * tramp-smb.el (tramp-smb-maybe-open-connection): Apply
+ `tramp-check-proper-host'.
+
+ * tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime):
+ BUF can be optional. (Bug#15186)
+
+2013-08-17 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el:
+ * tramp-adb.el:
+ * tramp-cmds.el:
+ * tramp-efs.el:
+ * tramp-ftp.el:
+ * tramp-gvfs.el:
+ * tramp-gw.el:
+ * tramp-sh.el: Don't wrap external variable declarations by
+ `eval-when-compile'.
+
+2013-08-16 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-cmds.el (top): Don't declare `buffer-name'.
+ (tramp-append-tramp-buffers): Rewrite buffer local variables part.
+
+2013-08-15 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Remove byte compiler warnings, visible when compiling with
+ `byte-compile-force-lexical-warnings' set to t.
+
+ * tramp.el (tramp-debug-message, tramp-message, tramp-error)
+ (tramp-error-with-buffer): Rename ARGS to ARGUMENTS and BUFFER to BUF.
+ (tramp-handle-unhandled-file-name-directory)
+ (tramp-handle-file-notify-add-watch, tramp-action-login)
+ (tramp-action-succeed, tramp-action-permission-denied)
+ (tramp-action-terminal, tramp-action-process-alive): Prefix unused
+ arguments with "_".
+
+ * tramp-adb.el (tramp-adb-parse-device-names)
+ (tramp-adb-handle-insert-directory, tramp-adb-handle-delete-file)
+ (tramp-adb-handle-copy-file): Prefix unused arguments with "_".
+ (tramp-adb-handle-file-truename): Remove unused arguments.
+
+ * tramp-cache.el (tramp-flush-directory-property)
+ (tramp-flush-connection-property, tramp-list-connections)
+ (tramp-parse-connection-properties): Prefix unused arguments with "_".
+
+ * tramp-compat.el (tramp-compat-make-temp-file): Rename FILENAME to F.
+
+ * tramp-efs.el (top, tramp-efs-file-name-handler): Use `mapc'.
+
+ * tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch)
+ (tramp-gvfs-handle-write-region, tramp-bluez-parse-device-names)
+ (tramp-zeroconf-parse-workstation-device-names)
+ (tramp-zeroconf-parse-webdav-device-names)
+ (tramp-synce-parse-device-names): Prefix unused arguments with "_".
+
+ * tramp-gw.el (tramp-gw-gw-proc-sentinel)
+ (tramp-gw-aux-proc-sentinel): Prefix unused arguments with "_".
+
+ * tramp-sh.el (tramp-sh-handle-file-truename): Remove unused arguments.
+ (tramp-sh-handle-copy-file, tramp-sh-handle-dired-compress-file)
+ (tramp-sh-handle-insert-file-contents-literally)
+ (tramp-sh-handle-file-notify-add-watch): Prefix unused arguments
+ with "_".
+ (tramp-do-copy-or-rename-file, tramp-barf-if-no-shell-prompt):
+ Remove unused variables.
+
+ * tramp-smb.el (tramp-smb-handle-copy-directory)
+ (tramp-smb-handle-copy-file, tramp-smb-handle-delete-file)
+ (tramp-smb-read-file-entry): Prefix unused arguments with "_".
+
+ * tramp-uu.el (tramp-uu-b64-alphabet, tramp-uu-b64-char-to-byte):
+ Make them a defconst.
+ (tramp-uuencode-region): Remove unused variable.
+
+2013-08-01 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Complete file name handlers.
+
+ * tramp.el (tramp-handle-set-visited-file-modtime)
+ (tramp-handle-verify-visited-file-modtime)
+ (tramp-handle-file-notify-rm-watch): New functions.
+ (tramp-call-process): Do not bind `default-directory'.
+
+ * 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.
+ (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.
+ (with-tramp-gvfs-error-message)
+ (tramp-gvfs-handle-set-visited-file-modtime)
+ (tramp-gvfs-fuse-file-name): Remove.
+ (tramp-gvfs-handle-file-notify-add-watch)
+ (tramp-gvfs-file-gvfs-monitor-file-process-filter): New defuns.
+ (tramp-gvfs-handle-write-region): Fix error in moving tmpfile.
+
+ * tramp-sh.el (tramp-sh-file-name-handler-alist): Order
+ alphabetically.
+ [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)
+ (tramp-sh-handle-file-notify-rm-watch): Remove functions.
+ (tramp-sh-file-gvfs-monitor-dir-process-filter)
+ (tramp-sh-file-inotifywait-process-filter, tramp-set-remote-path):
+ 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.
+ (tramp-smb-call-winexe): Do not bind `default-directory'.
+
+2013-07-29 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-use-ssh-controlmaster-options): New customer option.
+
+ * tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
+ (tramp-maybe-open-connection): Use it.
+
+2013-07-24 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-file-name-for-operation):
+ * tramp-adb.el (tramp-adb-file-name-handler-alist):
+ * tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
+ * tramp-smb.el (tramp-smb-file-name-handler-alist):
+ * tramp-sh.el (tramp-sh-file-name-handler-alist):
+ Remove `file-notify-supported-p' entry.
+ (tramp-sh-handle-file-notify-supported-p): Remove function.
+
+2013-07-23 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-handle-file-notify-add-watch): New defun.
+
+ * tramp-adb.el (tramp-adb-file-name-handler-alist):
+ * tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
+ * tramp-smb.el (tramp-smb-file-name-handler-alist): Use it.
+
+2013-07-18 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-file-name-for-operation):
+ Add `file-notify-supported-p'.
+
+ * tramp-sh.el (tramp-sh-handle-file-notify-supported-p):
+ New defun.
+ (tramp-sh-file-name-handler-alist): Add it as handler for
+ `file-notify-supported-p '.
+
+ * tramp-adb.el (tramp-adb-file-name-handler-alist):
+ * tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
+ * tramp-smb.el (tramp-smb-file-name-handler-alist):
+ Add `ignore' as handler for `file-notify-*' functions.
+
+2013-07-14 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-vc-registered): Use `ignore-error'.
+
+2013-07-11 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-methods): Extend docstring.
+ (tramp-connection-timeout): New defcustom.
+ (tramp-error-with-buffer): Reset timestamp only when appropriate.
+ (with-tramp-progress-reporter): Simplify.
+ (tramp-process-actions): Improve messages.
+
+ * 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.
+
+2013-07-10 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Improve error messages. (Bug#14808)
+
+ * tramp.el (tramp-current-connection): New defvar, moved from
+ tramp-sh.el.
+ (tramp-message-show-progress-reporter-message): Removed, not
+ needed anymore.
+ (tramp-error-with-buffer): Show message in minibuffer. Discard
+ input before waiting. Reset connection timestamp.
+ (with-tramp-progress-reporter): Improve messages.
+ (tramp-process-actions): Use progress reporter. Delete process in
+ case of error. Improve messages.
+
+ * tramp-sh.el (tramp-barf-if-no-shell-prompt): Use
+ condition-case. Call `tramp-error-with-buffer' with vector and buffer.
+ (tramp-current-connection): Removed.
+ (tramp-maybe-open-connection): The car of
+ `tramp-current-connection' are the first 3 slots of the vector.
+
+2013-07-06 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-file-gvfs-monitor-dir-process-filter):
+ Check for incomplete strings, and keep them for the next run.
+ Handle file names with spaces.
+ (tramp-sh-file-inotifywait-process-filter): Handle file names with
+ spaces.
+
+2013-07-05 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Support
+ both "gvfs-monitor-dir" and "inotifywait".
+ (tramp-sh-file-inotifywait-process-filter): Renamed from
+ `tramp-sh-file-notify-process-filter'.
+ (tramp-sh-file-gvfs-monitor-dir-process-filter)
+ (tramp-get-remote-gvfs-monitor-dir): New defuns.
+
+2013-07-04 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Check, that
+ the `inotifywait' process runs.
+ (tramp-sh-file-notify-process-filter): Do not return a cookie.
+
+2013-07-01 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-file-name-for-operation): Remove
+ `inotify-add-watch'. Add `file-notify-add-watch' and
+ `file-notify-rm-watch'.
+
+ * tramp-sh.el (tramp-sh-file-name-handler-alist): Remove
+ `inotify-add-watch'. Add `file-notify-add-watch' and
+ `file-notify-rm-watch'.
+ (tramp-sh-handle-inotify-add-watch)
+ (tramp-sh-inotify-process-filter): Remove functions.
+ (tramp-sh-handle-file-notify-add-watch)
+ (tramp-sh-file-notify-process-filter)
+ (tramp-sh-handle-file-notify-rm-watch): New functions.
+
+2013-06-19 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-adb.el (tramp-adb-get-toolbox): Remove function, it is not
+ needed.
+
+ * tramp-sh.el (tramp-find-shell): Don't set "busybox" property.
+
+2013-05-24 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-gvfs.el (tramp-gvfs-enabled): New defconst.
+ (tramp-gvfs-file-name-handler): Raise a user error when
+ `tramp-gvfs-enabled' is nil.
+ (top): Register signals only when `tramp-gvfs-enabled' is non-nil.
+ Do not raise a user error when loading package. (Bug#14447)
+
+2013-05-23 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-gvfs.el (top): Suppress D-Bus errors when loading package.
+ (Bug#14447)
+
+2013-04-22 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Fix pack/unpack coding. Reported by David Smith <davidsmith(a)acm.org>.
+
+ * tramp-compat.el (tramp-compat-call-process): Move function ...
+ * tramp.el (tramp-call-process): ... here.
+ (tramp-set-completion-function, tramp-parse-putty):
+ * tramp-adb.el (tramp-adb-execute-adb-command):
+ * tramp-gvfs.el (tramp-gvfs-send-command):
+ * tramp-sh.el (tramp-sh-handle-set-file-times, tramp-set-file-uid-gid)
+ (tramp-sh-handle-write-region, tramp-call-local-coding-command):
+ Use `tramp-call-process' instead of `tramp-compat-call-process'.
+
+ * tramp-sh.el (tramp-perl-pack, tramp-perl-unpack): New defconst.
+ (tramp-local-coding-commands, tramp-remote-coding-commands): Use them.
+ (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region):
+ (tramp-find-inline-compress): Improve traces.
+ (tramp-maybe-send-script): Check for Perl binary.
+ (tramp-get-inline-coding): Do not redirect STDOUT for local decoding.
+
+2013-04-18 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-remote-process-environment): Add "TMOUT=0".
+
+2013-03-25 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-drop-volume-letter): Make it an ordinary defun.
+ Defining it as defalias could introduce too eager byte-compiler
+ optimization. (Bug#14030)
+
+2013-03-18 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-compat.el (tramp-compat-user-error): New defun.
+
+ * tramp-adb.el (tramp-adb-handle-shell-command):
+ * tramp-gvfs.el (top):
+ * tramp.el (tramp-find-method, tramp-dissect-file-name)
+ (tramp-handle-shell-command): Use it.
+ (tramp-dissect-file-name): Raise an error when hostname is a
+ method name, and neither method nor user is specified.
+
+2013-03-17 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-adb.el (tramp-adb-parse-device-names): Use `start-process'
+ instead of `call-process'. Otherwise, the function might be
+ blocked under MS Windows. (Bug#13299)
+
2013-03-15 Michael Albinus <michael.albinus(a)gmx.de>
Version 2.2.7 released.
diff -r 207075d5c8de0360bbd4db340b8db5dc44f5aecc -r
51acc30e700b795edb8d7b4fd020d61ce152dad2 lisp/tramp-adb.el
--- a/lisp/tramp-adb.el
+++ b/lisp/tramp-adb.el
@@ -36,6 +36,8 @@
(require 'tramp)
(require 'time-date)
+;; Pacify byte-compiler.
+(defvar directory-sep-char)
(defvar dired-move-to-filename-regexp)
(defcustom tramp-adb-program "adb"
@@ -85,51 +87,74 @@
(cons 'tramp-adb-file-name-p 'tramp-adb-file-name-handler))
(defconst tramp-adb-file-name-handler-alist
- '((directory-file-name . tramp-handle-directory-file-name)
+ '((access-file . ignore)
+ (add-name-to-file . tramp-adb-handle-copy-file)
+ ;; `byte-compiler-base-file-name' performed by default handler.
+ ;; `copy-directory' performed by default handler.
+ (copy-file . tramp-adb-handle-copy-file)
+ (delete-directory . tramp-adb-handle-delete-directory)
+ (delete-file . tramp-adb-handle-delete-file)
+ ;; `diff-latest-backup-file' performed by default handler.
+ (directory-file-name . tramp-handle-directory-file-name)
+ (directory-files . tramp-handle-directory-files)
+ (directory-files-and-attributes
+ . tramp-adb-handle-directory-files-and-attributes)
+ (dired-call-process . ignore)
+ (dired-compress-file . ignore)
(dired-uncache . tramp-handle-dired-uncache)
- (file-name-as-directory . tramp-handle-file-name-as-directory)
- (file-name-completion . tramp-handle-file-name-completion)
- (file-name-all-completions . tramp-adb-handle-file-name-all-completions)
+ (expand-file-name . tramp-adb-handle-expand-file-name)
+ (file-accessible-directory-p . tramp-handle-file-accessible-directory-p)
+ (file-acl . ignore)
(file-attributes . tramp-adb-handle-file-attributes)
- (file-name-directory . tramp-handle-file-name-directory)
- (file-name-nondirectory . tramp-handle-file-name-nondirectory)
- (file-truename . tramp-adb-handle-file-truename)
- (file-newer-than-file-p . tramp-handle-file-newer-than-file-p)
- (file-name-as-directory . tramp-handle-file-name-as-directory)
- (file-regular-p . tramp-handle-file-regular-p)
- (file-remote-p . tramp-handle-file-remote-p)
- (file-accessible-directory-p . tramp-handle-file-accessible-directory-p)
(file-directory-p . tramp-adb-handle-file-directory-p)
- (file-symlink-p . tramp-handle-file-symlink-p)
+ ;; `file-equal-p' performed by default handler.
;; FIXME: This is too sloppy.
(file-executable-p . tramp-handle-file-exists-p)
(file-exists-p . tramp-handle-file-exists-p)
- (file-readable-p . tramp-handle-file-exists-p)
- (file-writable-p . tramp-adb-handle-file-writable-p)
+ ;; `file-in-directory-p' performed by default handler.
(file-local-copy . tramp-adb-handle-file-local-copy)
(file-modes . tramp-handle-file-modes)
- (expand-file-name . tramp-adb-handle-expand-file-name)
+ (file-name-all-completions . tramp-adb-handle-file-name-all-completions)
+ (file-name-as-directory . tramp-handle-file-name-as-directory)
+ (file-name-completion . tramp-handle-file-name-completion)
+ (file-name-directory . tramp-handle-file-name-directory)
+ (file-name-nondirectory . tramp-handle-file-name-nondirectory)
+ ;; `file-name-sans-versions' performed by default handler.
+ (file-newer-than-file-p . tramp-handle-file-newer-than-file-p)
+ (file-notify-add-watch . tramp-handle-file-notify-add-watch)
+ (file-notify-rm-watch . tramp-handle-file-notify-rm-watch)
+ (file-ownership-preserved-p . ignore)
+ (file-readable-p . tramp-handle-file-exists-p)
+ (file-regular-p . tramp-handle-file-regular-p)
+ (file-remote-p . tramp-handle-file-remote-p)
+ (file-selinux-context . ignore)
+ (file-symlink-p . tramp-handle-file-symlink-p)
+ (file-truename . tramp-adb-handle-file-truename)
+ (file-writable-p . tramp-adb-handle-file-writable-p)
(find-backup-file-name . tramp-handle-find-backup-file-name)
- (directory-files . tramp-handle-directory-files)
- (directory-files-and-attributes
- . tramp-adb-handle-directory-files-and-attributes)
- (make-directory . tramp-adb-handle-make-directory)
- (delete-directory . tramp-adb-handle-delete-directory)
- (delete-file . tramp-adb-handle-delete-file)
- (load . tramp-handle-load)
+ ;; `find-file-noselect' performed by default handler.
+ ;; `get-file-buffer' performed by default handler.
(insert-directory . tramp-adb-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)
+ (process-file . tramp-adb-handle-process-file)
+ (rename-file . tramp-adb-handle-rename-file)
+ (set-file-acl . ignore)
+ (set-file-modes . tramp-adb-handle-set-file-modes)
+ (set-file-selinux-context . ignore)
+ (set-file-times . tramp-adb-handle-set-file-times)
+ (set-visited-file-modtime . tramp-handle-set-visited-file-modtime)
+ (shell-command . tramp-adb-handle-shell-command)
+ (start-file-process . tramp-adb-handle-start-file-process)
(substitute-in-file-name . tramp-handle-substitute-in-file-name)
(unhandled-file-name-directory . tramp-handle-unhandled-file-name-directory)
- (vc-registered . ignore) ;no vc control files on Android devices
- (write-region . tramp-adb-handle-write-region)
- (set-file-modes . tramp-adb-handle-set-file-modes)
- (set-file-times . tramp-adb-handle-set-file-times)
- (copy-file . tramp-adb-handle-copy-file)
- (rename-file . tramp-adb-handle-rename-file)
- (process-file . tramp-adb-handle-process-file)
- (shell-command . tramp-adb-handle-shell-command)
- (start-file-process . tramp-adb-handle-start-file-process))
+ (vc-registered . ignore)
+ (verify-visited-file-modtime . tramp-handle-verify-visited-file-modtime)
+ (write-region . tramp-adb-handle-write-region))
"Alist of handler functions for Tramp ADB method.")
;; It must be a `defsubst' in order to push the whole code into
@@ -151,16 +176,22 @@
(tramp-run-real-handler operation args))))
;;;###tramp-autoload
-(defun tramp-adb-parse-device-names (ignore)
+(defun tramp-adb-parse-device-names (_ignore)
"Return a list of (nil host) tuples allowed to access."
(with-timeout (10)
(with-temp-buffer
- (when (zerop (call-process tramp-adb-program nil t nil "devices"))
- (let (result)
- (goto-char (point-min))
- (while (search-forward-regexp "^\\(\\S-+\\)[[:space:]]+device$" nil t)
- (add-to-list 'result (list nil (match-string 1))))
- result)))))
+ ;; `call-process' does not react on timer under MS Windows.
+ ;; That's why we use `start-process'.
+ (let ((p (start-process
+ tramp-adb-program (current-buffer) tramp-adb-program "devices"))
+ result)
+ (tramp-compat-set-process-query-on-exit-flag p nil)
+ (while (eq 'run (process-status p))
+ (sleep-for 0.1))
+ (goto-char (point-min))
+ (while (search-forward-regexp "^\\(\\S-+\\)[[:space:]]+device$" nil t)
+ (add-to-list 'result (list nil (match-string 1))))
+ result))))
(defun tramp-adb-handle-expand-file-name (name &optional dir)
"Like `expand-file-name' for Tramp files."
@@ -195,7 +226,7 @@
;; This is derived from `tramp-sh-handle-file-truename'. Maybe the
;; code could be shared?
-(defun tramp-adb-handle-file-truename (filename &optional counter prev-dirs)
+(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"
@@ -369,16 +400,6 @@
"ls --color=never"
"ls")))
-(defun tramp-adb-get-toolbox (vec)
- "Get shell toolbox implementation: `toolbox' for original distributions
-or `busybox' for CyanogenMod based distributions"
- (with-tramp-connection-property vec "toolbox"
- (tramp-message vec 5 "Checking shell toolbox implementation")
- (cond
- ((zerop (tramp-adb-command-exit-status vec "busybox")) 'busybox)
- ((zerop (tramp-adb-command-exit-status vec "toolbox")) 'toolbox)
- (t 'unknown))))
-
(defun tramp-adb--gnu-switches-to-ash
(switches)
"Almquist shell can't handle multiple arguments.
@@ -386,9 +407,9 @@
(split-string
(apply 'concat
(mapcar (lambda (s)
- (replace-regexp-in-string
+ (tramp-compat-replace-regexp-in-string
"\\(.\\)" " -\\1"
- (replace-regexp-in-string "^-" "" s)))
+ (tramp-compat-replace-regexp-in-string "^-" "" s)))
;; FIXME: Warning about removed switches (long and non-dash).
(delq nil
(mapcar
@@ -397,7 +418,7 @@
switches))))))
(defun tramp-adb-handle-insert-directory
- (filename switches &optional wildcard full-directory-p)
+ (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))))
@@ -499,7 +520,7 @@
(tramp-shell-quote-argument localname))
"Couldn't delete %s" directory)))
-(defun tramp-adb-handle-delete-file (filename &optional trash)
+(defun tramp-adb-handle-delete-file (filename &optional _trash)
"Like `delete-file' for Tramp files."
(setq filename (expand-file-name filename))
(with-parsed-tramp-file-name filename nil
@@ -601,6 +622,9 @@
(tramp-error v 'file-error "Cannot write: `%s' filename"))
(delete-file tmpfile)))
+ (when (or (eq visit t) (stringp visit))
+ (set-visited-file-modtime))
+
(unless (equal curbuf (current-buffer))
(tramp-error
v 'file-error
@@ -629,7 +653,7 @@
(defun tramp-adb-handle-copy-file
(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.
PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(setq filename (expand-file-name filename)
@@ -850,7 +874,7 @@
(when p
(if (yes-or-no-p "A command is running. Kill it? ")
(ignore-errors (kill-process p))
- (error "Shell command in progress")))
+ (tramp-user-error p "Shell command in progress")))
(if current-buffer-p
(progn
@@ -976,11 +1000,10 @@
(setq args (append (list "-s" (tramp-file-name-host vec)) args)))
(with-temp-buffer
(prog1
- (unless (zerop (apply 'call-process tramp-adb-program nil t nil args))
+ (unless
+ (zerop (apply 'tramp-call-process tramp-adb-program nil t nil args))
(buffer-string))
- (tramp-message
- vec 6 "%s %s\n%s"
- tramp-adb-program (mapconcat 'identity args " ")
(buffer-string)))))
+ (tramp-message vec 6 "%s" (buffer-string)))))
(defun tramp-adb-find-test-command (vec)
"Checks, whether the ash has a builtin \"test\" command.
@@ -1069,6 +1092,8 @@
"Maybe open a connection VEC.
Does not do anything if a connection is already open, but re-opens the
connection if a previous connection has died for some reason."
+ (tramp-check-proper-method-and-host vec)
+
(let* ((buf (tramp-get-connection-buffer vec))
(p (get-buffer-process buf))
(host (tramp-file-name-host vec))
@@ -1128,11 +1153,11 @@
(read (current-buffer))))))
(when (and (stringp old-getprop)
(not (string-equal old-getprop new-getprop)))
- (tramp-cleanup vec)
(tramp-message
vec 3
"Connection reset, because remote host changed from `%s' to `%s'"
old-getprop new-getprop)
+ (tramp-cleanup-connection vec t)
(tramp-adb-maybe-open-connection vec)))
;; Change user if indicated.
diff -r 207075d5c8de0360bbd4db340b8db5dc44f5aecc -r
51acc30e700b795edb8d7b4fd020d61ce152dad2 lisp/tramp-cache.el
--- a/lisp/tramp-cache.el
+++ b/lisp/tramp-cache.el
@@ -38,9 +38,11 @@
;;
;; - localname is a string. This are temporary properties, which are
;; related to the file localname is referring to. Examples:
-;; "file-exists-p" is t or nile, depending on the file existence, or
+;; "file-exists-p" is t or nil, depending on the file existence, or
;; "file-attributes" caches the result of the function
-;; `file-attributes'.
+;; `file-attributes'. These entries have a timestamp, and they
+;; expire after `remote-file-name-inhibit-cache' seconds if this
+;; variable is set.
;;
;; - The key is a process. This are temporary properties related to
;; an open connection. Examples: "scripts" keeps shell script
@@ -64,7 +66,7 @@
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 in for PROPERTY in `tramp-cache-data'."
+matching entry for PROPERTY in `tramp-cache-data'."
:group 'tramp
:version "24.4"
:type '(repeat (list (choice :tag "File Name regexp" regexp (const nil))
@@ -185,7 +187,7 @@
'directory-file-name (list directory))))
(tramp-message key 8 "%s" directory)
(maphash
- (lambda (key value)
+ (lambda (key _value)
(when (and (stringp (tramp-file-name-localname key))
(string-match directory (tramp-file-name-localname key)))
(remhash key tramp-cache-data)))
@@ -271,7 +273,7 @@
(let ((hash (gethash key tramp-cache-data))
properties)
(when (hash-table-p hash)
- (maphash (lambda (x y) (add-to-list 'properties x 'append)) hash))
+ (maphash (lambda (x _y) (add-to-list 'properties x 'append)) hash))
properties))
(setq tramp-cache-data-changed t)
(remhash key tramp-cache-data))
@@ -283,6 +285,21 @@
(let (result)
(maphash
(lambda (key value)
+ ;; Remove text properties from KEY and VALUE.
+ ;; `substring-no-properties' does not exist in XEmacs.
+ (when (functionp 'substring-no-properties)
+ (when (vectorp key)
+ (dotimes (i (length key))
+ (when (stringp (aref key i))
+ (aset key i
+ (tramp-compat-funcall
+ 'substring-no-properties (aref key i))))))
+ (when (stringp key)
+ (setq key (tramp-compat-funcall 'substring-no-properties key)))
+ (when (stringp value)
+ (setq value
+ (tramp-compat-funcall 'substring-no-properties value))))
+ ;; Dump.
(let ((tmp (format
"(%s %s)"
(if (processp key)
@@ -302,7 +319,7 @@
"Return a list of all known connection vectors according to
`tramp-cache'."
(let (result)
(maphash
- (lambda (key value)
+ (lambda (key _value)
(when (and (vectorp key) (null (aref key 3)))
(add-to-list 'result key)))
tramp-cache-data)
@@ -366,7 +383,7 @@
for all methods. Resulting data are derived from connection history."
(let (res)
(maphash
- (lambda (key value)
+ (lambda (key _value)
(if (and (vectorp key)
(string-equal method (tramp-file-name-method key))
(not (tramp-file-name-localname key)))
diff -r 207075d5c8de0360bbd4db340b8db5dc44f5aecc -r
51acc30e700b795edb8d7b4fd020d61ce152dad2 lisp/tramp-cmds.el
--- a/lisp/tramp-cmds.el
+++ b/lisp/tramp-cmds.el
@@ -30,6 +30,10 @@
(require 'tramp)
+;; Pacify byte-compiler.
+(defvar reporter-eval-buffer)
+(defvar reporter-prompt-for-summary-p)
+
(defun tramp-list-tramp-buffers ()
"Return a list of all Tramp connection buffers."
(append
@@ -51,9 +55,11 @@
(buffer-list))))
;;;###tramp-autoload
-(defun tramp-cleanup-connection (vec)
+(defun tramp-cleanup-connection (vec &optional keep-debug keep-password)
"Flush all connection related objects.
-This includes password cache, file cache, connection cache, buffers.
+This includes password cache, file cache, connection cache,
+buffers. KEEP-DEBUG non-nil preserves the debug buffer.
+KEEP-PASSWORD non-nil preserves the password cache.
When called interactively, a Tramp connection has to be selected."
(interactive
;; When interactive, select the Tramp remote identification.
@@ -76,14 +82,15 @@
"Enter Tramp connection: " connections nil t
(try-completion "" connections)))
(when (and name (file-remote-p name))
- (with-parsed-tramp-file-name name nil v))))))
+ (with-parsed-tramp-file-name name nil v))))
+ nil nil))
(if (not vec)
;; Nothing to do.
(message "No Tramp connection found.")
;; Flush password cache.
- (tramp-clear-passwd vec)
+ (unless keep-password (tramp-clear-passwd vec))
;; Flush file cache.
(tramp-flush-directory-property vec "")
@@ -97,7 +104,8 @@
;; Remove buffers.
(dolist
(buf (list (get-buffer (tramp-buffer-name vec))
- (get-buffer (tramp-debug-buffer-name vec))
+ (unless keep-debug
+ (get-buffer (tramp-debug-buffer-name vec)))
(tramp-get-connection-property vec "process-buffer" nil)))
(when (bufferp buf) (kill-buffer buf)))))
@@ -186,7 +194,9 @@
'tramp-load-report-modules ; pre-hook
'tramp-append-tramp-buffers ; post-hook
- (propertize "\n" 'display "\
+ (tramp-compat-funcall
+ (if (functionp 'propertize) 'propertize 'progn)
+ "\n" 'display "\
Enter your bug report in this message, including as much detail
as you possibly can about the problem, what you did to cause it
and what the local and remote machines are.
@@ -266,6 +276,7 @@
(goto-char (point-max))
;; Dump buffer local variables.
+ (insert "\nlocal variables:\n================")
(dolist (buffer
(delq nil
(mapcar
@@ -273,21 +284,23 @@
(when (string-match "\\*tramp/" (buffer-name b)) b))
(buffer-list))))
(let ((reporter-eval-buffer buffer)
- (buffer-name (buffer-name buffer))
(elbuf (get-buffer-create " *tmp-reporter-buffer*")))
(with-current-buffer elbuf
(emacs-lisp-mode)
(erase-buffer)
- (insert "\n(setq\n")
+ (insert (format "\n;; %s\n(setq-local\n" (buffer-name buffer)))
(lisp-indent-line)
- (tramp-compat-funcall
- 'reporter-dump-variable 'buffer-name (current-buffer))
- (dolist (varsym-or-cons-cell (buffer-local-variables buffer))
- (let ((varsym (or (car-safe varsym-or-cons-cell)
- varsym-or-cons-cell)))
- (when (string-match "tramp" (symbol-name varsym))
- (tramp-compat-funcall
- 'reporter-dump-variable varsym (current-buffer)))))
+ (dolist
+ (varsym
+ (sort
+ (append
+ (mapcar
+ 'intern
+ (all-completions "tramp-" (buffer-local-variables buffer)))
+ ;; Non-tramp variables of interest.
+ '(default-directory))
+ 'string<))
+ (tramp-compat-funcall 'reporter-dump-variable varsym elbuf))
(lisp-indent-line)
(insert ")\n"))
(insert-buffer-substring elbuf)))
@@ -348,7 +361,7 @@
(kill-buffer nil)
(switch-to-buffer curbuf)
(goto-char (point-max))
- (insert (propertize "\n" 'display "\n\
+ (insert (tramp-compat-funcall 'propertize "\n" 'display
"\n\
This is a special notion of the `gnus/message' package. If you
use another mail agent (by copying the contents of this buffer)
please ensure that the buffers are attached to your email.\n\n"))
diff -r 207075d5c8de0360bbd4db340b8db5dc44f5aecc -r
51acc30e700b795edb8d7b4fd020d61ce152dad2 lisp/tramp-compat.el
--- a/lisp/tramp-compat.el
+++ b/lisp/tramp-compat.el
@@ -29,9 +29,8 @@
;;; Code:
+;; Pacify byte-compiler.
(eval-when-compile
-
- ;; Pacify byte-compiler.
(require 'cl))
(eval-and-compile
@@ -184,10 +183,10 @@
'file-expand-wildcards 'around 'tramp-advice-file-expand-wildcards)
(ad-activate 'file-expand-wildcards)))))
-;; `with-temp-message' does not exists in XEmacs.
+;; `with-temp-message' does not exist in XEmacs.
(if (fboundp 'with-temp-message)
(defalias 'tramp-compat-with-temp-message 'with-temp-message)
- (defmacro tramp-compat-with-temp-message (message &rest body)
+ (defmacro tramp-compat-with-temp-message (_message &rest body)
"Display MESSAGE temporarily if non-nil while BODY is evaluated."
`(progn ,@body)))
@@ -238,14 +237,14 @@
;; `make-temp-file' exists in Emacs only. On XEmacs, we use our own
;; implementation with `make-temp-name', creating the temporary file
;; immediately in order to avoid a security hole.
-(defsubst tramp-compat-make-temp-file (filename &optional dir-flag)
+(defsubst tramp-compat-make-temp-file (f &optional dir-flag)
"Create a temporary file (compat function).
-Add the extension of FILENAME, if existing."
+Add the extension of F, if existing."
(let* (file-name-handler-alist
(prefix (expand-file-name
(symbol-value 'tramp-temp-name-prefix)
(tramp-compat-temporary-file-directory)))
- (extension (file-name-extension filename t))
+ (extension (file-name-extension f t))
result)
(condition-case nil
(setq result
@@ -292,7 +291,7 @@
(error "Non-octal junk in string `%s'" x))
(string-to-number ostr 8)))
-;; ID-FORMAT does not exists in XEmacs.
+;; ID-FORMAT does not exist in XEmacs.
(defun tramp-compat-file-attributes (filename &optional id-format)
"Like `file-attributes' for Tramp files (compat function)."
(cond
@@ -314,13 +313,21 @@
"Like `copy-file' for Tramp files (compat function)."
(cond
(preserve-extended-attributes
- (tramp-compat-funcall
- 'copy-file filename newname ok-if-already-exists keep-date
- preserve-uid-gid preserve-extended-attributes))
+ (condition-case nil
+ (tramp-compat-funcall
+ 'copy-file filename newname ok-if-already-exists keep-date
+ preserve-uid-gid preserve-extended-attributes)
+ (wrong-number-of-arguments
+ (tramp-compat-copy-file
+ filename newname ok-if-already-exists keep-date preserve-uid-gid))))
(preserve-uid-gid
- (tramp-compat-funcall
- 'copy-file filename newname ok-if-already-exists keep-date
- preserve-uid-gid))
+ (condition-case nil
+ (tramp-compat-funcall
+ 'copy-file filename newname ok-if-already-exists keep-date
+ preserve-uid-gid)
+ (wrong-number-of-arguments
+ (tramp-compat-copy-file
+ filename newname ok-if-already-exists keep-date))))
(t
(copy-file filename newname ok-if-already-exists keep-date))))
@@ -438,20 +445,6 @@
element is not omitted."
(delete "" (split-string string pattern)))
-(defun tramp-compat-call-process
- (program &optional infile destination display &rest args)
- "Calls `call-process' on the local host.
-This is needed because for some Emacs flavors Tramp has
-defadvised `call-process' to behave like `process-file'. The
-Lisp error raised when PROGRAM is nil is trapped also, returning 1."
- (let ((default-directory
- (if (file-remote-p default-directory)
- (tramp-compat-temporary-file-directory)
- default-directory)))
- (if (executable-find program)
- (apply 'call-process program infile destination display args)
- 1)))
-
(defun tramp-compat-process-running-p (process-name)
"Returns `t' if system process PROCESS-NAME is running for
`user-login-name'."
(when (stringp process-name)
@@ -533,6 +526,58 @@
"`dos', `unix', or `mac'")))))
(t (error "Can't change EOL conversion -- is MULE missing?"))))
+;; `replace-regexp-in-string' does not exist in XEmacs.
+;; Implementation is taken from Emacs 24.
+(if (fboundp 'replace-regexp-in-string)
+ (defalias 'tramp-compat-replace-regexp-in-string 'replace-regexp-in-string)
+ (defun tramp-compat-replace-regexp-in-string
+ (regexp rep string &optional fixedcase literal subexp start)
+ "Replace all matches for REGEXP with REP in STRING.
+
+Return a new string containing the replacements.
+
+Optional arguments FIXEDCASE, LITERAL and SUBEXP are like the
+arguments with the same names of function `replace-match'. If START
+is non-nil, start replacements at that index in STRING.
+
+REP is either a string used as the NEWTEXT arg of `replace-match' or a
+function. If it is a function, it is called with the actual text of each
+match, and its value is used as the replacement text. When REP is called,
+the match data are the result of matching REGEXP against a substring
+of STRING.
+
+To replace only the first match (if any), make REGEXP match up to \\'
+and replace a sub-expression, e.g.
+ (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\"
\" foo foo\" nil nil 1)
+ => \" bar foo\""
+
+ (let ((l (length string))
+ (start (or start 0))
+ matches str mb me)
+ (save-match-data
+ (while (and (< start l) (string-match regexp string start))
+ (setq mb (match-beginning 0)
+ me (match-end 0))
+ ;; If we matched the empty string, make sure we advance by one char
+ (when (= me mb) (setq me (min l (1+ mb))))
+ ;; Generate a replacement for the matched substring.
+ ;; Operate only on the substring to minimize string consing.
+ ;; Set up match data for the substring for replacement;
+ ;; presumably this is likely to be faster than munging the
+ ;; match data directly in Lisp.
+ (string-match regexp (setq str (substring string mb me)))
+ (setq matches
+ (cons (replace-match (if (stringp rep)
+ rep
+ (funcall rep (match-string 0 str)))
+ fixedcase literal str subexp)
+ (cons (substring string start mb) ; unmatched prefix
+ matches)))
+ (setq start me))
+ ;; Reconstruct a string from the pieces.
+ (setq matches (cons (substring string start l) matches)) ; leftover
+ (apply #'concat (nreverse matches))))))
+
(add-hook 'tramp-unload-hook
(lambda ()
(unload-feature 'tramp-compat 'force)))
diff -r 207075d5c8de0360bbd4db340b8db5dc44f5aecc -r
51acc30e700b795edb8d7b4fd020d61ce152dad2 lisp/tramp-efs.el
--- a/lisp/tramp-efs.el
+++ b/lisp/tramp-efs.el
@@ -29,6 +29,15 @@
(require 'tramp)
+;; Pacify byte-compiler.
+(defvar efs-path-format-string)
+(defvar efs-path-format-without-user)
+(defvar efs-path-host-format)
+(defvar efs-path-regexp)
+(defvar efs-path-root-regexp)
+(defvar efs-path-user-at-host-format)
+(defvar package-get-download-sites)
+
;;;###tramp-autoload
(defconst tramp-efs-method "ftp"
"Name of the method invoking EFS.")
@@ -146,15 +155,14 @@
;; Add all XEmacs download sites to `tramp-default-method-alist'.
;; The settings above should be sufficient, but it's better to make
;; it explicitly.
- (defvar package-get-download-sites) ; Pacify compiler.
(when (listp package-get-download-sites)
- (mapcar (lambda (x)
- (when (listp x)
- (add-to-list
- 'tramp-default-method-alist
- (list (concat "\\`" (nth 1 x) "\\'")
- "\\`anonymous\\'" tramp-efs-method))))
- package-get-download-sites)))
+ (mapc (lambda (x)
+ (when (listp x)
+ (add-to-list
+ 'tramp-default-method-alist
+ (list (concat "\\`" (nth 1 x) "\\'")
+ "\\`anonymous\\'" tramp-efs-method))))
+ package-get-download-sites)))
;; Add completion function for FTP method.
;;;###tramp-autoload
@@ -178,11 +186,11 @@
;; Check whether the method is given in a filename.
(setq tramp-efs-method-given nil)
- (mapcar (lambda (x)
- (and (stringp x)
- (string-match tramp-efs-method-regexp x)
- (setq tramp-efs-method-given t)))
- args)
+ (mapc (lambda (x)
+ (and (stringp x)
+ (string-match tramp-efs-method-regexp x)
+ (setq tramp-efs-method-given t)))
+ args)
(let ((efs-path-regexp (tramp-efs-path-regexp))
(efs-path-format-string (tramp-efs-path-format-string))
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