1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00
emacs/lisp/net/tramp-sh.el

5995 lines
232 KiB
EmacsLisp
Raw Normal View History

;;; tramp-sh.el --- Tramp access functions for (s)sh-like connections -*- lexical-binding:t -*-
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; (copyright statements below in code to be updated with the above notice)
;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
;; Michael Albinus <michael.albinus@gmx.de>
Require method in remote file name syntax * lisp/minibuffer.el (completion--nth-completion): Do not bind `non-essential'. * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Do not call `tramp-check-proper-method-and-host'. * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Better traces. (tramp-maybe-open-connection): Do not use argument for ´tramp-completion-mode-p'. * lisp/net/tramp.el (tramp-default-method-marker): New defconst. (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): Use `eq' instead of `eqal'. (tramp-method-regexp, tramp-domain-regexp) (tramp-remote-file-name-spec-regexp) (tramp-file-name-regexp-unified) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate): Adapt regexp. (tramp-completion-file-name-handler-alist) (tramp-run-real-handler): Autoload them. (tramp-find-method): Handle `tramp-default-method-marker'. (tramp-check-proper-method-and-host) (tramp-completion-run-real-handler): Remove them. (tramp-error-with-buffer, tramp-connectable-p): Do not use argument for ´tramp-completion-mode-p'. (tramp-find-foreign-file-name-handler): Remove COMPLETION argument. Do not apply heuristic for completion. (tramp-file-name-handler): Do not modify `non-essential'. (tramp-completion-file-name-handler): Change implementation. (tramp-autoload-file-name-handler) (tramp-completion-handle-file-name-all-completions): Call `tramp-run-real-handler'. (tramp-completion-mode-p): Do not autoload. Remove argument. Do not apply heuristic for completion. (tramp-completion-dissect-file-name): Simplify implementation. (tramp-handle-file-name-as-directory): Call `tramp-connectable-p'. * test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax) (tramp-test02-file-name-dissect) (tramp-test03-file-name-defaults) (tramp-test06-directory-file-name): Adapt to the new syntax. (tramp-test11-copy-file, tramp-test12-rename-file) (tramp--test-check-files): Deactivate temporarily tests with quoted file names. (tramp-test16-directory-files, tramp-test17-insert-directory): Adapt tests. (tramp-test24-file-name-completion): Do not check for completion mode. (tramp-test31-make-auto-save-file-name): Deactivate temporarily two tests.
2017-03-13 17:05:59 +00:00
;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Keywords: comm, processes
;; Package: tramp
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Adapt Tramp docstrings according to checkdoc * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 12:10:58 +00:00
;;; Commentary:
;; The file name handler implementation for ssh-alike remote connections.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;;; Code:
(eval-when-compile (require 'cl-lib))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(require 'tramp)
(declare-function dired-remove-file "dired-aux")
(defvar dired-compress-file-suffixes)
(defvar process-file-return-signal-string)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(defvar vc-handled-backends)
(defvar vc-bzr-program)
(defvar vc-git-program)
(defvar vc-hg-program)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;;;###tramp-autoload
(defconst tramp-default-remote-shell "/bin/sh"
"The default remote shell Tramp applies.")
(defcustom tramp-inline-compress-start-size 4096
"The minimum size of compressing where inline transfer.
When inline transfer, compress transferred data of file whose
size is this value or above (up to `tramp-copy-size-limit' for
out-of-band methods).
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
If it is nil, no compression at all will be applied."
:group 'tramp
Fix Bug#31558 * lisp/net/tramp.el (tramp-mode, tramp-verbose) (tramp-backup-directory-alist, tramp-auto-save-directory) (tramp-encoding-shell, tramp-encoding-command-switch) (tramp-encoding-command-interactive, tramp-default-method) (tramp-default-method-alist, tramp-default-user) (tramp-default-user-alist, tramp-default-host) (tramp-default-host-alist, tramp-default-proxies-alist) (tramp-save-ad-hoc-proxies, tramp-restricted-shell-hosts-alist) (tramp-local-host-regexp, tramp-local-end-of-line) (tramp-rsh-end-of-line, tramp-login-prompt-regexp) (tramp-shell-prompt-pattern, tramp-password-prompt-regexp) (tramp-wrong-passwd-regexp, tramp-yesno-prompt-regexp) (tramp-yn-prompt-regexp, tramp-terminal-prompt-regexp) (tramp-operation-not-permitted-regexp, tramp-copy-failed-regexp) (tramp-process-alive-regexp, tramp-ignored-file-name-regexp) (tramp-chunksize, tramp-process-connection-type) (tramp-connection-timeout, tramp-connection-min-time-diff) (tramp-completion-reread-directory-timeout) * lisp/net/tramp-adb.el (tramp-adb-program) (tramp-adb-connect-if-not-connected, tramp-adb-prompt): * lisp/net/tramp-cache.el (tramp-connection-properties) (tramp-persistency-file-name): * lisp/net/tramp-gvfs.el (tramp-gvfs-methods) (tramp-gvfs-zeroconf-domain) (tramp-bluez-discover-devices-timeout): * lisp/net/tramp-sh.el (tramp-inline-compress-start-size) (tramp-copy-size-limit, tramp-terminal-type) (tramp-histfile-override, tramp-use-ssh-controlmaster-options) (tramp-remote-path, tramp-remote-process-environment) (tramp-sh-extra-args): * lisp/net/tramp-smb.el (tramp-smb-program, tramp-smb-acl-program) (tramp-smb-conf, tramp-smb-winexe-program) (tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): Dont't require 'tramp. (Bug#31558) * lisp/net/tramp.el (tramp-ignored-file-name-regexp): Use type regexp.
2018-05-24 12:32:12 +00:00
:type '(choice (const nil) integer))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defcustom tramp-copy-size-limit 10240
Shorten over-wide docstrings in defcustoms * lisp/calc/calc.el (calc-embedded-announce-formula-alist) (calc-embedded-open-formula, calc-embedded-close-formula) (calc-matrix-mode): * lisp/cedet/semantic/imenu.el (semantic-imenu-sort-bucket-function): * lisp/emacs-lisp/find-func.el (find-feature-regexp): * lisp/emulation/cua-base.el (cua-paste-pop-rotate-temporarily): * lisp/emulation/viper-init.el (viper-fast-keyseq-timeout) (viper-related-files-and-buffers-ring): * lisp/emulation/viper-keym.el (viper-want-ctl-h-help): * lisp/gnus/gnus-art.el (gnus-article-banner-alist): * lisp/gnus/gnus-group.el (gnus-keep-same-level): * lisp/gnus/gnus-score.el (gnus-adaptive-word-length-limit): * lisp/gnus/gnus-sum.el (gnus-inhibit-user-auto-expire): * lisp/gnus/gnus-uu.el (gnus-uu-ignore-files-by-type) (gnus-uu-do-not-unpack-archives) (gnus-uu-unmark-articles-not-decoded) (gnus-uu-correct-stripped-uucode, gnus-uu-save-in-digest) (gnus-uu-post-include-before-composing): * lisp/gnus/gnus.el (gnus-use-long-file-name) (gnus-install-group-spam-parameters): * lisp/gnus/message.el (message-cite-style): * lisp/gnus/nnmail.el (nnmail-split-fancy-with-parent-ignore-groups) (nnmail-cache-ignore-groups): * lisp/ido.el (ido-rewrite-file-prompt-functions): * lisp/mail/feedmail.el (feedmail-fiddle-plex-user-list) (feedmail-spray-address-fiddle-plex-list): * lisp/mh-e/mh-e.el (mh-annotate-msg-hook): * lisp/net/imap.el (imap-process-connection-type): * lisp/net/rcirc.el (rcirc-omit-threshold): * lisp/net/tramp-sh.el (tramp-copy-size-limit): * lisp/nxml/nxml-mode.el (nxml-default-buffer-file-coding-system): * lisp/obsolete/landmark.el (landmark-max-stall-time): * lisp/obsolete/tls.el (tls-checktrust): * lisp/org/org-indent.el (org-indent-mode-turns-off-org-adapt-indentation) (org-indent-mode-turns-on-hiding-stars): * lisp/org/org-protocol.el (org-protocol-project-alist): * lisp/progmodes/cc-vars.el (c-doc-comment-style): * lisp/progmodes/cperl-mode.el (cperl-indent-subs-specially): * lisp/progmodes/flymake-proc.el (flymake-proc-allowed-file-name-masks): * lisp/progmodes/hideif.el (hide-ifdef-expand-reinclusion-protection): * lisp/simple.el (minibuffer-history-case-insensitive-variables): * lisp/tab-bar.el (tab-bar-close-last-tab-choice): * lisp/textmodes/reftex-vars.el (reftex-special-environment-functions): * lisp/vc/ediff-init.el (ediff-startup-hook, ediff-cleanup-hook) (ediff-metachars): * lisp/vc/ediff-merg.el (ediff-show-clashes-only): * lisp/vc/ediff-mult.el (ediff-default-filtering-regexp): Shorten doc strings to not exceed 80-column limits. (Bug#44858)
2020-12-19 16:26:58 +00:00
"Maximum file size where inline copying is preferred to an out-of-the-band copy.
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
If it is nil, out-of-the-band copy will be used without a check."
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
:group 'tramp
Fix Bug#31558 * lisp/net/tramp.el (tramp-mode, tramp-verbose) (tramp-backup-directory-alist, tramp-auto-save-directory) (tramp-encoding-shell, tramp-encoding-command-switch) (tramp-encoding-command-interactive, tramp-default-method) (tramp-default-method-alist, tramp-default-user) (tramp-default-user-alist, tramp-default-host) (tramp-default-host-alist, tramp-default-proxies-alist) (tramp-save-ad-hoc-proxies, tramp-restricted-shell-hosts-alist) (tramp-local-host-regexp, tramp-local-end-of-line) (tramp-rsh-end-of-line, tramp-login-prompt-regexp) (tramp-shell-prompt-pattern, tramp-password-prompt-regexp) (tramp-wrong-passwd-regexp, tramp-yesno-prompt-regexp) (tramp-yn-prompt-regexp, tramp-terminal-prompt-regexp) (tramp-operation-not-permitted-regexp, tramp-copy-failed-regexp) (tramp-process-alive-regexp, tramp-ignored-file-name-regexp) (tramp-chunksize, tramp-process-connection-type) (tramp-connection-timeout, tramp-connection-min-time-diff) (tramp-completion-reread-directory-timeout) * lisp/net/tramp-adb.el (tramp-adb-program) (tramp-adb-connect-if-not-connected, tramp-adb-prompt): * lisp/net/tramp-cache.el (tramp-connection-properties) (tramp-persistency-file-name): * lisp/net/tramp-gvfs.el (tramp-gvfs-methods) (tramp-gvfs-zeroconf-domain) (tramp-bluez-discover-devices-timeout): * lisp/net/tramp-sh.el (tramp-inline-compress-start-size) (tramp-copy-size-limit, tramp-terminal-type) (tramp-histfile-override, tramp-use-ssh-controlmaster-options) (tramp-remote-path, tramp-remote-process-environment) (tramp-sh-extra-args): * lisp/net/tramp-smb.el (tramp-smb-program, tramp-smb-acl-program) (tramp-smb-conf, tramp-smb-winexe-program) (tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): Dont't require 'tramp. (Bug#31558) * lisp/net/tramp.el (tramp-ignored-file-name-regexp): Use type regexp.
2018-05-24 12:32:12 +00:00
:type '(choice (const nil) integer))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defcustom tramp-histfile-override "~/.tramp_history"
"When invoking a shell, override the HISTFILE with this value.
When setting to a string, it redirects the shell history to that
file. Be careful when setting to \"/dev/null\"; this might
result in undesired results when using \"bash\" as shell.
The value t unsets any setting of HISTFILE, and sets both
HISTFILESIZE and HISTSIZE to 0. If you set this variable to nil,
however, the *override* is disabled, so the history will go to
the default storage location, e.g. \"$HOME/.sh_history\"."
:group 'tramp
:version "25.2"
:type '(choice (const :tag "Do not override HISTFILE" nil)
(const :tag "Unset HISTFILE" t)
Fix Bug#31558 * lisp/net/tramp.el (tramp-mode, tramp-verbose) (tramp-backup-directory-alist, tramp-auto-save-directory) (tramp-encoding-shell, tramp-encoding-command-switch) (tramp-encoding-command-interactive, tramp-default-method) (tramp-default-method-alist, tramp-default-user) (tramp-default-user-alist, tramp-default-host) (tramp-default-host-alist, tramp-default-proxies-alist) (tramp-save-ad-hoc-proxies, tramp-restricted-shell-hosts-alist) (tramp-local-host-regexp, tramp-local-end-of-line) (tramp-rsh-end-of-line, tramp-login-prompt-regexp) (tramp-shell-prompt-pattern, tramp-password-prompt-regexp) (tramp-wrong-passwd-regexp, tramp-yesno-prompt-regexp) (tramp-yn-prompt-regexp, tramp-terminal-prompt-regexp) (tramp-operation-not-permitted-regexp, tramp-copy-failed-regexp) (tramp-process-alive-regexp, tramp-ignored-file-name-regexp) (tramp-chunksize, tramp-process-connection-type) (tramp-connection-timeout, tramp-connection-min-time-diff) (tramp-completion-reread-directory-timeout) * lisp/net/tramp-adb.el (tramp-adb-program) (tramp-adb-connect-if-not-connected, tramp-adb-prompt): * lisp/net/tramp-cache.el (tramp-connection-properties) (tramp-persistency-file-name): * lisp/net/tramp-gvfs.el (tramp-gvfs-methods) (tramp-gvfs-zeroconf-domain) (tramp-bluez-discover-devices-timeout): * lisp/net/tramp-sh.el (tramp-inline-compress-start-size) (tramp-copy-size-limit, tramp-terminal-type) (tramp-histfile-override, tramp-use-ssh-controlmaster-options) (tramp-remote-path, tramp-remote-process-environment) (tramp-sh-extra-args): * lisp/net/tramp-smb.el (tramp-smb-program, tramp-smb-acl-program) (tramp-smb-conf, tramp-smb-winexe-program) (tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): Dont't require 'tramp. (Bug#31558) * lisp/net/tramp.el (tramp-ignored-file-name-regexp): Use type regexp.
2018-05-24 12:32:12 +00:00
(string :tag "Redirect to a file")))
Do not hardcode "/bin/sh" in compile. Bug#24338, Bug#29723 * doc/emacs/custom.texi (Connection Variables): New node. * doc/emacs/emacs.texi (Top): Add entry for Connection Variables. * doc/emacs/misc.texi (Single Shell): Mention default value for remote buffers. * doc/lispref/variables.texi (Connection Local Variables): Describe `with-connection-local-variables' instead of `with-connection-local-profiles'. * doc/misc/tramp.texi (Remote processes): Refer to Emacs manual. Mention default connection-local settings for `shell-file-name' and `shell-command-switch'. * etc/NEWS: Mention connection-local variables changes. * lisp/files-x.el (hack-connection-local-variables): Push connection-local variables to `file-local-variables-alist'. (connection-local-criteria-for-default-directory): New defsubst. (with-connection-local-variables): Rename from `with-connection-local-profiles'. Adapt implementation. * lisp/files.el (hack-local-variables): Call `hack-connection-local-variables'. * lisp/shell.el (shell): Use `with-connection-local-variables'. * lisp/subr.el (start-file-process-shell-command): * lisp/progmodes/compile.el (compilation-start): Use `with-connection-local-variables'. Do not set "/bin/sh" for remote buffers, trust settings of `shell-file-name'. (Bug#24338), (Bug#29723) * lisp/net/ange-ftp.el (ange-ftp-compress, ange-ftp-uncompress): Use `shell-command-switch'. * lisp/net/tramp-adb.el (tramp-adb-connection-local-default-profile): New defvar. Add it to connection-local profiles after loading "shell". * lisp/net/tramp-integration.el (tramp-compat): Require tramp-compat. (tramp-compat-exec-path): Do not declare anymore. (tramp-connection-local-safe-shell-file-names): New defvar. (tramp-connection-local-default-profile): New defconst. Activate it after loading "shell". (shell-file-name, shell-command-switch): Add safe-local-variable property. * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp): Add tramp-autoload cookie. * test/lisp/files-x-tests.el (remote-shell-file-name): Add safe-local-variable property to remote-* variables. (tramp-connection-local-default-profile): Declare. (files-x-test-with-connection-local-variables): Rename from `files-x-test-with-connection-local-profiles'. Adapt implementation. * test/lisp/net/tramp-tests.el (tramp-test34-connection-local-variables): New test. (tramp-test34-explicit-shell-file-name): Run it also for tramp-adb. Bind connection-local-{profile,criteria}-alist. Use tramp-adb specific `shell-file-name'. Add safe-local-variable property to `explicit-shell-file-name' and `explicit-sh-args'.
2019-03-09 15:44:24 +00:00
;;;###tramp-autoload
Tramp code cleanup * lisp/net/tramp.el (tramp-shell-prompt-pattern) (tramp-wrong-passwd-regexp, tramp-method-regexp-alist) (tramp-domain-regexp, tramp-host-regexp, tramp-ipv6-regexp) (tramp-port-regexp, tramp-debug-outline-regexp) (tramp-drop-volume-letter, tramp-parse-shostkeys) (tramp-handle-file-name-case-insensitive-p): * lisp/net/tramp-adb.el (tramp-adb-send-command-and-check): * lisp/net/tramp-ftp.el (tramp-ftp-enable-ange-ftp): * lisp/net/tramp-gvfs.el (tramp-gvfs-monitor-process-filter): * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): * lisp/net/tramp-smb.el (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-set-file-acl, tramp-smb-read-file-entry): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-selinux-context): Use character classes in regexp. * lisp/net/tramp-adb.el (tramp-adb-ls-date-year-regexp) (tramp-adb-ls-date-time-regexp): New defconst. (tramp-adb-ls-date-regexp, tramp-adb-ls-toolbox-regexp) (tramp-adb-sh-fix-ls-output): Use them. (tramp-adb-handle-set-file-times, tramp-adb-maybe-open-connection): Apply `eval-when-compile' on constant concat data. (tramp-do-parse-file-attributes-with-ls): Suppress `signal-hook-function'. (tramp-adb--gnu-switches-to-ash): Remove unused function. (tramp-adb-handle-set-file-modes): Qhote argument. (tramp-adb-maybe-open-connection): Set file property rather than flush. * lisp/net/tramp-cmds.el (tramp-rename-these-files): Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes) (tramp-gvfs-file-attributes-with-gvfs-ls-regexp): Embed them in `eval-and-compile'. (tramp-gvfs-get-directory-attributes): Apply `eval-when-compile' on constant concat data.
2020-07-10 08:45:14 +00:00
(defconst tramp-display-escape-sequence-regexp "\e[[:digit:];[]+m"
Sync with Tramp repository. * lisp/net/tramp-adb.el (tramp-adb-handle-start-file-process): * lisp/net/tramp-sh.el (tramp-sh-handle-start-file-process) * lisp/net/tramp-smb.el (tramp-smb-handle-start-file-process): Create BUFFER if it doesn't exist. Reported by Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes) (tramp-gvfs-file-attributes-with-gvfs-ls-regexp) (tramp-gvfs-file-attributes-with-gvfs-info-regexp): New defconst. (tramp-gvfs-get-directory-attributes) (tramp-gvfs-get-root-attributes) (tramp-gvfs-get-file-attributes): New defun. (tramp-gvfs-handle-file-attributes) (tramp-gvfs-handle-file-name-all-completions): Use them. (tramp-gvfs-handle-file-directory-p): Use `file-truename'. (tramp-gvfs-maybe-open-connection): Set :noquery flag for process. (tramp-gvfs-send-command): Add locale settings to `process-environment'. (top): Suppress D-Bus error messages during zeroconf initialization. * lisp/net/tramp.el (tramp-unknown-id-string) (tramp-unknown-id-integer): New defconst. (tramp-check-cached-permissions) * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes) * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-convert-file-attributes, tramp-get-remote-uid) (tramp-get-remote-gid): Use them. * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp): Rename from `tramp-color-escape-sequence-regexp'. (tramp-sh-handle-insert-directory) (tramp-convert-file-attributes): Adapt callees. (tramp-device-escape-sequence-regexp): New defconst. (tramp-wait-for-output): Use it. Reported by Matthías Páll Gissurarson <icetritlo@gmail.com>. * lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions): Simplify. * test/lisp/net/tramp-tests.el (tramp-test26-process-file) (tramp-test28-shell-command): Use `tramp-display-escape-sequence-regexp'.
2016-05-28 10:14:58 +00:00
"Terminal control escape sequences for display attributes.")
Tramp code cleanup * lisp/net/tramp.el (tramp-shell-prompt-pattern) (tramp-wrong-passwd-regexp, tramp-method-regexp-alist) (tramp-domain-regexp, tramp-host-regexp, tramp-ipv6-regexp) (tramp-port-regexp, tramp-debug-outline-regexp) (tramp-drop-volume-letter, tramp-parse-shostkeys) (tramp-handle-file-name-case-insensitive-p): * lisp/net/tramp-adb.el (tramp-adb-send-command-and-check): * lisp/net/tramp-ftp.el (tramp-ftp-enable-ange-ftp): * lisp/net/tramp-gvfs.el (tramp-gvfs-monitor-process-filter): * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): * lisp/net/tramp-smb.el (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-set-file-acl, tramp-smb-read-file-entry): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-selinux-context): Use character classes in regexp. * lisp/net/tramp-adb.el (tramp-adb-ls-date-year-regexp) (tramp-adb-ls-date-time-regexp): New defconst. (tramp-adb-ls-date-regexp, tramp-adb-ls-toolbox-regexp) (tramp-adb-sh-fix-ls-output): Use them. (tramp-adb-handle-set-file-times, tramp-adb-maybe-open-connection): Apply `eval-when-compile' on constant concat data. (tramp-do-parse-file-attributes-with-ls): Suppress `signal-hook-function'. (tramp-adb--gnu-switches-to-ash): Remove unused function. (tramp-adb-handle-set-file-modes): Qhote argument. (tramp-adb-maybe-open-connection): Set file property rather than flush. * lisp/net/tramp-cmds.el (tramp-rename-these-files): Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes) (tramp-gvfs-file-attributes-with-gvfs-ls-regexp): Embed them in `eval-and-compile'. (tramp-gvfs-get-directory-attributes): Apply `eval-when-compile' on constant concat data.
2020-07-10 08:45:14 +00:00
(defconst tramp-device-escape-sequence-regexp "\e[[:digit:][]+n"
Sync with Tramp repository. * lisp/net/tramp-adb.el (tramp-adb-handle-start-file-process): * lisp/net/tramp-sh.el (tramp-sh-handle-start-file-process) * lisp/net/tramp-smb.el (tramp-smb-handle-start-file-process): Create BUFFER if it doesn't exist. Reported by Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes) (tramp-gvfs-file-attributes-with-gvfs-ls-regexp) (tramp-gvfs-file-attributes-with-gvfs-info-regexp): New defconst. (tramp-gvfs-get-directory-attributes) (tramp-gvfs-get-root-attributes) (tramp-gvfs-get-file-attributes): New defun. (tramp-gvfs-handle-file-attributes) (tramp-gvfs-handle-file-name-all-completions): Use them. (tramp-gvfs-handle-file-directory-p): Use `file-truename'. (tramp-gvfs-maybe-open-connection): Set :noquery flag for process. (tramp-gvfs-send-command): Add locale settings to `process-environment'. (top): Suppress D-Bus error messages during zeroconf initialization. * lisp/net/tramp.el (tramp-unknown-id-string) (tramp-unknown-id-integer): New defconst. (tramp-check-cached-permissions) * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes) * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-convert-file-attributes, tramp-get-remote-uid) (tramp-get-remote-gid): Use them. * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp): Rename from `tramp-color-escape-sequence-regexp'. (tramp-sh-handle-insert-directory) (tramp-convert-file-attributes): Adapt callees. (tramp-device-escape-sequence-regexp): New defconst. (tramp-wait-for-output): Use it. Reported by Matthías Páll Gissurarson <icetritlo@gmail.com>. * lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions): Simplify. * test/lisp/net/tramp-tests.el (tramp-test26-process-file) (tramp-test28-shell-command): Use `tramp-display-escape-sequence-regexp'.
2016-05-28 10:14:58 +00:00
"Terminal control escape sequences for device status.")
;; ksh on OpenBSD 4.5 requires that $PS1 contains a `#' character for
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; root users. It uses the `$' character for other users. In order
;; to guarantee a proper prompt, we use "#$ " for the prompt.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defvar tramp-end-of-output
(format
"///%s#$"
(md5 (concat (prin1-to-string process-environment) (current-time-string))))
"String used to recognize end of output.
The `$' character at the end is quoted; the string cannot be
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
detected as prompt when being sent on echoing hosts, therefore.")
;;;###tramp-autoload
(defconst tramp-initial-end-of-output "#$ "
"Prompt when establishing a connection.")
(defconst tramp-end-of-heredoc (md5 tramp-end-of-output)
"String used to recognize end of heredoc strings.")
(defcustom tramp-use-ssh-controlmaster-options (not (eq system-type 'windows-nt))
"Whether to use `tramp-ssh-controlmaster-options'.
Set it to nil, if you use Control* or Proxy* options in your ssh
configuration."
:group 'tramp
:version "28.1"
Fix Bug#31558 * lisp/net/tramp.el (tramp-mode, tramp-verbose) (tramp-backup-directory-alist, tramp-auto-save-directory) (tramp-encoding-shell, tramp-encoding-command-switch) (tramp-encoding-command-interactive, tramp-default-method) (tramp-default-method-alist, tramp-default-user) (tramp-default-user-alist, tramp-default-host) (tramp-default-host-alist, tramp-default-proxies-alist) (tramp-save-ad-hoc-proxies, tramp-restricted-shell-hosts-alist) (tramp-local-host-regexp, tramp-local-end-of-line) (tramp-rsh-end-of-line, tramp-login-prompt-regexp) (tramp-shell-prompt-pattern, tramp-password-prompt-regexp) (tramp-wrong-passwd-regexp, tramp-yesno-prompt-regexp) (tramp-yn-prompt-regexp, tramp-terminal-prompt-regexp) (tramp-operation-not-permitted-regexp, tramp-copy-failed-regexp) (tramp-process-alive-regexp, tramp-ignored-file-name-regexp) (tramp-chunksize, tramp-process-connection-type) (tramp-connection-timeout, tramp-connection-min-time-diff) (tramp-completion-reread-directory-timeout) * lisp/net/tramp-adb.el (tramp-adb-program) (tramp-adb-connect-if-not-connected, tramp-adb-prompt): * lisp/net/tramp-cache.el (tramp-connection-properties) (tramp-persistency-file-name): * lisp/net/tramp-gvfs.el (tramp-gvfs-methods) (tramp-gvfs-zeroconf-domain) (tramp-bluez-discover-devices-timeout): * lisp/net/tramp-sh.el (tramp-inline-compress-start-size) (tramp-copy-size-limit, tramp-terminal-type) (tramp-histfile-override, tramp-use-ssh-controlmaster-options) (tramp-remote-path, tramp-remote-process-environment) (tramp-sh-extra-args): * lisp/net/tramp-smb.el (tramp-smb-program, tramp-smb-acl-program) (tramp-smb-conf, tramp-smb-winexe-program) (tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): Dont't require 'tramp. (Bug#31558) * lisp/net/tramp.el (tramp-ignored-file-name-regexp): Use type regexp.
2018-05-24 12:32:12 +00:00
:type 'boolean)
(defvar tramp-ssh-controlmaster-options nil
"Which ssh Control* arguments to use.
If it is a string, it should have the form
\"-o ControlMaster=auto -o ControlPath=\\='tramp.%%r@%%h:%%p\\='
-o ControlPersist=no\". Percent characters in the ControlPath
spec must be doubled, because the string is used as format string.
Otherwise, it will be auto-detected by Tramp, if
`tramp-use-ssh-controlmaster-options' is non-nil. The value
depends on the installed local ssh version.
The string is used in `tramp-methods'.")
(defvar tramp-scp-strict-file-name-checking nil
"Which scp strict file name checking argument to use.
It is the string \"-T\" if supported by the local scp (since
release 8.0), otherwise the string \"\". If it is nil, it will
be auto-detected by Tramp.
The string is used in `tramp-methods'.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Initialize `tramp-methods' with the supported methods.
;;;###tramp-autoload
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp--with-startup
(add-to-list 'tramp-methods
`("rcp"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "rsh")
(tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "rcp")
(tramp-copy-args (("-p" "%k") ("-r")))
(tramp-copy-keep-date t)
(tramp-copy-recursive t)))
(add-to-list 'tramp-methods
`("remcp"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "remsh")
(tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "rcp")
(tramp-copy-args (("-p" "%k")))
(tramp-copy-keep-date t)))
(add-to-list 'tramp-methods
`("scp"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
("-e" "none") ("%h")))
(tramp-async-args (("-q")))
Some Tramp adaptions, mainly direct async processes * doc/misc/tramp.texi (Firewalls, Remote processes) (Frequently Asked Questions): Add @vindex. (Predefined connection information): Precise precondition or direct async processes. (Remote shell setup): Ban ssh RemoteCommand option. (Frequently Asked Questions): Adapt quoting. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.5.1-pre". * lisp/net/tramp-adb.el (tramp-methods) <adb>: Add `tramp-direct-async' parameter. (tramp-adb-handle-make-process): Adapt docstring. * lisp/net/tramp-sh.el (tramp-methods) <scp, scpx, rsync, ssh, sshx>: Add `tramp-direct-async' parameter. (tramp-sh-handle-insert-directory): Simplify merkers. (tramp-sh-handle-make-process): Adapt docstring. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-debug-message): Suppress lockfiles. (tramp-test-message): New defun. (tramp-direct-async-process-p): Check also for `tramp-direct-async'. (tramp-handle-make-process): Do not check for `tramp-direct-async-args'. * test/lisp/net/tramp-tests.el (all): Replace `string-match' by `string-match-p'. (dired-copy-dereference): Declare. (tramp-test-temporary-file-directory): Remove `tramp-direct-async-args` for mock method. (tramp-test15-copy-directory, tramp-test40-special-characters) (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls, tramp-test41-utf8) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Skip for tramp-rclone.el. (tramp--test--deftest-direct-async-process): Do not skip for mock method. (tramp-test32-shell-command): Adapt test for direct async processes. (tramp-test36-vc-registered, tramp--test-hpux-p, tramp--test-ksh-p): Use `tramp-test-vec'.
2021-01-15 10:32:12 +00:00
(tramp-direct-async t)
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "scp")
(tramp-copy-args (("-P" "%p") ("-p" "%k")
("%x") ("-q") ("-r") ("%c")))
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-copy-keep-date t)
(tramp-copy-recursive t)))
(add-to-list 'tramp-methods
`("scpx"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
("-e" "none") ("-t" "-t")
("-o" "RemoteCommand=\"%l\"")
("%h")))
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-async-args (("-q")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "scp")
(tramp-copy-args (("-P" "%p") ("-p" "%k")
("%x") ("-q") ("-r") ("%c")))
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-copy-keep-date t)
(tramp-copy-recursive t)))
(add-to-list 'tramp-methods
`("rsync"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
("-e" "none") ("%h")))
(tramp-async-args (("-q")))
Some Tramp adaptions, mainly direct async processes * doc/misc/tramp.texi (Firewalls, Remote processes) (Frequently Asked Questions): Add @vindex. (Predefined connection information): Precise precondition or direct async processes. (Remote shell setup): Ban ssh RemoteCommand option. (Frequently Asked Questions): Adapt quoting. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.5.1-pre". * lisp/net/tramp-adb.el (tramp-methods) <adb>: Add `tramp-direct-async' parameter. (tramp-adb-handle-make-process): Adapt docstring. * lisp/net/tramp-sh.el (tramp-methods) <scp, scpx, rsync, ssh, sshx>: Add `tramp-direct-async' parameter. (tramp-sh-handle-insert-directory): Simplify merkers. (tramp-sh-handle-make-process): Adapt docstring. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-debug-message): Suppress lockfiles. (tramp-test-message): New defun. (tramp-direct-async-process-p): Check also for `tramp-direct-async'. (tramp-handle-make-process): Do not check for `tramp-direct-async-args'. * test/lisp/net/tramp-tests.el (all): Replace `string-match' by `string-match-p'. (dired-copy-dereference): Declare. (tramp-test-temporary-file-directory): Remove `tramp-direct-async-args` for mock method. (tramp-test15-copy-directory, tramp-test40-special-characters) (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls, tramp-test41-utf8) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Skip for tramp-rclone.el. (tramp--test--deftest-direct-async-process): Do not skip for mock method. (tramp-test32-shell-command): Adapt test for direct async processes. (tramp-test36-vc-registered, tramp--test-hpux-p, tramp--test-ksh-p): Use `tramp-test-vec'.
2021-01-15 10:32:12 +00:00
(tramp-direct-async t)
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "rsync")
(tramp-copy-args (("-t" "%k") ("-p") ("-r") ("-s")
("-c")))
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-copy-env (("RSYNC_RSH") ("ssh" "%c")))
(tramp-copy-keep-date t)
(tramp-copy-keep-tmpfile t)
(tramp-copy-recursive t)))
(add-to-list 'tramp-methods
`("rsh"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "rsh")
(tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
(add-to-list 'tramp-methods
`("remsh"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "remsh")
(tramp-login-args (("%h") ("-l" "%u")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
(add-to-list 'tramp-methods
`("ssh"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
("-e" "none") ("%h")))
(tramp-async-args (("-q")))
Some Tramp adaptions, mainly direct async processes * doc/misc/tramp.texi (Firewalls, Remote processes) (Frequently Asked Questions): Add @vindex. (Predefined connection information): Precise precondition or direct async processes. (Remote shell setup): Ban ssh RemoteCommand option. (Frequently Asked Questions): Adapt quoting. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.5.1-pre". * lisp/net/tramp-adb.el (tramp-methods) <adb>: Add `tramp-direct-async' parameter. (tramp-adb-handle-make-process): Adapt docstring. * lisp/net/tramp-sh.el (tramp-methods) <scp, scpx, rsync, ssh, sshx>: Add `tramp-direct-async' parameter. (tramp-sh-handle-insert-directory): Simplify merkers. (tramp-sh-handle-make-process): Adapt docstring. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-debug-message): Suppress lockfiles. (tramp-test-message): New defun. (tramp-direct-async-process-p): Check also for `tramp-direct-async'. (tramp-handle-make-process): Do not check for `tramp-direct-async-args'. * test/lisp/net/tramp-tests.el (all): Replace `string-match' by `string-match-p'. (dired-copy-dereference): Declare. (tramp-test-temporary-file-directory): Remove `tramp-direct-async-args` for mock method. (tramp-test15-copy-directory, tramp-test40-special-characters) (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls, tramp-test41-utf8) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Skip for tramp-rclone.el. (tramp--test--deftest-direct-async-process): Do not skip for mock method. (tramp-test32-shell-command): Adapt test for direct async processes. (tramp-test36-vc-registered, tramp--test-hpux-p, tramp--test-ksh-p): Use `tramp-test-vec'.
2021-01-15 10:32:12 +00:00
(tramp-direct-async t)
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
(add-to-list 'tramp-methods
`("sshx"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
("-e" "none") ("-t" "-t")
("-o" "RemoteCommand=\"%l\"")
("%h")))
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-async-args (("-q")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
(add-to-list 'tramp-methods
`("telnet"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "telnet")
(tramp-login-args (("%h") ("%p") ("%n")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
(add-to-list 'tramp-methods
`("nc"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "telnet")
(tramp-login-args (("%h") ("%p") ("%n")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "nc")
;; We use "-v" for better error tracking.
(tramp-copy-args (("-w" "1") ("-v") ("%h") ("%r")))
(tramp-remote-copy-program "nc")
;; We use "-p" as required for newer busyboxes. For older
;; busybox/nc versions, the value must be (("-l") ("%r")). This
;; can be achieved by tweaking `tramp-connection-properties'.
(tramp-remote-copy-args (("-l") ("-p" "%r") ("%n")))))
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(add-to-list 'tramp-methods
`("su"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "su")
(tramp-login-args (("-") ("%u")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
(add-to-list 'tramp-methods
`("sg"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "sg")
(tramp-login-args (("-") ("%u")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
(add-to-list 'tramp-methods
`("sudo"
(tramp-login-program "env")
;; The password template must be masked. Otherwise,
;; it could be interpreted as password prompt if the
;; remote host echoes the command.
;; The "-p" argument doesn't work reliably, see Bug#50594.
(tramp-login-args (("SUDO_PROMPT=P\"\"a\"\"s\"\"s\"\"w\"\"o\"\"r\"\"d\"\":")
("sudo") ("-u" "%u") ("-s") ("-H")
("%l")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)
(tramp-session-timeout 300)))
(add-to-list 'tramp-methods
`("doas"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "doas")
(tramp-login-args (("-u" "%u") ("-s")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)
(tramp-session-timeout 300)))
(add-to-list 'tramp-methods
`("ksu"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "ksu")
(tramp-login-args (("%u") ("-q")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
(add-to-list 'tramp-methods
`("krlogin"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "krlogin")
(tramp-login-args (("%h") ("-l" "%u") ("-x")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
(add-to-list 'tramp-methods
`("plink"
(tramp-login-program "plink")
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh")
("-t") ("%h") ("\"")
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(,(format
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
tramp-terminal-type
tramp-initial-end-of-output))
("%l") ("\"")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
(add-to-list 'tramp-methods
`("plinkx"
(tramp-login-program "plink")
(tramp-login-args (("-load") ("%h") ("-t") ("\"")
(,(format
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
tramp-terminal-type
tramp-initial-end-of-output))
("%l") ("\"")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
(add-to-list 'tramp-methods
`("pscp"
(tramp-login-program "plink")
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh")
("-t") ("%h") ("\"")
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(,(format
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
tramp-terminal-type
tramp-initial-end-of-output))
("%l") ("\"")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "pscp")
(tramp-copy-args (("-l" "%u") ("-P" "%p") ("-scp")
("-p" "%k") ("-q") ("-r")))
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-copy-keep-date t)
(tramp-copy-recursive t)))
(add-to-list 'tramp-methods
`("psftp"
(tramp-login-program "plink")
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh")
("-t") ("%h") ("\"")
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(,(format
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
tramp-terminal-type
tramp-initial-end-of-output))
("%l") ("\"")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-copy-program "pscp")
(tramp-copy-args (("-l" "%u") ("-P" "%p") ("-sftp")
("-p" "%k") ("-q")))
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-copy-keep-date t)))
(add-to-list 'tramp-methods
`("fcp"
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-login-program "fsh")
(tramp-login-args (("%h") ("-l" "%u") ("sh" "-i")))
(tramp-remote-shell ,tramp-default-remote-shell)
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-i") ("-c"))
(tramp-copy-program "fcp")
(tramp-copy-args (("-p" "%k")))
(tramp-copy-keep-date t)))
(add-to-list 'tramp-default-method-alist
`(,tramp-local-host-regexp "\\`root\\'" "su"))
(add-to-list 'tramp-default-user-alist
`(,(concat "\\`" (regexp-opt '("su" "sudo" "doas" "ksu")) "\\'")
nil "root"))
;; Do not add "ssh" based methods, otherwise ~/.ssh/config would be ignored.
;; Do not add "plink" based methods, they ask interactively for the user.
(add-to-list 'tramp-default-user-alist
`(,(concat
"\\`"
(regexp-opt
'("rcp" "remcp" "rsh" "telnet" "nc" "krlogin" "fcp"))
"\\'")
nil ,(user-login-name))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;;;###tramp-autoload
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-completion-function-alist-rsh
'((tramp-parse-rhosts "/etc/hosts.equiv")
(tramp-parse-rhosts "~/.rhosts"))
"Default list of (FUNCTION FILE) pairs to be examined for rsh methods.")
;;;###tramp-autoload
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-completion-function-alist-ssh
`((tramp-parse-rhosts "/etc/hosts.equiv")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-parse-rhosts "/etc/shosts.equiv")
;; On W32 systems, the ssh directory is located somewhere else.
(tramp-parse-shosts ,(expand-file-name
"ssh/ssh_known_hosts"
(or (and (eq system-type 'windows-nt)
(getenv "ProgramData"))
"/etc/")))
(tramp-parse-sconfig ,(expand-file-name
"ssh/ssh_config"
(or (and (eq system-type 'windows-nt)
(getenv "ProgramData"))
"/etc/")))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-parse-shostkeys "/etc/ssh2/hostkeys")
(tramp-parse-sknownhosts "/etc/ssh2/knownhosts")
(tramp-parse-rhosts "~/.rhosts")
(tramp-parse-rhosts "~/.shosts")
;; On W32 systems, the .ssh directory is located somewhere else.
(tramp-parse-shosts ,(expand-file-name
".ssh/known_hosts"
(or (and (eq system-type 'windows-nt)
(getenv "USERPROFILE"))
"~/")))
(tramp-parse-sconfig ,(expand-file-name
".ssh/config"
(or (and (eq system-type 'windows-nt)
(getenv "USERPROFILE"))
"~/")))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-parse-shostkeys "~/.ssh2/hostkeys")
(tramp-parse-sknownhosts "~/.ssh2/knownhosts"))
"Default list of (FUNCTION FILE) pairs to be examined for ssh methods.")
;;;###tramp-autoload
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-completion-function-alist-telnet
'((tramp-parse-hosts "/etc/hosts"))
"Default list of (FUNCTION FILE) pairs to be examined for telnet methods.")
;;;###tramp-autoload
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-completion-function-alist-su
'((tramp-parse-passwd "/etc/passwd"))
"Default list of (FUNCTION FILE) pairs to be examined for su methods.")
;;;###tramp-autoload
(defconst tramp-completion-function-alist-sg
'((tramp-parse-etc-group "/etc/group"))
"Default list of (FUNCTION FILE) pairs to be examined for sg methods.")
;;;###tramp-autoload
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-completion-function-alist-putty
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
`((tramp-parse-putty
,(if (eq system-type 'windows-nt)
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
"HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\Sessions"
"~/.putty/sessions")))
"Default list of (FUNCTION REGISTRY) pairs to be examined for putty sessions.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;;;###tramp-autoload
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp--with-startup
(tramp-set-completion-function "rcp" tramp-completion-function-alist-rsh)
(tramp-set-completion-function "remcp" tramp-completion-function-alist-rsh)
(tramp-set-completion-function "scp" tramp-completion-function-alist-ssh)
(tramp-set-completion-function "scpx" tramp-completion-function-alist-ssh)
(tramp-set-completion-function "rsync" tramp-completion-function-alist-ssh)
(tramp-set-completion-function "rsh" tramp-completion-function-alist-rsh)
(tramp-set-completion-function "remsh" tramp-completion-function-alist-rsh)
(tramp-set-completion-function "ssh" tramp-completion-function-alist-ssh)
(tramp-set-completion-function "sshx" tramp-completion-function-alist-ssh)
(tramp-set-completion-function
"telnet" tramp-completion-function-alist-telnet)
(tramp-set-completion-function "nc" tramp-completion-function-alist-telnet)
(tramp-set-completion-function "su" tramp-completion-function-alist-su)
(tramp-set-completion-function "sudo" tramp-completion-function-alist-su)
(tramp-set-completion-function "doas" tramp-completion-function-alist-su)
(tramp-set-completion-function "ksu" tramp-completion-function-alist-su)
(tramp-set-completion-function "sg" tramp-completion-function-alist-sg)
(tramp-set-completion-function
"krlogin" tramp-completion-function-alist-rsh)
(tramp-set-completion-function "plink" tramp-completion-function-alist-ssh)
(tramp-set-completion-function
"plinkx" tramp-completion-function-alist-putty)
(tramp-set-completion-function "pscp" tramp-completion-function-alist-ssh)
(tramp-set-completion-function "psftp" tramp-completion-function-alist-ssh)
(tramp-set-completion-function "fcp" tramp-completion-function-alist-ssh))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defcustom tramp-sh-extra-args
'(("/bash\\'" . "-noediting -norc -noprofile")
("/zsh\\'" . "-f +Z -V"))
"Alist specifying extra arguments to pass to the remote shell.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Entries are (REGEXP . ARGS) where REGEXP is a regular expression
matching the shell file name and ARGS is a string specifying the
arguments. These arguments shall disable line editing, see
`tramp-open-shell'.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
This variable is only used when Tramp needs to start up another shell
for tilde expansion. The extra arguments should typically prevent the
shell from reading its init file."
:group 'tramp
:version "27.1"
Fix Bug#31558 * lisp/net/tramp.el (tramp-mode, tramp-verbose) (tramp-backup-directory-alist, tramp-auto-save-directory) (tramp-encoding-shell, tramp-encoding-command-switch) (tramp-encoding-command-interactive, tramp-default-method) (tramp-default-method-alist, tramp-default-user) (tramp-default-user-alist, tramp-default-host) (tramp-default-host-alist, tramp-default-proxies-alist) (tramp-save-ad-hoc-proxies, tramp-restricted-shell-hosts-alist) (tramp-local-host-regexp, tramp-local-end-of-line) (tramp-rsh-end-of-line, tramp-login-prompt-regexp) (tramp-shell-prompt-pattern, tramp-password-prompt-regexp) (tramp-wrong-passwd-regexp, tramp-yesno-prompt-regexp) (tramp-yn-prompt-regexp, tramp-terminal-prompt-regexp) (tramp-operation-not-permitted-regexp, tramp-copy-failed-regexp) (tramp-process-alive-regexp, tramp-ignored-file-name-regexp) (tramp-chunksize, tramp-process-connection-type) (tramp-connection-timeout, tramp-connection-min-time-diff) (tramp-completion-reread-directory-timeout) * lisp/net/tramp-adb.el (tramp-adb-program) (tramp-adb-connect-if-not-connected, tramp-adb-prompt): * lisp/net/tramp-cache.el (tramp-connection-properties) (tramp-persistency-file-name): * lisp/net/tramp-gvfs.el (tramp-gvfs-methods) (tramp-gvfs-zeroconf-domain) (tramp-bluez-discover-devices-timeout): * lisp/net/tramp-sh.el (tramp-inline-compress-start-size) (tramp-copy-size-limit, tramp-terminal-type) (tramp-histfile-override, tramp-use-ssh-controlmaster-options) (tramp-remote-path, tramp-remote-process-environment) (tramp-sh-extra-args): * lisp/net/tramp-smb.el (tramp-smb-program, tramp-smb-acl-program) (tramp-smb-conf, tramp-smb-winexe-program) (tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): Dont't require 'tramp. (Bug#31558) * lisp/net/tramp.el (tramp-ignored-file-name-regexp): Use type regexp.
2018-05-24 12:32:12 +00:00
:type '(alist :key-type regexp :value-type string))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-actions-before-shell
'((tramp-login-prompt-regexp tramp-action-login)
(tramp-password-prompt-regexp tramp-action-password)
(tramp-wrong-passwd-regexp tramp-action-permission-denied)
(shell-prompt-pattern tramp-action-succeed)
(tramp-shell-prompt-pattern tramp-action-succeed)
(tramp-yesno-prompt-regexp tramp-action-yesno)
(tramp-yn-prompt-regexp tramp-action-yn)
(tramp-terminal-prompt-regexp tramp-action-terminal)
(tramp-antispoof-regexp tramp-action-confirm-message)
(tramp-security-key-confirm-regexp tramp-action-show-and-confirm-message)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-process-alive-regexp tramp-action-process-alive))
"List of pattern/action pairs.
Whenever a pattern matches, the corresponding action is performed.
Each item looks like (PATTERN ACTION).
The PATTERN should be a symbol, a variable. The value of this
variable gives the regular expression to search for. Note that the
regexp must match at the end of the buffer, \"\\'\" is implicitly
appended to it.
The ACTION should also be a symbol, but a function. When the
corresponding PATTERN matches, the ACTION function is called.")
(defconst tramp-actions-copy-out-of-band
'((tramp-password-prompt-regexp tramp-action-password)
(tramp-wrong-passwd-regexp tramp-action-permission-denied)
(tramp-copy-failed-regexp tramp-action-permission-denied)
(tramp-security-key-confirm-regexp tramp-action-show-and-confirm-message)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-process-alive-regexp tramp-action-out-of-band))
"List of pattern/action pairs.
This list is used for copying/renaming with out-of-band methods.
See `tramp-actions-before-shell' for more info.")
(defconst tramp-uudecode
"(echo begin 600 %t; tail -n +2) | uudecode
cat %t
rm -f %t"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Shell function to implement `uudecode' to standard output.
Many systems support `uudecode -o /dev/stdout' or `uudecode -o -'
for this or `uudecode -p', but some systems don't, and for them
we have this shell function.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-perl-file-truename
"%p -e '
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
use File::Spec;
use Cwd \"realpath\";
sub myrealpath {
my ($file) = @_;
return realpath($file) if (-e $file || -l $file);
}
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
sub recursive {
my ($volume, @dirs) = @_;
my $real = myrealpath(File::Spec->catpath(
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
$volume, File::Spec->catdir(@dirs), \"\"));
if ($real) {
my ($vol, $dir) = File::Spec->splitpath($real, 1);
return ($vol, File::Spec->splitdir($dir));
}
else {
my $last = pop(@dirs);
($volume, @dirs) = recursive($volume, @dirs);
push(@dirs, $last);
return ($volume, @dirs);
}
}
$result = myrealpath($ARGV[0]);
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
if (!$result) {
my ($vol, $dir) = File::Spec->splitpath($ARGV[0], 1);
($vol, @dirs) = recursive($vol, File::Spec->splitdir($dir));
$result = File::Spec->catpath($vol, File::Spec->catdir(@dirs), \"\");
}
$result =~ s/\"/\\\\\"/g;
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
print \"\\\"$result\\\"\\n\";
' \"$1\" %n"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Perl script to produce output suitable for use with `file-truename'
on the remote file system.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-perl-file-name-all-completions
"%p -e '
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
opendir(d, $ARGV[0]) || die(\"$ARGV[0]: $!\\nfail\\n\");
@files = readdir(d); closedir(d);
foreach $f (@files) {
if (-d \"$ARGV[0]/$f\") {
print \"$f/\\n\";
}
else {
print \"$f\\n\";
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
}
}
print \"ok\\n\"
' \"$1\" %n"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Perl script to produce output suitable for use with
`file-name-all-completions' on the remote file system.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Perl script to implement `file-attributes' in a Lisp `read'able
;; output. If you are hacking on this, note that you get *no* output
;; unless this spits out a complete line, including the '\n' at the
;; end.
;; The device number is returned as "-1", because there will be a virtual
;; device number set in `tramp-sh-handle-file-attributes'.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-perl-file-attributes
"%p -e '
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
@stat = lstat($ARGV[0]);
if (!@stat) {
print \"nil\\n\";
exit 0;
}
if (($stat[2] & 0170000) == 0120000)
{
$type = readlink($ARGV[0]);
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
$type =~ s/\"/\\\\\"/g;
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
$type = \"\\\"$type\\\"\";
}
elsif (($stat[2] & 0170000) == 040000)
{
$type = \"t\";
}
else
{
$type = \"nil\"
};
$uid = ($ARGV[1] eq \"integer\") ? $stat[4] : \"\\\"\" . getpwuid($stat[4]) . \"\\\"\";
$gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" . getgrgid($stat[5]) . \"\\\"\";
printf(
\"(%%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u %%u t %%u -1)\\n\",
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
$type,
$stat[3],
$uid,
$gid,
$stat[8] >> 16 & 0xffff,
$stat[8] & 0xffff,
$stat[9] >> 16 & 0xffff,
$stat[9] & 0xffff,
$stat[10] >> 16 & 0xffff,
$stat[10] & 0xffff,
$stat[7],
$stat[2],
$stat[1]
);' \"$1\" \"$2\" %n"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Perl script to produce output suitable for use with `file-attributes'
on the remote file system.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-perl-directory-files-and-attributes
"%p -e '
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
chdir($ARGV[0]) or printf(\"\\\"Cannot change to $ARGV[0]: $''!''\\\"\\n\"), exit();
opendir(DIR,\".\") or printf(\"\\\"Cannot open directory $ARGV[0]: $''!''\\\"\\n\"), exit();
@list = readdir(DIR);
closedir(DIR);
$n = scalar(@list);
printf(\"(\\n\");
for($i = 0; $i < $n; $i++)
{
$filename = $list[$i];
@stat = lstat($filename);
if (($stat[2] & 0170000) == 0120000)
{
$type = readlink($filename);
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
$type =~ s/\"/\\\\\"/g;
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
$type = \"\\\"$type\\\"\";
}
elsif (($stat[2] & 0170000) == 040000)
{
$type = \"t\";
}
else
{
$type = \"nil\"
};
$uid = ($ARGV[1] eq \"integer\") ? $stat[4] : \"\\\"\" . getpwuid($stat[4]) . \"\\\"\";
$gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" . getgrgid($stat[5]) . \"\\\"\";
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
$filename =~ s/\"/\\\\\"/g;
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
printf(
\"(\\\"%%s\\\" %%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u %%u t %%u -1)\\n\",
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
$filename,
$type,
$stat[3],
$uid,
$gid,
$stat[8] >> 16 & 0xffff,
$stat[8] & 0xffff,
$stat[9] >> 16 & 0xffff,
$stat[9] & 0xffff,
$stat[10] >> 16 & 0xffff,
$stat[10] & 0xffff,
$stat[7],
$stat[2],
$stat[1]);
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
}
printf(\")\\n\");' \"$1\" \"$2\" %n"
"Perl script implementing `directory-files-and-attributes' as Lisp `read'able
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
output.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; These two use base64 encoding.
(defconst tramp-perl-encode-with-module
"%p -MMIME::Base64 -0777 -ne 'print encode_base64($_)' %n"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Perl program to use for encoding a file.
This implementation requires the MIME::Base64 Perl module to be installed
on the remote host.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-perl-decode-with-module
"%p -MMIME::Base64 -0777 -ne 'print decode_base64($_)' %n"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Perl program to use for decoding a file.
This implementation requires the MIME::Base64 Perl module to be installed
on the remote host.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-perl-encode
"%p -e '
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
# This script contributed by Juanma Barranquero <lektu@terra.es>.
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
use strict;
my %%trans = do {
my $i = 0;
map {(substr(unpack(q(B8), chr $i++), 2, 6), $_)}
split //, q(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/);
};
my $data;
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
# We read in chunks of 54 bytes, to generate output lines
# of 72 chars (plus end of line)
while (read STDIN, $data, 54) {
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
my $pad = q();
# Only for the last chunk, and only if did not fill the last
# three-byte packet
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
if (eof) {
my $mod = length($data) %% 3;
$pad = q(=) x (3 - $mod) if $mod;
}
# Not the fastest method, but it is simple: unpack to binary string, split
# by groups of 6 bits and convert back from binary to byte; then map into
# the translation table
print
join q(),
map($trans{$_},
(substr(unpack(q(B*), $data) . q(00000), 0, 432) =~ /....../g)),
$pad,
qq(\\n);
}' %n"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Perl program to use for encoding a file.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-perl-decode
"%p -e '
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
# This script contributed by Juanma Barranquero <lektu@terra.es>.
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
use strict;
my %%trans = do {
my $i = 0;
map {($_, substr(unpack(q(B8), chr $i++), 2, 6))}
split //, q(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/)
};
my %%bytes = map {(unpack(q(B8), chr $_), chr $_)} 0 .. 255;
binmode(\\*STDOUT);
# We are going to accumulate into $pending to accept any line length
# (we do not check they are <= 76 chars as the RFC says)
my $pending = q();
while (my $data = <STDIN>) {
chomp $data;
# If we find one or two =, we have reached the end and
# any following data is to be discarded
my $finished = $data =~ s/(==?).*/$1/;
$pending .= $data;
my $len = length($pending);
my $chunk = substr($pending, 0, $len & ~3);
$pending = substr($pending, $len & ~3 + 1);
# Easy method: translate from chars to (pregenerated) six-bit packets, join,
# split in 8-bit chunks and convert back to char.
print join q(),
map $bytes{$_},
((join q(), map {$trans{$_} || q()} split //, $chunk) =~ /......../g);
last if $finished;
}' %n"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Perl program to use for decoding a file.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-perl-pack
"%p -e 'binmode STDIN; binmode STDOUT; print pack(q{u*}, join q{}, <>)' %n"
"Perl program to use for encoding a file.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
(defconst tramp-perl-unpack
"%p -e 'binmode STDIN; binmode STDOUT; print unpack(q{u*}, join q{}, <>)' %n"
"Perl program to use for decoding a file.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
(defconst tramp-hexdump-encode "%h -v -e '16/1 \" %%02x\" \"\\n\"'"
"`hexdump' program to use for encoding a file.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
(defconst tramp-awk-encode
"%a '\\
BEGIN {
b64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"
b16 = \"0123456789abcdef\"
}
{
for (c=1; c<=length($0); c++) {
d=index(b16, substr($0,c,1))
if (d--) {
for (b=1; b<=4; b++) {
o=o*2+int(d/8); d=(d*2)%%16
if (++obc==6) {
printf substr(b64,o+1,1)
if (++rc>75) { printf \"\\n\"; rc=0 }
obc=0; o=0
}
}
}
}
}
END {
if (obc) {
tail=(obc==2) ? \"==\\n\" : \"=\\n\"
while (obc++<6) { o=o*2 }
printf \"%%c\", substr(b64,o+1,1)
} else {
tail=\"\\n\"
}
printf tail
}'"
"`awk' program to use for encoding a file.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
(defconst tramp-hexdump-awk-encode
(format "%s | %s" tramp-hexdump-encode tramp-awk-encode)
"`hexdump' / `awk' pipe to use for encoding a file.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
(defconst tramp-od-encode "%o -v -t x1 -A n"
"`od' program to use for encoding a file.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
(defconst tramp-od-awk-encode (format "%s | %s" tramp-od-encode tramp-awk-encode)
"`od' / `awk' pipe to use for encoding a file.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
(defconst tramp-awk-decode
"%a '\\
BEGIN {
b64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"
}
{
for (i=1; i<=length($0); i++) {
c=index(b64, substr($0,i,1))
if(c--) {
for(b=0; b<6; b++) {
o=o*2+int(c/32); c=(c*2)%%64
if(++obc==8) {
if (o) {
printf \"%%c\", o
} else {
system(\"dd if=/dev/zero bs=1 count=1 %n\")
}
obc=0; o=0
}
}
}
}
}'"
"Awk program to use for decoding a file.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-vc-registered-read-file-names
"echo \"(\"
while read file; do
quoted=`echo \"$file\" | sed -e \"s/\\\"/\\\\\\\\\\\\\\\\\\\"/\"`
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
if %s \"$file\"; then
echo \"(\\\"$quoted\\\" \\\"file-exists-p\\\" t)\"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
else
echo \"(\\\"$quoted\\\" \\\"file-exists-p\\\" nil)\"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
fi
if %s \"$file\"; then
echo \"(\\\"$quoted\\\" \\\"file-readable-p\\\" t)\"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
else
echo \"(\\\"$quoted\\\" \\\"file-readable-p\\\" nil)\"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
fi
done
echo \")\""
"Script to check existence of VC related files.
It must be send formatted with two strings; the tests for file
existence, and file readability. Input shall be read via
here-document, otherwise the command could exceed maximum length
of command line.
Format specifiers \"%s\" are replaced before the script is used.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
;; New handlers should be added here.
;;;###tramp-autoload
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-sh-file-name-handler-alist
'((access-file . tramp-handle-access-file)
(add-name-to-file . tramp-sh-handle-add-name-to-file)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
;; `byte-compiler-base-file-name' performed by default handler.
(copy-directory . tramp-sh-handle-copy-directory)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(copy-file . tramp-sh-handle-copy-file)
(delete-directory . tramp-sh-handle-delete-directory)
(delete-file . tramp-sh-handle-delete-file)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
;; `diff-latest-backup-file' performed by default handler.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(directory-file-name . tramp-handle-directory-file-name)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(directory-files . tramp-handle-directory-files)
(directory-files-and-attributes
. tramp-sh-handle-directory-files-and-attributes)
(dired-compress-file . tramp-sh-handle-dired-compress-file)
(dired-uncache . tramp-handle-dired-uncache)
Implement command completion in remote shells. (Bug#31704) * doc/lispref/files.texi (Locating Files): Describe optional argument REMOTE of `executable-find'. (Magic File Names): Add `exec-path'. * doc/lispref/processes.texi (Subprocess Creation): Describe function `exec-path'. * doc/misc/tramp.texi (Remote programs): Explain refresh of search paths by `tramp-cleanup-this-connection'. * etc/NEWS: Mention 'exec-path' and 'executable-find'. * lisp/files.el (exec-path): New defun. (executable-find): Add optional argument REMOTE. * lisp/shell.el (shell-completion-vars): Set `comint-file-name-prefix'. (shell--command-completion-data): Use `(exec-path)'. (Bug#31704) * lisp/net/ange-ftp.el (exec-path): * lisp/net/tramp.el (tramp-file-name-for-operation): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) <exec-path>: Add handler. * lisp/net/tramp-adb.el (tramp-adb-handle-exec-path): New defun. (tramp-adb-maybe-open-connection): Do not set "remote-path" connection property. * lisp/net/tramp-compat.el (tramp-compat-exec-path): New defun. * lisp/net/tramp-sh.el (tramp-sh-handle-exec-path): New defun. * lisp/net/tramp.el (tramp-eshell-directory-change): Use it. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test38-make-nearby-temp-file) (tramp-archive-test41-file-system-info) (tramp-archive-test43-auto-load) (tramp-archive-test43-delay-load): Rename. * test/lisp/net/tramp-tests.el (tramp-test34-exec-path): New test. (tramp-test36-make-auto-save-file-name) (tramp-test37-find-backup-file-name) (tramp-test38-make-nearby-temp-file) (tramp-test39-special-characters) (tramp-test39-special-characters-with-stat) (tramp-test39-special-characters-with-perl) (tramp-test39-special-characters-with-ls, tramp-test40-utf8) (tramp-test40-utf8-with-stat, tramp-test40-utf8-with-perl) (tramp-test40-utf8-with-ls, tramp-test41-file-system-info) (tramp-test42-asynchronous-requests, tramp-test43-auto-load) (tramp-test43-delay-load, tramp-test43-recursive-load) (tramp-test43-remote-load-path, tramp-test44-unload): Rename.
2018-06-20 10:13:56 +00:00
(exec-path . tramp-sh-handle-exec-path)
(expand-file-name . tramp-sh-handle-expand-file-name)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(file-accessible-directory-p . tramp-handle-file-accessible-directory-p)
(file-acl . tramp-sh-handle-file-acl)
(file-attributes . tramp-sh-handle-file-attributes)
(file-directory-p . tramp-sh-handle-file-directory-p)
(file-equal-p . tramp-handle-file-equal-p)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(file-executable-p . tramp-sh-handle-file-executable-p)
(file-exists-p . tramp-sh-handle-file-exists-p)
(file-in-directory-p . tramp-handle-file-in-directory-p)
(file-local-copy . tramp-sh-handle-file-local-copy)
Implement file locks for remote files (Bug#49261) * doc/lispref/files.texi (Magic File Names): Add file-locked-p, lock-file and unlock-file. * etc/NEWS: Tramp supports file locks now. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-adb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): New defun. * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify. (tramp-fuse-unmount): New defun. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sh-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-smb-handle-copy-directory): Use `sleep-for'. (tramp-smb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sshfs-handle-write-region): Handle LOCKNAME. (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sudoedit-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid) (tramp-handle-file-locked-p, tramp-handle-lock-file) (tramp-handle-unlock-file): New defuns. (tramp-lock-file-contents-regexp): New regexp. (tramp-handle-write-region): Handle LOCKNAME. * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p): Call handler if exists. (Flock_file, Funlock_file): New defuns. (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols. (Slock_file, Sunlock_file): Declare subroutines. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-make-nearby-temp-file) (tramp-archive-test43-file-system-info): Rename. * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil. (tramp--test-fuse-p): New defun. (tramp-test14-delete-directory): Use it. (tramp-test39-lock-file): New test. (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters) (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls, tramp-test42-utf8) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls, tramp-test43-file-system-info) (tramp-test44-asynchronous-requests, tramp-test45-auto-load) (tramp-test45-delay-load, tramp-test45-recursive-load) (tramp-test45-remote-load-path, tramp-test46-unload): Rename. (tramp--test-special-characters, tramp--test-utf8) (tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 16:36:53 +00:00
(file-locked-p . tramp-handle-file-locked-p)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(file-modes . tramp-handle-file-modes)
(file-name-all-completions . tramp-sh-handle-file-name-all-completions)
(file-name-as-directory . tramp-handle-file-name-as-directory)
(file-name-case-insensitive-p . tramp-handle-file-name-case-insensitive-p)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(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)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(file-notify-add-watch . tramp-sh-handle-file-notify-add-watch)
(file-notify-rm-watch . tramp-handle-file-notify-rm-watch)
(file-notify-valid-p . tramp-handle-file-notify-valid-p)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(file-ownership-preserved-p . tramp-sh-handle-file-ownership-preserved-p)
(file-readable-p . tramp-sh-handle-file-readable-p)
(file-regular-p . tramp-handle-file-regular-p)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(file-remote-p . tramp-handle-file-remote-p)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(file-selinux-context . tramp-sh-handle-file-selinux-context)
(file-symlink-p . tramp-handle-file-symlink-p)
(file-system-info . tramp-sh-handle-file-system-info)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(file-truename . tramp-sh-handle-file-truename)
(file-writable-p . tramp-sh-handle-file-writable-p)
(find-backup-file-name . tramp-handle-find-backup-file-name)
;; `get-file-buffer' performed by default handler.
(insert-directory . tramp-sh-handle-insert-directory)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(insert-file-contents . tramp-handle-insert-file-contents)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(load . tramp-handle-load)
Implement file locks for remote files (Bug#49261) * doc/lispref/files.texi (Magic File Names): Add file-locked-p, lock-file and unlock-file. * etc/NEWS: Tramp supports file locks now. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-adb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): New defun. * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify. (tramp-fuse-unmount): New defun. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sh-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-smb-handle-copy-directory): Use `sleep-for'. (tramp-smb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sshfs-handle-write-region): Handle LOCKNAME. (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sudoedit-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid) (tramp-handle-file-locked-p, tramp-handle-lock-file) (tramp-handle-unlock-file): New defuns. (tramp-lock-file-contents-regexp): New regexp. (tramp-handle-write-region): Handle LOCKNAME. * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p): Call handler if exists. (Flock_file, Funlock_file): New defuns. (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols. (Slock_file, Sunlock_file): Declare subroutines. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-make-nearby-temp-file) (tramp-archive-test43-file-system-info): Rename. * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil. (tramp--test-fuse-p): New defun. (tramp-test14-delete-directory): Use it. (tramp-test39-lock-file): New test. (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters) (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls, tramp-test42-utf8) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls, tramp-test43-file-system-info) (tramp-test44-asynchronous-requests, tramp-test45-auto-load) (tramp-test45-delay-load, tramp-test45-recursive-load) (tramp-test45-remote-load-path, tramp-test46-unload): Rename. (tramp--test-special-characters, tramp--test-utf8) (tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 16:36:53 +00:00
(lock-file . tramp-handle-lock-file)
Improve compatibility with older Emacsen, and XEmacs. * net/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. * net/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'. * net/tramp-cache.el (tramp-cache-print): Call `substring-no-properties' only if it is bound. It isn't for XEmacs. * net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is bound. It isn't for XEmacs. * net/tramp-compat.el (tramp-compat-copy-file): Catch `wrong-number-of-arguments' error. (tramp-compat-replace-regexp-in-string): New defun. * net/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'. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `tramp-compat-replace-regexp-in-string'. * net/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'. * net/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-08 15:04:10 +00:00
(make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(make-directory . tramp-sh-handle-make-directory)
;; `make-directory-internal' performed by default handler.
(make-lock-file-name . tramp-handle-make-lock-file-name)
Add `make-nearby-temp-file' and `temporary-file-directory' * doc/lispref/files.texi (Unique File Names): Introduce `make-nearby-temp-file' and `temporary-file-directory'. (Magic File Names): Mention `make-nearby-temp-file' and `temporary-file-directory'. * etc/NEWS (provided): Mention `make-nearby-temp-file' and `temporary-file-directory'. * lisp/files.el (mounted-file-systems): New defcustom. (temporary-file-directory, make-nearby-temp-file): New defuns. (normal-backup-enable-predicate): Fix docstring. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): <make-nearby-temp-file, temporary-file-directory>: Add handler. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `make-nearby-temp-file' and `temporary-file-directory'. (tramp-get-remote-tmpdir): Remove compatibility code. (tramp-handle-temporary-file-directory) (tramp-handle-make-nearby-temp-file): New defuns. * lisp/org/ob-core.el (org-babel-local-file-name): * lisp/progmodes/gud.el (gud-common-init): * lisp/vc/vc-hooks.el (vc-user-login-name): Use `file-remote-p'. * lisp/vc/vc-git.el (vc-git-checkin): Handle remote log message. * test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name): Check `tramp--test-enabled'. (tramp-test18-file-attributes): Add tests for `file-ownership-preserved-p'. (tramp-test27-start-file-process, tramp-test28-shell-command): Reduce timeouts in `accept-process-output'. (tramp-test--shell-command-to-string-asynchronously): Add timeout. (tramp-test29-environment-variables): Remove additional sleep calls. (tramp-test32-make-nearby-temp-file): New test. (tramp--test-special-characters, tramp--test-utf8): Adapt docstring. (tramp-test33-special-characters) (tramp-test33-special-characters-with-stat) (tramp-test33-special-characters-with-perl) (tramp-test33-special-characters-with-ls, tramp-test34-utf8) (tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl) (tramp-test34-utf8-with-ls) (tramp-test35-asynchronous-requests) (tramp-test36-recursive-load, tramp-test37-unload): Rename. (tramp--test-ftp-p): Simplify check. (tramp--test-sh-p): New defun. (tramp-test20-file-modes, tramp-test22-file-times) (tramp-test26-process-file, tramp-test27-start-file-process) (tramp-test28-shell-command) (tramp-test29-environment-variables) (tramp-test30-vc-registered) (tramp-test33-special-characters-with-stat) (tramp-test33-special-characters-with-perl) (tramp-test33-special-characters-with-ls) (tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl) (tramp-test34-utf8-with-ls) (tramp-test35-asynchronous-requests): Use it.
2016-08-07 11:57:23 +00:00
(make-nearby-temp-file . tramp-handle-make-nearby-temp-file)
(make-process . tramp-sh-handle-make-process)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(make-symbolic-link . tramp-sh-handle-make-symbolic-link)
(process-file . tramp-sh-handle-process-file)
(rename-file . tramp-sh-handle-rename-file)
(set-file-acl . tramp-sh-handle-set-file-acl)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(set-file-modes . tramp-sh-handle-set-file-modes)
(set-file-selinux-context . tramp-sh-handle-set-file-selinux-context)
(set-file-times . tramp-sh-handle-set-file-times)
(set-visited-file-modtime . tramp-sh-handle-set-visited-file-modtime)
(shell-command . tramp-handle-shell-command)
(start-file-process . tramp-handle-start-file-process)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(substitute-in-file-name . tramp-handle-substitute-in-file-name)
Add `make-nearby-temp-file' and `temporary-file-directory' * doc/lispref/files.texi (Unique File Names): Introduce `make-nearby-temp-file' and `temporary-file-directory'. (Magic File Names): Mention `make-nearby-temp-file' and `temporary-file-directory'. * etc/NEWS (provided): Mention `make-nearby-temp-file' and `temporary-file-directory'. * lisp/files.el (mounted-file-systems): New defcustom. (temporary-file-directory, make-nearby-temp-file): New defuns. (normal-backup-enable-predicate): Fix docstring. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): <make-nearby-temp-file, temporary-file-directory>: Add handler. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `make-nearby-temp-file' and `temporary-file-directory'. (tramp-get-remote-tmpdir): Remove compatibility code. (tramp-handle-temporary-file-directory) (tramp-handle-make-nearby-temp-file): New defuns. * lisp/org/ob-core.el (org-babel-local-file-name): * lisp/progmodes/gud.el (gud-common-init): * lisp/vc/vc-hooks.el (vc-user-login-name): Use `file-remote-p'. * lisp/vc/vc-git.el (vc-git-checkin): Handle remote log message. * test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name): Check `tramp--test-enabled'. (tramp-test18-file-attributes): Add tests for `file-ownership-preserved-p'. (tramp-test27-start-file-process, tramp-test28-shell-command): Reduce timeouts in `accept-process-output'. (tramp-test--shell-command-to-string-asynchronously): Add timeout. (tramp-test29-environment-variables): Remove additional sleep calls. (tramp-test32-make-nearby-temp-file): New test. (tramp--test-special-characters, tramp--test-utf8): Adapt docstring. (tramp-test33-special-characters) (tramp-test33-special-characters-with-stat) (tramp-test33-special-characters-with-perl) (tramp-test33-special-characters-with-ls, tramp-test34-utf8) (tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl) (tramp-test34-utf8-with-ls) (tramp-test35-asynchronous-requests) (tramp-test36-recursive-load, tramp-test37-unload): Rename. (tramp--test-ftp-p): Simplify check. (tramp--test-sh-p): New defun. (tramp-test20-file-modes, tramp-test22-file-times) (tramp-test26-process-file, tramp-test27-start-file-process) (tramp-test28-shell-command) (tramp-test29-environment-variables) (tramp-test30-vc-registered) (tramp-test33-special-characters-with-stat) (tramp-test33-special-characters-with-perl) (tramp-test33-special-characters-with-ls) (tramp-test34-utf8-with-stat, tramp-test34-utf8-with-perl) (tramp-test34-utf8-with-ls) (tramp-test35-asynchronous-requests): Use it.
2016-08-07 11:57:23 +00:00
(temporary-file-directory . tramp-handle-temporary-file-directory)
Rearrange detecting remote uid and gid in Tramp * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-ownership-preserved-p'. (tramp-crypt-add-directory): Check, that NAME is not quoted. (tramp-crypt-handle-file-ownership-preserved-p): New defun. (tramp-crypt-handle-insert-directory): Fix docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-gvfs-handle-file-readable-p): Call `tramp-get-remote-uid'. (tramp-gvfs-handle-get-remote-uid) (tramp-gvfs-handle-get-remote-gid): Rename from `tramp-gvfs-get-remote-{uid,gid}'. Do not cache result. (tramp-gvfs-maybe-open-connection): No special handling for remote uid and gid. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-sh-handle-get-remote-uid, tramp-sh-handle-get-remote-gid): Rename from `tramp-get-remote-{uid,gid}'. Do not cache result. (tramp-sh-handle-file-ownership-preserved-p): Distinguish by GROUP when caching. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-sudoedit-handle-get-remote-uid) (tramp-sudoedit-handle-get-remote-gid): Rename from `tramp-sudoedit-get-remote-{uid,gid}'. Do not cache result. (tramp-sudoedit-handle-set-file-uid-gid) (tramp-sudoedit-handle-write-region): Call `tramp-get-remote-uid' and `tramp-get-remote-gid'. (tramp-sudoedit-maybe-open-connection): No special handling for remote uid and gid. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-handle-write-region, tramp-check-cached-permissions): Call `tramp-get-remote-uid' and `tramp-get-remote-gid'. (tramp-get-remote-uid, tramp-get-remote-gid): New defuns. (tramp-local-host-p): Simplify `tramp-get-remote-uid' call. * test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards) Skip if needed.
2020-06-14 13:31:17 +00:00
(tramp-get-remote-gid . tramp-sh-handle-get-remote-gid)
(tramp-get-remote-uid . tramp-sh-handle-get-remote-uid)
(tramp-set-file-uid-gid . tramp-sh-handle-set-file-uid-gid)
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(unhandled-file-name-directory . ignore)
Implement file locks for remote files (Bug#49261) * doc/lispref/files.texi (Magic File Names): Add file-locked-p, lock-file and unlock-file. * etc/NEWS: Tramp supports file locks now. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-adb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): New defun. * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify. (tramp-fuse-unmount): New defun. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sh-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-smb-handle-copy-directory): Use `sleep-for'. (tramp-smb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sshfs-handle-write-region): Handle LOCKNAME. (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sudoedit-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid) (tramp-handle-file-locked-p, tramp-handle-lock-file) (tramp-handle-unlock-file): New defuns. (tramp-lock-file-contents-regexp): New regexp. (tramp-handle-write-region): Handle LOCKNAME. * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p): Call handler if exists. (Flock_file, Funlock_file): New defuns. (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols. (Slock_file, Sunlock_file): Declare subroutines. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-make-nearby-temp-file) (tramp-archive-test43-file-system-info): Rename. * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil. (tramp--test-fuse-p): New defun. (tramp-test14-delete-directory): Use it. (tramp-test39-lock-file): New test. (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters) (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls, tramp-test42-utf8) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls, tramp-test43-file-system-info) (tramp-test44-asynchronous-requests, tramp-test45-auto-load) (tramp-test45-delay-load, tramp-test45-recursive-load) (tramp-test45-remote-load-path, tramp-test46-unload): Rename. (tramp--test-special-characters, tramp--test-utf8) (tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 16:36:53 +00:00
(unlock-file . tramp-handle-unlock-file)
(vc-registered . tramp-sh-handle-vc-registered)
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(verify-visited-file-modtime . tramp-sh-handle-verify-visited-file-modtime)
(write-region . tramp-sh-handle-write-region))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Alist of handler functions.
Operations not mentioned here will be handled by the normal Emacs functions.")
;;; File Name Handler Functions:
(defun tramp-sh-handle-make-symbolic-link
(target linkname &optional ok-if-already-exists)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `make-symbolic-link' for Tramp files.
If TARGET is a non-Tramp file, it is used verbatim as the target
of the symlink. If TARGET is a Tramp file, only the localname
component is used as the target of the symlink."
(if (not (tramp-tramp-file-p (expand-file-name linkname)))
(tramp-run-real-handler
#'make-symbolic-link (list target linkname ok-if-already-exists))
(with-parsed-tramp-file-name linkname nil
;; If TARGET is a Tramp name, use just the localname component.
Stronger check for Tramp method * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection): Use `tramp-get-connection-name'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-symbolic-link): Don't check remote TARGET. * lisp/net/tramp.el (tramp-dissect-file-name): Check for proper method. (tramp-file-name-for-operation): Take only 2nd argument into account for file name handler. (tramp-file-name-handler): Suppress checks for `file-remote-p'. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test02-file-name-dissect): Suppress check for wrong method. * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case): Dump *all* Tramp buffers. (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate): Check also wrong method. (tramp-test03-file-name-defaults): Check, that the respective Tramp package is loaded. (tramp-test04-substitute-in-file-name) (tramp-test05-expand-file-name) (tramp-test06-directory-file-name, tramp-test44-auto-load): Suppress check for wrong method. (tramp-test30-make-process): Remove instrumentation code. (tramp-test31-interrupt-process, tramp-test36-vc-registered): Guarantee that connection is established prior starting process.
2019-06-04 10:51:45 +00:00
;; Don't check for a proper method.
(let ((non-essential t))
(when (and (tramp-tramp-file-p target)
(tramp-file-name-equal-p v (tramp-dissect-file-name target)))
; Sync with Tramp repository * doc/misc/tramp.texi (Frequently Asked Questions): Mention Emacs 28. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.4-pre". * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file): Use `tramp-file-local-name'. (tramp-adb-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-cmds.el (tramp-rename-files): Use `tramp-file-local-name'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-process-file, tramp-set-remote-path) (tramp-find-inline-encoding, tramp-get-remote-touch): Use `tramp-file-local-name'. (tramp-sh-handle-make-process): Support `stderr' as file name. Delete temporary stderr file. (tramp-sh-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-process-file): Use `tramp-file-local-name'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-set-file-uid-gid): Use `tramp-unquote-file-local-name'. (tramp-sudoedit-handle-make-symbolic-link): Use `tramp-file-local-name'. (tramp-sudoedit-handle-file-system-info): Fix a scoping error. * lisp/net/tramp.el: Bump version to 2.4.4-pre. (tramp-ignored-file-name-regexp, tramp-time-dont-know) (tramp-time-doesnt-exist): Fix typo. (tramp-file-local-name): Extend for non-remote file names. (tramp-unquote-file-local-name): New defun. (tramp-completion-make-tramp-file-name): Simplify. (tramp-set-connection-local-variables-for-buffer) (tramp-equal-remote, tramp-handle-make-auto-save-file-name): Use `tramp-tramp-file-p'. (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-truename, tramp-get-remote-tmpdir) (tramp-make-tramp-temp-file): Use `tramp-file-local-name'. (tramp-handle-shell-command, tramp-handle-start-file-process): Implement asynchronous `error-buffer'.
2020-01-06 11:11:53 +00:00
(setq target (tramp-file-local-name (expand-file-name target)))))
;; If TARGET is still remote, quote it.
(if (tramp-tramp-file-p target)
(make-symbolic-link (tramp-compat-file-name-quote target 'top)
linkname ok-if-already-exists)
(let ((ln (tramp-get-remote-ln v))
(cwd (tramp-run-real-handler
#'file-name-directory (list localname))))
(unless ln
(tramp-error
v 'file-error
Tramp code cleanup * lisp/net/tramp.el (tramp-signal-hook-function) (tramp-handle-access-file, tramp-handle-copy-directory) (tramp-handle-directory-files, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-load): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-make-directory) (tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file) (tramp-crypt-handle-directory-files) (tramp-crypt-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-make-directory): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-make-directory) (tramp-sh-handle-file-local-copy) (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory, tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Unify error report. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args with other `tramp-*-file-name-handler'. * lisp/net/tramp-compat.el (tramp-error): Declare. (tramp-compat-file-missing): New defsubst. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Handle volatile files. (tramp-gvfs-set-attribute): New defun. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use it. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Use `msg-operation'. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Remove superfluous `format: (tramp-smb-maybe-open-connection): Simplify loop. * lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from symlinked files. * test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun. (tramp--test-nextcloud-p): Remove. (tramp-test40-special-characters-with-ls): Do not skip on MS Windows. (tramp-test41-utf8): Skip if needed.
2021-02-03 17:48:09 +00:00
(concat "Making a symbolic link. "
"ln(1) does not exist on the remote host.")))
;; Do the 'confirm if exists' thing.
(when (file-exists-p linkname)
;; What to do?
(if (or (null ok-if-already-exists) ; not allowed to exist
(and (numberp ok-if-already-exists)
(not
(yes-or-no-p
(format
"File %s already exists; make it a link anyway?"
localname)))))
(tramp-error v 'file-already-exists localname)
(delete-file linkname)))
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-file-properties v localname)
;; Right, they are on the same host, regardless of user,
;; method, etc. We now make the link on the remote
;; machine. This will occur as the user that TARGET belongs to.
(and (tramp-send-command-and-check
v (format "cd %s" (tramp-shell-quote-argument cwd)))
(tramp-send-command-and-check
v (format
"%s -sf %s %s" ln
(tramp-shell-quote-argument target)
;; The command could exceed PATH_MAX, so we use
;; relative file names. However, relative file
;; names could start with "-".
;; `tramp-shell-quote-argument' does not handle
;; this, we must do it ourselves.
(tramp-shell-quote-argument
(concat "./" (file-name-nondirectory localname)))))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Remove byte compiler warnings, visible when compiling with `byte-compile-force-lexical-warnings' set to t. * net/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 "_". * net/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. * net/tramp-cache.el (tramp-flush-directory-property) (tramp-flush-connection-property, tramp-list-connections) (tramp-parse-connection-properties): Prefix unused arguments with "_". * net/tramp-compat.el (tramp-compat-make-temp-file): Rename FILENAME to F. * net/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 "_". * net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel): Prefix unused arguments with "_". * net/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. * net/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 "_". * net/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-15 14:29:08 +00:00
(defun tramp-sh-handle-file-truename (filename)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `file-truename' for Tramp files."
;; Preserve trailing "/".
(funcall
Sync with Tramp 2.5.0-pre * doc/misc/tramp.texi: Protext Tramp x.y and Emacs x.y by @w{}. (GVFS-based methods): Move "GNOME Online Accounts" index. (Customizing Methods, Android shell setup, File name completion) (Frequently Asked Questions): Fix typos. * doc/misc/trampver.texi: Change version to "2.5.0-pre". * lisp/net/trampver.el: Change version to "2.5.0-pre". (inhibit-message): Don't declare. * lisp/net/tramp.el: Bump version to 2.5.0-pre. Require Emacs 25.1. (tramp-debug-message): Simplify. (tramp-message): Don't use `tramp-message-show-message'. (tramp-with-demoted-errors, with-parsed-tramp-file-name) (with-tramp-file-property, with-tramp-connection-property): Adapt `declare' form. (with-tramp-progress-reporter): Suppress progress reporter when noninteractive. (tramp-completion-mode, tramp-completion-mode-p): Remove. * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (format-message): Remove compatibility code. (tramp-compat-directory-name-p) (tramp-compat-tramp-file-name-slots): Remove. * lisp/net/tramp.el (tramp-debug-message, tramp-message) (tramp-backtrace, tramp-error, tramp-error-with-buffer) (tramp-user-error, tramp-with-demoted-errors) (tramp-signal-hook-function): * lisp/net/tramp-compat.el (tramp-compat-funcall) * lisp/net/tramp-gvfs.el (tramp-dbus-function): Add `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-get-method-parameter) (tramp-dissect-file-name, tramp-error, tramp-error-with-buffer) (tramp-user-error, with-parsed-tramp-file-name) (with-tramp-progress-reporter, tramp-file-name-handler) (tramp-completion-file-name-handler, tramp-autoload-file-name-handler) (tramp-register-file-name-handlers, tramp-connectable-p) (tramp-handle-file-modes, tramp-handle-file-regular-p) (tramp-handle-file-truename, tramp-handle-insert-directory) (tramp-handle-load, tramp-set-file-uid-gid): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name): * lisp/net/tramp-cache.el (tramp-get-file-property, tramp-cache-print): * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (tramp-compat-exec-path): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-dbus-byte-array-to-string) (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler) (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-insert-directory, tramp-sh-file-name-handler) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler) (tramp-smb-handle-copy-file, tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-insert-directory) (tramp-smb-handle-rename-file, tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-file-truename): Use `if-let', `when-let', `directory-name-p', `inhibit-message', `non-essential and `cl-struct-slot-info'. Don't use `seconds-to-time'. * test/lisp/net/tramp-archive-tests.el (tramp-message-show-message): Don't set. * test/lisp/net/tramp-tests.el (inhibit-message): Don't declare. (tramp-message-show-message): Don't set. (tramp-test06-directory-file-name): Use `non-essential'. (tramp-test10-write-region): Use `inhibit-message'. (tramp-test36-vc-registered): No special handling for old Emacsen. (tramp--test-emacs25-p): Remove. (tramp-test45-unload): Special case of `tramp-completion-mode'.
2020-01-19 13:11:07 +00:00
(if (directory-name-p filename) #'file-name-as-directory #'identity)
;; Quote properly.
(funcall
(if (tramp-compat-file-name-quoted-p filename)
#'tramp-compat-file-name-quote #'identity)
(with-parsed-tramp-file-name
(tramp-compat-file-name-unquote (expand-file-name filename)) nil
(tramp-make-tramp-file-name
v
(with-tramp-file-property v localname "file-truename"
(let (result) ; result steps in reverse order
(tramp-message v 4 "Finding true name for `%s'" filename)
(cond
;; Use GNU readlink --canonicalize-missing where available.
((tramp-get-remote-readlink v)
(tramp-send-command-and-check
v
(format "%s --canonicalize-missing %s"
(tramp-get-remote-readlink v)
(tramp-shell-quote-argument localname)))
(with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-min))
(setq result (buffer-substring (point-min) (point-at-eol)))))
;; Use Perl implementation.
((and (tramp-get-remote-perl v)
(tramp-get-connection-property v "perl-file-spec" nil)
(tramp-get-connection-property v "perl-cwd-realpath" nil))
(tramp-maybe-send-script
v tramp-perl-file-truename "tramp_perl_file_truename")
(setq result
(tramp-send-command-and-read
v
(format "tramp_perl_file_truename %s"
(tramp-shell-quote-argument localname)))))
;; Do it yourself.
(t (setq
result
(tramp-file-local-name (tramp-handle-file-truename filename)))))
;; Detect cycle.
(when (and (file-symlink-p filename)
(string-equal result localname))
(tramp-error
v 'file-error
"Apparent cycle of symbolic links for %s" filename))
;; If the resulting localname looks remote, we must quote it
;; for security reasons.
(when (file-remote-p result)
(setq result (tramp-compat-file-name-quote result 'top)))
(tramp-message v 4 "True name of `%s' is `%s'" localname result)
result))
'nohop)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Basic functions.
(defun tramp-sh-handle-file-exists-p (filename)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `file-exists-p' for Tramp files."
;; `file-exists-p' is used as predicate in file name completion.
;; We don't want to run it when `non-essential' is t, or there is
;; no connection process yet.
(when (tramp-connectable-p filename)
(with-parsed-tramp-file-name filename nil
(with-tramp-file-property v localname "file-exists-p"
(or (not (null (tramp-get-file-property
v localname "file-attributes-integer" nil)))
(not (null (tramp-get-file-property
v localname "file-attributes-string" nil)))
(tramp-send-command-and-check
v
(format
"%s %s"
(tramp-get-file-exists-command v)
(tramp-shell-quote-argument localname))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh-handle-file-attributes (filename &optional id-format)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `file-attributes' for Tramp files."
(unless id-format (setq id-format 'integer))
(ignore-errors
;; Don't modify `last-coding-system-used' by accident.
(let ((last-coding-system-used last-coding-system-used))
(with-parsed-tramp-file-name (expand-file-name filename) nil
(with-tramp-file-property
v localname (format "file-attributes-%s" id-format)
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(tramp-convert-file-attributes
v
(or
(cond
((tramp-get-remote-stat v)
(tramp-do-file-attributes-with-stat v localname id-format))
((tramp-get-remote-perl v)
(tramp-do-file-attributes-with-perl v localname id-format))
(t nil))
;; The scripts could fail, for example with huge file size.
(tramp-do-file-attributes-with-ls v localname id-format))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh--quoting-style-options (vec)
Adapt Tramp docstrings according to checkdoc * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 12:10:58 +00:00
"Quoting style options to be used for VEC."
(or
(tramp-get-ls-command-with
vec "--quoting-style=literal --show-control-chars")
(tramp-get-ls-command-with vec "-w")
""))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-do-file-attributes-with-ls (vec localname &optional id-format)
"Implement `file-attributes' for Tramp files using the ls(1) command."
(let (symlinkp dirp
Sync with Tramp 2.5.0-pre * doc/misc/tramp.texi: Protext Tramp x.y and Emacs x.y by @w{}. (GVFS-based methods): Move "GNOME Online Accounts" index. (Customizing Methods, Android shell setup, File name completion) (Frequently Asked Questions): Fix typos. * doc/misc/trampver.texi: Change version to "2.5.0-pre". * lisp/net/trampver.el: Change version to "2.5.0-pre". (inhibit-message): Don't declare. * lisp/net/tramp.el: Bump version to 2.5.0-pre. Require Emacs 25.1. (tramp-debug-message): Simplify. (tramp-message): Don't use `tramp-message-show-message'. (tramp-with-demoted-errors, with-parsed-tramp-file-name) (with-tramp-file-property, with-tramp-connection-property): Adapt `declare' form. (with-tramp-progress-reporter): Suppress progress reporter when noninteractive. (tramp-completion-mode, tramp-completion-mode-p): Remove. * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (format-message): Remove compatibility code. (tramp-compat-directory-name-p) (tramp-compat-tramp-file-name-slots): Remove. * lisp/net/tramp.el (tramp-debug-message, tramp-message) (tramp-backtrace, tramp-error, tramp-error-with-buffer) (tramp-user-error, tramp-with-demoted-errors) (tramp-signal-hook-function): * lisp/net/tramp-compat.el (tramp-compat-funcall) * lisp/net/tramp-gvfs.el (tramp-dbus-function): Add `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-get-method-parameter) (tramp-dissect-file-name, tramp-error, tramp-error-with-buffer) (tramp-user-error, with-parsed-tramp-file-name) (with-tramp-progress-reporter, tramp-file-name-handler) (tramp-completion-file-name-handler, tramp-autoload-file-name-handler) (tramp-register-file-name-handlers, tramp-connectable-p) (tramp-handle-file-modes, tramp-handle-file-regular-p) (tramp-handle-file-truename, tramp-handle-insert-directory) (tramp-handle-load, tramp-set-file-uid-gid): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name): * lisp/net/tramp-cache.el (tramp-get-file-property, tramp-cache-print): * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (tramp-compat-exec-path): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-dbus-byte-array-to-string) (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler) (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-insert-directory, tramp-sh-file-name-handler) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler) (tramp-smb-handle-copy-file, tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-insert-directory) (tramp-smb-handle-rename-file, tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-file-truename): Use `if-let', `when-let', `directory-name-p', `inhibit-message', `non-essential and `cl-struct-slot-info'. Don't use `seconds-to-time'. * test/lisp/net/tramp-archive-tests.el (tramp-message-show-message): Don't set. * test/lisp/net/tramp-tests.el (inhibit-message): Don't declare. (tramp-message-show-message): Don't set. (tramp-test06-directory-file-name): Use `non-essential'. (tramp-test10-write-region): Use `inhibit-message'. (tramp-test36-vc-registered): No special handling for old Emacsen. (tramp--test-emacs25-p): Remove. (tramp-test45-unload): Special case of `tramp-completion-mode'.
2020-01-19 13:11:07 +00:00
res-inode res-filemodes res-numlinks
res-uid res-gid res-size res-symlink-target)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-message vec 5 "file attributes with ls: %s" localname)
;; We cannot send all three commands combined, it could exceed
;; NAME_MAX or PATH_MAX. Happened on macOS, for example.
(when (or (tramp-send-command-and-check
vec
(format "%s %s"
(tramp-get-file-exists-command vec)
(tramp-shell-quote-argument localname)))
(tramp-send-command-and-check
vec
(format "%s -h %s"
(tramp-get-test-command vec)
(tramp-shell-quote-argument localname))))
(tramp-send-command
vec
(format "%s %s %s %s"
(tramp-get-ls-command vec)
(if (eq id-format 'integer) "-ildn" "-ild")
;; On systems which have no quoting style, file names
;; with special characters could fail.
(tramp-sh--quoting-style-options vec)
(tramp-shell-quote-argument localname)))
;; Parse `ls -l' output ...
(with-current-buffer (tramp-get-buffer vec)
(when (> (buffer-size) 0)
(goto-char (point-min))
;; ... inode
(setq res-inode (read (current-buffer)))
;; ... file mode flags
(setq res-filemodes (symbol-name (read (current-buffer))))
;; ... number links
(setq res-numlinks (read (current-buffer)))
;; ... uid and gid
(setq res-uid (read (current-buffer)))
(setq res-gid (read (current-buffer)))
(if (eq id-format 'integer)
(progn
Sync with Tramp repository. * lisp/net/tramp-adb.el (tramp-adb-handle-start-file-process): * lisp/net/tramp-sh.el (tramp-sh-handle-start-file-process) * lisp/net/tramp-smb.el (tramp-smb-handle-start-file-process): Create BUFFER if it doesn't exist. Reported by Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes) (tramp-gvfs-file-attributes-with-gvfs-ls-regexp) (tramp-gvfs-file-attributes-with-gvfs-info-regexp): New defconst. (tramp-gvfs-get-directory-attributes) (tramp-gvfs-get-root-attributes) (tramp-gvfs-get-file-attributes): New defun. (tramp-gvfs-handle-file-attributes) (tramp-gvfs-handle-file-name-all-completions): Use them. (tramp-gvfs-handle-file-directory-p): Use `file-truename'. (tramp-gvfs-maybe-open-connection): Set :noquery flag for process. (tramp-gvfs-send-command): Add locale settings to `process-environment'. (top): Suppress D-Bus error messages during zeroconf initialization. * lisp/net/tramp.el (tramp-unknown-id-string) (tramp-unknown-id-integer): New defconst. (tramp-check-cached-permissions) * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes) * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-convert-file-attributes, tramp-get-remote-uid) (tramp-get-remote-gid): Use them. * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp): Rename from `tramp-color-escape-sequence-regexp'. (tramp-sh-handle-insert-directory) (tramp-convert-file-attributes): Adapt callees. (tramp-device-escape-sequence-regexp): New defconst. (tramp-wait-for-output): Use it. Reported by Matthías Páll Gissurarson <icetritlo@gmail.com>. * lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions): Simplify. * test/lisp/net/tramp-tests.el (tramp-test26-process-file) (tramp-test28-shell-command): Use `tramp-display-escape-sequence-regexp'.
2016-05-28 10:14:58 +00:00
(unless (numberp res-uid)
(setq res-uid tramp-unknown-id-integer))
(unless (numberp res-gid)
(setq res-gid tramp-unknown-id-integer)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(progn
(unless (stringp res-uid) (setq res-uid (symbol-name res-uid)))
(unless (stringp res-gid) (setq res-gid (symbol-name res-gid)))))
;; ... size
(setq res-size (read (current-buffer)))
;; From the file modes, figure out other stuff.
(setq symlinkp (eq ?l (aref res-filemodes 0)))
(setq dirp (eq ?d (aref res-filemodes 0)))
;; If symlink, find out file name pointed to.
(when symlinkp
(search-forward "-> ")
(setq res-symlink-target
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(if (looking-at-p "\"")
(read (current-buffer))
(buffer-substring (point) (point-at-eol)))))
;; Return data gathered.
(list
;; 0. t for directory, string (name linked to) for symbolic
;; link, or nil.
(or dirp res-symlink-target)
;; 1. Number of links to file.
res-numlinks
;; 2. File uid.
res-uid
;; 3. File gid.
res-gid
;; 4. Last access time.
;; 5. Last modification time.
;; 6. Last status change time.
tramp-time-dont-know tramp-time-dont-know tramp-time-dont-know
;; 7. Size in bytes (-1, if number is out of range).
res-size
;; 8. File modes, as a string of ten letters or dashes as in ls -l.
res-filemodes
;; 9. t if file's gid would change if file were deleted and
;; recreated. Will be set in `tramp-convert-file-attributes'.
t
;; 10. Inode number.
res-inode
;; 11. Device number. Will be replaced by a virtual device number.
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
-1))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-do-file-attributes-with-perl
(vec localname &optional id-format)
"Implement `file-attributes' for Tramp files using a Perl script."
(tramp-message vec 5 "file attributes with perl: %s" localname)
(tramp-maybe-send-script
vec tramp-perl-file-attributes "tramp_perl_file_attributes")
(tramp-send-command-and-read
vec
(format "tramp_perl_file_attributes %s %s"
(tramp-shell-quote-argument localname) id-format)))
(defun tramp-do-file-attributes-with-stat
(vec localname &optional id-format)
"Implement `file-attributes' for Tramp files using stat(1) command."
(tramp-message vec 5 "file attributes with stat: %s" localname)
(tramp-send-command-and-read
vec
(format
(concat
;; Apostrophes in the stat output are masked as
;; `tramp-stat-marker', in order to make a proper shell escape of
;; them in file names.
"(%s -c '((%s%%N%s) %%h %s %s %%X %%Y %%Z %%s %s%%A%s t %%i -1)' %s |"
" sed -e 's/\"/\\\\\"/g' -e 's/%s/\"/g')")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-get-remote-stat vec)
tramp-stat-marker tramp-stat-marker
(if (eq id-format 'integer)
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
"%u"
(eval-when-compile (concat tramp-stat-marker "%U" tramp-stat-marker)))
(if (eq id-format 'integer)
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
"%g"
(eval-when-compile (concat tramp-stat-marker "%G" tramp-stat-marker)))
tramp-stat-marker tramp-stat-marker
(tramp-shell-quote-argument localname)
tramp-stat-quoted-marker)
'noerror))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh-handle-set-visited-file-modtime (&optional time-list)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `set-visited-file-modtime' for Tramp files."
(unless (buffer-file-name)
(error "Can't set-visited-file-modtime: buffer `%s' not visiting a file"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(buffer-name)))
(if time-list
(tramp-run-real-handler #'set-visited-file-modtime (list time-list))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(let ((f (buffer-file-name))
coding-system-used)
(with-parsed-tramp-file-name f nil
(let* ((remote-file-name-inhibit-cache t)
(attr (file-attributes f))
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
(modtime (or (tramp-compat-file-attribute-modification-time attr)
tramp-time-doesnt-exist)))
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(setq coding-system-used last-coding-system-used)
(if (not (tramp-compat-time-equal-p modtime tramp-time-dont-know))
(tramp-run-real-handler #'set-visited-file-modtime (list modtime))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(progn
(tramp-send-command
v
(format "%s -ild %s"
(tramp-get-ls-command v)
(tramp-shell-quote-argument localname)))
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(setq attr (buffer-substring (point) (point-at-eol))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-set-file-property
v localname "visited-file-modtime-ild" attr))
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(setq last-coding-system-used coding-system-used)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
nil)))))
;; This function makes the same assumption as
;; `tramp-sh-handle-set-visited-file-modtime'.
(defun tramp-sh-handle-verify-visited-file-modtime (&optional buf)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `verify-visited-file-modtime' for Tramp files.
At the time `verify-visited-file-modtime' calls this function, we
already know that the buffer is visiting a file and that
`visited-file-modtime' does not return 0. Do not call this
function directly, unless those two cases are already taken care
of."
(with-current-buffer (or buf (current-buffer))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(let ((f (buffer-file-name)))
;; There is no file visiting the buffer, or the buffer has no
;; recorded last modification time, or there is no established
;; connection.
(if (or (not f)
(zerop (float-time (visited-file-modtime)))
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(not (file-remote-p f nil 'connected)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
t
(with-parsed-tramp-file-name f nil
(let* ((remote-file-name-inhibit-cache t)
(attr (file-attributes f))
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
(modtime (tramp-compat-file-attribute-modification-time attr))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(mt (visited-file-modtime)))
(cond
;; File exists, and has a known modtime.
((and attr
(not
(tramp-compat-time-equal-p modtime tramp-time-dont-know)))
(< (abs (tramp-time-diff modtime mt)) 2))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Modtime has the don't know value.
(attr
(tramp-send-command
v
(format "%s -ild %s"
(tramp-get-ls-command v)
(tramp-shell-quote-argument localname)))
(with-current-buffer (tramp-get-buffer v)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(setq attr (buffer-substring (point) (point-at-eol))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(equal
attr
(tramp-get-file-property
v localname "visited-file-modtime-ild" "")))
;; If file does not exist, say it is not modified if and
;; only if that agrees with the buffer's record.
(t (tramp-compat-time-equal-p mt tramp-time-doesnt-exist)))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Add 'nofollow' flag to set-file-modes etc. This avoids some race conditions (Bug#39683). E.g., if some other program changes a file to a symlink between the time Emacs creates the file and the time it changes the file’s permissions, using the new flag prevents Emacs from inadvertently changing the permissions of a victim in some completely unrelated directory. * admin/merge-gnulib (GNULIB_MODULES): Add fchmodat. * doc/lispref/files.texi (Testing Accessibility, Changing Files): * doc/lispref/os.texi (File Notifications): * etc/NEWS: Adjust documentation accordingly. * lib/chmodat.c, lib/fchmodat.c, lib/lchmod.c, m4/fchmodat.m4: * m4/lchmod.m4: New files, copied from Gnulib. * lib/gnulib.mk.in: Regenerate. * lisp/dired-aux.el (dired-do-chmod): * lisp/doc-view.el (doc-view-make-safe-dir): * lisp/emacs-lisp/autoload.el (autoload--save-buffer): * lisp/emacs-lisp/bytecomp.el (byte-compile-file): * lisp/eshell/em-pred.el (eshell-pred-file-mode): * lisp/files.el (backup-buffer-copy, copy-directory): * lisp/gnus/mail-source.el (mail-source-movemail): * lisp/gnus/mm-decode.el (mm-display-external): * lisp/gnus/nnmail.el (nnmail-write-region): * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-write-region): * lisp/net/tramp.el (tramp-handle-write-region) (tramp-make-tramp-temp-file): * lisp/server.el (server-ensure-safe-dir): * lisp/url/url-util.el (url-make-private-file): When getting or setting file modes, avoid following symbolic links when the file is not supposed to be a symbolic link. * lisp/doc-view.el (doc-view-make-safe-dir): Omit no-longer-needed separate symlink test. * lisp/gnus/gnus-util.el (gnus-set-file-modes): * lisp/net/tramp.el (tramp-handle-file-modes): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): * src/fileio.c (symlink_nofollow_flag): New function. (Ffile_modes, Fset_file_modes): Support an optional FLAG arg. All C callers changed. * lisp/net/ange-ftp.el (ange-ftp-set-file-modes): * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-modes): * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Accept an optional FLAG arg that is currently ignored, and add a FIXME comment for it. * m4/gnulib-comp.m4: Regenerate.
2020-02-24 00:19:42 +00:00
(defun tramp-sh-handle-set-file-modes (filename mode &optional flag)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `set-file-modes' for Tramp files."
(with-parsed-tramp-file-name filename nil
;; We need "chmod -h" when the flag is set.
(when (or (not (eq flag 'nofollow))
(not (file-symlink-p filename))
(tramp-get-remote-chmod-h v))
Finish implementation of {set-}file-modes FLAG arg in Tramp * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use 'nofollow for temporary files. Use `tramp-compat-set-file-modes'. (tramp-adb-handle-write-region): Do not use 'nofollow for temporary files. (tramp-adb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-compat.el (tramp-compat-file-modes) (tramp-compat-set-file-modes): New defaliases. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): Make explicit check (eq flag 'nofollow). * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG. (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region): Do not use 'nofollow for temporary files. (tramp-get-remote-chmod-h): New defun. * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Implement FLAG. (tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'. * lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG. (tramp-handle-file-modes): Use `file-truename' instead of `file-chase-links'. The latter function does not work for remote file names. (tramp-handle-write-region): Call `tramp-default-file-modes' with 'nofollow if needed. Do not use 'nofollow for temporary files. * test/lisp/net/tramp-tests.el (tramp--test-ignore-make-symbolic-link-error): Check also for "Cannot chmod .* with nofollow flag" error. (tramp-test20-file-modes): Extend test. (tramp--test-emacs28-p): New defun.
2020-02-25 12:25:57 +00:00
(tramp-flush-file-properties v localname)
;; FIXME: extract the proper text from chmod's stderr.
(tramp-barf-unless-okay
v
(format
"chmod %s %o %s"
(if (and (eq flag 'nofollow) (tramp-get-remote-chmod-h v)) "-h" "")
mode (tramp-shell-quote-argument localname))
Finish implementation of {set-}file-modes FLAG arg in Tramp * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use 'nofollow for temporary files. Use `tramp-compat-set-file-modes'. (tramp-adb-handle-write-region): Do not use 'nofollow for temporary files. (tramp-adb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-compat.el (tramp-compat-file-modes) (tramp-compat-set-file-modes): New defaliases. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): Make explicit check (eq flag 'nofollow). * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG. (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region): Do not use 'nofollow for temporary files. (tramp-get-remote-chmod-h): New defun. * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Implement FLAG. (tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'. * lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG. (tramp-handle-file-modes): Use `file-truename' instead of `file-chase-links'. The latter function does not work for remote file names. (tramp-handle-write-region): Call `tramp-default-file-modes' with 'nofollow if needed. Do not use 'nofollow for temporary files. * test/lisp/net/tramp-tests.el (tramp--test-ignore-make-symbolic-link-error): Check also for "Cannot chmod .* with nofollow flag" error. (tramp-test20-file-modes): Extend test. (tramp--test-emacs28-p): New defun.
2020-02-25 12:25:57 +00:00
"Error while changing file's mode %s" filename))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Add ‘nofollow’ flag to set-file-times This is a companion to the recent set-file-modes patch. It adds support for a ‘nofollow’ flag to set-file-times (Bug#39773). Like the set-file-modes patch, it needs work in the w32 port. * admin/merge-gnulib (GNULIB_MODULES): Add futimens, utimensat. Remove utimens. * doc/lispref/files.texi (Changing Files): * etc/NEWS: Mention the change. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lisp/files.el (copy-directory): * lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file): * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file): * lisp/tar-mode.el (tar-copy): * test/lisp/filenotify-tests.el (file-notify-test03-events): * test/lisp/files-tests.el: (files-tests-file-name-non-special-set-file-times): * test/lisp/net/tramp-tests.el (tramp-test22-file-times): When setting file times, avoid following symbolic links when the file is not supposed to be a symbolic link. * lib/futimens.c, lib/utimensat.c, m4/futimens.m4, m4/utimensat.m4: New files, copied from Gnulib. * lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file): When creating a file that is not supposed to exist already, use the excl flag to check this. * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times): * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times): Accept an optional FLAG arg that is currently ignored, and add a FIXME comment for it. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-times): * src/fileio.c (Fset_file_times): Support an optional FLAG arg. * src/fileio.c (Fcopy_file): Use futimens instead of set_file_times, as it’s simpler and is a POSIX API. * src/sysdep.c (set_file_times): Move from here ... * src/w32.c (set_file_times): ... to here, and make it static, since it is now used only in w32.c. Presumably w32.c should also add support for futimens and utimensat (the POSIX APIs, which Emacs now uses) and it can remove fdutimens (the Gnulib API, which Emacs no longer uses).
2020-03-07 20:04:05 +00:00
(defun tramp-sh-handle-set-file-times (filename &optional time flag)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `set-file-times' for Tramp files."
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(with-parsed-tramp-file-name filename nil
(when (tramp-get-remote-touch v)
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-file-properties v localname)
(let ((time
(if (or (null time)
(tramp-compat-time-equal-p time tramp-time-doesnt-exist)
(tramp-compat-time-equal-p time tramp-time-dont-know))
(current-time)
time)))
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(tramp-send-command-and-check
v (format
"env TZ=UTC %s %s %s %s"
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(tramp-get-remote-touch v)
(if (tramp-get-connection-property v "touch-t" nil)
(format "-t %s" (format-time-string "%Y%m%d%H%M.%S" time t))
"")
(if (eq flag 'nofollow) "-h" "")
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(tramp-shell-quote-argument localname)))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Rearrange detecting remote uid and gid in Tramp * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-ownership-preserved-p'. (tramp-crypt-add-directory): Check, that NAME is not quoted. (tramp-crypt-handle-file-ownership-preserved-p): New defun. (tramp-crypt-handle-insert-directory): Fix docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-gvfs-handle-file-readable-p): Call `tramp-get-remote-uid'. (tramp-gvfs-handle-get-remote-uid) (tramp-gvfs-handle-get-remote-gid): Rename from `tramp-gvfs-get-remote-{uid,gid}'. Do not cache result. (tramp-gvfs-maybe-open-connection): No special handling for remote uid and gid. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-sh-handle-get-remote-uid, tramp-sh-handle-get-remote-gid): Rename from `tramp-get-remote-{uid,gid}'. Do not cache result. (tramp-sh-handle-file-ownership-preserved-p): Distinguish by GROUP when caching. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-sudoedit-handle-get-remote-uid) (tramp-sudoedit-handle-get-remote-gid): Rename from `tramp-sudoedit-get-remote-{uid,gid}'. Do not cache result. (tramp-sudoedit-handle-set-file-uid-gid) (tramp-sudoedit-handle-write-region): Call `tramp-get-remote-uid' and `tramp-get-remote-gid'. (tramp-sudoedit-maybe-open-connection): No special handling for remote uid and gid. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-handle-write-region, tramp-check-cached-permissions): Call `tramp-get-remote-uid' and `tramp-get-remote-gid'. (tramp-get-remote-uid, tramp-get-remote-gid): New defuns. (tramp-local-host-p): Simplify `tramp-get-remote-uid' call. * test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards) Skip if needed.
2020-06-14 13:31:17 +00:00
(defun tramp-sh-handle-get-remote-uid (vec id-format)
"The uid of the remote connection VEC, in ID-FORMAT.
ID-FORMAT valid values are `string' and `integer'."
(ignore-errors
(cond
((tramp-get-remote-id vec) (tramp-get-remote-uid-with-id vec id-format))
((tramp-get-remote-perl vec) (tramp-get-remote-uid-with-perl vec id-format))
((tramp-get-remote-python vec)
(tramp-get-remote-uid-with-python vec id-format)))))
(defun tramp-sh-handle-get-remote-gid (vec id-format)
"The gid of the remote connection VEC, in ID-FORMAT.
ID-FORMAT valid values are `string' and `integer'."
(ignore-errors
(cond
((tramp-get-remote-id vec) (tramp-get-remote-gid-with-id vec id-format))
((tramp-get-remote-perl vec) (tramp-get-remote-gid-with-perl vec id-format))
((tramp-get-remote-python vec)
(tramp-get-remote-gid-with-python vec id-format)))))
(defun tramp-sh-handle-set-file-uid-gid (filename &optional uid gid)
"Like `tramp-set-file-uid-gid' for Tramp files."
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Modern Unices allow chown only for root. So we might need
;; another implementation, see `dired-do-chown'. OTOH, it is mostly
;; working with su(do)? when it is needed, so it shall succeed in
;; the majority of cases.
;; Don't modify `last-coding-system-used' by accident.
(let ((last-coding-system-used last-coding-system-used))
(with-parsed-tramp-file-name filename nil
(if (and (zerop (user-uid)) (tramp-local-host-p v))
;; If we are root on the local host, we can do it directly.
(tramp-set-file-uid-gid localname uid gid)
(let ((uid (or (and (natnump uid) uid)
(tramp-get-remote-uid v 'integer)))
(gid (or (and (natnump gid) gid)
(tramp-get-remote-gid v 'integer))))
(tramp-send-command
v (format
"chown %d:%d %s" uid gid
(tramp-shell-quote-argument localname))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-remote-selinux-p (vec)
"Check, whether SELINUX is enabled on the remote host."
(with-tramp-connection-property (tramp-get-process vec) "selinux-p"
(tramp-send-command-and-check vec "selinuxenabled")))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh-handle-file-selinux-context (filename)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `file-selinux-context' for Tramp files."
(with-parsed-tramp-file-name filename nil
(with-tramp-file-property v localname "file-selinux-context"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(let ((context '(nil nil nil nil))
(regexp (concat "\\([[:alnum:]_]+\\):" "\\([[:alnum:]_]+\\):"
"\\([[:alnum:]_]+\\):" "\\([[:alnum:]_]+\\)")))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(when (and (tramp-remote-selinux-p v)
(tramp-send-command-and-check
v (format
"%s -d -Z %s"
(tramp-get-ls-command v)
(tramp-shell-quote-argument localname))))
(with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-min))
(when (re-search-forward regexp (point-at-eol) t)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq context (list (match-string 1) (match-string 2)
(match-string 3) (match-string 4))))))
;; Return the context.
context))))
(defun tramp-sh-handle-set-file-selinux-context (filename context)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `set-file-selinux-context' for Tramp files."
(with-parsed-tramp-file-name filename nil
(when (and (consp context)
(tramp-remote-selinux-p v))
(let ((user (and (stringp (nth 0 context)) (nth 0 context)))
(role (and (stringp (nth 1 context)) (nth 1 context)))
(type (and (stringp (nth 2 context)) (nth 2 context)))
(range (and (stringp (nth 3 context)) (nth 3 context))))
(when (tramp-send-command-and-check
v (format "chcon %s %s %s %s %s"
(if user (format "--user=%s" user) "")
(if role (format "--role=%s" role) "")
(if type (format "--type=%s" type) "")
(if range (format "--range=%s" range) "")
(tramp-shell-quote-argument localname)))
(if (and user role type range)
(tramp-set-file-property
v localname "file-selinux-context" context)
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-file-property v localname "file-selinux-context"))
t)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-remote-acl-p (vec)
"Check, whether ACL is enabled on the remote host."
(with-tramp-connection-property (tramp-get-process vec) "acl-p"
(tramp-send-command-and-check vec "getfacl /")))
(defun tramp-sh-handle-file-acl (filename)
"Like `file-acl' for Tramp files."
(with-parsed-tramp-file-name filename nil
(with-tramp-file-property v localname "file-acl"
(when (and (tramp-remote-acl-p v)
(tramp-send-command-and-check
v (format
"getfacl -ac %s"
(tramp-shell-quote-argument localname))))
(with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-max))
(delete-blank-lines)
(when (> (point-max) (point-min))
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(substring-no-properties (buffer-string))))))))
(defun tramp-sh-handle-set-file-acl (filename acl-string)
"Like `set-file-acl' for Tramp files."
(with-parsed-tramp-file-name (expand-file-name filename) nil
(if (and (stringp acl-string) (tramp-remote-acl-p v)
(progn
(tramp-send-command
v (format "setfacl --set-file=- %s <<'%s'\n%s\n%s\n"
(tramp-shell-quote-argument localname)
tramp-end-of-heredoc
acl-string
tramp-end-of-heredoc))
(tramp-send-command-and-check v nil)))
;; Success.
(progn
(tramp-set-file-property v localname "file-acl" acl-string)
t)
;; In case of errors, we return nil.
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-file-property v localname "file-acl-string")
nil)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Simple functions using the `test' command.
(defun tramp-sh-handle-file-executable-p (filename)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `file-executable-p' for Tramp files."
(with-parsed-tramp-file-name filename nil
(with-tramp-file-property v localname "file-executable-p"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Examine `file-attributes' cache to see if request can be
;; satisfied without remote operation.
(or (tramp-check-cached-permissions v ?x)
(tramp-run-test "-x" filename)))))
(defun tramp-sh-handle-file-readable-p (filename)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `file-readable-p' for Tramp files."
(with-parsed-tramp-file-name filename nil
(with-tramp-file-property v localname "file-readable-p"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Examine `file-attributes' cache to see if request can be
;; satisfied without remote operation.
(or (tramp-check-cached-permissions v ?r)
(tramp-run-test "-r" filename)))))
;; Functions implemented using the basic functions above.
(defun tramp-sh-handle-file-directory-p (filename)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `file-directory-p' for Tramp files."
(with-parsed-tramp-file-name filename nil
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
;; `file-directory-p' is used as predicate for file name completion.
;; Sometimes, when a connection is not established yet, it is
;; desirable to return t immediately for "/method:foo:". It can
;; be expected that this is always a directory.
(or (zerop (length localname))
(with-tramp-file-property v localname "file-directory-p"
(tramp-run-test "-d" filename)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh-handle-file-writable-p (filename)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `file-writable-p' for Tramp files."
(with-parsed-tramp-file-name filename nil
(with-tramp-file-property v localname "file-writable-p"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(if (file-exists-p filename)
;; Examine `file-attributes' cache to see if request can be
;; satisfied without remote operation.
(or (tramp-check-cached-permissions v ?w)
(tramp-run-test "-w" filename))
;; If file doesn't exist, check if directory is writable.
(and (tramp-run-test "-d" (file-name-directory filename))
(tramp-run-test "-w" (file-name-directory filename)))))))
Fix permissions bugs with setgid directories etc. * configure.ac (BSD4_2): Remove; no longer needed. * admin/CPP-DEFINES (BSD4_2): Remove. * doc/lispintro/emacs-lisp-intro.texi (Files List): directory-files-and-attributes now outputs t for attribute that's now a placeholder. * doc/lispref/files.texi (Testing Accessibility): Document GROUP arg of file-ownership-preserved-p. (File Attributes): Document that 9th element is now just a placeholder. * doc/lispref/os.texi (User Identification): Document new functions group-gid, group-real-gid. * etc/NEWS: Document changes to file-attributes, file-ownership-preserved-p. Mention new functions group-gid, group-real-gid. * lisp/files.el (backup-buffer): Don't rely on 9th output of file-attributes, as it's now a placeholder. Instead, use the new optional arg of file-ownership-preserved-p. (file-ownership-preserved-p): New optional arg GROUP. Fix mishandling of setuid directories that would cause this function to return t when it should have returned nil. Document what happens if the file does not exist, and when it's not known whether the ownership will be preserved. * lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p): Likewise. (tramp-get-local-gid): Use group-gid for integer, as that's faster and more reliable. * src/dired.c (Ffile_attributes): Return t as the 9th attribute, to mark it as a placeholder. The old value was often wrong. The only user of this attribute has been changed to use file-ownership-preserved-p instead, with its new group arg. * src/editfns.c (Fgroup_gid, Fgroup_real_gid): New functions. Fixes: debbugs:13125
2012-12-14 18:59:00 +00:00
(defun tramp-sh-handle-file-ownership-preserved-p (filename &optional group)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `file-ownership-preserved-p' for Tramp files."
(with-parsed-tramp-file-name filename nil
Rearrange detecting remote uid and gid in Tramp * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-ownership-preserved-p'. (tramp-crypt-add-directory): Check, that NAME is not quoted. (tramp-crypt-handle-file-ownership-preserved-p): New defun. (tramp-crypt-handle-insert-directory): Fix docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-gvfs-handle-file-readable-p): Call `tramp-get-remote-uid'. (tramp-gvfs-handle-get-remote-uid) (tramp-gvfs-handle-get-remote-gid): Rename from `tramp-gvfs-get-remote-{uid,gid}'. Do not cache result. (tramp-gvfs-maybe-open-connection): No special handling for remote uid and gid. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-sh-handle-get-remote-uid, tramp-sh-handle-get-remote-gid): Rename from `tramp-get-remote-{uid,gid}'. Do not cache result. (tramp-sh-handle-file-ownership-preserved-p): Distinguish by GROUP when caching. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-sudoedit-handle-get-remote-uid) (tramp-sudoedit-handle-get-remote-gid): Rename from `tramp-sudoedit-get-remote-{uid,gid}'. Do not cache result. (tramp-sudoedit-handle-set-file-uid-gid) (tramp-sudoedit-handle-write-region): Call `tramp-get-remote-uid' and `tramp-get-remote-gid'. (tramp-sudoedit-maybe-open-connection): No special handling for remote uid and gid. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-handle-write-region, tramp-check-cached-permissions): Call `tramp-get-remote-uid' and `tramp-get-remote-gid'. (tramp-get-remote-uid, tramp-get-remote-gid): New defuns. (tramp-local-host-p): Simplify `tramp-get-remote-uid' call. * test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards) Skip if needed.
2020-06-14 13:31:17 +00:00
(with-tramp-file-property
v localname
(format "file-ownership-preserved-p%s" (if group "-group" ""))
(let ((attributes (file-attributes filename 'integer)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Return t if the file doesn't exist, since it's true that no
;; information would be lost by an (attempted) delete and create.
(or (null attributes)
Fix permissions bugs with setgid directories etc. * configure.ac (BSD4_2): Remove; no longer needed. * admin/CPP-DEFINES (BSD4_2): Remove. * doc/lispintro/emacs-lisp-intro.texi (Files List): directory-files-and-attributes now outputs t for attribute that's now a placeholder. * doc/lispref/files.texi (Testing Accessibility): Document GROUP arg of file-ownership-preserved-p. (File Attributes): Document that 9th element is now just a placeholder. * doc/lispref/os.texi (User Identification): Document new functions group-gid, group-real-gid. * etc/NEWS: Document changes to file-attributes, file-ownership-preserved-p. Mention new functions group-gid, group-real-gid. * lisp/files.el (backup-buffer): Don't rely on 9th output of file-attributes, as it's now a placeholder. Instead, use the new optional arg of file-ownership-preserved-p. (file-ownership-preserved-p): New optional arg GROUP. Fix mishandling of setuid directories that would cause this function to return t when it should have returned nil. Document what happens if the file does not exist, and when it's not known whether the ownership will be preserved. * lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p): Likewise. (tramp-get-local-gid): Use group-gid for integer, as that's faster and more reliable. * src/dired.c (Ffile_attributes): Return t as the 9th attribute, to mark it as a placeholder. The old value was often wrong. The only user of this attribute has been changed to use file-ownership-preserved-p instead, with its new group arg. * src/editfns.c (Fgroup_gid, Fgroup_real_gid): New functions. Fixes: debbugs:13125
2012-12-14 18:59:00 +00:00
(and
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
(= (tramp-compat-file-attribute-user-id attributes)
(tramp-get-remote-uid v 'integer))
Fix permissions bugs with setgid directories etc. * configure.ac (BSD4_2): Remove; no longer needed. * admin/CPP-DEFINES (BSD4_2): Remove. * doc/lispintro/emacs-lisp-intro.texi (Files List): directory-files-and-attributes now outputs t for attribute that's now a placeholder. * doc/lispref/files.texi (Testing Accessibility): Document GROUP arg of file-ownership-preserved-p. (File Attributes): Document that 9th element is now just a placeholder. * doc/lispref/os.texi (User Identification): Document new functions group-gid, group-real-gid. * etc/NEWS: Document changes to file-attributes, file-ownership-preserved-p. Mention new functions group-gid, group-real-gid. * lisp/files.el (backup-buffer): Don't rely on 9th output of file-attributes, as it's now a placeholder. Instead, use the new optional arg of file-ownership-preserved-p. (file-ownership-preserved-p): New optional arg GROUP. Fix mishandling of setuid directories that would cause this function to return t when it should have returned nil. Document what happens if the file does not exist, and when it's not known whether the ownership will be preserved. * lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p): Likewise. (tramp-get-local-gid): Use group-gid for integer, as that's faster and more reliable. * src/dired.c (Ffile_attributes): Return t as the 9th attribute, to mark it as a placeholder. The old value was often wrong. The only user of this attribute has been changed to use file-ownership-preserved-p instead, with its new group arg. * src/editfns.c (Fgroup_gid, Fgroup_real_gid): New functions. Fixes: debbugs:13125
2012-12-14 18:59:00 +00:00
(or (not group)
;; On BSD-derived systems files always inherit the
;; parent directory's group, so skip the group-gid
;; test.
(string-match-p
"BSD\\|DragonFly\\|Darwin"
(tramp-get-connection-property v "uname" ""))
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
(= (tramp-compat-file-attribute-group-id attributes)
(tramp-get-remote-gid v 'integer)))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Directory listings.
(defun tramp-sh-handle-directory-files-and-attributes
(directory &optional full match nosort id-format count)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `directory-files-and-attributes' for Tramp files."
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
(unless id-format (setq id-format 'integer))
(unless (file-exists-p directory)
Tramp code cleanup * lisp/net/tramp.el (tramp-signal-hook-function) (tramp-handle-access-file, tramp-handle-copy-directory) (tramp-handle-directory-files, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-load): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-make-directory) (tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file) (tramp-crypt-handle-directory-files) (tramp-crypt-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-make-directory): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-make-directory) (tramp-sh-handle-file-local-copy) (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory, tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Unify error report. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args with other `tramp-*-file-name-handler'. * lisp/net/tramp-compat.el (tramp-error): Declare. (tramp-compat-file-missing): New defsubst. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Handle volatile files. (tramp-gvfs-set-attribute): New defun. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use it. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Use `msg-operation'. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Remove superfluous `format: (tramp-smb-maybe-open-connection): Simplify loop. * lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from symlinked files. * test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun. (tramp--test-nextcloud-p): Remove. (tramp-test40-special-characters-with-ls): Do not skip on MS Windows. (tramp-test41-utf8): Skip if needed.
2021-02-03 17:48:09 +00:00
(tramp-compat-file-missing
(tramp-dissect-file-name directory) directory))
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
(when (file-directory-p directory)
(setq directory (expand-file-name directory))
(let* ((temp
(copy-tree
(with-parsed-tramp-file-name directory nil
(with-tramp-file-property
v localname
(format "directory-files-and-attributes-%s" id-format)
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(mapcar
(lambda (x)
(cons (car x) (tramp-convert-file-attributes v (cdr x))))
(cond
((tramp-get-remote-stat v)
(tramp-do-directory-files-and-attributes-with-stat
v localname id-format))
((tramp-get-remote-perl v)
(tramp-do-directory-files-and-attributes-with-perl
v localname id-format))
(t nil)))))))
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
result item)
(while temp
(setq item (pop temp))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(when (or (null match) (string-match-p match (car item)))
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
(when full
(setcar item (expand-file-name (car item) directory)))
(push item result)))
(unless nosort
(setq result (sort result (lambda (x y) (string< (car x) (car y))))))
(when (and (natnump count) (> count 0))
(setq result (nbutlast result (- (length result) count))))
(or result
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
;; The scripts could fail, for example with huge file size.
(tramp-handle-directory-files-and-attributes
directory full match nosort id-format count)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; FIXME: Fix function to work with count parameter.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-do-directory-files-and-attributes-with-perl
(vec localname &optional id-format)
"Implement `directory-files-and-attributes' for Tramp files using a Perl script."
(tramp-message vec 5 "directory-files-and-attributes with perl: %s" localname)
(tramp-maybe-send-script
vec tramp-perl-directory-files-and-attributes
"tramp_perl_directory_files_and_attributes")
(let ((object
(tramp-send-command-and-read
vec
(format "tramp_perl_directory_files_and_attributes %s %s"
(tramp-shell-quote-argument localname) id-format))))
(when (stringp object) (tramp-error vec 'file-error object))
object))
;; FIXME: Fix function to work with count parameter.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-do-directory-files-and-attributes-with-stat
(vec localname &optional id-format)
"Implement `directory-files-and-attributes' for Tramp files using stat(1) command."
(tramp-message vec 5 "directory-files-and-attributes with stat: %s" localname)
(tramp-send-command-and-read
vec
(format
(concat
;; We must care about file names with spaces, or starting with
;; "-"; this would confuse xargs. "ls -aQ" might be a solution,
;; but it does not work on all remote systems. Therefore, we use
;; \000 as file separator. `tramp-sh--quoting-style-options' do
;; not work for file names with spaces piped to "xargs".
;; Apostrophes in the stat output are masked as
;; `tramp-stat-marker', in order to make a proper shell escape of
;; them in file names.
"cd %s && echo \"(\"; (%s %s -a | tr '\\n\\r' '\\000\\000' | "
"xargs -0 %s -c "
"'(%s%%n%s (%s%%N%s) %%h %s %s %%X %%Y %%Z %%s %s%%A%s t %%i -1)' "
"-- 2>%s | sed -e 's/\"/\\\\\"/g' -e 's/%s/\"/g'); echo \")\"")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-shell-quote-argument localname)
(tramp-get-ls-command vec)
;; On systems which have no quoting style, file names with special
;; characters could fail.
(tramp-sh--quoting-style-options vec)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-get-remote-stat vec)
tramp-stat-marker tramp-stat-marker
tramp-stat-marker tramp-stat-marker
(if (eq id-format 'integer)
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
"%u"
(eval-when-compile (concat tramp-stat-marker "%U" tramp-stat-marker)))
(if (eq id-format 'integer)
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
"%g"
(eval-when-compile (concat tramp-stat-marker "%G" tramp-stat-marker)))
tramp-stat-marker tramp-stat-marker
(tramp-get-remote-null-device vec)
tramp-stat-quoted-marker)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; This function should return "foo/" for directories and "bar" for
;; files.
(defun tramp-sh-handle-file-name-all-completions (filename directory)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `file-name-all-completions' for Tramp files."
(unless (tramp-compat-string-search "/" filename)
(all-completions
filename
(with-parsed-tramp-file-name (expand-file-name directory) nil
(with-tramp-file-property v localname "file-name-all-completions"
(let (result)
;; Get a list of directories and files, including reliably
;; tagging the directories with a trailing "/". Because I
;; rock. --daniel@danann.net
(tramp-send-command
v
(if (tramp-get-remote-perl v)
(progn
(tramp-maybe-send-script
v tramp-perl-file-name-all-completions
"tramp_perl_file_name_all_completions")
(format "tramp_perl_file_name_all_completions %s"
(tramp-shell-quote-argument localname)))
(format (concat
"(cd %s 2>&1 && %s -a 2>%s"
" | while IFS= read f; do"
" if %s -d \"$f\" 2>%s;"
" then \\echo \"$f/\"; else \\echo \"$f\"; fi; done"
" && \\echo ok) || \\echo fail")
(tramp-shell-quote-argument localname)
(tramp-get-ls-command v)
(tramp-get-remote-null-device v)
(tramp-get-test-command v)
(tramp-get-remote-null-device v))))
;; Now grab the output.
(with-current-buffer (tramp-get-buffer v)
(goto-char (point-max))
;; Check result code, found in last line of output.
(forward-line -1)
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(if (looking-at-p "^fail$")
(progn
;; Grab error message from line before last line
;; (it was put there by `cd 2>&1').
(forward-line -1)
(tramp-error
v 'file-error
"tramp-sh-handle-file-name-all-completions: %s"
(buffer-substring (point) (point-at-eol))))
;; For peace of mind, if buffer doesn't end in `fail'
;; then it should end in `ok'. If neither are in the
;; buffer something went seriously wrong on the remote
;; side.
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(unless (looking-at-p "^ok$")
(tramp-error
Tramp code cleanup * lisp/net/tramp.el (tramp-signal-hook-function) (tramp-handle-access-file, tramp-handle-copy-directory) (tramp-handle-directory-files, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-load): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-make-directory) (tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file) (tramp-crypt-handle-directory-files) (tramp-crypt-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-make-directory): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-make-directory) (tramp-sh-handle-file-local-copy) (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory, tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Unify error report. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args with other `tramp-*-file-name-handler'. * lisp/net/tramp-compat.el (tramp-error): Declare. (tramp-compat-file-missing): New defsubst. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Handle volatile files. (tramp-gvfs-set-attribute): New defun. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use it. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Use `msg-operation'. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Remove superfluous `format: (tramp-smb-maybe-open-connection): Simplify loop. * lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from symlinked files. * test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun. (tramp--test-nextcloud-p): Remove. (tramp-test40-special-characters-with-ls): Do not skip on MS Windows. (tramp-test41-utf8): Skip if needed.
2021-02-03 17:48:09 +00:00
v 'file-error
(concat "tramp-sh-handle-file-name-all-completions: "
"internal error accessing `%s': `%s'")
(tramp-shell-quote-argument localname) (buffer-string))))
(while (zerop (forward-line -1))
(push (buffer-substring (point) (point-at-eol)) result)))
result))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; cp, mv and ln
(defun tramp-sh-handle-add-name-to-file
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(filename newname &optional ok-if-already-exists)
"Like `add-name-to-file' for Tramp files."
(unless (tramp-equal-remote filename newname)
(with-parsed-tramp-file-name
(if (tramp-tramp-file-p filename) filename newname) nil
(tramp-error
v 'file-error
"add-name-to-file: %s"
"only implemented for same method, same user, same host")))
(with-parsed-tramp-file-name filename v1
(with-parsed-tramp-file-name newname v2
(let ((ln (when v1 (tramp-get-remote-ln v1))))
;; Do the 'confirm if exists' thing.
(when (file-exists-p newname)
;; What to do?
(if (or (null ok-if-already-exists) ; not allowed to exist
(and (numberp ok-if-already-exists)
(not (yes-or-no-p
(format
"File %s already exists; make it a link anyway?"
v2-localname)))))
(tramp-error v2 'file-already-exists newname)
(delete-file newname)))
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-file-properties v2 v2-localname)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-barf-unless-okay
v1
(format "%s %s %s" ln
(tramp-shell-quote-argument v1-localname)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-shell-quote-argument v2-localname))
"error with add-name-to-file, see buffer `%s' for details"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(buffer-name))))))
(defun tramp-sh-handle-copy-file
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(filename newname &optional ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `copy-file' for Tramp files."
(setq filename (expand-file-name filename)
newname (expand-file-name newname))
(if (or (tramp-tramp-file-p filename)
(tramp-tramp-file-p newname))
(tramp-do-copy-or-rename-file
'copy filename newname ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-run-real-handler
#'copy-file
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(list filename newname ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh-handle-copy-directory
(dirname newname &optional keep-date parents copy-contents)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `copy-directory' for Tramp files."
(let ((t1 (tramp-tramp-file-p dirname))
(t2 (tramp-tramp-file-p newname))
target)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(with-parsed-tramp-file-name (if t1 dirname newname) nil
(unless (file-exists-p dirname)
Tramp code cleanup * lisp/net/tramp.el (tramp-signal-hook-function) (tramp-handle-access-file, tramp-handle-copy-directory) (tramp-handle-directory-files, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-load): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-make-directory) (tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file) (tramp-crypt-handle-directory-files) (tramp-crypt-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-make-directory): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-make-directory) (tramp-sh-handle-file-local-copy) (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory, tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Unify error report. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args with other `tramp-*-file-name-handler'. * lisp/net/tramp-compat.el (tramp-error): Declare. (tramp-compat-file-missing): New defsubst. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Handle volatile files. (tramp-gvfs-set-attribute): New defun. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use it. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Use `msg-operation'. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Remove superfluous `format: (tramp-smb-maybe-open-connection): Simplify loop. * lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from symlinked files. * test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun. (tramp--test-nextcloud-p): Remove. (tramp-test40-special-characters-with-ls): Do not skip on MS Windows. (tramp-test41-utf8): Skip if needed.
2021-02-03 17:48:09 +00:00
(tramp-compat-file-missing v dirname))
;; `copy-directory-create-symlink' exists since Emacs 28.1.
(if (and (bound-and-true-p copy-directory-create-symlink)
(setq target (file-symlink-p dirname))
(tramp-equal-remote dirname newname))
(make-symbolic-link
target
(if (directory-name-p newname)
(concat newname (file-name-nondirectory dirname)) newname)
t)
(if (and (not copy-contents)
(tramp-get-method-parameter v 'tramp-copy-recursive)
;; When DIRNAME and NEWNAME are remote, they must
;; have the same method.
(or (null t1) (null t2)
(string-equal
(tramp-file-name-method (tramp-dissect-file-name dirname))
(tramp-file-name-method
(tramp-dissect-file-name newname)))))
;; scp or rsync DTRT.
(progn
(when (and (file-directory-p newname)
(not (directory-name-p newname)))
(tramp-error v 'file-already-exists newname))
(setq dirname (directory-file-name (expand-file-name dirname))
newname (directory-file-name (expand-file-name newname)))
(when (and (file-directory-p newname)
(not (string-equal (file-name-nondirectory dirname)
(file-name-nondirectory newname))))
(setq newname
(expand-file-name
(file-name-nondirectory dirname) newname)))
(unless (file-directory-p (file-name-directory newname))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(make-directory (file-name-directory newname) parents))
(tramp-do-copy-or-rename-file-out-of-band
'copy dirname newname 'ok-if-already-exists keep-date))
;; We must do it file-wise.
(tramp-run-real-handler
#'copy-directory
(list dirname newname keep-date parents copy-contents))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; When newname did exist, we have wrong cached values.
(when t2
(with-parsed-tramp-file-name newname nil
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-file-properties v localname))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh-handle-rename-file
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(filename newname &optional ok-if-already-exists)
"Like `rename-file' for Tramp files."
;; Check if both files are local -- invoke normal rename-file.
;; Otherwise, use Tramp from local system.
2020-01-24 13:41:44 +00:00
(setq filename (expand-file-name filename)
newname (expand-file-name newname))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; At least one file a Tramp file?
(if (or (tramp-tramp-file-p filename)
(tramp-tramp-file-p newname))
(tramp-do-copy-or-rename-file
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
'rename filename newname ok-if-already-exists
'keep-time 'preserve-uid-gid)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-run-real-handler
#'rename-file (list filename newname ok-if-already-exists))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-do-copy-or-rename-file
(op filename newname &optional ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Copy or rename a remote file.
OP must be `copy' or `rename' and indicates the operation to perform.
FILENAME specifies the file to copy or rename, NEWNAME is the name of
the new file (for copy) or the new name of the file (for rename).
OK-IF-ALREADY-EXISTS means don't barf if NEWNAME exists already.
KEEP-DATE means to make sure that NEWNAME has the same timestamp
as FILENAME. PRESERVE-UID-GID, when non-nil, instructs to keep
the uid and gid if both files are on the same host.
PRESERVE-EXTENDED-ATTRIBUTES activates selinux and acl commands.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
This function is invoked by `tramp-sh-handle-copy-file' and
`tramp-sh-handle-rename-file'. It is an error if OP is neither
of `copy' and `rename'. FILENAME and NEWNAME must be absolute
file names."
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(unless (memq op '(copy rename))
(error "Unknown operation `%s', must be `copy' or `rename'" op))
(if (and
(file-directory-p filename)
(not (tramp-equal-remote filename newname)))
(progn
(copy-directory filename newname keep-date t)
(when (eq op 'rename) (delete-directory filename 'recursive)))
(let ((t1 (tramp-tramp-file-p filename))
(t2 (tramp-tramp-file-p newname))
(length (tramp-compat-file-attribute-size
(file-attributes (file-truename filename))))
(attributes (and preserve-extended-attributes
(file-extended-attributes filename)))
Tramp code cleanup * lisp/net/tramp.el (tramp-signal-hook-function) (tramp-handle-access-file, tramp-handle-copy-directory) (tramp-handle-directory-files, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-load): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-make-directory) (tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file) (tramp-crypt-handle-directory-files) (tramp-crypt-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-make-directory): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-make-directory) (tramp-sh-handle-file-local-copy) (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory, tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Unify error report. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args with other `tramp-*-file-name-handler'. * lisp/net/tramp-compat.el (tramp-error): Declare. (tramp-compat-file-missing): New defsubst. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Handle volatile files. (tramp-gvfs-set-attribute): New defun. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use it. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Use `msg-operation'. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Remove superfluous `format: (tramp-smb-maybe-open-connection): Simplify loop. * lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from symlinked files. * test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun. (tramp--test-nextcloud-p): Remove. (tramp-test40-special-characters-with-ls): Do not skip on MS Windows. (tramp-test41-utf8): Skip if needed.
2021-02-03 17:48:09 +00:00
(msg-operation (if (eq op 'copy) "Copying" "Renaming")))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(unless (file-exists-p filename)
Tramp code cleanup * lisp/net/tramp.el (tramp-signal-hook-function) (tramp-handle-access-file, tramp-handle-copy-directory) (tramp-handle-directory-files, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-load): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-make-directory) (tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file) (tramp-crypt-handle-directory-files) (tramp-crypt-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-make-directory): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-make-directory) (tramp-sh-handle-file-local-copy) (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory, tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Unify error report. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args with other `tramp-*-file-name-handler'. * lisp/net/tramp-compat.el (tramp-error): Declare. (tramp-compat-file-missing): New defsubst. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Handle volatile files. (tramp-gvfs-set-attribute): New defun. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use it. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Use `msg-operation'. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Remove superfluous `format: (tramp-smb-maybe-open-connection): Simplify loop. * lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from symlinked files. * test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun. (tramp--test-nextcloud-p): Remove. (tramp-test40-special-characters-with-ls): Do not skip on MS Windows. (tramp-test41-utf8): Skip if needed.
2021-02-03 17:48:09 +00:00
(tramp-compat-file-missing v filename))
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error v 'file-already-exists newname))
(when (and (file-directory-p newname)
Sync with Tramp 2.5.0-pre * doc/misc/tramp.texi: Protext Tramp x.y and Emacs x.y by @w{}. (GVFS-based methods): Move "GNOME Online Accounts" index. (Customizing Methods, Android shell setup, File name completion) (Frequently Asked Questions): Fix typos. * doc/misc/trampver.texi: Change version to "2.5.0-pre". * lisp/net/trampver.el: Change version to "2.5.0-pre". (inhibit-message): Don't declare. * lisp/net/tramp.el: Bump version to 2.5.0-pre. Require Emacs 25.1. (tramp-debug-message): Simplify. (tramp-message): Don't use `tramp-message-show-message'. (tramp-with-demoted-errors, with-parsed-tramp-file-name) (with-tramp-file-property, with-tramp-connection-property): Adapt `declare' form. (with-tramp-progress-reporter): Suppress progress reporter when noninteractive. (tramp-completion-mode, tramp-completion-mode-p): Remove. * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (format-message): Remove compatibility code. (tramp-compat-directory-name-p) (tramp-compat-tramp-file-name-slots): Remove. * lisp/net/tramp.el (tramp-debug-message, tramp-message) (tramp-backtrace, tramp-error, tramp-error-with-buffer) (tramp-user-error, tramp-with-demoted-errors) (tramp-signal-hook-function): * lisp/net/tramp-compat.el (tramp-compat-funcall) * lisp/net/tramp-gvfs.el (tramp-dbus-function): Add `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-get-method-parameter) (tramp-dissect-file-name, tramp-error, tramp-error-with-buffer) (tramp-user-error, with-parsed-tramp-file-name) (with-tramp-progress-reporter, tramp-file-name-handler) (tramp-completion-file-name-handler, tramp-autoload-file-name-handler) (tramp-register-file-name-handlers, tramp-connectable-p) (tramp-handle-file-modes, tramp-handle-file-regular-p) (tramp-handle-file-truename, tramp-handle-insert-directory) (tramp-handle-load, tramp-set-file-uid-gid): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name): * lisp/net/tramp-cache.el (tramp-get-file-property, tramp-cache-print): * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (tramp-compat-exec-path): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-dbus-byte-array-to-string) (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler) (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-insert-directory, tramp-sh-file-name-handler) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler) (tramp-smb-handle-copy-file, tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-insert-directory) (tramp-smb-handle-rename-file, tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-file-truename): Use `if-let', `when-let', `directory-name-p', `inhibit-message', `non-essential and `cl-struct-slot-info'. Don't use `seconds-to-time'. * test/lisp/net/tramp-archive-tests.el (tramp-message-show-message): Don't set. * test/lisp/net/tramp-tests.el (inhibit-message): Don't declare. (tramp-message-show-message): Don't set. (tramp-test06-directory-file-name): Use `non-essential'. (tramp-test10-write-region): Use `inhibit-message'. (tramp-test36-vc-registered): No special handling for old Emacsen. (tramp--test-emacs25-p): Remove. (tramp-test45-unload): Special case of `tramp-completion-mode'.
2020-01-19 13:11:07 +00:00
(not (directory-name-p newname)))
(tramp-error v 'file-error "File is a directory %s" newname))
(with-tramp-progress-reporter
Tramp code cleanup * lisp/net/tramp.el (tramp-signal-hook-function) (tramp-handle-access-file, tramp-handle-copy-directory) (tramp-handle-directory-files, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-load): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-make-directory) (tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file) (tramp-crypt-handle-directory-files) (tramp-crypt-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-make-directory): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-make-directory) (tramp-sh-handle-file-local-copy) (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory, tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Unify error report. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args with other `tramp-*-file-name-handler'. * lisp/net/tramp-compat.el (tramp-error): Declare. (tramp-compat-file-missing): New defsubst. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Handle volatile files. (tramp-gvfs-set-attribute): New defun. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use it. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Use `msg-operation'. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Remove superfluous `format: (tramp-smb-maybe-open-connection): Simplify loop. * lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from symlinked files. * test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun. (tramp--test-nextcloud-p): Remove. (tramp-test40-special-characters-with-ls): Do not skip on MS Windows. (tramp-test41-utf8): Skip if needed.
2021-02-03 17:48:09 +00:00
v 0 (format "%s %s to %s" msg-operation filename newname)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(cond
;; Both are Tramp files.
((and t1 t2)
(with-parsed-tramp-file-name filename v1
(with-parsed-tramp-file-name newname v2
(cond
;; Shortcut: if method, host, user are the same for
;; both files, we invoke `cp' or `mv' on the remote
;; host directly.
((tramp-equal-remote filename newname)
(tramp-do-copy-or-rename-file-directly
op filename newname
ok-if-already-exists keep-date preserve-uid-gid))
;; Try out-of-band operation.
((and
(tramp-method-out-of-band-p v1 length)
(tramp-method-out-of-band-p v2 length))
(tramp-do-copy-or-rename-file-out-of-band
op filename newname ok-if-already-exists keep-date))
;; No shortcut was possible. So we copy the file
;; first. If the operation was `rename', we go back
;; and delete the original file (if the copy was
;; successful). The approach is simple-minded: we
;; create a new buffer, insert the contents of the
;; source file into it, then write out the buffer to
;; the target file. The advantage is that it doesn't
;; matter which file name handlers are used for the
;; source and target file.
(t
(tramp-do-copy-or-rename-file-via-buffer
op filename newname ok-if-already-exists keep-date))))))
;; One file is a Tramp file, the other one is local.
((or t1 t2)
(cond
;; Fast track on local machine.
((tramp-local-host-p v)
(tramp-do-copy-or-rename-file-directly
op filename newname
ok-if-already-exists keep-date preserve-uid-gid))
;; If the Tramp file has an out-of-band method, the
;; corresponding copy-program can be invoked.
((tramp-method-out-of-band-p v length)
(tramp-do-copy-or-rename-file-out-of-band
op filename newname ok-if-already-exists keep-date))
;; Use the inline method via a Tramp buffer.
(t (tramp-do-copy-or-rename-file-via-buffer
op filename newname ok-if-already-exists keep-date))))
(t
;; One of them must be a Tramp file.
(error "Tramp implementation says this cannot happen")))
;; Handle `preserve-extended-attributes'. We ignore possible
;; errors, because ACL strings could be incompatible.
(when attributes
(ignore-errors
(set-file-extended-attributes newname attributes)))
;; In case of `rename', we must flush the cache of the source file.
(when (and t1 (eq op 'rename))
(with-parsed-tramp-file-name filename v1
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-file-properties v1 v1-localname)))
;; When newname did exist, we have wrong cached values.
(when t2
(with-parsed-tramp-file-name newname v2
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-file-properties v2 v2-localname))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-do-copy-or-rename-file-via-buffer
(op filename newname ok-if-already-exists keep-date)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Use an Emacs buffer to copy or rename a file.
First arg OP is either `copy' or `rename' and indicates the operation.
FILENAME is the source file, NEWNAME the target file.
KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
;; Check, whether file is too large. Emacs checks in `insert-file-1'
;; and `find-file-noselect', but that's not called here.
(abort-if-file-too-large
(tramp-compat-file-attribute-size (file-attributes (file-truename filename)))
(symbol-name op) filename)
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
;; We must disable multibyte, because binary data shall not be
;; converted. We don't want the target file to be compressed, so we
;; let-bind `jka-compr-inhibit' to t. `epa-file-handler' shall not
;; be called either. We remove `tramp-file-name-handler' from
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
;; `inhibit-file-name-handlers'; otherwise the file name handler for
;; `insert-file-contents' might be deactivated in some corner cases.
(let ((coding-system-for-read 'binary)
(coding-system-for-write 'binary)
(jka-compr-inhibit t)
(inhibit-file-name-operation 'write-region)
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
(inhibit-file-name-handlers
(cons 'epa-file-handler
(remq 'tramp-file-name-handler inhibit-file-name-handlers))))
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
(with-temp-file newname
(set-buffer-multibyte nil)
(insert-file-contents-literally filename)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; KEEP-DATE handling.
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
(when keep-date
(tramp-compat-set-file-times
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
newname
(tramp-compat-file-attribute-modification-time
(file-attributes filename))
(unless ok-if-already-exists 'nofollow)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Set the mode.
(set-file-modes newname (tramp-default-file-modes filename))
;; If the operation was `rename', delete the original file.
(unless (eq op 'copy) (delete-file filename)))
(defun tramp-do-copy-or-rename-file-directly
(op filename newname ok-if-already-exists keep-date preserve-uid-gid)
"Invokes `cp' or `mv' on the remote system.
OP must be one of `copy' or `rename', indicating `cp' or `mv',
respectively. FILENAME specifies the file to copy or rename,
NEWNAME is the name of the new file (for copy) or the new name of
the file (for rename). Both files must reside on the same host.
KEEP-DATE means to make sure that NEWNAME has the same timestamp
as FILENAME. PRESERVE-UID-GID, when non-nil, instructs to keep
the uid and gid from FILENAME."
(let ((t1 (tramp-tramp-file-p filename))
(t2 (tramp-tramp-file-p newname))
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
(file-times (tramp-compat-file-attribute-modification-time
(file-attributes filename)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(file-modes (tramp-default-file-modes filename)))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(let* ((cmd (cond ((and (eq op 'copy) preserve-uid-gid) "cp -f -p")
((eq op 'copy) "cp -f")
((eq op 'rename) "mv -f")
(t (tramp-error
v 'file-error
"Unknown operation `%s', must be `copy' or `rename'"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
op))))
; Sync with Tramp repository * doc/misc/tramp.texi (Frequently Asked Questions): Mention Emacs 28. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.4-pre". * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file): Use `tramp-file-local-name'. (tramp-adb-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-cmds.el (tramp-rename-files): Use `tramp-file-local-name'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-process-file, tramp-set-remote-path) (tramp-find-inline-encoding, tramp-get-remote-touch): Use `tramp-file-local-name'. (tramp-sh-handle-make-process): Support `stderr' as file name. Delete temporary stderr file. (tramp-sh-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-process-file): Use `tramp-file-local-name'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-set-file-uid-gid): Use `tramp-unquote-file-local-name'. (tramp-sudoedit-handle-make-symbolic-link): Use `tramp-file-local-name'. (tramp-sudoedit-handle-file-system-info): Fix a scoping error. * lisp/net/tramp.el: Bump version to 2.4.4-pre. (tramp-ignored-file-name-regexp, tramp-time-dont-know) (tramp-time-doesnt-exist): Fix typo. (tramp-file-local-name): Extend for non-remote file names. (tramp-unquote-file-local-name): New defun. (tramp-completion-make-tramp-file-name): Simplify. (tramp-set-connection-local-variables-for-buffer) (tramp-equal-remote, tramp-handle-make-auto-save-file-name): Use `tramp-tramp-file-p'. (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-truename, tramp-get-remote-tmpdir) (tramp-make-tramp-temp-file): Use `tramp-file-local-name'. (tramp-handle-shell-command, tramp-handle-start-file-process): Implement asynchronous `error-buffer'.
2020-01-06 11:11:53 +00:00
(localname1 (tramp-file-local-name filename))
(localname2 (tramp-file-local-name newname))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(prefix (file-remote-p (if t1 filename newname)))
cmd-result)
(when (and (eq op 'copy) (file-directory-p filename))
(setq cmd (concat cmd " -R")))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(cond
;; Both files are on a remote host, with same user.
((and t1 t2)
(setq cmd-result
(tramp-send-command-and-check
v (format "%s %s %s" cmd
(tramp-shell-quote-argument localname1)
(tramp-shell-quote-argument localname2))))
(with-current-buffer (tramp-get-buffer v)
(goto-char (point-min))
(unless
(or
(and keep-date
;; Mask cp -f error.
(re-search-forward
tramp-operation-not-permitted-regexp nil t))
cmd-result)
(tramp-error-with-buffer
nil v 'file-error
"Copying directly failed, see buffer `%s' for details."
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(buffer-name)))))
;; We are on the local host.
((or t1 t2)
(cond
;; We can do it directly.
((let (file-name-handler-alist)
(and (file-readable-p localname1)
;; No sticky bit when renaming.
(or (eq op 'copy)
(zerop
(logand
(file-modes (file-name-directory localname1)) #o1000)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(file-writable-p (file-name-directory localname2))
(or (file-directory-p localname2)
(file-writable-p localname2))))
(if (eq op 'copy)
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(copy-file
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
localname1 localname2 ok-if-already-exists
keep-date preserve-uid-gid)
(tramp-run-real-handler
#'rename-file
(list localname1 localname2 ok-if-already-exists))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; We can do it directly with `tramp-send-command'
((and (file-readable-p (concat prefix localname1))
(file-writable-p
(file-name-directory (concat prefix localname2)))
(or (file-directory-p (concat prefix localname2))
(file-writable-p (concat prefix localname2))))
(tramp-do-copy-or-rename-file-directly
op (concat prefix localname1) (concat prefix localname2)
ok-if-already-exists keep-date preserve-uid-gid)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; We must change the ownership to the local user.
(tramp-set-file-uid-gid
(concat prefix localname2)
(tramp-get-local-uid 'integer)
(tramp-get-local-gid 'integer)))
;; We need a temporary file in between.
(t
;; Create the temporary file.
(let ((tmpfile (tramp-compat-make-temp-file localname1)))
(unwind-protect
(progn
(cond
(t1
(tramp-barf-unless-okay
v (format
"%s %s %s" cmd
(tramp-shell-quote-argument localname1)
(tramp-shell-quote-argument tmpfile))
"Copying directly failed, see buffer `%s' for details."
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-get-buffer v))
;; We must change the ownership as remote user.
;; Since this does not work reliable, we also
;; give read permissions.
(set-file-modes (concat prefix tmpfile) #o0777)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-set-file-uid-gid
(concat prefix tmpfile)
(tramp-get-local-uid 'integer)
(tramp-get-local-gid 'integer)))
(t2
(if (eq op 'copy)
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(copy-file
localname1 tmpfile t keep-date preserve-uid-gid)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-run-real-handler
#'rename-file (list localname1 tmpfile t)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; We must change the ownership as local user.
;; Since this does not work reliable, we also
;; give read permissions.
Finish implementation of {set-}file-modes FLAG arg in Tramp * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use 'nofollow for temporary files. Use `tramp-compat-set-file-modes'. (tramp-adb-handle-write-region): Do not use 'nofollow for temporary files. (tramp-adb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-compat.el (tramp-compat-file-modes) (tramp-compat-set-file-modes): New defaliases. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): Make explicit check (eq flag 'nofollow). * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG. (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region): Do not use 'nofollow for temporary files. (tramp-get-remote-chmod-h): New defun. * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Implement FLAG. (tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'. * lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG. (tramp-handle-file-modes): Use `file-truename' instead of `file-chase-links'. The latter function does not work for remote file names. (tramp-handle-write-region): Call `tramp-default-file-modes' with 'nofollow if needed. Do not use 'nofollow for temporary files. * test/lisp/net/tramp-tests.el (tramp--test-ignore-make-symbolic-link-error): Check also for "Cannot chmod .* with nofollow flag" error. (tramp-test20-file-modes): Extend test. (tramp--test-emacs28-p): New defun.
2020-02-25 12:25:57 +00:00
(set-file-modes tmpfile #o0777)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-set-file-uid-gid
tmpfile
(tramp-get-remote-uid v 'integer)
(tramp-get-remote-gid v 'integer))))
;; Move the temporary file to its destination.
(cond
(t2
(tramp-barf-unless-okay
v (format
"cp -f -p %s %s"
(tramp-shell-quote-argument tmpfile)
(tramp-shell-quote-argument localname2))
"Copying directly failed, see buffer `%s' for details."
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-get-buffer v)))
(t1
(tramp-run-real-handler
#'rename-file
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(list tmpfile localname2 ok-if-already-exists)))))
;; Save exit.
(ignore-errors (delete-file tmpfile)))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Set the time and mode. Mask possible errors.
(ignore-errors
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(when keep-date
(tramp-compat-set-file-times
newname file-times (unless ok-if-already-exists 'nofollow))
(set-file-modes newname file-modes))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-do-copy-or-rename-file-out-of-band
(op filename newname ok-if-already-exists keep-date)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
"Invoke `scp' program to copy.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
The method used must be an out-of-band method."
(let* ((t1 (tramp-tramp-file-p filename))
(t2 (tramp-tramp-file-p newname))
(orig-vec (tramp-dissect-file-name (if t1 filename newname)))
Introduce a defstruct `tramp-file-name' as central data structure. This solves also Bug#27009. * lisp/net/tramp.el (tramp-current-domain) (tramp-current-port): New defvars. (tramp-file-name): New defstruct. (tramp-file-name-user-domain, tramp-file-name-host-port) (tramp-file-name-equal-p): New defuns. (tramp-file-name-p, tramp-file-name-method) (tramp-file-name-user, tramp-file-name-host) (tramp-file-name-localname, tramp-file-name-hop) (tramp-file-name-real-user, tramp-file-name-domain) (tramp-file-name-real-host, tramp-file-name-port): Remove defuns. They are provided by the defstruct, or not needed anymore. (tramp-dissect-file-name, tramp-buffer-name) (tramp-make-tramp-file-name, tramp-get-buffer) (tramp-set-connection-local-variables) (tramp-debug-buffer-name, tramp-message) (tramp-error-with-buffer, with-parsed-tramp-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-remote-p, tramp-handle-file-symlink-p) (tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-process-actions) (tramp-check-cached-permissions, tramp-local-host-p) (tramp-get-remote-tmpdir, tramp-call-process) (tramp-call-process-region, tramp-read-passwd) (tramp-clear-passwd): * lisp/net/tramp-adb.el (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-process-file) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-get-file-property, tramp-set-file-property) (tramp-flush-file-property, tramp-flush-directory-property) (tramp-get-connection-property) (tramp-set-connection-property, tramp-connection-property-p) (tramp-flush-connection-property, tramp-cache-print) (tramp-list-connections, tramp-dump-connection-properties) (tramp-parse-connection-properties): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-url-file-name, tramp-gvfs-handler-askpassword) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-mount-spec, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid) (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-compute-multi-hops) (tramp-maybe-open-connection) (tramp-make-copy-program-file-name, tramp-get-remote-path) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-expand-file-name) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-maybe-open-connection): Adapt according to defstruct.
2017-05-24 14:16:53 +00:00
copy-program copy-args copy-env copy-keep-date listener spec
options source target remote-copy-program remote-copy-args p)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(with-parsed-tramp-file-name (if t1 filename newname) nil
(if (and t1 t2)
;; Both are Tramp files. We shall optimize it when the
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
;; methods for FILENAME and NEWNAME are the same.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(let* ((dir-flag (file-directory-p filename))
(tmpfile (tramp-compat-make-temp-file localname dir-flag)))
(if dir-flag
(setq tmpfile
(expand-file-name
(file-name-nondirectory newname) tmpfile)))
(unwind-protect
(progn
(tramp-do-copy-or-rename-file-out-of-band
op filename tmpfile ok-if-already-exists keep-date)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-do-copy-or-rename-file-out-of-band
'rename tmpfile newname ok-if-already-exists keep-date))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Save exit.
(ignore-errors
(if dir-flag
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(delete-directory
(expand-file-name ".." tmpfile) 'recursive)
(delete-file tmpfile)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Check which ones of source and target are Tramp files.
(setq source (funcall
(if (and (string-equal method "rsync")
(file-directory-p filename)
(not (file-exists-p newname)))
#'file-name-as-directory
#'identity)
(if t1
(tramp-make-copy-program-file-name v)
(tramp-compat-file-name-unquote filename)))
target (if t2
(tramp-make-copy-program-file-name v)
(tramp-compat-file-name-unquote newname)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Check for user. There might be an interactive setting.
(setq user (or (tramp-file-name-user v)
(tramp-get-connection-property v "login-as" nil)))
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
;; Check for listener port.
Sync with Tramp repository * doc/misc/tramp.texi (Configuration): Note, that Tramp must be required prior changing its configuration. (Connection caching, Predefined connection information) (Remote shell setup): Fix typos. (Predefined connection information): Describe, how to overwrite parameters of `tramp-methods'. (Remote programs, Remote processes, Traces and Profiles): Simplify example. (Remote programs): Remove superfluous comment. * doc/misc/trampver.texi: Update release number. * lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun. (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it. (tramp-gvfs-handle-make-directory): Reimplement PARENTS handling, "gvfs-mkdir -p ..." does not work robust. (tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call. * lisp/net/tramp-sh.el (tramp-methods): Add `tramp-remote-shell-login' parameter where it fits. (tramp-get-remote-path): Use it. (tramp-make-copy-program-file-name): Fix quoting for "psftp" method. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-get-method-parameter): Replace argument METHOD by VEC. Check also for hits in `tramp-connection-properties'. Adapt docstring. (tramp-get-remote-tmpdir): Cache only the local name of tmpdir. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/trampver.el Update release number. * test/automated/tramp-tests.el (tramp--instrument-test-case): Add "^make-symbolic-link not supported$" to `debug-ignored-errors'. (tramp-test13-make-directory, tramp--test-adb-p) (tramp--test-smb-or-windows-nt-p): Simplify. (tramp--test-ftp-p, tramp--test-gvfs-p): New defuns. (tramp--test-special-characters): Fix docstring. Add gvfs and ftp tests. (tramp--test-utf8): Fix docstring.
2015-07-21 12:59:18 +00:00
(when (tramp-get-method-parameter v 'tramp-remote-copy-args)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(setq listener (number-to-string (+ 50000 (random 10000))))
(while
(zerop (tramp-call-process v "nc" nil nil nil "-z" host listener))
(setq listener (number-to-string (+ 50000 (random 10000))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Compose copy command.
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
(setq options
(format-spec
(tramp-ssh-controlmaster-options v)
(format-spec-make
?t (tramp-get-connection-property
(tramp-get-connection-process v) "temp-file" "")))
spec (list
?h (or host "") ?u (or user "") ?p (or port "")
?r listener ?c options ?k (if keep-date " " "")
?n (concat "2>" (tramp-get-remote-null-device v))
?x (tramp-scp-strict-file-name-checking v))
Sync with Tramp repository * doc/misc/tramp.texi (Configuration): Note, that Tramp must be required prior changing its configuration. (Connection caching, Predefined connection information) (Remote shell setup): Fix typos. (Predefined connection information): Describe, how to overwrite parameters of `tramp-methods'. (Remote programs, Remote processes, Traces and Profiles): Simplify example. (Remote programs): Remove superfluous comment. * doc/misc/trampver.texi: Update release number. * lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun. (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it. (tramp-gvfs-handle-make-directory): Reimplement PARENTS handling, "gvfs-mkdir -p ..." does not work robust. (tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call. * lisp/net/tramp-sh.el (tramp-methods): Add `tramp-remote-shell-login' parameter where it fits. (tramp-get-remote-path): Use it. (tramp-make-copy-program-file-name): Fix quoting for "psftp" method. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-get-method-parameter): Replace argument METHOD by VEC. Check also for hits in `tramp-connection-properties'. Adapt docstring. (tramp-get-remote-tmpdir): Cache only the local name of tmpdir. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/trampver.el Update release number. * test/automated/tramp-tests.el (tramp--instrument-test-case): Add "^make-symbolic-link not supported$" to `debug-ignored-errors'. (tramp-test13-make-directory, tramp--test-adb-p) (tramp--test-smb-or-windows-nt-p): Simplify. (tramp--test-ftp-p, tramp--test-gvfs-p): New defuns. (tramp--test-special-characters): Fix docstring. Add gvfs and ftp tests. (tramp--test-utf8): Fix docstring.
2015-07-21 12:59:18 +00:00
copy-program (tramp-get-method-parameter v 'tramp-copy-program)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
copy-keep-date (tramp-get-method-parameter
Sync with Tramp repository * doc/misc/tramp.texi (Configuration): Note, that Tramp must be required prior changing its configuration. (Connection caching, Predefined connection information) (Remote shell setup): Fix typos. (Predefined connection information): Describe, how to overwrite parameters of `tramp-methods'. (Remote programs, Remote processes, Traces and Profiles): Simplify example. (Remote programs): Remove superfluous comment. * doc/misc/trampver.texi: Update release number. * lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun. (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it. (tramp-gvfs-handle-make-directory): Reimplement PARENTS handling, "gvfs-mkdir -p ..." does not work robust. (tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call. * lisp/net/tramp-sh.el (tramp-methods): Add `tramp-remote-shell-login' parameter where it fits. (tramp-get-remote-path): Use it. (tramp-make-copy-program-file-name): Fix quoting for "psftp" method. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-get-method-parameter): Replace argument METHOD by VEC. Check also for hits in `tramp-connection-properties'. Adapt docstring. (tramp-get-remote-tmpdir): Cache only the local name of tmpdir. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/trampver.el Update release number. * test/automated/tramp-tests.el (tramp--instrument-test-case): Add "^make-symbolic-link not supported$" to `debug-ignored-errors'. (tramp-test13-make-directory, tramp--test-adb-p) (tramp--test-smb-or-windows-nt-p): Simplify. (tramp--test-ftp-p, tramp--test-gvfs-p): New defuns. (tramp--test-special-characters): Fix docstring. Add gvfs and ftp tests. (tramp--test-utf8): Fix docstring.
2015-07-21 12:59:18 +00:00
v 'tramp-copy-keep-date)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
copy-args
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
;; " " has either been a replacement of "%k" (when
;; keep-date argument is non-nil), or a replacement for
;; the whole keep-date sublist.
(delete " " (apply #'tramp-expand-args v 'tramp-copy-args spec))
;; `tramp-ssh-controlmaster-options' is a string instead
;; of a list. Unflatten it.
copy-args
(tramp-compat-flatten-tree
(mapcar
(lambda (x) (if (tramp-compat-string-search " " x)
(split-string x) x))
copy-args))
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
copy-env (apply #'tramp-expand-args v 'tramp-copy-env spec)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
remote-copy-program
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
(tramp-get-method-parameter v 'tramp-remote-copy-program)
remote-copy-args
(apply #'tramp-expand-args v 'tramp-remote-copy-args spec))
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
;; Check for local copy program.
Complete file name handlers. * net/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'. * net/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'. * net/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. * net/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'. * net/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-08-01 11:10:31 +00:00
(unless (executable-find copy-program)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-error
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
v 'file-error "Cannot find local copy program: %s" copy-program))
;; Install listener on the remote side. The prompt must be
;; consumed later on, when the process does not listen anymore.
(when remote-copy-program
(unless (with-tramp-connection-property
v (concat "remote-copy-program-" remote-copy-program)
(tramp-find-executable
v remote-copy-program (tramp-get-remote-path v)))
(tramp-error
v 'file-error
"Cannot find remote listener: %s" remote-copy-program))
(setq remote-copy-program
(mapconcat
#'identity
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(append
(list remote-copy-program) remote-copy-args
(list (if t1 (concat "<" source) (concat ">" target)) "&"))
" "))
(tramp-send-command v remote-copy-program)
(with-timeout
(60 (tramp-error
v 'file-error
"Listener process not running on remote host: `%s'"
remote-copy-program))
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(tramp-send-command v (format "netstat -l | grep -q :%s" listener))
(while (not (tramp-send-command-and-check v nil))
(tramp-send-command
v (format "netstat -l | grep -q :%s" listener)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(with-temp-buffer
(unwind-protect
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; The default directory must be remote.
(let ((default-directory
(file-name-directory (if t1 filename newname)))
(process-environment (copy-sequence process-environment)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Set the transfer process properties.
(tramp-set-connection-property
v "process-name" (buffer-name (current-buffer)))
(tramp-set-connection-property
v "process-buffer" (current-buffer))
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
(when copy-env
(tramp-message
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
orig-vec 6 "%s=\"%s\""
(car copy-env) (string-join (cdr copy-env) " "))
(setenv (car copy-env) (string-join (cdr copy-env) " ")))
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(setq
copy-args
(append
copy-args
(if remote-copy-program
(list (if t1 (concat ">" target) (concat "<" source)))
(list source target)))
;; Use an asynchronous process. By this, password
;; can be handled. We don't set a timeout, because
;; the copying of large files can last longer than 60
;; secs.
p (let ((default-directory (tramp-compat-temporary-file-directory)))
(apply
#'start-process
(tramp-get-connection-name v)
(tramp-get-connection-buffer v)
copy-program copy-args)))
(tramp-message orig-vec 6 "%s" (string-join (process-command p) " "))
(process-put p 'vector orig-vec)
(process-put p 'adjust-window-size-function #'ignore)
(set-process-query-on-exit-flag p nil)
;; We must adapt `tramp-local-end-of-line' for
;; sending the password.
(let ((tramp-local-end-of-line tramp-rsh-end-of-line))
(tramp-process-actions
p v nil tramp-actions-copy-out-of-band)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Reset the transfer process properties.
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-connection-property v "process-name")
(tramp-flush-connection-property v "process-buffer")
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
;; Clear the remote prompt.
(when (and remote-copy-program
(not (tramp-send-command-and-check v nil)))
;; Houston, we have a problem! Likely, the listener is
;; still running, so let's clear everything (but the
;; cached password).
(tramp-cleanup-connection v 'keep-debug 'keep-password))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Handle KEEP-DATE argument.
(when (and keep-date (not copy-keep-date))
(tramp-compat-set-file-times
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
newname
(tramp-compat-file-attribute-modification-time
(file-attributes filename))
(unless ok-if-already-exists 'nofollow)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Set the mode.
(unless (and keep-date copy-keep-date)
(ignore-errors
(set-file-modes newname (tramp-default-file-modes filename)))))
;; If the operation was `rename', delete the original file.
(unless (eq op 'copy)
(if (file-regular-p filename)
(delete-file filename)
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(delete-directory filename 'recursive))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh-handle-make-directory (dir &optional parents)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `make-directory' for Tramp files."
(setq dir (expand-file-name dir))
(with-parsed-tramp-file-name dir nil
(when (and (null parents) (file-exists-p dir))
Tramp code cleanup * lisp/net/tramp.el (tramp-signal-hook-function) (tramp-handle-access-file, tramp-handle-copy-directory) (tramp-handle-directory-files, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-load): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-make-directory) (tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file) (tramp-crypt-handle-directory-files) (tramp-crypt-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-make-directory): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-make-directory) (tramp-sh-handle-file-local-copy) (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory, tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Unify error report. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args with other `tramp-*-file-name-handler'. * lisp/net/tramp-compat.el (tramp-error): Declare. (tramp-compat-file-missing): New defsubst. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Handle volatile files. (tramp-gvfs-set-attribute): New defun. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use it. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Use `msg-operation'. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Remove superfluous `format: (tramp-smb-maybe-open-connection): Simplify loop. * lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from symlinked files. * test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun. (tramp--test-nextcloud-p): Remove. (tramp-test40-special-characters-with-ls): Do not skip on MS Windows. (tramp-test41-utf8): Skip if needed.
2021-02-03 17:48:09 +00:00
(tramp-error v 'file-already-exists dir))
;; When PARENTS is non-nil, DIR could be a chain of non-existent
;; directories a/b/c/... Instead of checking, we simply flush the
;; whole cache.
(tramp-flush-directory-properties
v (if parents "/" (file-name-directory localname)))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(tramp-barf-unless-okay
v (format "%s -m %#o %s"
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(if parents "mkdir -p" "mkdir")
(default-file-modes)
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(tramp-shell-quote-argument localname))
"Couldn't make directory %s" dir)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh-handle-delete-directory (directory &optional recursive trash)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `delete-directory' for Tramp files."
(tramp-skeleton-delete-directory directory recursive trash
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-barf-unless-okay
Sync with Tramp upstream. * net/tramp-cache.el (tramp-dump-connection-properties): Use `with-temp-file'. * net/tramp-sh.el (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes): Escape apostrophs in file names. (tramp-do-file-attributes-with-stat): Quote file name. (tramp-sh-handle-directory-files-and-attributes): Fall back to `tramp-handle-directory-files-and-attributes' in case of problems. (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-delete-directory) (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): Normalize use of "cd". (tramp-do-directory-files-and-attributes-with-stat): Use the `quoting-style' arg of `ls' if possible. Make it also working for file names with apostrophs. (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' in proper order. (tramp-do-copy-or-rename-file-via-buffer) (tramp-sh-handle-file-local-copy): Use `with-temp-file'. (tramp-get-remote-locale): Accept also \r in output. (tramp-get-ls-command-with-quoting-style): New defun. (tramp-get-inline-coding): Set `default-directory' to a local directory. Sporadically, `call-process-region' does not handle a remote default directory properly. * net/tramp.el (tramp): Add :link property. (tramp-login-prompt-regexp): Allow also "user", as required by Fritz!Box telnet. (tramp-autoload-file-name-handler): Use "/". (tramp-handle-unhandled-file-name-directory): Return nil when required by the spec. * net/trampver.el: Update release number.
2015-03-04 10:02:36 +00:00
v (format "cd / && %s %s"
(if recursive "rm -rf" "rmdir")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-shell-quote-argument localname))
"Couldn't delete %s" directory)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh-handle-delete-file (filename &optional trash)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `delete-file' for Tramp files."
(setq filename (expand-file-name filename))
(with-parsed-tramp-file-name filename nil
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-file-properties v localname)
(if (and delete-by-moving-to-trash trash)
(move-file-to-trash filename)
(tramp-barf-unless-okay
v (format "rm -f %s" (tramp-shell-quote-argument localname))
"Couldn't delete %s" filename))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Dired.
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(defun tramp-sh-handle-dired-compress-file (file)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `dired-compress-file' for Tramp files."
;; Code stolen mainly from dired-aux.el.
(with-parsed-tramp-file-name file nil
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-file-properties v localname)
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(let ((suffixes dired-compress-file-suffixes)
suffix)
;; See if any suffix rule matches this file name.
(while suffixes
(let (case-fold-search)
(if (string-match-p (car (car suffixes)) localname)
(setq suffix (car suffixes) suffixes nil))
(setq suffixes (cdr suffixes))))
(cond ((file-symlink-p file) nil)
((and suffix (nth 2 suffix))
;; We found an uncompression rule.
(with-tramp-progress-reporter
v 0 (format "Uncompressing %s" file)
(when (tramp-send-command-and-check
v (concat (nth 2 suffix) " "
(tramp-shell-quote-argument localname)))
(dired-remove-file file)
(string-match (car suffix) file)
(concat (substring file 0 (match-beginning 0))))))
(t
;; We don't recognize the file as compressed, so compress it.
;; Try gzip.
(with-tramp-progress-reporter v 0 (format "Compressing %s" file)
(when (tramp-send-command-and-check
v (concat "gzip -f "
(tramp-shell-quote-argument localname)))
(dired-remove-file file)
(cond ((file-exists-p (concat file ".gz"))
(concat file ".gz"))
((file-exists-p (concat file ".z"))
(concat file ".z"))
(t nil)))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh-handle-insert-directory
(filename switches &optional wildcard full-directory-p)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `insert-directory' for Tramp files."
(unless switches (setq switches ""))
;; Check, whether directory is accessible.
(unless wildcard
(access-file filename "Reading directory"))
(with-parsed-tramp-file-name (expand-file-name filename) nil
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(if (and (featurep 'ls-lisp)
(not (symbol-value 'ls-lisp-use-insert-directory-program)))
(tramp-handle-insert-directory
filename switches wildcard full-directory-p)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(when (stringp switches)
(setq switches (split-string switches)))
(setq switches
(append switches (split-string (tramp-sh--quoting-style-options v))))
(unless (tramp-get-ls-command-with v "--dired")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq switches (delete "--dired" switches)))
(when wildcard
(setq wildcard (tramp-run-real-handler
#'file-name-nondirectory (list localname)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq localname (tramp-run-real-handler
#'file-name-directory (list localname))))
(unless (or full-directory-p (member "-d" switches))
(setq switches (append switches '("-d"))))
(setq switches (mapconcat #'tramp-shell-quote-argument switches " "))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(when wildcard
(setq switches (concat switches " " wildcard)))
(tramp-message
v 4 "Inserting directory `ls %s %s', wildcard %s, fulldir %s"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
switches filename (if wildcard "yes" "no")
(if full-directory-p "yes" "no"))
;; If `full-directory-p', we just say `ls -l FILENAME'. Else we
;; chdir to the parent directory, then say `ls -ld BASENAME'.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(if full-directory-p
(tramp-send-command
v (format "%s %s %s 2>%s"
(tramp-get-ls-command v)
switches
(if wildcard
localname
(tramp-shell-quote-argument (concat localname ".")))
(tramp-get-remote-null-device v)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-barf-unless-okay
v (format "cd %s" (tramp-shell-quote-argument
(tramp-run-real-handler
#'file-name-directory (list localname))))
"Couldn't `cd %s'"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-shell-quote-argument
(tramp-run-real-handler #'file-name-directory (list localname))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-send-command
v (format "%s %s %s 2>%s"
(tramp-get-ls-command v)
switches
(if (or wildcard
(zerop (length
(tramp-run-real-handler
#'file-name-nondirectory (list localname)))))
""
(tramp-shell-quote-argument
(tramp-run-real-handler
#'file-name-nondirectory (list localname))))
(tramp-get-remote-null-device v))))
Some Tramp adaptions, mainly direct async processes * doc/misc/tramp.texi (Firewalls, Remote processes) (Frequently Asked Questions): Add @vindex. (Predefined connection information): Precise precondition or direct async processes. (Remote shell setup): Ban ssh RemoteCommand option. (Frequently Asked Questions): Adapt quoting. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.5.1-pre". * lisp/net/tramp-adb.el (tramp-methods) <adb>: Add `tramp-direct-async' parameter. (tramp-adb-handle-make-process): Adapt docstring. * lisp/net/tramp-sh.el (tramp-methods) <scp, scpx, rsync, ssh, sshx>: Add `tramp-direct-async' parameter. (tramp-sh-handle-insert-directory): Simplify merkers. (tramp-sh-handle-make-process): Adapt docstring. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-debug-message): Suppress lockfiles. (tramp-test-message): New defun. (tramp-direct-async-process-p): Check also for `tramp-direct-async'. (tramp-handle-make-process): Do not check for `tramp-direct-async-args'. * test/lisp/net/tramp-tests.el (all): Replace `string-match' by `string-match-p'. (dired-copy-dereference): Declare. (tramp-test-temporary-file-directory): Remove `tramp-direct-async-args` for mock method. (tramp-test15-copy-directory, tramp-test40-special-characters) (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls, tramp-test41-utf8) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Skip for tramp-rclone.el. (tramp--test--deftest-direct-async-process): Do not skip for mock method. (tramp-test32-shell-command): Adapt test for direct async processes. (tramp-test36-vc-registered, tramp--test-hpux-p, tramp--test-ksh-p): Use `tramp-test-vec'.
2021-01-15 10:32:12 +00:00
(let ((beg-marker (copy-marker (point) nil))
(end-marker (copy-marker (point) t))
(emc enable-multibyte-characters))
;; We cannot use `insert-buffer-substring' because the Tramp
;; buffer changes its contents before insertion due to calling
;; `expand-file-name' and alike.
(insert (with-current-buffer (tramp-get-buffer v) (buffer-string)))
;; We must enable unibyte strings, because the "--dired"
;; output counts in bytes.
(set-buffer-multibyte nil)
(save-restriction
(narrow-to-region beg-marker end-marker)
;; Check for "--dired" output.
(when (re-search-backward "^//DIRED//\\s-+\\(.+\\)$" nil 'noerror)
(let ((beg (match-beginning 1))
(end (match-end 0)))
;; Now read the numeric positions of file names.
(goto-char beg)
(while (< (point) end)
(let ((start (+ (point-min) (read (current-buffer))))
(end (+ (point-min) (read (current-buffer)))))
(if (memq (char-after end) '(?\n ?\ ))
;; End is followed by \n or by " -> ".
(put-text-property start end 'dired-filename t))))))
;; Remove trailing lines.
(beginning-of-line)
(while (looking-at "//")
(forward-line 1)
(delete-region (match-beginning 0) (point))))
;; Reset multibyte if needed.
(set-buffer-multibyte emc)
(save-restriction
(narrow-to-region beg-marker end-marker)
;; Some busyboxes are reluctant to discard colors.
(unless (tramp-compat-string-search
"color" (tramp-get-connection-property v "ls" ""))
(goto-char (point-min))
(while (re-search-forward tramp-display-escape-sequence-regexp nil t)
(replace-match "")))
;; Now decode what read if necessary. Stolen from `insert-directory'.
(let ((coding (or coding-system-for-read
file-name-coding-system
default-file-name-coding-system
'undecided))
coding-no-eol
val pos)
(when (and enable-multibyte-characters
(not (memq (coding-system-base coding)
'(raw-text no-conversion))))
;; If no coding system is specified or detection is
;; requested, detect the coding.
(if (eq (coding-system-base coding) 'undecided)
(setq coding (detect-coding-region (point-min) (point) t)))
(unless (eq (coding-system-base coding) 'undecided)
(setq coding-no-eol
(coding-system-change-eol-conversion coding 'unix))
(goto-char (point-min))
(while (not (eobp))
(setq pos (point)
val (get-text-property (point) 'dired-filename))
(goto-char (next-single-property-change
(point) 'dired-filename nil (point-max)))
;; Force no eol conversion on a file name, so that
;; CR is preserved.
(decode-coding-region
pos (point) (if val coding-no-eol coding))
(if val (put-text-property pos (point) 'dired-filename t))))))
;; The inserted file could be from somewhere else.
(when (and (not wildcard) (not full-directory-p))
(goto-char (point-max))
(when (file-symlink-p filename)
(goto-char (search-backward "->" (point-min) 'noerror)))
(search-backward
Sync with Tramp 2.5.0-pre * doc/misc/tramp.texi: Protext Tramp x.y and Emacs x.y by @w{}. (GVFS-based methods): Move "GNOME Online Accounts" index. (Customizing Methods, Android shell setup, File name completion) (Frequently Asked Questions): Fix typos. * doc/misc/trampver.texi: Change version to "2.5.0-pre". * lisp/net/trampver.el: Change version to "2.5.0-pre". (inhibit-message): Don't declare. * lisp/net/tramp.el: Bump version to 2.5.0-pre. Require Emacs 25.1. (tramp-debug-message): Simplify. (tramp-message): Don't use `tramp-message-show-message'. (tramp-with-demoted-errors, with-parsed-tramp-file-name) (with-tramp-file-property, with-tramp-connection-property): Adapt `declare' form. (with-tramp-progress-reporter): Suppress progress reporter when noninteractive. (tramp-completion-mode, tramp-completion-mode-p): Remove. * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (format-message): Remove compatibility code. (tramp-compat-directory-name-p) (tramp-compat-tramp-file-name-slots): Remove. * lisp/net/tramp.el (tramp-debug-message, tramp-message) (tramp-backtrace, tramp-error, tramp-error-with-buffer) (tramp-user-error, tramp-with-demoted-errors) (tramp-signal-hook-function): * lisp/net/tramp-compat.el (tramp-compat-funcall) * lisp/net/tramp-gvfs.el (tramp-dbus-function): Add `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-get-method-parameter) (tramp-dissect-file-name, tramp-error, tramp-error-with-buffer) (tramp-user-error, with-parsed-tramp-file-name) (with-tramp-progress-reporter, tramp-file-name-handler) (tramp-completion-file-name-handler, tramp-autoload-file-name-handler) (tramp-register-file-name-handlers, tramp-connectable-p) (tramp-handle-file-modes, tramp-handle-file-regular-p) (tramp-handle-file-truename, tramp-handle-insert-directory) (tramp-handle-load, tramp-set-file-uid-gid): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name): * lisp/net/tramp-cache.el (tramp-get-file-property, tramp-cache-print): * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (tramp-compat-exec-path): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-dbus-byte-array-to-string) (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler) (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-insert-directory, tramp-sh-file-name-handler) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler) (tramp-smb-handle-copy-file, tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-insert-directory) (tramp-smb-handle-rename-file, tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-file-truename): Use `if-let', `when-let', `directory-name-p', `inhibit-message', `non-essential and `cl-struct-slot-info'. Don't use `seconds-to-time'. * test/lisp/net/tramp-archive-tests.el (tramp-message-show-message): Don't set. * test/lisp/net/tramp-tests.el (inhibit-message): Don't declare. (tramp-message-show-message): Don't set. (tramp-test06-directory-file-name): Use `non-essential'. (tramp-test10-write-region): Use `inhibit-message'. (tramp-test36-vc-registered): No special handling for old Emacsen. (tramp--test-emacs25-p): Remove. (tramp-test45-unload): Special case of `tramp-completion-mode'.
2020-01-19 13:11:07 +00:00
(if (directory-name-p filename)
"."
(file-name-nondirectory filename))
(point-min) 'noerror)
(replace-match (file-relative-name filename) t))
;; Try to insert the amount of free space.
(goto-char (point-min))
;; First find the line to put it on.
(when (re-search-forward "^\\([[:space:]]*total\\)" nil t)
Sync with Tramp 2.5.0-pre * doc/misc/tramp.texi: Protext Tramp x.y and Emacs x.y by @w{}. (GVFS-based methods): Move "GNOME Online Accounts" index. (Customizing Methods, Android shell setup, File name completion) (Frequently Asked Questions): Fix typos. * doc/misc/trampver.texi: Change version to "2.5.0-pre". * lisp/net/trampver.el: Change version to "2.5.0-pre". (inhibit-message): Don't declare. * lisp/net/tramp.el: Bump version to 2.5.0-pre. Require Emacs 25.1. (tramp-debug-message): Simplify. (tramp-message): Don't use `tramp-message-show-message'. (tramp-with-demoted-errors, with-parsed-tramp-file-name) (with-tramp-file-property, with-tramp-connection-property): Adapt `declare' form. (with-tramp-progress-reporter): Suppress progress reporter when noninteractive. (tramp-completion-mode, tramp-completion-mode-p): Remove. * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (format-message): Remove compatibility code. (tramp-compat-directory-name-p) (tramp-compat-tramp-file-name-slots): Remove. * lisp/net/tramp.el (tramp-debug-message, tramp-message) (tramp-backtrace, tramp-error, tramp-error-with-buffer) (tramp-user-error, tramp-with-demoted-errors) (tramp-signal-hook-function): * lisp/net/tramp-compat.el (tramp-compat-funcall) * lisp/net/tramp-gvfs.el (tramp-dbus-function): Add `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-get-method-parameter) (tramp-dissect-file-name, tramp-error, tramp-error-with-buffer) (tramp-user-error, with-parsed-tramp-file-name) (with-tramp-progress-reporter, tramp-file-name-handler) (tramp-completion-file-name-handler, tramp-autoload-file-name-handler) (tramp-register-file-name-handlers, tramp-connectable-p) (tramp-handle-file-modes, tramp-handle-file-regular-p) (tramp-handle-file-truename, tramp-handle-insert-directory) (tramp-handle-load, tramp-set-file-uid-gid): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name): * lisp/net/tramp-cache.el (tramp-get-file-property, tramp-cache-print): * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (tramp-compat-exec-path): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-dbus-byte-array-to-string) (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler) (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-insert-directory, tramp-sh-file-name-handler) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler) (tramp-smb-handle-copy-file, tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-insert-directory) (tramp-smb-handle-rename-file, tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-file-truename): Use `if-let', `when-let', `directory-name-p', `inhibit-message', `non-essential and `cl-struct-slot-info'. Don't use `seconds-to-time'. * test/lisp/net/tramp-archive-tests.el (tramp-message-show-message): Don't set. * test/lisp/net/tramp-tests.el (inhibit-message): Don't declare. (tramp-message-show-message): Don't set. (tramp-test06-directory-file-name): Use `non-essential'. (tramp-test10-write-region): Use `inhibit-message'. (tramp-test36-vc-registered): No special handling for old Emacsen. (tramp--test-emacs25-p): Remove. (tramp-test45-unload): Special case of `tramp-completion-mode'.
2020-01-19 13:11:07 +00:00
(when-let ((available (get-free-disk-space ".")))
;; Replace "total" with "total used", to avoid confusion.
(replace-match "\\1 used in directory")
(end-of-line)
(insert " available " available))))
(prog1 (goto-char end-marker)
(set-marker beg-marker nil)
(set-marker end-marker nil))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Canonicalization of file names.
(defun tramp-sh-handle-expand-file-name (name &optional dir)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `expand-file-name' for Tramp files.
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
If the localname part of the given file name starts with \"/../\" then
the result will be a local, non-Tramp, file name."
;; If DIR is not given, use `default-directory' or "/".
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq dir (or dir default-directory "/"))
;; Handle empty NAME.
(when (zerop (length name)) (setq name "."))
;; On MS Windows, some special file names are not returned properly
;; by `file-name-absolute-p'.
(if (and (eq system-type 'windows-nt)
(string-match-p
(concat "^\\([[:alpha:]]:\\|" null-device "$\\)") name))
(tramp-run-real-handler #'expand-file-name (list name dir))
;; Unless NAME is absolute, concat DIR and NAME.
(unless (file-name-absolute-p name)
(setq name (tramp-compat-file-name-concat dir name)))
;; If connection is not established yet, run the real handler.
(if (not (tramp-connectable-p name))
(tramp-run-real-handler #'expand-file-name (list name nil))
;; Dissect NAME.
(with-parsed-tramp-file-name name nil
(unless (tramp-run-real-handler #'file-name-absolute-p (list localname))
(setq localname (concat "~/" localname)))
;; Tilde expansion if necessary. This needs a shell which
;; groks tilde expansion! The function `tramp-find-shell' is
;; supposed to find such a shell on the remote host. Please
;; tell me about it when this doesn't work on your system.
(when (string-match "\\`\\(~[^/]*\\)\\(.*\\)\\'" localname)
(let ((uname (match-string 1 localname))
(fname (match-string 2 localname)))
;; We cannot simply apply "~/", because under sudo "~/" is
;; expanded to the local user home directory but to the
;; root home directory. On the other hand, using always
;; the default user name for tilde expansion is not
;; appropriate either, because ssh and companions might
;; use a user name from the config file.
(when (and (string-equal uname "~")
(string-match-p "\\`su\\(do\\)?\\'" method))
(setq uname (concat uname user)))
(setq uname
(with-tramp-connection-property v uname
(tramp-send-command
v
(format "cd %s && pwd" (tramp-shell-quote-argument uname)))
(with-current-buffer (tramp-get-buffer v)
(goto-char (point-min))
(buffer-substring (point) (point-at-eol)))))
(setq localname (concat uname fname))))
;; There might be a double slash, for example when "~/"
;; expands to "/". Remove this.
(while (string-match "//" localname)
(setq localname (replace-match "/" t t localname)))
;; Do not keep "/..".
(when (string-match-p "^/\\.\\.?$" localname)
(setq localname "/"))
;; No tilde characters in file name, do normal
;; `expand-file-name' (this does "/./" and "/../").
;; `default-directory' is bound, because on Windows there
;; would be problems with UNC shares or Cygwin mounts.
(let ((default-directory (tramp-compat-temporary-file-directory)))
(tramp-make-tramp-file-name
v (tramp-drop-volume-letter
(tramp-run-real-handler
#'expand-file-name (list localname)))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;;; Remote commands:
;; We use BUFFER also as connection buffer during setup. Because of
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; this, its original contents must be saved, and restored once
;; connection has been setup.
(defun tramp-sh-handle-make-process (&rest args)
; Sync with Tramp repository * doc/misc/tramp.texi (Frequently Asked Questions): Mention Emacs 28. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.4-pre". * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file): Use `tramp-file-local-name'. (tramp-adb-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-cmds.el (tramp-rename-files): Use `tramp-file-local-name'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-process-file, tramp-set-remote-path) (tramp-find-inline-encoding, tramp-get-remote-touch): Use `tramp-file-local-name'. (tramp-sh-handle-make-process): Support `stderr' as file name. Delete temporary stderr file. (tramp-sh-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-process-file): Use `tramp-file-local-name'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-set-file-uid-gid): Use `tramp-unquote-file-local-name'. (tramp-sudoedit-handle-make-symbolic-link): Use `tramp-file-local-name'. (tramp-sudoedit-handle-file-system-info): Fix a scoping error. * lisp/net/tramp.el: Bump version to 2.4.4-pre. (tramp-ignored-file-name-regexp, tramp-time-dont-know) (tramp-time-doesnt-exist): Fix typo. (tramp-file-local-name): Extend for non-remote file names. (tramp-unquote-file-local-name): New defun. (tramp-completion-make-tramp-file-name): Simplify. (tramp-set-connection-local-variables-for-buffer) (tramp-equal-remote, tramp-handle-make-auto-save-file-name): Use `tramp-tramp-file-p'. (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-truename, tramp-get-remote-tmpdir) (tramp-make-tramp-temp-file): Use `tramp-file-local-name'. (tramp-handle-shell-command, tramp-handle-start-file-process): Implement asynchronous `error-buffer'.
2020-01-06 11:11:53 +00:00
"Like `make-process' for Tramp files.
STDERR can also be a remote file name. If method parameter
`tramp-direct-async' and connection property
\"direct-async-process\" are non-nil, an alternative
implementation will be used."
(if (tramp-direct-async-process-p args)
(apply #'tramp-handle-make-process args)
(when args
(with-parsed-tramp-file-name (expand-file-name default-directory) nil
(let ((name (plist-get args :name))
(buffer (plist-get args :buffer))
(command (plist-get args :command))
(coding (plist-get args :coding))
(noquery (plist-get args :noquery))
(connection-type
(or (plist-get args :connection-type) process-connection-type))
(filter (plist-get args :filter))
(sentinel (plist-get args :sentinel))
(stderr (plist-get args :stderr)))
(unless (stringp name)
(signal 'wrong-type-argument (list #'stringp name)))
(unless (or (null buffer) (bufferp buffer) (stringp buffer))
(signal 'wrong-type-argument (list #'stringp buffer)))
(unless (or (null command) (consp command))
(signal 'wrong-type-argument (list #'consp command)))
(unless (or (null coding)
(and (symbolp coding) (memq coding coding-system-list))
(and (consp coding)
(memq (car coding) coding-system-list)
(memq (cdr coding) coding-system-list)))
(signal 'wrong-type-argument (list #'symbolp coding)))
(when (eq connection-type t)
(setq connection-type 'pty))
(unless (memq connection-type '(nil pipe pty))
(signal 'wrong-type-argument (list #'symbolp connection-type)))
(unless (or (null filter) (functionp filter))
(signal 'wrong-type-argument (list #'functionp filter)))
(unless (or (null sentinel) (functionp sentinel))
(signal 'wrong-type-argument (list #'functionp sentinel)))
(unless (or (null stderr) (bufferp stderr) (stringp stderr))
(signal 'wrong-type-argument (list #'bufferp stderr)))
(when (and (stringp stderr)
(not (tramp-equal-remote default-directory stderr)))
(signal 'file-error (list "Wrong stderr" stderr)))
(let* ((buffer
(if buffer
(get-buffer-create buffer)
;; BUFFER can be nil. We use a temporary buffer.
(generate-new-buffer tramp-temp-buffer-name)))
;; STDERR can also be a file name.
(tmpstderr
(and stderr
(tramp-unquote-file-local-name
(if (stringp stderr)
stderr (tramp-make-tramp-temp-name v)))))
(remote-tmpstderr
(and tmpstderr (tramp-make-tramp-file-name v tmpstderr)))
(program (car command))
(args (cdr command))
;; When PROGRAM matches "*sh", and the first arg is
;; "-c", it might be that the arguments exceed the
;; command line length. Therefore, we modify the
;; command.
(heredoc (and (not (bufferp stderr))
(stringp program)
(string-match-p "sh$" program)
(= (length args) 2)
(string-equal "-c" (car args))
;; Don't if there is a string.
(not (string-match-p "'\\|\"" (cadr args)))))
;; When PROGRAM is nil, we just provide a tty.
(args (if (not heredoc) args
(let ((i 250))
(while (and (< i (length (cadr args)))
(string-match " " (cadr args) i))
(setcdr
args
(list
(replace-match " \\\\\n" nil nil (cadr args))))
(setq i (+ i 250))))
(cdr args)))
;; Use a human-friendly prompt, for example for
;; `shell'. We discard hops, if existing, that's why
;; we cannot use `file-remote-p'.
(prompt (format "PS1=%s %s"
(tramp-make-tramp-file-name v nil 'nohop)
tramp-initial-end-of-output))
;; We use as environment the difference to toplevel
;; `process-environment'.
env uenv
(env (dolist (elt (cons prompt process-environment) env)
(or (member
elt (default-toplevel-value 'process-environment))
(if (tramp-compat-string-search "=" elt)
(setq env (append env `(,elt)))
(setq uenv (cons elt uenv))))))
(env (setenv-internal
env "INSIDE_EMACS" (tramp-inside-emacs) 'keep))
(command
(when (stringp program)
(format "cd %s && %s exec %s %s env %s %s"
(tramp-shell-quote-argument localname)
(if uenv
(format
"unset %s &&"
(mapconcat
#'tramp-shell-quote-argument uenv " "))
"")
(if heredoc
(format "<<'%s'" tramp-end-of-heredoc) "")
(if tmpstderr (format "2>'%s'" tmpstderr) "")
(mapconcat #'tramp-shell-quote-argument env " ")
(if heredoc
(format "%s\n(\n%s\n) </dev/tty\n%s"
program (car args) tramp-end-of-heredoc)
(mapconcat #'tramp-shell-quote-argument
(cons program args) " ")))))
(tramp-process-connection-type
(or (null program) tramp-process-connection-type))
(bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
(name1 name)
(i 0)
;; We do not want to raise an error when
;; `make-process' has been started several times in
;; `eshell' and friends.
tramp-current-connection
p)
;; Handle error buffer.
(when (bufferp stderr)
(with-current-buffer stderr
(setq buffer-read-only nil))
;; Create named pipe.
(tramp-send-command v (format "mknod %s p" tmpstderr))
;; Create stderr process.
(make-process
:name (buffer-name stderr)
:buffer stderr
:command `("cat" ,tmpstderr)
:coding coding
:noquery t
:filter nil
:sentinel #'ignore
:file-handler t))
(while (get-process name1)
;; NAME must be unique as process name.
(setq i (1+ i)
name1 (format "%s<%d>" name i)))
(setq name name1)
;; Set the new process properties.
(tramp-set-connection-property v "process-name" name)
(tramp-set-connection-property v "process-buffer" buffer)
(with-current-buffer (tramp-get-connection-buffer v)
(unwind-protect
;; We catch this event. Otherwise, `make-process'
;; could be called on the local host.
(save-excursion
(save-restriction
;; Activate narrowing in order to save BUFFER
;; contents. Clear also the modification time;
;; otherwise we might be interrupted by
;; `verify-visited-file-modtime'.
(let ((buffer-undo-list t)
(inhibit-read-only t)
(mark (point-max))
(coding-system-for-write
(if (symbolp coding) coding (car coding)))
(coding-system-for-read
(if (symbolp coding) coding (cdr coding))))
(clear-visited-file-modtime)
(narrow-to-region (point-max) (point-max))
(catch 'suppress
;; Set the pid of the remote shell. This is
;; needed when sending signals remotely.
(let ((pid (tramp-send-command-and-read v "echo $$")))
(setq p (tramp-get-connection-process v))
(process-put p 'remote-pid pid)
(tramp-set-connection-property p "remote-pid" pid))
;; Disable carriage return to newline translation.
(when (memq connection-type '(nil pipe))
(tramp-send-command v "stty -icrnl"))
;; `tramp-maybe-open-connection' and
;; `tramp-send-command-and-read' could have
;; trashed the connection buffer. Remove this.
(widen)
(delete-region mark (point-max))
(narrow-to-region (point-max) (point-max))
;; Now do it.
(if command
;; Send the command.
(tramp-send-command v command nil t) ; nooutput
;; Check, whether a pty is associated.
(unless (process-get p 'remote-tty)
(tramp-error
v 'file-error
"pty association is not supported for `%s'"
name))))
;; Set sentinel and filter.
(when sentinel
(set-process-sentinel p sentinel))
(when filter
(set-process-filter p filter))
;; Set query flag and process marker for this
;; process. We ignore errors, because the
;; process could have finished already.
(ignore-errors
(set-process-query-on-exit-flag p (null noquery))
(set-marker (process-mark p) (point)))
;; Kill stderr process delete and named pipe.
(when (bufferp stderr)
(add-function
:after (process-sentinel p)
(lambda (_proc _msg)
(ignore-errors
(while (accept-process-output
(get-buffer-process stderr) 0 nil t))
(delete-process (get-buffer-process stderr)))
(ignore-errors
(delete-file remote-tmpstderr)))))
;; Return process.
p)))
;; Save exit.
(if (string-prefix-p tramp-temp-buffer-name (buffer-name))
(ignore-errors
(set-process-buffer p nil)
(kill-buffer (current-buffer)))
(set-buffer-modified-p bmp))
(tramp-flush-connection-property v "process-name")
(tramp-flush-connection-property v "process-buffer")))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-sh-get-signal-strings (vec)
"Strings to return by `process-file' in case of signals."
(with-tramp-connection-property
vec
(concat
"signal-strings-" (tramp-get-method-parameter vec 'tramp-remote-shell))
(let ((default-directory (tramp-make-tramp-file-name vec 'localname))
process-file-return-signal-string signals res result)
(setq signals
(append
'(0) (split-string (shell-command-to-string "kill -l") nil 'omit)))
;; Sanity check. Sometimes, the first entry is "0", although we
;; don't expect it. Remove it.
(when (and (stringp (cadr signals)) (string-equal "0" (cadr signals)))
(setcdr signals (cddr signals)))
;; Sanity check. "kill -l" shall have returned just the signal
;; names. Some shells don't, like the one in "docker alpine".
(let (signal-hook-function)
(condition-case nil
(dolist (sig (cdr signals))
(unless (string-match-p "^[[:alnum:]+-]+$" sig)
(error nil)))
(error (setq signals '(0)))))
(dotimes (i 128)
(push
(cond
;; Some predefined values, which aren't reported sometimes,
;; or would raise problems (all Stopped signals).
((= i 0) 0)
((string-equal (nth i signals) "HUP") "Hangup")
((string-equal (nth i signals) "INT") "Interrupt")
((string-equal (nth i signals) "QUIT") "Quit")
((string-equal (nth i signals) "STOP") "Stopped (signal)")
((string-equal (nth i signals) "TSTP") "Stopped")
((string-equal (nth i signals) "TTIN") "Stopped (tty input)")
((string-equal (nth i signals) "TTOU") "Stopped (tty output)")
(t (setq res
(if (null (nth i signals))
""
(tramp-send-command
vec
(format
"%s %s %s"
(tramp-get-method-parameter vec 'tramp-remote-shell)
(mapconcat
#'identity
(tramp-get-method-parameter vec 'tramp-remote-shell-args)
" ")
(tramp-shell-quote-argument (format "kill -%d $$" i))))
(with-current-buffer (tramp-get-connection-buffer vec)
(goto-char (point-min))
(buffer-substring (point-at-bol) (point-at-eol)))))
(if (string-equal res "")
(format "Signal %d" i)
res)))
result))
;; Due to Bug#41287, we cannot add this to the `dotimes' clause.
(reverse result))))
(defun tramp-sh-handle-process-file
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(program &optional infile destination display &rest args)
"Like `process-file' for Tramp files."
;; The implementation is not complete yet.
(when (and (numberp destination) (zerop destination))
(error "Implementation does not handle immediate return"))
(with-parsed-tramp-file-name (expand-file-name default-directory) nil
(let (command env uenv input tmpinput stderr tmpstderr outbuf ret)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Compute command.
(setq command (mapconcat #'tramp-shell-quote-argument
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(cons program args) " "))
;; We use as environment the difference to toplevel `process-environment'.
(dolist (elt process-environment)
(or (member elt (default-toplevel-value 'process-environment))
(if (tramp-compat-string-search "=" elt)
(setq env (append env `(,elt)))
(setq uenv (cons elt uenv)))))
(setenv-internal env "INSIDE_EMACS" (tramp-inside-emacs) 'keep)
(when env
(setq command
(format
"env %s %s"
(mapconcat #'tramp-shell-quote-argument env " ") command)))
(when uenv
(setq command
(format
"unset %s && %s"
(mapconcat #'tramp-shell-quote-argument uenv " ") command)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Determine input.
(if (null infile)
(setq input (tramp-get-remote-null-device v))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq infile (expand-file-name infile))
(if (tramp-equal-remote default-directory infile)
;; INFILE is on the same remote host.
; Sync with Tramp repository * doc/misc/tramp.texi (Frequently Asked Questions): Mention Emacs 28. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.4-pre". * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file): Use `tramp-file-local-name'. (tramp-adb-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-cmds.el (tramp-rename-files): Use `tramp-file-local-name'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-process-file, tramp-set-remote-path) (tramp-find-inline-encoding, tramp-get-remote-touch): Use `tramp-file-local-name'. (tramp-sh-handle-make-process): Support `stderr' as file name. Delete temporary stderr file. (tramp-sh-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-process-file): Use `tramp-file-local-name'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-set-file-uid-gid): Use `tramp-unquote-file-local-name'. (tramp-sudoedit-handle-make-symbolic-link): Use `tramp-file-local-name'. (tramp-sudoedit-handle-file-system-info): Fix a scoping error. * lisp/net/tramp.el: Bump version to 2.4.4-pre. (tramp-ignored-file-name-regexp, tramp-time-dont-know) (tramp-time-doesnt-exist): Fix typo. (tramp-file-local-name): Extend for non-remote file names. (tramp-unquote-file-local-name): New defun. (tramp-completion-make-tramp-file-name): Simplify. (tramp-set-connection-local-variables-for-buffer) (tramp-equal-remote, tramp-handle-make-auto-save-file-name): Use `tramp-tramp-file-p'. (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-truename, tramp-get-remote-tmpdir) (tramp-make-tramp-temp-file): Use `tramp-file-local-name'. (tramp-handle-shell-command, tramp-handle-start-file-process): Implement asynchronous `error-buffer'.
2020-01-06 11:11:53 +00:00
(setq input (tramp-file-local-name infile))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; INFILE must be copied to remote host.
(setq input (tramp-make-tramp-temp-file v)
tmpinput (tramp-make-tramp-file-name v input 'nohop))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(copy-file infile tmpinput t)))
(when input (setq command (format "%s <%s" command input)))
;; Determine output.
(cond
;; Just a buffer.
((bufferp destination)
(setq outbuf destination))
;; A buffer name.
((stringp destination)
(setq outbuf (get-buffer-create destination)))
;; (REAL-DESTINATION ERROR-DESTINATION)
((consp destination)
;; output.
(cond
((bufferp (car destination))
(setq outbuf (car destination)))
((stringp (car destination))
(setq outbuf (get-buffer-create (car destination))))
((car destination)
(setq outbuf (current-buffer))))
;; stderr.
(cond
((stringp (cadr destination))
(setcar (cdr destination) (expand-file-name (cadr destination)))
(if (tramp-equal-remote default-directory (cadr destination))
;; stderr is on the same remote host.
; Sync with Tramp repository * doc/misc/tramp.texi (Frequently Asked Questions): Mention Emacs 28. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.4-pre". * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file): Use `tramp-file-local-name'. (tramp-adb-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-cmds.el (tramp-rename-files): Use `tramp-file-local-name'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-process-file, tramp-set-remote-path) (tramp-find-inline-encoding, tramp-get-remote-touch): Use `tramp-file-local-name'. (tramp-sh-handle-make-process): Support `stderr' as file name. Delete temporary stderr file. (tramp-sh-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-process-file): Use `tramp-file-local-name'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-set-file-uid-gid): Use `tramp-unquote-file-local-name'. (tramp-sudoedit-handle-make-symbolic-link): Use `tramp-file-local-name'. (tramp-sudoedit-handle-file-system-info): Fix a scoping error. * lisp/net/tramp.el: Bump version to 2.4.4-pre. (tramp-ignored-file-name-regexp, tramp-time-dont-know) (tramp-time-doesnt-exist): Fix typo. (tramp-file-local-name): Extend for non-remote file names. (tramp-unquote-file-local-name): New defun. (tramp-completion-make-tramp-file-name): Simplify. (tramp-set-connection-local-variables-for-buffer) (tramp-equal-remote, tramp-handle-make-auto-save-file-name): Use `tramp-tramp-file-p'. (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-truename, tramp-get-remote-tmpdir) (tramp-make-tramp-temp-file): Use `tramp-file-local-name'. (tramp-handle-shell-command, tramp-handle-start-file-process): Implement asynchronous `error-buffer'.
2020-01-06 11:11:53 +00:00
(setq stderr (tramp-file-local-name (cadr destination)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; stderr must be copied to remote host. The temporary
;; file must be deleted after execution.
(setq stderr (tramp-make-tramp-temp-file v)
tmpstderr (tramp-make-tramp-file-name v stderr 'nohop))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; stderr to be discarded.
((null (cadr destination))
(setq stderr (tramp-get-remote-null-device v)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; 't
(destination
(setq outbuf (current-buffer))))
(when stderr (setq command (format "%s 2>%s" command stderr)))
;; Send the command. It might not return in time, so we protect
;; it. Call it in a subshell, in order to preserve working
;; directory.
(condition-case nil
(unwind-protect
(setq ret (tramp-send-command-and-check
v (format
"cd %s && %s"
(tramp-shell-quote-argument localname) command)
t t t))
(unless (natnump ret) (setq ret 1))
;; We should add the output anyway.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(when outbuf
(with-current-buffer outbuf
(insert
(with-current-buffer (tramp-get-connection-buffer v)
(buffer-string))))
(when (and display (get-buffer-window outbuf t)) (redisplay))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; When the user did interrupt, we should do it also. We use
;; return code -1 as marker.
(quit
(kill-buffer (tramp-get-connection-buffer v))
(setq ret -1))
;; Handle errors.
(error
(kill-buffer (tramp-get-connection-buffer v))
(setq ret 1)))
;; Handle signals. `process-file-return-signal-string' exists
;; since Emacs 28.1.
(when (and (bound-and-true-p process-file-return-signal-string)
(natnump ret) (>= ret 128))
(setq ret (nth (- ret 128) (tramp-sh-get-signal-strings v))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Provide error file.
(when tmpstderr (rename-file tmpstderr (cadr destination) t))
;; Cleanup. We remove all file cache values for the connection,
;; because the remote process could have changed them.
(when tmpinput (delete-file tmpinput))
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(unless process-file-side-effects
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-directory-properties v ""))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Return exit status.
(if (equal ret -1)
(keyboard-quit)
ret))))
Implement command completion in remote shells. (Bug#31704) * doc/lispref/files.texi (Locating Files): Describe optional argument REMOTE of `executable-find'. (Magic File Names): Add `exec-path'. * doc/lispref/processes.texi (Subprocess Creation): Describe function `exec-path'. * doc/misc/tramp.texi (Remote programs): Explain refresh of search paths by `tramp-cleanup-this-connection'. * etc/NEWS: Mention 'exec-path' and 'executable-find'. * lisp/files.el (exec-path): New defun. (executable-find): Add optional argument REMOTE. * lisp/shell.el (shell-completion-vars): Set `comint-file-name-prefix'. (shell--command-completion-data): Use `(exec-path)'. (Bug#31704) * lisp/net/ange-ftp.el (exec-path): * lisp/net/tramp.el (tramp-file-name-for-operation): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) <exec-path>: Add handler. * lisp/net/tramp-adb.el (tramp-adb-handle-exec-path): New defun. (tramp-adb-maybe-open-connection): Do not set "remote-path" connection property. * lisp/net/tramp-compat.el (tramp-compat-exec-path): New defun. * lisp/net/tramp-sh.el (tramp-sh-handle-exec-path): New defun. * lisp/net/tramp.el (tramp-eshell-directory-change): Use it. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test38-make-nearby-temp-file) (tramp-archive-test41-file-system-info) (tramp-archive-test43-auto-load) (tramp-archive-test43-delay-load): Rename. * test/lisp/net/tramp-tests.el (tramp-test34-exec-path): New test. (tramp-test36-make-auto-save-file-name) (tramp-test37-find-backup-file-name) (tramp-test38-make-nearby-temp-file) (tramp-test39-special-characters) (tramp-test39-special-characters-with-stat) (tramp-test39-special-characters-with-perl) (tramp-test39-special-characters-with-ls, tramp-test40-utf8) (tramp-test40-utf8-with-stat, tramp-test40-utf8-with-perl) (tramp-test40-utf8-with-ls, tramp-test41-file-system-info) (tramp-test42-asynchronous-requests, tramp-test43-auto-load) (tramp-test43-delay-load, tramp-test43-recursive-load) (tramp-test43-remote-load-path, tramp-test44-unload): Rename.
2018-06-20 10:13:56 +00:00
(defun tramp-sh-handle-exec-path ()
"Like `exec-path' for Tramp files."
(append
(tramp-get-remote-path (tramp-dissect-file-name default-directory))
;; The equivalent to `exec-directory'.
; Sync with Tramp repository * doc/misc/tramp.texi (Frequently Asked Questions): Mention Emacs 28. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.4-pre". * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file): Use `tramp-file-local-name'. (tramp-adb-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-cmds.el (tramp-rename-files): Use `tramp-file-local-name'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-process-file, tramp-set-remote-path) (tramp-find-inline-encoding, tramp-get-remote-touch): Use `tramp-file-local-name'. (tramp-sh-handle-make-process): Support `stderr' as file name. Delete temporary stderr file. (tramp-sh-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-process-file): Use `tramp-file-local-name'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-set-file-uid-gid): Use `tramp-unquote-file-local-name'. (tramp-sudoedit-handle-make-symbolic-link): Use `tramp-file-local-name'. (tramp-sudoedit-handle-file-system-info): Fix a scoping error. * lisp/net/tramp.el: Bump version to 2.4.4-pre. (tramp-ignored-file-name-regexp, tramp-time-dont-know) (tramp-time-doesnt-exist): Fix typo. (tramp-file-local-name): Extend for non-remote file names. (tramp-unquote-file-local-name): New defun. (tramp-completion-make-tramp-file-name): Simplify. (tramp-set-connection-local-variables-for-buffer) (tramp-equal-remote, tramp-handle-make-auto-save-file-name): Use `tramp-tramp-file-p'. (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-truename, tramp-get-remote-tmpdir) (tramp-make-tramp-temp-file): Use `tramp-file-local-name'. (tramp-handle-shell-command, tramp-handle-start-file-process): Implement asynchronous `error-buffer'.
2020-01-06 11:11:53 +00:00
`(,(tramp-file-local-name (expand-file-name default-directory)))))
Implement command completion in remote shells. (Bug#31704) * doc/lispref/files.texi (Locating Files): Describe optional argument REMOTE of `executable-find'. (Magic File Names): Add `exec-path'. * doc/lispref/processes.texi (Subprocess Creation): Describe function `exec-path'. * doc/misc/tramp.texi (Remote programs): Explain refresh of search paths by `tramp-cleanup-this-connection'. * etc/NEWS: Mention 'exec-path' and 'executable-find'. * lisp/files.el (exec-path): New defun. (executable-find): Add optional argument REMOTE. * lisp/shell.el (shell-completion-vars): Set `comint-file-name-prefix'. (shell--command-completion-data): Use `(exec-path)'. (Bug#31704) * lisp/net/ange-ftp.el (exec-path): * lisp/net/tramp.el (tramp-file-name-for-operation): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) <exec-path>: Add handler. * lisp/net/tramp-adb.el (tramp-adb-handle-exec-path): New defun. (tramp-adb-maybe-open-connection): Do not set "remote-path" connection property. * lisp/net/tramp-compat.el (tramp-compat-exec-path): New defun. * lisp/net/tramp-sh.el (tramp-sh-handle-exec-path): New defun. * lisp/net/tramp.el (tramp-eshell-directory-change): Use it. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test38-make-nearby-temp-file) (tramp-archive-test41-file-system-info) (tramp-archive-test43-auto-load) (tramp-archive-test43-delay-load): Rename. * test/lisp/net/tramp-tests.el (tramp-test34-exec-path): New test. (tramp-test36-make-auto-save-file-name) (tramp-test37-find-backup-file-name) (tramp-test38-make-nearby-temp-file) (tramp-test39-special-characters) (tramp-test39-special-characters-with-stat) (tramp-test39-special-characters-with-perl) (tramp-test39-special-characters-with-ls, tramp-test40-utf8) (tramp-test40-utf8-with-stat, tramp-test40-utf8-with-perl) (tramp-test40-utf8-with-ls, tramp-test41-file-system-info) (tramp-test42-asynchronous-requests, tramp-test43-auto-load) (tramp-test43-delay-load, tramp-test43-recursive-load) (tramp-test43-remote-load-path, tramp-test44-unload): Rename.
2018-06-20 10:13:56 +00:00
(defun tramp-sh-handle-file-local-copy (filename)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `file-local-copy' for Tramp files."
(with-parsed-tramp-file-name filename nil
(unless (file-exists-p (file-truename filename))
Tramp code cleanup * lisp/net/tramp.el (tramp-signal-hook-function) (tramp-handle-access-file, tramp-handle-copy-directory) (tramp-handle-directory-files, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-load): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-make-directory) (tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file) (tramp-crypt-handle-directory-files) (tramp-crypt-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-make-directory): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-make-directory) (tramp-sh-handle-file-local-copy) (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory, tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Unify error report. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args with other `tramp-*-file-name-handler'. * lisp/net/tramp-compat.el (tramp-error): Declare. (tramp-compat-file-missing): New defsubst. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Handle volatile files. (tramp-gvfs-set-attribute): New defun. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use it. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Use `msg-operation'. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Remove superfluous `format: (tramp-smb-maybe-open-connection): Simplify loop. * lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from symlinked files. * test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun. (tramp--test-nextcloud-p): Remove. (tramp-test40-special-characters-with-ls): Do not skip on MS Windows. (tramp-test41-utf8): Skip if needed.
2021-02-03 17:48:09 +00:00
(tramp-compat-file-missing v filename))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
(let* ((size (tramp-compat-file-attribute-size
(file-attributes (file-truename filename))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(rem-enc (tramp-get-inline-coding v "remote-encoding" size))
(loc-dec (tramp-get-inline-coding v "local-decoding" size))
(tmpfile (tramp-compat-make-temp-file filename)))
(condition-case err
(cond
;; `copy-file' handles direct copy and out-of-band methods.
((or (tramp-local-host-p v)
(tramp-method-out-of-band-p v size))
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(copy-file filename tmpfile 'ok-if-already-exists 'keep-time))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Use inline encoding for file transfer.
(rem-enc
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(with-tramp-progress-reporter
v 3
(format-message
"Encoding remote file `%s' with `%s'" filename rem-enc)
(tramp-barf-unless-okay
v (format rem-enc (tramp-shell-quote-argument localname))
"Encoding remote file failed"))
(with-tramp-progress-reporter
v 3 (format-message
"Decoding local file `%s' with `%s'" tmpfile loc-dec)
(if (functionp loc-dec)
;; If local decoding is a function, we call it. We
;; must disable multibyte, because
;; `uudecode-decode-region' doesn't handle it
;; correctly. Unset `file-name-handler-alist'.
;; Otherwise, epa-file gets confused.
(let (file-name-handler-alist
(coding-system-for-write 'binary)
(default-directory
(tramp-compat-temporary-file-directory)))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(with-temp-file tmpfile
(set-buffer-multibyte nil)
(insert-buffer-substring (tramp-get-buffer v))
(funcall loc-dec (point-min) (point-max))))
;; If tramp-decoding-function is not defined for this
;; method, we invoke tramp-decoding-command instead.
(let ((tmpfile2 (tramp-compat-make-temp-file filename)))
;; Unset `file-name-handler-alist'. Otherwise,
;; epa-file gets confused.
(let (file-name-handler-alist
(coding-system-for-write 'binary))
(with-current-buffer (tramp-get-buffer v)
(write-region
(point-min) (point-max) tmpfile2 nil 'no-message)))
(unwind-protect
(tramp-call-local-coding-command
loc-dec tmpfile2 tmpfile)
(delete-file tmpfile2)))))
;; Set proper permissions.
Finish implementation of {set-}file-modes FLAG arg in Tramp * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use 'nofollow for temporary files. Use `tramp-compat-set-file-modes'. (tramp-adb-handle-write-region): Do not use 'nofollow for temporary files. (tramp-adb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-compat.el (tramp-compat-file-modes) (tramp-compat-set-file-modes): New defaliases. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): Make explicit check (eq flag 'nofollow). * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG. (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region): Do not use 'nofollow for temporary files. (tramp-get-remote-chmod-h): New defun. * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Implement FLAG. (tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'. * lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG. (tramp-handle-file-modes): Use `file-truename' instead of `file-chase-links'. The latter function does not work for remote file names. (tramp-handle-write-region): Call `tramp-default-file-modes' with 'nofollow if needed. Do not use 'nofollow for temporary files. * test/lisp/net/tramp-tests.el (tramp--test-ignore-make-symbolic-link-error): Check also for "Cannot chmod .* with nofollow flag" error. (tramp-test20-file-modes): Extend test. (tramp--test-emacs28-p): New defun.
2020-02-25 12:25:57 +00:00
(set-file-modes tmpfile (tramp-default-file-modes filename))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
;; Set local user ownership.
(tramp-set-file-uid-gid tmpfile))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Oops, I don't know what to do.
(t (tramp-error
v 'file-error "Wrong method specification for `%s'" method)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Error handling.
((error quit)
(delete-file tmpfile)
(signal (car err) (cdr err))))
(run-hooks 'tramp-handle-file-local-copy-hook)
tmpfile)))
(defun tramp-sh-handle-write-region
Implement file locks for remote files (Bug#49261) * doc/lispref/files.texi (Magic File Names): Add file-locked-p, lock-file and unlock-file. * etc/NEWS: Tramp supports file locks now. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-adb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): New defun. * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify. (tramp-fuse-unmount): New defun. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sh-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-smb-handle-copy-directory): Use `sleep-for'. (tramp-smb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sshfs-handle-write-region): Handle LOCKNAME. (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sudoedit-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid) (tramp-handle-file-locked-p, tramp-handle-lock-file) (tramp-handle-unlock-file): New defuns. (tramp-lock-file-contents-regexp): New regexp. (tramp-handle-write-region): Handle LOCKNAME. * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p): Call handler if exists. (Flock_file, Funlock_file): New defuns. (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols. (Slock_file, Sunlock_file): Declare subroutines. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-make-nearby-temp-file) (tramp-archive-test43-file-system-info): Rename. * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil. (tramp--test-fuse-p): New defun. (tramp-test14-delete-directory): Use it. (tramp-test39-lock-file): New test. (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters) (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls, tramp-test42-utf8) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls, tramp-test43-file-system-info) (tramp-test44-asynchronous-requests, tramp-test45-auto-load) (tramp-test45-delay-load, tramp-test45-recursive-load) (tramp-test45-remote-load-path, tramp-test46-unload): Rename. (tramp--test-special-characters, tramp--test-utf8) (tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 16:36:53 +00:00
(start end filename &optional append visit lockname mustbenew)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `write-region' for Tramp files."
Implement file locks for remote files (Bug#49261) * doc/lispref/files.texi (Magic File Names): Add file-locked-p, lock-file and unlock-file. * etc/NEWS: Tramp supports file locks now. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-adb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): New defun. * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify. (tramp-fuse-unmount): New defun. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sh-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-smb-handle-copy-directory): Use `sleep-for'. (tramp-smb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sshfs-handle-write-region): Handle LOCKNAME. (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sudoedit-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid) (tramp-handle-file-locked-p, tramp-handle-lock-file) (tramp-handle-unlock-file): New defuns. (tramp-lock-file-contents-regexp): New regexp. (tramp-handle-write-region): Handle LOCKNAME. * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p): Call handler if exists. (Flock_file, Funlock_file): New defuns. (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols. (Slock_file, Sunlock_file): Declare subroutines. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-make-nearby-temp-file) (tramp-archive-test43-file-system-info): Rename. * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil. (tramp--test-fuse-p): New defun. (tramp-test14-delete-directory): Use it. (tramp-test39-lock-file): New test. (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters) (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls, tramp-test42-utf8) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls, tramp-test43-file-system-info) (tramp-test44-asynchronous-requests, tramp-test45-auto-load) (tramp-test45-delay-load, tramp-test45-recursive-load) (tramp-test45-remote-load-path, tramp-test46-unload): Rename. (tramp--test-special-characters, tramp--test-utf8) (tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 16:36:53 +00:00
(setq filename (expand-file-name filename)
lockname (file-truename (or lockname filename)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(with-parsed-tramp-file-name filename nil
(when (and mustbenew (file-exists-p filename)
(or (eq mustbenew 'excl)
(not
(y-or-n-p
(format "File %s exists; overwrite anyway?" filename)))))
(tramp-error v 'file-already-exists filename))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(let ((file-locked (eq (file-locked-p lockname) t))
Implement file locks for remote files (Bug#49261) * doc/lispref/files.texi (Magic File Names): Add file-locked-p, lock-file and unlock-file. * etc/NEWS: Tramp supports file locks now. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-adb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): New defun. * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify. (tramp-fuse-unmount): New defun. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sh-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-smb-handle-copy-directory): Use `sleep-for'. (tramp-smb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sshfs-handle-write-region): Handle LOCKNAME. (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sudoedit-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid) (tramp-handle-file-locked-p, tramp-handle-lock-file) (tramp-handle-unlock-file): New defuns. (tramp-lock-file-contents-regexp): New regexp. (tramp-handle-write-region): Handle LOCKNAME. * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p): Call handler if exists. (Flock_file, Funlock_file): New defuns. (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols. (Slock_file, Sunlock_file): Declare subroutines. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-make-nearby-temp-file) (tramp-archive-test43-file-system-info): Rename. * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil. (tramp--test-fuse-p): New defun. (tramp-test14-delete-directory): Use it. (tramp-test39-lock-file): New test. (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters) (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls, tramp-test42-utf8) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls, tramp-test43-file-system-info) (tramp-test44-asynchronous-requests, tramp-test45-auto-load) (tramp-test45-delay-load, tramp-test45-recursive-load) (tramp-test45-remote-load-path, tramp-test46-unload): Rename. (tramp--test-special-characters, tramp--test-utf8) (tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 16:36:53 +00:00
(uid (or (tramp-compat-file-attribute-user-id
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
(file-attributes filename 'integer))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-get-remote-uid v 'integer)))
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
(gid (or (tramp-compat-file-attribute-group-id
(file-attributes filename 'integer))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-get-remote-gid v 'integer))))
Implement file locks for remote files (Bug#49261) * doc/lispref/files.texi (Magic File Names): Add file-locked-p, lock-file and unlock-file. * etc/NEWS: Tramp supports file locks now. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-adb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): New defun. * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify. (tramp-fuse-unmount): New defun. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sh-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-smb-handle-copy-directory): Use `sleep-for'. (tramp-smb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sshfs-handle-write-region): Handle LOCKNAME. (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sudoedit-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid) (tramp-handle-file-locked-p, tramp-handle-lock-file) (tramp-handle-unlock-file): New defuns. (tramp-lock-file-contents-regexp): New regexp. (tramp-handle-write-region): Handle LOCKNAME. * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p): Call handler if exists. (Flock_file, Funlock_file): New defuns. (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols. (Slock_file, Sunlock_file): Declare subroutines. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-make-nearby-temp-file) (tramp-archive-test43-file-system-info): Rename. * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil. (tramp--test-fuse-p): New defun. (tramp-test14-delete-directory): Use it. (tramp-test39-lock-file): New test. (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters) (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls, tramp-test42-utf8) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls, tramp-test43-file-system-info) (tramp-test44-asynchronous-requests, tramp-test45-auto-load) (tramp-test45-delay-load, tramp-test45-recursive-load) (tramp-test45-remote-load-path, tramp-test46-unload): Rename. (tramp--test-special-characters, tramp--test-utf8) (tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 16:36:53 +00:00
;; Lock file.
(when (and (not (auto-save-file-name-p (file-name-nondirectory filename)))
(file-remote-p lockname)
(not file-locked))
Implement file locks for remote files (Bug#49261) * doc/lispref/files.texi (Magic File Names): Add file-locked-p, lock-file and unlock-file. * etc/NEWS: Tramp supports file locks now. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-adb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): New defun. * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify. (tramp-fuse-unmount): New defun. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sh-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-smb-handle-copy-directory): Use `sleep-for'. (tramp-smb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sshfs-handle-write-region): Handle LOCKNAME. (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sudoedit-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid) (tramp-handle-file-locked-p, tramp-handle-lock-file) (tramp-handle-unlock-file): New defuns. (tramp-lock-file-contents-regexp): New regexp. (tramp-handle-write-region): Handle LOCKNAME. * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p): Call handler if exists. (Flock_file, Funlock_file): New defuns. (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols. (Slock_file, Sunlock_file): Declare subroutines. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-make-nearby-temp-file) (tramp-archive-test43-file-system-info): Rename. * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil. (tramp--test-fuse-p): New defun. (tramp-test14-delete-directory): Use it. (tramp-test39-lock-file): New test. (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters) (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls, tramp-test42-utf8) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls, tramp-test43-file-system-info) (tramp-test44-asynchronous-requests, tramp-test45-auto-load) (tramp-test45-delay-load, tramp-test45-recursive-load) (tramp-test45-remote-load-path, tramp-test46-unload): Rename. (tramp--test-special-characters, tramp--test-utf8) (tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 16:36:53 +00:00
(setq file-locked t)
;; `lock-file' exists since Emacs 28.1.
(tramp-compat-funcall 'lock-file lockname))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(if (and (tramp-local-host-p v)
;; `file-writable-p' calls `file-expand-file-name'. We
;; cannot use `tramp-run-real-handler' therefore.
(file-writable-p (file-name-directory localname))
(or (file-directory-p localname)
(file-writable-p localname)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Short track: if we are on the local host, we can run directly.
(let ((create-lockfiles (not file-locked)))
(write-region start end localname append 'no-message lockname))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Finish implementation of {set-}file-modes FLAG arg in Tramp * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use 'nofollow for temporary files. Use `tramp-compat-set-file-modes'. (tramp-adb-handle-write-region): Do not use 'nofollow for temporary files. (tramp-adb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-compat.el (tramp-compat-file-modes) (tramp-compat-set-file-modes): New defaliases. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): Make explicit check (eq flag 'nofollow). * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG. (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region): Do not use 'nofollow for temporary files. (tramp-get-remote-chmod-h): New defun. * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Implement FLAG. (tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'. * lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG. (tramp-handle-file-modes): Use `file-truename' instead of `file-chase-links'. The latter function does not work for remote file names. (tramp-handle-write-region): Call `tramp-default-file-modes' with 'nofollow if needed. Do not use 'nofollow for temporary files. * test/lisp/net/tramp-tests.el (tramp--test-ignore-make-symbolic-link-error): Check also for "Cannot chmod .* with nofollow flag" error. (tramp-test20-file-modes): Extend test. (tramp--test-emacs28-p): New defun.
2020-02-25 12:25:57 +00:00
(let* ((modes (tramp-default-file-modes
filename (and (eq mustbenew 'excl) 'nofollow)))
;; We use this to save the value of
;; `last-coding-system-used' after writing the tmp
;; file. At the end of the function, we set
;; `last-coding-system-used' to this saved value. This
;; way, any intermediary coding systems used while
;; talking to the remote shell or suchlike won't hose
;; this variable. This approach was snarfed from
;; ange-ftp.el.
coding-system-used
;; Write region into a tmp file. This isn't really
;; needed if we use an encoding function, but currently
;; we use it always because this makes the logic
;; simpler. We must also set `temporary-file-directory',
;; because it could point to a remote directory.
(temporary-file-directory
(tramp-compat-temporary-file-directory))
(tmpfile (or tramp-temp-buffer-file-name
(tramp-compat-make-temp-file filename))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; If `append' is non-nil, we copy the file locally, and let
;; the native `write-region' implementation do the job.
(when (and append (file-exists-p filename))
(copy-file filename tmpfile 'ok))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; We say `no-message' here because we don't want the
;; visited file modtime data to be clobbered from the temp
;; file. We call `set-visited-file-modtime' ourselves later
;; on. We must ensure that `file-coding-system-alist'
;; matches `tmpfile'.
(let ((file-coding-system-alist
(tramp-find-file-name-coding-system-alist filename tmpfile))
create-lockfiles)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(condition-case err
(write-region start end tmpfile append 'no-message)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
((error quit)
(setq tramp-temp-buffer-file-name nil)
(delete-file tmpfile)
(signal (car err) (cdr err))))
;; Now, `last-coding-system-used' has the right value. Remember it.
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(setq coding-system-used last-coding-system-used))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; The permissions of the temporary file should be set. If
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
;; FILENAME does not exist (eq modes nil) it has been
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; renamed to the backup file. This case `save-buffer'
;; handles permissions.
;; Ensure that it is still readable.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(when modes
Finish implementation of {set-}file-modes FLAG arg in Tramp * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use 'nofollow for temporary files. Use `tramp-compat-set-file-modes'. (tramp-adb-handle-write-region): Do not use 'nofollow for temporary files. (tramp-adb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-compat.el (tramp-compat-file-modes) (tramp-compat-set-file-modes): New defaliases. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): Make explicit check (eq flag 'nofollow). * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG. (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region): Do not use 'nofollow for temporary files. (tramp-get-remote-chmod-h): New defun. * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Implement FLAG. (tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'. * lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG. (tramp-handle-file-modes): Use `file-truename' instead of `file-chase-links'. The latter function does not work for remote file names. (tramp-handle-write-region): Call `tramp-default-file-modes' with 'nofollow if needed. Do not use 'nofollow for temporary files. * test/lisp/net/tramp-tests.el (tramp--test-ignore-make-symbolic-link-error): Check also for "Cannot chmod .* with nofollow flag" error. (tramp-test20-file-modes): Extend test. (tramp--test-emacs28-p): New defun.
2020-02-25 12:25:57 +00:00
(set-file-modes tmpfile (logior (or modes 0) #o0400)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; This is a bit lengthy due to the different methods
;; possible for file transfer. First, we check whether the
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
;; method uses an scp program. If so, we call it.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Otherwise, both encoding and decoding command must be
;; specified. However, if the method _also_ specifies an
;; encoding function, then that is used for encoding the
;; contents of the tmp file.
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
(let* ((size (tramp-compat-file-attribute-size
(file-attributes tmpfile)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(rem-dec (tramp-get-inline-coding v "remote-decoding" size))
(loc-enc (tramp-get-inline-coding v "local-encoding" size)))
(cond
;; `copy-file' handles direct copy and out-of-band methods.
((or (tramp-local-host-p v)
(tramp-method-out-of-band-p v size))
(if (and (not (stringp start))
(= (or end (point-max)) (point-max))
(= (or start (point-min)) (point-min))
Sync with Tramp repository * doc/misc/tramp.texi (Configuration): Note, that Tramp must be required prior changing its configuration. (Connection caching, Predefined connection information) (Remote shell setup): Fix typos. (Predefined connection information): Describe, how to overwrite parameters of `tramp-methods'. (Remote programs, Remote processes, Traces and Profiles): Simplify example. (Remote programs): Remove superfluous comment. * doc/misc/trampver.texi: Update release number. * lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun. (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it. (tramp-gvfs-handle-make-directory): Reimplement PARENTS handling, "gvfs-mkdir -p ..." does not work robust. (tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call. * lisp/net/tramp-sh.el (tramp-methods): Add `tramp-remote-shell-login' parameter where it fits. (tramp-get-remote-path): Use it. (tramp-make-copy-program-file-name): Fix quoting for "psftp" method. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-get-method-parameter): Replace argument METHOD by VEC. Check also for hits in `tramp-connection-properties'. Adapt docstring. (tramp-get-remote-tmpdir): Cache only the local name of tmpdir. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/trampver.el Update release number. * test/automated/tramp-tests.el (tramp--instrument-test-case): Add "^make-symbolic-link not supported$" to `debug-ignored-errors'. (tramp-test13-make-directory, tramp--test-adb-p) (tramp--test-smb-or-windows-nt-p): Simplify. (tramp--test-ftp-p, tramp--test-gvfs-p): New defuns. (tramp--test-special-characters): Fix docstring. Add gvfs and ftp tests. (tramp--test-utf8): Fix docstring.
2015-07-21 12:59:18 +00:00
(tramp-get-method-parameter v 'tramp-copy-keep-tmpfile))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(progn
(setq tramp-temp-buffer-file-name tmpfile)
(condition-case err
;; We keep the local file for performance
;; reasons, useful for "rsync".
(copy-file tmpfile filename t)
((error quit)
(setq tramp-temp-buffer-file-name nil)
(delete-file tmpfile)
(signal (car err) (cdr err)))))
(setq tramp-temp-buffer-file-name nil)
;; Don't rename, in order to keep context in SELinux.
(unwind-protect
(copy-file tmpfile filename t)
(delete-file tmpfile))))
;; Use inline file transfer.
(rem-dec
;; Encode tmpfile.
(unwind-protect
(with-temp-buffer
(set-buffer-multibyte nil)
;; Use encoding function or command.
(with-tramp-progress-reporter
Tramp diagnostics as per ‘text-quoting-style’ * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-get-ls-command, tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory) (tramp-adb-handle-delete-file) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-copy-file) (tramp-adb-send-command-and-check, tramp-adb-wait-for-output) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el: * lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory) (tramp-compat-octal-to-decimal) (tramp-compat-coding-system-change-eol-conversion): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-url-file-name): * lisp/net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel, tramp-gw-open-connection): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-set-file-modes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-add-name-to-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory) (tramp-sh-handle-delete-directory, tramp-sh-handle-delete-file) (tramp-sh-handle-insert-directory, tramp-process-sentinel) (tramp-sh-handle-start-file-process) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch, tramp-maybe-send-script) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-wait-for-output, tramp-send-command-and-check) (tramp-send-command-and-read, tramp-get-remote-path) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-ls-command-with-quoting-style) (tramp-get-test-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-touch, tramp-get-remote-gvfs-monitor-dir) (tramp-get-remote-inotifywait, tramp-get-remote-id) (tramp-get-remote-python): * lisp/net/tramp-smb.el (tramp-smb-errors) (tramp-smb-handle-add-name-to-file, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-delete-file) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries): * lisp/net/tramp.el (tramp-debug-message, tramp-error) (tramp-process-actions): Generate diagnostics according to ‘text-quoting-style’, by using curved quotes in format strings and ‘format-message’ when appropriate. * lisp/net/tramp-compat.el (format-message): Define a replacement, if it’s an older version of Emacs that doesn’t have it already.
2015-08-25 00:59:12 +00:00
v 3 (format-message
"Encoding local file `%s' using `%s'"
Tramp diagnostics as per ‘text-quoting-style’ * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-get-ls-command, tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory) (tramp-adb-handle-delete-file) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-copy-file) (tramp-adb-send-command-and-check, tramp-adb-wait-for-output) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el: * lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory) (tramp-compat-octal-to-decimal) (tramp-compat-coding-system-change-eol-conversion): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-url-file-name): * lisp/net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel, tramp-gw-open-connection): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-set-file-modes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-add-name-to-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory) (tramp-sh-handle-delete-directory, tramp-sh-handle-delete-file) (tramp-sh-handle-insert-directory, tramp-process-sentinel) (tramp-sh-handle-start-file-process) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch, tramp-maybe-send-script) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-wait-for-output, tramp-send-command-and-check) (tramp-send-command-and-read, tramp-get-remote-path) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-ls-command-with-quoting-style) (tramp-get-test-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-touch, tramp-get-remote-gvfs-monitor-dir) (tramp-get-remote-inotifywait, tramp-get-remote-id) (tramp-get-remote-python): * lisp/net/tramp-smb.el (tramp-smb-errors) (tramp-smb-handle-add-name-to-file, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-delete-file) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries): * lisp/net/tramp.el (tramp-debug-message, tramp-error) (tramp-process-actions): Generate diagnostics according to ‘text-quoting-style’, by using curved quotes in format strings and ‘format-message’ when appropriate. * lisp/net/tramp-compat.el (format-message): Define a replacement, if it’s an older version of Emacs that doesn’t have it already.
2015-08-25 00:59:12 +00:00
tmpfile loc-enc)
(if (functionp loc-enc)
;; The following `let' is a workaround for
;; the base64.el that comes with pgnus-0.84.
;; If both of the following conditions are
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; satisfied, it tries to write to a local
;; file in default-directory, but at this
;; point, default-directory is remote.
;; (`call-process-region' can't write to
;; remote files, it seems.) The file in
;; question is a tmp file anyway.
(let ((coding-system-for-read 'binary)
(default-directory
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-compat-temporary-file-directory)))
(insert-file-contents-literally tmpfile)
(funcall loc-enc (point-min) (point-max)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(unless (zerop (tramp-call-local-coding-command
loc-enc tmpfile t))
(tramp-error
v 'file-error
(concat "Cannot write to `%s', "
"local encoding command `%s' failed")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
filename loc-enc))))
;; Send buffer into remote decoding command which
;; writes to remote file. Because this happens on
;; the remote host, we cannot use the function.
(with-tramp-progress-reporter
Tramp diagnostics as per ‘text-quoting-style’ * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-get-ls-command, tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory) (tramp-adb-handle-delete-file) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-copy-file) (tramp-adb-send-command-and-check, tramp-adb-wait-for-output) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el: * lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory) (tramp-compat-octal-to-decimal) (tramp-compat-coding-system-change-eol-conversion): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-url-file-name): * lisp/net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel, tramp-gw-open-connection): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-set-file-modes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-add-name-to-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory) (tramp-sh-handle-delete-directory, tramp-sh-handle-delete-file) (tramp-sh-handle-insert-directory, tramp-process-sentinel) (tramp-sh-handle-start-file-process) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch, tramp-maybe-send-script) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-wait-for-output, tramp-send-command-and-check) (tramp-send-command-and-read, tramp-get-remote-path) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-ls-command-with-quoting-style) (tramp-get-test-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-touch, tramp-get-remote-gvfs-monitor-dir) (tramp-get-remote-inotifywait, tramp-get-remote-id) (tramp-get-remote-python): * lisp/net/tramp-smb.el (tramp-smb-errors) (tramp-smb-handle-add-name-to-file, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-delete-file) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries): * lisp/net/tramp.el (tramp-debug-message, tramp-error) (tramp-process-actions): Generate diagnostics according to ‘text-quoting-style’, by using curved quotes in format strings and ‘format-message’ when appropriate. * lisp/net/tramp-compat.el (format-message): Define a replacement, if it’s an older version of Emacs that doesn’t have it already.
2015-08-25 00:59:12 +00:00
v 3 (format-message
"Decoding remote file `%s' using `%s'"
Tramp diagnostics as per ‘text-quoting-style’ * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-get-ls-command, tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory) (tramp-adb-handle-delete-file) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-copy-file) (tramp-adb-send-command-and-check, tramp-adb-wait-for-output) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el: * lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory) (tramp-compat-octal-to-decimal) (tramp-compat-coding-system-change-eol-conversion): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-url-file-name): * lisp/net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel, tramp-gw-open-connection): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-set-file-modes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-add-name-to-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory) (tramp-sh-handle-delete-directory, tramp-sh-handle-delete-file) (tramp-sh-handle-insert-directory, tramp-process-sentinel) (tramp-sh-handle-start-file-process) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch, tramp-maybe-send-script) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-wait-for-output, tramp-send-command-and-check) (tramp-send-command-and-read, tramp-get-remote-path) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-ls-command-with-quoting-style) (tramp-get-test-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-touch, tramp-get-remote-gvfs-monitor-dir) (tramp-get-remote-inotifywait, tramp-get-remote-id) (tramp-get-remote-python): * lisp/net/tramp-smb.el (tramp-smb-errors) (tramp-smb-handle-add-name-to-file, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-delete-file) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries): * lisp/net/tramp.el (tramp-debug-message, tramp-error) (tramp-process-actions): Generate diagnostics according to ‘text-quoting-style’, by using curved quotes in format strings and ‘format-message’ when appropriate. * lisp/net/tramp-compat.el (format-message): Define a replacement, if it’s an older version of Emacs that doesn’t have it already.
2015-08-25 00:59:12 +00:00
filename rem-dec)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(goto-char (point-max))
(unless (bolp) (newline))
(tramp-send-command
v
(format
(concat rem-dec " <<'%s'\n%s%s")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-shell-quote-argument localname)
tramp-end-of-heredoc
(buffer-string)
tramp-end-of-heredoc))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-barf-unless-okay
v nil
"Couldn't write region to `%s', decode using `%s' failed"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
filename rem-dec)
;; When `file-precious-flag' is set, the region is
;; written to a temporary file. Check that the
;; checksum is equal to that from the local tmpfile.
(when file-precious-flag
(erase-buffer)
(and
;; cksum runs locally, if possible.
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(zerop (tramp-call-process v "cksum" tmpfile t))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; cksum runs remotely.
(tramp-send-command-and-check
v
(format
"cksum <%s" (tramp-shell-quote-argument localname)))
;; ... they are different.
(not
(string-equal
(buffer-string)
(with-current-buffer (tramp-get-buffer v)
(buffer-string))))
(tramp-error
v 'file-error
(concat "Couldn't write region to `%s',"
" decode using `%s' failed")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
filename rem-dec)))))
;; Save exit.
(delete-file tmpfile)))
;; That's not expected.
(t
(tramp-error
v 'file-error
(concat "Method `%s' should specify both encoding and "
"decoding command or an scp program")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
method))))
;; Make `last-coding-system-used' have the right value.
(when coding-system-used
(setq last-coding-system-used coding-system-used))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Extend tramp-cache.el interface * lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-dired-uncache): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory, tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-file-system-info, tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-send-command): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-set-file-selinux-context, tramp-sh-handle-set-file-acl) (tramp-sh-handle-add-name-to-file, tramp-sh-handle-copy-directory) (tramp-do-copy-or-rename-file, tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory, tramp-sh-handle-delete-directory) (tramp-sh-handle-delete-file, tramp-sh-handle-dired-compress-file) (tramp-process-sentinel, tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file) (tramp-smb-handle-file-acl, tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link, tramp-smb-handle-process-file) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes, tramp-smb-handle-start-file-process) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): Use them. * lisp/net/tramp-cache.el (tramp-flush-file-properties) (tramp-flush-directory-properties, tramp-flush-connection-properties): Rename from `tramp-flush-file-property',`tramp-flush-directory-property' and `tramp-flush-connection-property', respectively. (tramp-flush-file-property, tramp-flush-connection-property): New defuns.
2017-12-12 14:46:17 +00:00
(tramp-flush-file-properties v localname)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; We must protect `last-coding-system-used', now we have set it
;; to its correct value.
(let (last-coding-system-used (need-chown t))
;; Set file modification time.
(when (or (eq visit t) (stringp visit))
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(let ((file-attr (file-attributes filename 'integer)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(set-visited-file-modtime
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
;; We must pass modtime explicitly, because FILENAME can
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; be different from (buffer-file-name), f.e. if
;; `file-precious-flag' is set.
(or (tramp-compat-file-attribute-modification-time file-attr)
(current-time)))
Use `file-attribute-*' in Tramp * lisp/net/tramp-compat.el (tramp-compat-file-attribute-type) (tramp-compat-file-attribute-link-number) (tramp-compat-file-attribute-user-id) (tramp-compat-file-attribute-group-id) (tramp-compat-file-attribute-modification-time) (tramp-compat-file-attribute-size) (tramp-compat-file-attribute-modes): New defaliases. * lisp/net/tramp.el (tramp-handle-file-modes) (tramp-handle-file-newer-than-file-p) (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-get-local-gid, tramp-check-cached-permissions): * lisp/net/tramp-adb.el (tramp-adb-handle-file-directory-p) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-file-directory-p) (tramp-gvfs-handle-write-region, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-file-newer-than-file-p) (tramp-sh-handle-file-ownership-preserved-p) (tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file) (tramp-smb-handle-file-directory-p) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory): Use them.
2016-08-30 13:36:14 +00:00
(when (and (= (tramp-compat-file-attribute-user-id file-attr) uid)
(= (tramp-compat-file-attribute-group-id file-attr) gid))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq need-chown nil))))
;; Set the ownership.
(when need-chown
(tramp-set-file-uid-gid filename uid gid))
Implement file locks for remote files (Bug#49261) * doc/lispref/files.texi (Magic File Names): Add file-locked-p, lock-file and unlock-file. * etc/NEWS: Tramp supports file locks now. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-adb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): New defun. * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify. (tramp-fuse-unmount): New defun. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sh-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-smb-handle-copy-directory): Use `sleep-for'. (tramp-smb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sshfs-handle-write-region): Handle LOCKNAME. (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sudoedit-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid) (tramp-handle-file-locked-p, tramp-handle-lock-file) (tramp-handle-unlock-file): New defuns. (tramp-lock-file-contents-regexp): New regexp. (tramp-handle-write-region): Handle LOCKNAME. * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p): Call handler if exists. (Flock_file, Funlock_file): New defuns. (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols. (Slock_file, Sunlock_file): Declare subroutines. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-make-nearby-temp-file) (tramp-archive-test43-file-system-info): Rename. * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil. (tramp--test-fuse-p): New defun. (tramp-test14-delete-directory): Use it. (tramp-test39-lock-file): New test. (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters) (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls, tramp-test42-utf8) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls, tramp-test43-file-system-info) (tramp-test44-asynchronous-requests, tramp-test45-auto-load) (tramp-test45-delay-load, tramp-test45-recursive-load) (tramp-test45-remote-load-path, tramp-test46-unload): Rename. (tramp--test-special-characters, tramp--test-utf8) (tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 16:36:53 +00:00
;; Unlock file.
(when file-locked
Implement file locks for remote files (Bug#49261) * doc/lispref/files.texi (Magic File Names): Add file-locked-p, lock-file and unlock-file. * etc/NEWS: Tramp supports file locks now. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-adb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file) (tramp-crypt-handle-unlock-file): New defun. * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify. (tramp-fuse-unmount): New defun. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sh-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-smb-handle-copy-directory): Use `sleep-for'. (tramp-smb-handle-write-region): Handle LOCKNAME. * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sshfs-handle-write-region): Handle LOCKNAME. (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-sudoedit-maybe-open-connection): Set "lock-pid" connection property. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `file-locked-p', `lock-file' and `unlock-file'. (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid) (tramp-handle-file-locked-p, tramp-handle-lock-file) (tramp-handle-unlock-file): New defuns. (tramp-lock-file-contents-regexp): New regexp. (tramp-handle-write-region): Handle LOCKNAME. * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p): Call handler if exists. (Flock_file, Funlock_file): New defuns. (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols. (Slock_file, Sunlock_file): Declare subroutines. * test/lisp/net/tramp-archive-tests.el (tramp-archive-test40-make-nearby-temp-file) (tramp-archive-test43-file-system-info): Rename. * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil. (tramp--test-fuse-p): New defun. (tramp-test14-delete-directory): Use it. (tramp-test39-lock-file): New test. (tramp-test40-make-nearby-temp-file) (tramp-test41-special-characters) (tramp-test41-special-characters-with-stat) (tramp-test41-special-characters-with-perl) (tramp-test41-special-characters-with-ls, tramp-test42-utf8) (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl) (tramp-test42-utf8-with-ls, tramp-test43-file-system-info) (tramp-test44-asynchronous-requests, tramp-test45-auto-load) (tramp-test45-delay-load, tramp-test45-recursive-load) (tramp-test45-remote-load-path, tramp-test46-unload): Rename. (tramp--test-special-characters, tramp--test-utf8) (tramp--test-asynchronous-requests-timeout): Modify docstring.
2021-07-07 16:36:53 +00:00
;; `unlock-file' exists since Emacs 28.1.
(tramp-compat-funcall 'unlock-file lockname))
(when (and (null noninteractive)
(or (eq visit t) (null visit) (stringp visit)))
(tramp-message v 0 "Wrote %s" filename))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(run-hooks 'tramp-handle-write-region-hook)))))
(defvar tramp-vc-registered-file-names nil
"List used to collect file names, which are checked during `vc-registered'.")
;; VC backends check for the existence of various different special
;; files. This is very time consuming, because every single check
;; requires a remote command (the file cache must be invalidated).
;; Therefore, we apply a kind of optimization. We install the file
;; name handler `tramp-vc-file-name-handler', which does nothing but
;; remembers all file names for which `file-exists-p' or
;; `file-readable-p' has been applied. A first run of `vc-registered'
;; is performed. Afterwards, a script is applied for all collected
;; file names, using just one remote command. The result of this
;; script is used to fill the file cache with actual values. Now we
;; can reset the file name handlers, and we make a second run of
;; `vc-registered', which returns the expected result without sending
;; any other remote command.
;; When called during `revert-buffer', it shouldn't spam the echo area
;; and the *Messages* buffer.
(defun tramp-sh-handle-vc-registered (file)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Like `vc-registered' for Tramp files."
(when vc-handled-backends
Sync with Tramp 2.5.0-pre * doc/misc/tramp.texi: Protext Tramp x.y and Emacs x.y by @w{}. (GVFS-based methods): Move "GNOME Online Accounts" index. (Customizing Methods, Android shell setup, File name completion) (Frequently Asked Questions): Fix typos. * doc/misc/trampver.texi: Change version to "2.5.0-pre". * lisp/net/trampver.el: Change version to "2.5.0-pre". (inhibit-message): Don't declare. * lisp/net/tramp.el: Bump version to 2.5.0-pre. Require Emacs 25.1. (tramp-debug-message): Simplify. (tramp-message): Don't use `tramp-message-show-message'. (tramp-with-demoted-errors, with-parsed-tramp-file-name) (with-tramp-file-property, with-tramp-connection-property): Adapt `declare' form. (with-tramp-progress-reporter): Suppress progress reporter when noninteractive. (tramp-completion-mode, tramp-completion-mode-p): Remove. * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (format-message): Remove compatibility code. (tramp-compat-directory-name-p) (tramp-compat-tramp-file-name-slots): Remove. * lisp/net/tramp.el (tramp-debug-message, tramp-message) (tramp-backtrace, tramp-error, tramp-error-with-buffer) (tramp-user-error, tramp-with-demoted-errors) (tramp-signal-hook-function): * lisp/net/tramp-compat.el (tramp-compat-funcall) * lisp/net/tramp-gvfs.el (tramp-dbus-function): Add `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-get-method-parameter) (tramp-dissect-file-name, tramp-error, tramp-error-with-buffer) (tramp-user-error, with-parsed-tramp-file-name) (with-tramp-progress-reporter, tramp-file-name-handler) (tramp-completion-file-name-handler, tramp-autoload-file-name-handler) (tramp-register-file-name-handlers, tramp-connectable-p) (tramp-handle-file-modes, tramp-handle-file-regular-p) (tramp-handle-file-truename, tramp-handle-insert-directory) (tramp-handle-load, tramp-set-file-uid-gid): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name): * lisp/net/tramp-cache.el (tramp-get-file-property, tramp-cache-print): * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (tramp-compat-exec-path): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-dbus-byte-array-to-string) (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler) (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-insert-directory, tramp-sh-file-name-handler) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler) (tramp-smb-handle-copy-file, tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-insert-directory) (tramp-smb-handle-rename-file, tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-file-truename): Use `if-let', `when-let', `directory-name-p', `inhibit-message', `non-essential and `cl-struct-slot-info'. Don't use `seconds-to-time'. * test/lisp/net/tramp-archive-tests.el (tramp-message-show-message): Don't set. * test/lisp/net/tramp-tests.el (inhibit-message): Don't declare. (tramp-message-show-message): Don't set. (tramp-test06-directory-file-name): Use `non-essential'. (tramp-test10-write-region): Use `inhibit-message'. (tramp-test36-vc-registered): No special handling for old Emacsen. (tramp--test-emacs25-p): Remove. (tramp-test45-unload): Special case of `tramp-completion-mode'.
2020-01-19 13:11:07 +00:00
(let ((inhibit-message (or revert-buffer-in-progress-p inhibit-message))
(temp-message (unless revert-buffer-in-progress-p "")))
(with-temp-message temp-message
(with-parsed-tramp-file-name file nil
(with-tramp-progress-reporter
v 3 (format-message "Checking `vc-registered' for %s" file)
;; There could be new files, created by the vc backend.
;; We cannot reuse the old cache entries, therefore. In
;; `tramp-get-file-property', `remote-file-name-inhibit-cache'
;; could also be a timestamp as `current-time' returns. This
;; means invalidate all cache entries with an older timestamp.
(let (tramp-vc-registered-file-names
(remote-file-name-inhibit-cache (current-time))
(file-name-handler-alist
`((,tramp-file-name-regexp . tramp-vc-file-name-handler))))
;; Here we collect only file names, which need an operation.
(tramp-with-demoted-errors
v "Error in 1st pass of `vc-registered': %s"
(tramp-run-real-handler #'vc-registered (list file)))
(tramp-message v 10 "\n%s" tramp-vc-registered-file-names)
;; Send just one command, in order to fill the cache.
(when tramp-vc-registered-file-names
(tramp-maybe-send-script
v
(format tramp-vc-registered-read-file-names
(tramp-get-file-exists-command v)
(format "%s -r" (tramp-get-test-command v)))
"tramp_vc_registered_read_file_names")
(dolist
(elt
(ignore-errors
;; We cannot use `tramp-send-command-and-read',
;; because this does not cooperate well with
;; heredoc documents.
(tramp-send-command
v
(format
"tramp_vc_registered_read_file_names <<'%s'\n%s\n%s\n"
tramp-end-of-heredoc
(mapconcat #'tramp-shell-quote-argument
tramp-vc-registered-file-names
"\n")
tramp-end-of-heredoc))
(with-current-buffer (tramp-get-connection-buffer v)
;; Read the expression.
(goto-char (point-min))
(read (current-buffer)))))
(tramp-set-file-property
v (car elt) (cadr elt) (cadr (cdr elt))))))
;; Second run. Now all `file-exists-p' or `file-readable-p'
;; calls shall be answered from the file cache. We unset
;; `process-file-side-effects' and `remote-file-name-inhibit-cache'
;; in order to keep the cache.
(let ((vc-handled-backends (copy-sequence vc-handled-backends))
remote-file-name-inhibit-cache process-file-side-effects)
;; Reduce `vc-handled-backends' in order to minimize
;; process calls.
(when (and
(memq 'Bzr vc-handled-backends)
(or (not (require 'vc-bzr nil 'noerror))
(not (with-tramp-connection-property v vc-bzr-program
(tramp-find-executable
v vc-bzr-program (tramp-get-remote-path v))))))
(setq vc-handled-backends (remq 'Bzr vc-handled-backends)))
(when (and
(memq 'Git vc-handled-backends)
(or (not (require 'vc-git nil 'noerror))
(not (with-tramp-connection-property v vc-git-program
(tramp-find-executable
v vc-git-program (tramp-get-remote-path v))))))
(setq vc-handled-backends (remq 'Git vc-handled-backends)))
(when (and
(memq 'Hg vc-handled-backends)
(or (not (require 'vc-hg nil 'noerror))
(not (with-tramp-connection-property v vc-hg-program
(tramp-find-executable
v vc-hg-program (tramp-get-remote-path v))))))
(setq vc-handled-backends (remq 'Hg vc-handled-backends)))
;; Run.
(tramp-with-demoted-errors
v "Error in 2nd pass of `vc-registered': %s"
(tramp-run-real-handler #'vc-registered (list file))))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;;;###tramp-autoload
(defun tramp-sh-file-name-handler (operation &rest args)
"Invoke remote-shell Tramp file name handler.
Fall back to normal file name handler if no Tramp handler exists."
Sync with Tramp 2.5.0-pre * doc/misc/tramp.texi: Protext Tramp x.y and Emacs x.y by @w{}. (GVFS-based methods): Move "GNOME Online Accounts" index. (Customizing Methods, Android shell setup, File name completion) (Frequently Asked Questions): Fix typos. * doc/misc/trampver.texi: Change version to "2.5.0-pre". * lisp/net/trampver.el: Change version to "2.5.0-pre". (inhibit-message): Don't declare. * lisp/net/tramp.el: Bump version to 2.5.0-pre. Require Emacs 25.1. (tramp-debug-message): Simplify. (tramp-message): Don't use `tramp-message-show-message'. (tramp-with-demoted-errors, with-parsed-tramp-file-name) (with-tramp-file-property, with-tramp-connection-property): Adapt `declare' form. (with-tramp-progress-reporter): Suppress progress reporter when noninteractive. (tramp-completion-mode, tramp-completion-mode-p): Remove. * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (format-message): Remove compatibility code. (tramp-compat-directory-name-p) (tramp-compat-tramp-file-name-slots): Remove. * lisp/net/tramp.el (tramp-debug-message, tramp-message) (tramp-backtrace, tramp-error, tramp-error-with-buffer) (tramp-user-error, tramp-with-demoted-errors) (tramp-signal-hook-function): * lisp/net/tramp-compat.el (tramp-compat-funcall) * lisp/net/tramp-gvfs.el (tramp-dbus-function): Add `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-get-method-parameter) (tramp-dissect-file-name, tramp-error, tramp-error-with-buffer) (tramp-user-error, with-parsed-tramp-file-name) (with-tramp-progress-reporter, tramp-file-name-handler) (tramp-completion-file-name-handler, tramp-autoload-file-name-handler) (tramp-register-file-name-handlers, tramp-connectable-p) (tramp-handle-file-modes, tramp-handle-file-regular-p) (tramp-handle-file-truename, tramp-handle-insert-directory) (tramp-handle-load, tramp-set-file-uid-gid): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name): * lisp/net/tramp-cache.el (tramp-get-file-property, tramp-cache-print): * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (tramp-compat-exec-path): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-dbus-byte-array-to-string) (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler) (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-insert-directory, tramp-sh-file-name-handler) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler) (tramp-smb-handle-copy-file, tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-insert-directory) (tramp-smb-handle-rename-file, tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-file-truename): Use `if-let', `when-let', `directory-name-p', `inhibit-message', `non-essential and `cl-struct-slot-info'. Don't use `seconds-to-time'. * test/lisp/net/tramp-archive-tests.el (tramp-message-show-message): Don't set. * test/lisp/net/tramp-tests.el (inhibit-message): Don't declare. (tramp-message-show-message): Don't set. (tramp-test06-directory-file-name): Use `non-essential'. (tramp-test10-write-region): Use `inhibit-message'. (tramp-test36-vc-registered): No special handling for old Emacsen. (tramp--test-emacs25-p): Remove. (tramp-test45-unload): Special case of `tramp-completion-mode'.
2020-01-19 13:11:07 +00:00
(if-let ((fn (assoc operation tramp-sh-file-name-handler-alist)))
(save-match-data (apply (cdr fn) args))
(tramp-run-real-handler operation args)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;;;###tramp-autoload
(defun tramp-sh-file-name-handler-p (vec)
"Whether VEC uses a method from `tramp-sh-file-name-handler'."
(and (assoc (tramp-file-name-method vec) tramp-methods)
(eq (tramp-find-foreign-file-name-handler
(tramp-make-tramp-file-name vec nil 'nohop))
'tramp-sh-file-name-handler)))
;; This must be the last entry, because `identity' always matches.
;;;###tramp-autoload
* lisp/net/tramp: Rework mutual dependencies Functionally split tramp-loaddefs.el into two parts: one part run while loading it at the very beginning of loading tramp.el (holding plain autoloads and declarations), and another run at the very end of loading tramp.el (holding setup code). This should reduce infinite-recursion problems while loading. * lisp/net/tramp.el: Require tramp-loaddefs at beginning. Run (new and internal) tramp--startup-hook at the end. Remove all tramp-autoloads. Prefer tramp--with-startup over eval-after-load. (tramp--with-startup): New macro. (tramp-set-syntax): Show the new value rather than the old value in the error message. (tramp-syntax-values): Explicitly return 'values'. (tramp-prefix-format, tramp-prefix-regexp, tramp-method-regexp) (tramp-postfix-method-format, tramp-postfix-method-regexp) (tramp-prefix-ipv6-format, tramp-prefix-ipv6-regexp) (tramp-postfix-ipv6-format, tramp-postfix-ipv6-regexp) (tramp-postfix-host-format, tramp-postfix-host-regexp) (tramp-remote-file-name-spec-regexp, tramp-file-name-structure) (tramp-completion-file-name-regexp): Don't initialize in the declaration, since it's recomputed at the end anyway. (tramp-time-dont-know, tramp-time-doesnt-exist): Move before first use. * lisp/net/tramp-compat.el: Don't require tramp-loaddefs any more. (tramp-compat-tramp-syntax): Declare tramp-syntax. * lisp/net/tramp-smb.el: * lisp/net/tramp-rclone.el: * lisp/net/tramp-gvfs.el: * lisp/net/tramp-ftp.el: * lisp/net/tramp-adb.el: Wrap all autoloaded setup operations within tramp--with-startup. * lisp/net/tramp-sh.el: Wrap all autoloaded setup operations within tramp--with-startup. (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): Don't tramp-autoload any more. (tramp-stat-marker): Use eval-and-compile rather than tramp-autoload. * lisp/net/tramp-sudoedit.el: Wrap all autoloaded setup operations within tramp--with-startup. Require tramp-sh at compile-time to precompute some regexps based on tramp-stat-marker.
2018-12-16 15:32:53 +00:00
(tramp--with-startup
(tramp-register-foreign-file-name-handler
#'identity #'tramp-sh-file-name-handler 'append))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-vc-file-name-handler (operation &rest args)
"Invoke special file name handler, which collects files to be handled."
(save-match-data
(let ((filename
(tramp-replace-environment-variables
(apply #'tramp-file-name-for-operation operation args)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(fn (assoc operation tramp-sh-file-name-handler-alist)))
(if (tramp-tramp-file-p filename)
(with-parsed-tramp-file-name filename nil
(cond
;; That's what we want: file names, for which checks are
;; applied. We assume that VC uses only `file-exists-p'
;; and `file-readable-p' checks; otherwise we must extend
;; the list. We do not perform any action, but return
;; nil, in order to keep `vc-registered' running.
((and fn (memq operation '(file-exists-p file-readable-p)))
(add-to-list 'tramp-vc-registered-file-names localname 'append)
nil)
;; `process-file' and `start-file-process' shall be ignored.
((and fn (eq operation 'process-file) 0))
((and fn (eq operation 'start-file-process) nil))
;; Tramp file name handlers like `expand-file-name'. They
;; must still work.
(fn (save-match-data (apply (cdr fn) args)))
;; Default file name handlers, we don't care.
(t (tramp-run-real-handler operation args))))
;; When `tramp-mode' is not enabled, or the file name is
;; quoted, we don't do anything.
(tramp-run-real-handler operation args)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Remove byte compiler warnings, visible when compiling with `byte-compile-force-lexical-warnings' set to t. * net/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 "_". * net/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. * net/tramp-cache.el (tramp-flush-directory-property) (tramp-flush-connection-property, tramp-list-connections) (tramp-parse-connection-properties): Prefix unused arguments with "_". * net/tramp-compat.el (tramp-compat-make-temp-file): Rename FILENAME to F. * net/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 "_". * net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel): Prefix unused arguments with "_". * net/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. * net/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 "_". * net/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-15 14:29:08 +00:00
(defun tramp-sh-handle-file-notify-add-watch (file-name flags _callback)
"Like `file-notify-add-watch' for Tramp files."
(setq file-name (expand-file-name file-name))
(with-parsed-tramp-file-name file-name nil
(let ((default-directory (file-name-directory file-name))
(process-environment
(cons "GIO_USE_FILE_MONITOR=help" process-environment))
command events filter p sequence)
(cond
;; "inotifywait".
((setq command (tramp-get-remote-inotifywait v))
(setq filter #'tramp-sh-inotifywait-process-filter
events
(cond
((and (memq 'change flags) (memq 'attribute-change flags))
(concat "create,modify,move,moved_from,moved_to,move_self,"
"delete,delete_self,attrib,ignored"))
((memq 'change flags)
(concat "create,modify,move,moved_from,moved_to,move_self,"
"delete,delete_self,ignored"))
((memq 'attribute-change flags) "attrib,ignored"))
sequence `(,command "-mq" "-e" ,events ,localname)
;; Make events a list of symbols.
events
(mapcar
(lambda (x) (intern-soft (tramp-compat-string-replace "_" "-" x)))
(split-string events "," 'omit))))
;; "gio monitor".
((setq command (tramp-get-remote-gio-monitor v))
(setq filter #'tramp-sh-gio-monitor-process-filter
events
(cond
((and (memq 'change flags) (memq 'attribute-change flags))
'(created changed changes-done-hint moved deleted
attribute-changed))
((memq 'change flags)
'(created changed changes-done-hint moved deleted))
((memq 'attribute-change flags) '(attribute-changed)))
sequence `(,command "monitor" ,localname)))
;; None.
(t (tramp-error
v 'file-notify-error
"No file notification program found on %s"
(file-remote-p file-name))))
Code cleanup. * net/tramp.el (tramp-debug-message): Do not check for connection buffer. (tramp-message): Use "vector" connection property. * net/tramp.el (tramp-rfn-eshadow-update-overlay) (tramp-equal-remote, tramp-eshell-directory-change) * net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file) * net/tramp-cmds.el (tramp-list-remote-buffers) (tramp-cleanup-connection, tramp-cleanup-this-connection) * net/tramp-compat.el (tramp-compat-process-running-p) * net/tramp-ftp.el (tramp-ftp-file-name-handler) * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-rename-file) * net/tramp-sh.el (tramp-sh-handle-set-file-times) (tramp-set-file-uid-gid) * net/tramp-smb.el (tramp-smb-handle-copy-file) (tramp-smb-handle-rename-file): Use `tramp-tramp-file-p' instead of `file-remote-p'. * net/tramp.el (tramp-connectable-p, tramp-handle-file-remote-p) * net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel, tramp-gw-process-filter) (tramp-gw-open-network-stream): Suppress unrelated traces. * net/tramp-adb.el (tramp-adb-maybe-open-connection) * net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch) * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) * net/tramp-smb.el (tramp-smb-maybe-open-connection): Set "vector" connection property. * net/tramp-cache.el (top): Suppress traces when reading presistency file. * net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Refactor common code. Improve debug message. (tramp-maybe-open-connection) * net/tramp-smb.el (tramp-smb-call-winexe): Do not request connection buffer too early. * net/tramp-smb.el (tramp-smb-actions-get-acl): New defconst, renamed from `tramp-smb-actions-with-acl'. (tramp-smb-actions-set-acl): New defconst. (tramp-smb-handle-copy-directory) (tramp-smb-action-get-acl): New defun, renamed from `tramp-smb-action-with-acl'. (tramp-smb-action-set-acl): New defun. (tramp-smb-handle-set-file-acl): Rewrite.
2013-10-17 19:39:22 +00:00
;; Start process.
(setq p (apply
#'start-file-process
Code cleanup. * net/tramp.el (tramp-debug-message): Do not check for connection buffer. (tramp-message): Use "vector" connection property. * net/tramp.el (tramp-rfn-eshadow-update-overlay) (tramp-equal-remote, tramp-eshell-directory-change) * net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file) * net/tramp-cmds.el (tramp-list-remote-buffers) (tramp-cleanup-connection, tramp-cleanup-this-connection) * net/tramp-compat.el (tramp-compat-process-running-p) * net/tramp-ftp.el (tramp-ftp-file-name-handler) * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-rename-file) * net/tramp-sh.el (tramp-sh-handle-set-file-times) (tramp-set-file-uid-gid) * net/tramp-smb.el (tramp-smb-handle-copy-file) (tramp-smb-handle-rename-file): Use `tramp-tramp-file-p' instead of `file-remote-p'. * net/tramp.el (tramp-connectable-p, tramp-handle-file-remote-p) * net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel, tramp-gw-process-filter) (tramp-gw-open-network-stream): Suppress unrelated traces. * net/tramp-adb.el (tramp-adb-maybe-open-connection) * net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch) * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) * net/tramp-smb.el (tramp-smb-maybe-open-connection): Set "vector" connection property. * net/tramp-cache.el (top): Suppress traces when reading presistency file. * net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Refactor common code. Improve debug message. (tramp-maybe-open-connection) * net/tramp-smb.el (tramp-smb-call-winexe): Do not request connection buffer too early. * net/tramp-smb.el (tramp-smb-actions-get-acl): New defconst, renamed from `tramp-smb-actions-with-acl'. (tramp-smb-actions-set-acl): New defconst. (tramp-smb-handle-copy-directory) (tramp-smb-action-get-acl): New defun, renamed from `tramp-smb-action-with-acl'. (tramp-smb-action-set-acl): New defun. (tramp-smb-handle-set-file-acl): Rewrite.
2013-10-17 19:39:22 +00:00
(file-name-nondirectory command)
(generate-new-buffer
(format " *%s*" (file-name-nondirectory command)))
sequence))
;; Return the process object as watch-descriptor.
(if (not (processp p))
(tramp-error
Code cleanup. * net/tramp.el (tramp-debug-message): Do not check for connection buffer. (tramp-message): Use "vector" connection property. * net/tramp.el (tramp-rfn-eshadow-update-overlay) (tramp-equal-remote, tramp-eshell-directory-change) * net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file) * net/tramp-cmds.el (tramp-list-remote-buffers) (tramp-cleanup-connection, tramp-cleanup-this-connection) * net/tramp-compat.el (tramp-compat-process-running-p) * net/tramp-ftp.el (tramp-ftp-file-name-handler) * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-rename-file) * net/tramp-sh.el (tramp-sh-handle-set-file-times) (tramp-set-file-uid-gid) * net/tramp-smb.el (tramp-smb-handle-copy-file) (tramp-smb-handle-rename-file): Use `tramp-tramp-file-p' instead of `file-remote-p'. * net/tramp.el (tramp-connectable-p, tramp-handle-file-remote-p) * net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel, tramp-gw-process-filter) (tramp-gw-open-network-stream): Suppress unrelated traces. * net/tramp-adb.el (tramp-adb-maybe-open-connection) * net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch) * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) * net/tramp-smb.el (tramp-smb-maybe-open-connection): Set "vector" connection property. * net/tramp-cache.el (top): Suppress traces when reading presistency file. * net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Refactor common code. Improve debug message. (tramp-maybe-open-connection) * net/tramp-smb.el (tramp-smb-call-winexe): Do not request connection buffer too early. * net/tramp-smb.el (tramp-smb-actions-get-acl): New defconst, renamed from `tramp-smb-actions-with-acl'. (tramp-smb-actions-set-acl): New defconst. (tramp-smb-handle-copy-directory) (tramp-smb-action-get-acl): New defun, renamed from `tramp-smb-action-with-acl'. (tramp-smb-action-set-acl): New defun. (tramp-smb-handle-set-file-acl): Rewrite.
2013-10-17 19:39:22 +00:00
v 'file-notify-error
"`%s' failed to start on remote host"
Tramp requires Emacs 24.4 * doc/misc/tramp.texi (Frequently Asked Questions): Use `with-eval-after-load'. in example. * doc/misc/trampver.texi: Set variable emacsver. * lisp/net/tramp.el (tramp-send-string, tramp-call-process) (tramp-call-process-region, tramp-process-lines): * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes) (tramp-gvfs-handle-file-notify-add-watch) * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-notify-add-watch, tramp-find-executable) (tramp-set-remote-path) (tramp-open-connection-setup-interactive-shell) (tramp-maybe-open-connection, tramp-send-command): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process) (tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl): (tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'. * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-ftp.el: Use `with-eval-after-load'. * lisp/net/tramp-cmds.el (tramp-cleanup-connection) (tramp-cleanup-all-connections): Cancel timer. * lisp/net/tramp-compat.el (subr-x): Require. (default-toplevel-value): Don't make it a defalias. * lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'. Do not special handle `split-string'. * lisp/net/tramp.el: Require Emacs 24.4. (tramp-password-prompt-regexp): Use `password-word-equivalents'. (tramp-user-error): Use `user-error'. (tramp-replace-environment-variables): Use `substitute-env-vars'. (tramp-wait-for-regexp): Rearrange `with-current-buffer' call. (tramp-get-local-gid): Use `group-gid'. * lisp/net/trampver.el: Check for Emacs 24.4. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate) (tramp-test03-file-name-host-rules) (tramp-test03-file-name-method-rules): Don't check for `user-error'.
2019-06-28 14:32:12 +00:00
(string-join sequence " "))
(tramp-message v 6 "Run `%s', %S" (string-join sequence " ") p)
(process-put p 'vector v)
;; Needed for process filter.
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(process-put p 'events events)
(process-put p 'watch-name localname)
(set-process-query-on-exit-flag p nil)
(set-process-filter p filter)
(set-process-sentinel p #'tramp-file-notify-process-sentinel)
;; There might be an error if the monitor is not supported.
;; Give the filter a chance to read the output.
(while (tramp-accept-process-output p 0))
(unless (process-live-p p)
(tramp-error
p 'file-notify-error "Monitoring not supported for `%s'" file-name))
p))))
(defun tramp-sh-gio-monitor-process-filter (proc string)
Adapt Tramp docstrings according to checkdoc * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 12:10:58 +00:00
"Read output from \"gio monitor\" and add corresponding `file-notify' events."
(let ((events (process-get proc 'events))
(remote-prefix
(with-current-buffer (process-buffer proc)
(file-remote-p default-directory)))
(rest-string (process-get proc 'rest-string))
pos)
(when rest-string
(tramp-message proc 10 "Previous string:\n%s" rest-string))
(tramp-message proc 6 "%S\n%s" proc string)
(setq string (concat rest-string string)
;; Fix action names.
string (tramp-compat-string-replace
"attributes changed" "attribute-changed" string)
string (tramp-compat-string-replace
"changes done" "changes-done-hint" string)
string (tramp-compat-string-replace
"renamed to" "moved" string))
(catch 'doesnt-work
;; https://bugs.launchpad.net/bugs/1742946
(when
(string-match-p "Monitoring not supported\\|No locations given" string)
(delete-process proc)
(throw 'doesnt-work nil))
;; Determine monitor name.
(unless (tramp-connection-property-p proc "gio-file-monitor")
(tramp-set-connection-property
proc "gio-file-monitor"
(cond
;; We have seen this on cygwin gio and on emba. Let's make
;; some assumptions.
((string-match
"Can't find module 'help' specified in GIO_USE_FILE_MONITOR" string)
(setq pos (match-end 0))
(cond
((getenv "EMACS_EMBA_CI") 'GInotifyFileMonitor)
((eq system-type 'cygwin) 'GPollFileMonitor)
(t nil)))
;; TODO: What happens, if several monitor names are reported?
((string-match "\
Supported arguments for GIO_USE_FILE_MONITOR environment variable:
\\s-*\\([[:alpha:]]+\\) - 20" string)
(setq pos (match-end 0))
(intern
(format "G%sFileMonitor" (capitalize (match-string 1 string)))))
(t (setq pos (length string)) nil)))
(setq string (substring string pos)))
;; Delete empty lines.
(setq string (tramp-compat-string-replace "\n\n" "\n" string))
(while (string-match
(eval-when-compile
(concat "^[^:]+:"
"[[:space:]]\\([^:]+\\):"
"[[:space:]]" (regexp-opt tramp-gio-events t)
"\\([[:space:]]\\([^:]+\\)\\)?$"))
string)
(let* ((file (match-string 1 string))
(file1 (match-string 4 string))
(object
(list
proc
(list
(intern-soft (match-string 2 string)))
;; File names are returned as absolute paths. We
;; must add the remote prefix.
(concat remote-prefix file)
(when file1 (concat remote-prefix file1)))))
(setq string (replace-match "" nil nil string))
;; Usually, we would add an Emacs event now. Unfortunately,
;; `unread-command-events' does not accept several events at
;; once. Therefore, we apply the handler directly.
(when (member (cl-caadr object) events)
(tramp-compat-funcall
(lookup-key special-event-map [file-notify])
`(file-notify ,object file-notify-callback))))))
;; Save rest of the string.
(while (string-match "^\n" string)
(setq string (replace-match "" nil nil string)))
(when (zerop (length string)) (setq string nil))
(when string (tramp-message proc 10 "Rest string:\n%s" string))
(process-put proc 'rest-string string)))
(defun tramp-sh-inotifywait-process-filter (proc string)
Adapt Tramp docstrings according to checkdoc * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 12:10:58 +00:00
"Read output from \"inotifywait\" and add corresponding `file-notify' events."
(let ((events (process-get proc 'events)))
(tramp-message proc 6 "%S\n%s" proc string)
(dolist (line (split-string string "[\n\r]+" 'omit))
;; Check, whether there is a problem.
(unless (string-match
(concat "^[^[:blank:]]+"
"[[:blank:]]+\\([^[:blank:]]+\\)"
"\\([[:blank:]]+\\([^\n\r]+\\)\\)?")
line)
Tramp code cleanup * lisp/net/tramp.el (tramp-signal-hook-function) (tramp-handle-access-file, tramp-handle-copy-directory) (tramp-handle-directory-files, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-load): * lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-make-directory) (tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file) (tramp-crypt-handle-directory-files) (tramp-crypt-handle-make-directory): * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-make-directory): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-directory-files): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-directory-files-and-attributes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-make-directory) (tramp-sh-handle-file-local-copy) (tramp-sh-inotifywait-process-filter): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-directory-files) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory, tramp-smb-handle-rename-file): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Unify error report. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args with other `tramp-*-file-name-handler'. * lisp/net/tramp-compat.el (tramp-error): Declare. (tramp-compat-file-missing): New defsubst. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Handle volatile files. (tramp-gvfs-set-attribute): New defun. (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times) (tramp-gvfs-handle-set-file-uid-gid): Use it. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Use `msg-operation'. * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Remove superfluous `format: (tramp-smb-maybe-open-connection): Simplify loop. * lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from symlinked files. * test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun. (tramp--test-nextcloud-p): Remove. (tramp-test40-special-characters-with-ls): Do not skip on MS Windows. (tramp-test41-utf8): Skip if needed.
2021-02-03 17:48:09 +00:00
(tramp-error proc 'file-notify-error line))
(let ((object
(list
proc
(mapcar
(lambda (x)
(intern-soft
(tramp-compat-string-replace "_" "-" (downcase x))))
(split-string (match-string 1 line) "," 'omit))
(or (match-string 3 line)
(file-name-nondirectory (process-get proc 'watch-name))))))
;; Usually, we would add an Emacs event now. Unfortunately,
;; `unread-command-events' does not accept several events at
;; once. Therefore, we apply the handler directly.
(when (member (cl-caadr object) events)
(tramp-compat-funcall
2019-07-18 18:46:25 +00:00
(lookup-key special-event-map [file-notify])
`(file-notify ,object file-notify-callback)))))))
(defun tramp-sh-handle-file-system-info (filename)
"Like `file-system-info' for Tramp files."
(ignore-errors
(with-parsed-tramp-file-name (expand-file-name filename) nil
(when (tramp-get-remote-df v)
(tramp-message v 5 "file system info: %s" localname)
(tramp-send-command
v (format
"%s %s"
(tramp-get-remote-df v) (tramp-shell-quote-argument localname)))
(with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-min))
(forward-line)
(when (looking-at
(concat "\\(?:^/[^[:space:]]*[[:space:]]\\)?"
"[[:space:]]*\\([[:digit:]]+\\)"
"[[:space:]]+\\([[:digit:]]+\\)"
"[[:space:]]+\\([[:digit:]]+\\)"))
(mapcar
(lambda (d)
(* d (tramp-get-connection-property v "df-blocksize" 0)))
(list (string-to-number (match-string 1))
;; The second value is the used size. We need the
;; free size.
(- (string-to-number (match-string 1))
(string-to-number (match-string 2)))
(string-to-number (match-string 3))))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;;; Internal Functions:
(defun tramp-expand-script (vec script)
"Expand SCRIPT with remote files or commands.
\"%a\", \"%h\", \"%o\" and \"%p\" format specifiers are replaced
by the respective `awk', `hexdump', `od' and `perl' commands.
\"%n\" is replaced by \"2>/dev/null\", and \"%t\" is replaced by
a temporary file name.
If VEC is nil, the respective local commands are used.
If there is a format specifier which cannot be expanded, this
function returns nil."
(if (not (string-match-p "\\(^\\|[^%]\\)%[ahnopt]" script))
script
(catch 'wont-work
(let ((awk (when (string-match-p "\\(^\\|[^%]\\)%a" script)
(or
(if vec (tramp-get-remote-awk vec) (executable-find "awk"))
(throw 'wont-work nil))))
(hdmp (when (string-match-p "\\(^\\|[^%]\\)%h" script)
(or
(if vec (tramp-get-remote-hexdump vec)
(executable-find "hexdump"))
(throw 'wont-work nil))))
(dev (when (string-match-p "\\(^\\|[^%]\\)%n" script)
(or
(if vec (concat "2>" (tramp-get-remote-null-device vec))
(if (eq system-type 'windows-nt) ""
(concat "2>" null-device)))
(throw 'wont-work nil))))
(od (when (string-match-p "\\(^\\|[^%]\\)%o" script)
(or (if vec (tramp-get-remote-od vec) (executable-find "od"))
(throw 'wont-work nil))))
(perl (when (string-match-p "\\(^\\|[^%]\\)%p" script)
(or
(if vec
(tramp-get-remote-perl vec) (executable-find "perl"))
(throw 'wont-work nil))))
(tmp (when (string-match-p "\\(^\\|[^%]\\)%t" script)
(or
(if vec
(tramp-file-local-name (tramp-make-tramp-temp-name vec))
(tramp-compat-make-temp-name))
(throw 'wont-work nil)))))
(format-spec
script
(format-spec-make ?a awk ?h hdmp ?n dev ?o od ?p perl ?t tmp))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-maybe-send-script (vec script name)
"Define in remote shell function NAME implemented as SCRIPT.
Only send the definition if it has not already been done."
;; We cannot let-bind (tramp-get-connection-process vec) because it
;; might be nil.
(let ((scripts (tramp-get-connection-property
(tramp-get-connection-process vec) "scripts" nil)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(unless (member name scripts)
Tramp diagnostics as per ‘text-quoting-style’ * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-get-ls-command, tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory) (tramp-adb-handle-delete-file) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-copy-file) (tramp-adb-send-command-and-check, tramp-adb-wait-for-output) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el: * lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory) (tramp-compat-octal-to-decimal) (tramp-compat-coding-system-change-eol-conversion): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-write-region, tramp-gvfs-url-file-name): * lisp/net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel, tramp-gw-open-connection): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-set-file-modes) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-add-name-to-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-make-directory) (tramp-sh-handle-delete-directory, tramp-sh-handle-delete-file) (tramp-sh-handle-insert-directory, tramp-process-sentinel) (tramp-sh-handle-start-file-process) (tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch, tramp-maybe-send-script) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-wait-for-output, tramp-send-command-and-check) (tramp-send-command-and-read, tramp-get-remote-path) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-ls-command-with-quoting-style) (tramp-get-test-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-touch, tramp-get-remote-gvfs-monitor-dir) (tramp-get-remote-inotifywait, tramp-get-remote-id) (tramp-get-remote-python): * lisp/net/tramp-smb.el (tramp-smb-errors) (tramp-smb-handle-add-name-to-file, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-delete-file) (tramp-smb-handle-file-local-copy) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-rename-file, tramp-smb-handle-set-file-acl) (tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries): * lisp/net/tramp.el (tramp-debug-message, tramp-error) (tramp-process-actions): Generate diagnostics according to ‘text-quoting-style’, by using curved quotes in format strings and ‘format-message’ when appropriate. * lisp/net/tramp-compat.el (format-message): Define a replacement, if it’s an older version of Emacs that doesn’t have it already.
2015-08-25 00:59:12 +00:00
(with-tramp-progress-reporter
vec 5 (format-message "Sending script `%s'" name)
;; In bash, leading TABs like in `tramp-vc-registered-read-file-names'
;; could result in unwanted command expansion. Avoid this.
(setq script (tramp-compat-string-replace
(make-string 1 ?\t) (make-string 8 ? ) script))
;; Expand format specifiers.
(unless (setq script (tramp-expand-script vec script))
(tramp-error
vec 'file-error
(format "Script %s is not applicable on remote host" name)))
;; Send it.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-barf-unless-okay
vec
(format "%s () {\n%s\n}" name script)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Script %s sending failed" name)
(tramp-set-connection-property
(tramp-get-connection-process vec) "scripts" (cons name scripts))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-run-test (switch filename)
"Run `test' on the remote system, given a SWITCH and a FILENAME.
Returns the exit code of the `test' program."
(with-parsed-tramp-file-name filename nil
(tramp-send-command-and-check
v
(format
"%s %s %s"
(tramp-get-test-command v)
switch
(tramp-shell-quote-argument localname)))))
(defconst tramp-sunos-unames (regexp-opt '("SunOS 5.10" "SunOS 5.11"))
"Regexp to determine remote SunOS.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-find-executable
(vec progname dirlist &optional ignore-tilde ignore-path)
Adapt Tramp docstrings according to checkdoc * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 12:10:58 +00:00
"Search for PROGNAME in $PATH and all directories mentioned in DIRLIST.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
First arg VEC specifies the connection, PROGNAME is the program
to search for, and DIRLIST gives the list of directories to
search. If IGNORE-TILDE is non-nil, directory names starting
with \"~\" will be ignored. If IGNORE-PATH is non-nil, searches
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
only in DIRLIST.
Returns the absolute file name of PROGNAME, if found, and nil otherwise.
This function expects to be in the right *tramp* buffer."
(with-current-buffer (tramp-get-connection-buffer vec)
(let (result)
;; Check whether the executable is in $PATH. "which(1)" does not
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; report always a correct error code; therefore we check the
;; number of words it returns. "SunOS 5.10" (and maybe "SunOS
;; 5.11") have problems with this command, we disable the call
;; therefore.
(unless (or ignore-path
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(string-match-p
tramp-sunos-unames
(tramp-get-connection-property vec "uname" "")))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-send-command vec (format "which \\%s | wc -w" progname))
(goto-char (point-min))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(if (looking-at-p "^\\s-*1$")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq result (concat "\\" progname))))
(unless result
(when ignore-tilde
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
;; Remove all ~/foo directories from dirlist.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(let (newdl d)
(while dirlist
2020-01-24 13:41:44 +00:00
(setq d (car dirlist)
dirlist (cdr dirlist))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(unless (char-equal ?~ (aref d 0))
(setq newdl (cons d newdl))))
(setq dirlist (nreverse newdl))))
(tramp-send-command
vec
(format (concat "while read d; "
"do if test -x $d/%s && test -f $d/%s; "
"then echo tramp_executable $d/%s; "
"break; fi; done <<'%s'\n"
"%s\n%s")
progname progname progname
tramp-end-of-heredoc
Tramp requires Emacs 24.4 * doc/misc/tramp.texi (Frequently Asked Questions): Use `with-eval-after-load'. in example. * doc/misc/trampver.texi: Set variable emacsver. * lisp/net/tramp.el (tramp-send-string, tramp-call-process) (tramp-call-process-region, tramp-process-lines): * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes) (tramp-gvfs-handle-file-notify-add-watch) * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-notify-add-watch, tramp-find-executable) (tramp-set-remote-path) (tramp-open-connection-setup-interactive-shell) (tramp-maybe-open-connection, tramp-send-command): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process) (tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl): (tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'. * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-ftp.el: Use `with-eval-after-load'. * lisp/net/tramp-cmds.el (tramp-cleanup-connection) (tramp-cleanup-all-connections): Cancel timer. * lisp/net/tramp-compat.el (subr-x): Require. (default-toplevel-value): Don't make it a defalias. * lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'. Do not special handle `split-string'. * lisp/net/tramp.el: Require Emacs 24.4. (tramp-password-prompt-regexp): Use `password-word-equivalents'. (tramp-user-error): Use `user-error'. (tramp-replace-environment-variables): Use `substitute-env-vars'. (tramp-wait-for-regexp): Rearrange `with-current-buffer' call. (tramp-get-local-gid): Use `group-gid'. * lisp/net/trampver.el: Check for Emacs 24.4. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate) (tramp-test03-file-name-host-rules) (tramp-test03-file-name-method-rules): Don't check for `user-error'.
2019-06-28 14:32:12 +00:00
(string-join dirlist "\n")
tramp-end-of-heredoc))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(goto-char (point-max))
(when (search-backward "tramp_executable " nil t)
(skip-chars-forward "^ ")
(skip-chars-forward " ")
(setq result (buffer-substring (point) (point-at-eol)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
result)))
;; On hydra.nixos.org, the $PATH environment variable is too long to
;; send it. This is likely not due to PATH_MAX, but PIPE_BUF. We
;; check it, and use a temporary file in case of. See Bug#33781.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-set-remote-path (vec)
Adapt Tramp docstrings according to checkdoc * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 12:10:58 +00:00
"Set the remote environment PATH to existing directories.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
I.e., for each directory in `tramp-remote-path', it is tested
whether it exists and if so, it is added to the environment
variable PATH."
(let ((command
Tramp requires Emacs 24.4 * doc/misc/tramp.texi (Frequently Asked Questions): Use `with-eval-after-load'. in example. * doc/misc/trampver.texi: Set variable emacsver. * lisp/net/tramp.el (tramp-send-string, tramp-call-process) (tramp-call-process-region, tramp-process-lines): * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes) (tramp-gvfs-handle-file-notify-add-watch) * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-notify-add-watch, tramp-find-executable) (tramp-set-remote-path) (tramp-open-connection-setup-interactive-shell) (tramp-maybe-open-connection, tramp-send-command): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process) (tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl): (tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'. * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-ftp.el: Use `with-eval-after-load'. * lisp/net/tramp-cmds.el (tramp-cleanup-connection) (tramp-cleanup-all-connections): Cancel timer. * lisp/net/tramp-compat.el (subr-x): Require. (default-toplevel-value): Don't make it a defalias. * lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'. Do not special handle `split-string'. * lisp/net/tramp.el: Require Emacs 24.4. (tramp-password-prompt-regexp): Use `password-word-equivalents'. (tramp-user-error): Use `user-error'. (tramp-replace-environment-variables): Use `substitute-env-vars'. (tramp-wait-for-regexp): Rearrange `with-current-buffer' call. (tramp-get-local-gid): Use `group-gid'. * lisp/net/trampver.el: Check for Emacs 24.4. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate) (tramp-test03-file-name-host-rules) (tramp-test03-file-name-method-rules): Don't check for `user-error'.
2019-06-28 14:32:12 +00:00
(format
"PATH=%s && export PATH" (string-join (tramp-get-remote-path vec) ":")))
(pipe-buf
(with-tramp-connection-property vec "pipe-buf"
(tramp-send-command-and-read
vec
(format "getconf PIPE_BUF / 2>%s || echo 4096"
(tramp-get-remote-null-device vec))
'noerror)))
tmpfile chunk chunksize)
(tramp-message vec 5 "Setting $PATH environment variable")
(if (< (length command) pipe-buf)
(tramp-send-command vec command)
;; Use a temporary file. We cannot use `write-region' because
;; setting the remote path happens in the early connection
;; handshake, and not all external tools are determined yet.
(setq command (concat command "\n")
tmpfile (tramp-make-tramp-temp-file vec))
(while (not (string-empty-p command))
(setq chunksize (min (length command) (/ pipe-buf 2))
chunk (substring command 0 chunksize)
command (substring command chunksize))
(tramp-send-command vec (format
"printf \"%%b\" \"$*\" %s >>%s"
(tramp-shell-quote-argument chunk)
(tramp-shell-quote-argument tmpfile))))
(tramp-send-command vec (format ". %s" tmpfile))
(tramp-send-command vec (format "rm -f %s" tmpfile)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; ------------------------------------------------------------
;; -- Communication with external shell --
;; ------------------------------------------------------------
(defun tramp-find-file-exists-command (vec)
"Find a command on the remote host for checking if a file exists.
Here, we are looking for a command which has zero exit status if the
file exists and nonzero exit status otherwise."
(let ((existing "/")
2011-12-14 21:05:20 +00:00
(nonexistent
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-shell-quote-argument "/ this file does not exist "))
result)
;; The algorithm is as follows: we try a list of several commands.
;; For each command, we first run `$cmd /' -- this should return
;; true, as the root directory always exists. And then we run
;; `$cmd /this\ file\ does\ not\ exist ', hoping that the file indeed
;; does not exist. This should return false. We use the first
;; command we find that seems to work.
;; The list of commands to try is as follows:
;; `ls -d' This works on most systems, but NetBSD 1.4
;; has a bug: `ls' always returns zero exit
;; status, even for files which don't exist.
;; `test -e' Some Bourne shells have a `test' builtin
;; which does not know the `-e' option.
;; `/bin/test -e' For those, the `test' binary on disk normally
;; provides the option. Alas, the binary
;; is sometimes `/bin/test' and sometimes it's
;; `/usr/bin/test'.
;; `/usr/bin/test -e' In case `/bin/test' does not exist.
(unless (or
(ignore-errors
(and (setq result (format "%s -e" (tramp-get-test-command vec)))
(tramp-send-command-and-check
vec (format "%s %s" result existing))
(not (tramp-send-command-and-check
vec (format "%s %s" result nonexistent)))))
(ignore-errors
(and (setq result "/bin/test -e")
(tramp-send-command-and-check
vec (format "%s %s" result existing))
(not (tramp-send-command-and-check
vec (format "%s %s" result nonexistent)))))
(ignore-errors
(and (setq result "/usr/bin/test -e")
(tramp-send-command-and-check
vec (format "%s %s" result existing))
(not (tramp-send-command-and-check
vec (format "%s %s" result nonexistent)))))
(ignore-errors
(and (setq result (format "%s -d" (tramp-get-ls-command vec)))
(tramp-send-command-and-check
vec (format "%s %s" result existing))
(not (tramp-send-command-and-check
vec (format "%s %s" result nonexistent))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-error
vec 'file-error "Couldn't find command to check if file exists"))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
result))
(defun tramp-get-sh-extra-args (shell)
"Find extra args for SHELL."
(let ((alist tramp-sh-extra-args)
item extra-args)
(while (and alist (null extra-args))
(setq item (pop alist))
(when (string-match-p (car item) shell)
(setq extra-args (cdr item))))
extra-args))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-open-shell (vec shell)
Adapt Tramp docstrings according to checkdoc * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 12:10:58 +00:00
"Open shell SHELL."
;; Find arguments for this shell.
(with-tramp-progress-reporter
vec 5 (format-message "Opening remote shell `%s'" shell)
;; It is useful to set the prompt in the following command because
;; some people have a setting for $PS1 which /bin/sh doesn't know
;; about and thus /bin/sh will display a strange prompt. For
;; example, if $PS1 has "${CWD}" in the value, then ksh will
;; display the current working directory but /bin/sh will display
;; a dollar sign. The following command line sets $PS1 to a sane
;; value, and works under Bourne-ish shells as well as csh-like
;; shells. We also unset the variable $ENV because that is read
;; by some sh implementations (eg, bash when called as sh) on
;; startup; this way, we avoid the startup file clobbering $PS1.
;; $PROMPT_COMMAND is another way to set the prompt in /bin/bash,
;; it must be discarded as well. $HISTFILE is set according to
;; `tramp-histfile-override'. $TERM and $INSIDE_EMACS set here to
;; ensure they have the correct values when the shell starts, not
;; just processes run within the shell. (Which processes include
;; our initial probes to ensure the remote shell is usable.)
;; For the time being, we assume that all shells interpret -i as
;; interactive shell. Must be the last argument, because (for
;; example) bash expects long options first.
(tramp-send-command
vec (format
(concat
"exec env TERM='%s' INSIDE_EMACS='%s' "
"ENV=%s %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s -i")
tramp-terminal-type (tramp-inside-emacs)
(or (getenv-internal "ENV" tramp-remote-process-environment) "")
(if (stringp tramp-histfile-override)
(format "HISTFILE=%s"
(tramp-shell-quote-argument tramp-histfile-override))
(if tramp-histfile-override
"HISTFILE='' HISTFILESIZE=0 HISTSIZE=0"
""))
(tramp-shell-quote-argument tramp-end-of-output)
shell (or (tramp-get-sh-extra-args shell) ""))
t)
;; Check proper HISTFILE setting. We give up when not working.
(when (and (stringp tramp-histfile-override)
(file-name-directory tramp-histfile-override))
(tramp-barf-unless-okay
vec
(format
"(cd %s)"
(tramp-shell-quote-argument
(file-name-directory tramp-histfile-override)))
"`tramp-histfile-override' uses invalid file `%s'"
tramp-histfile-override))
(tramp-set-connection-property
(tramp-get-connection-process vec) "remote-shell" shell)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-find-shell (vec)
Adapt Tramp docstrings according to checkdoc * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 12:10:58 +00:00
"Open a shell on the remote host which groks tilde expansion."
;; If we are in `make-process', we don't need another shell.
(unless (tramp-get-connection-property vec "process-name" nil)
(with-current-buffer (tramp-get-buffer vec)
(let ((default-shell (tramp-get-method-parameter vec 'tramp-remote-shell))
shell)
(setq shell
(with-tramp-connection-property vec "remote-shell"
;; CCC: "root" does not exist always, see my QNAP
;; TS-459. Which check could we apply instead?
(tramp-send-command vec "echo ~root" t)
(if (or (string-match-p "^~root$" (buffer-string))
;; The default shell (ksh93) of OpenSolaris
;; and Solaris is buggy. We've got reports
;; for "SunOS 5.10" and "SunOS 5.11" so far.
(string-match-p
tramp-sunos-unames
(tramp-get-connection-property vec "uname" "")))
(or (tramp-find-executable
vec "bash" (tramp-get-remote-path vec) t t)
(tramp-find-executable
vec "ksh" (tramp-get-remote-path vec) t t)
;; Maybe it works at least for some other commands.
(prog1
default-shell
(tramp-message
vec 2
(concat
"Couldn't find a remote shell which groks tilde "
"expansion, using `%s'")
default-shell)))
default-shell)))
;; Open a new shell if needed.
(unless (string-equal shell default-shell)
(tramp-message
vec 5 "Starting remote shell `%s' for tilde expansion" shell)
(tramp-open-shell vec shell))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Utility functions.
(defun tramp-barf-if-no-shell-prompt (proc timeout &rest error-args)
"Wait for shell prompt and barf if none appears.
Looks at process PROC to see if a shell prompt appears in TIMEOUT
seconds. If not, it produces an error message with the given ERROR-ARGS."
(let ((vec (process-get proc 'vector)))
Remove byte compiler warnings, visible when compiling with `byte-compile-force-lexical-warnings' set to t. * net/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 "_". * net/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. * net/tramp-cache.el (tramp-flush-directory-property) (tramp-flush-connection-property, tramp-list-connections) (tramp-parse-connection-properties): Prefix unused arguments with "_". * net/tramp-compat.el (tramp-compat-make-temp-file): Rename FILENAME to F. * net/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 "_". * net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel): Prefix unused arguments with "_". * net/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. * net/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 "_". * net/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-15 14:29:08 +00:00
(condition-case nil
(tramp-wait-for-regexp
proc timeout
(format
"\\(%s\\|%s\\)\\'" shell-prompt-pattern tramp-shell-prompt-pattern))
(error
(delete-process proc)
(apply #'tramp-error-with-buffer
(tramp-get-connection-buffer vec) vec 'file-error error-args)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-open-connection-setup-interactive-shell (proc vec)
"Set up an interactive shell.
Mainly sets the prompt and the echo correctly. PROC is the shell
process to set up. VEC specifies the connection."
(let ((tramp-end-of-output tramp-initial-end-of-output)
(case-fold-search t))
Sync with Tramp repository * doc/misc/tramp.texi (Configuration): Note, that Tramp must be required prior changing its configuration. (Connection caching, Predefined connection information) (Remote shell setup): Fix typos. (Predefined connection information): Describe, how to overwrite parameters of `tramp-methods'. (Remote programs, Remote processes, Traces and Profiles): Simplify example. (Remote programs): Remove superfluous comment. * doc/misc/trampver.texi: Update release number. * lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun. (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it. (tramp-gvfs-handle-make-directory): Reimplement PARENTS handling, "gvfs-mkdir -p ..." does not work robust. (tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call. * lisp/net/tramp-sh.el (tramp-methods): Add `tramp-remote-shell-login' parameter where it fits. (tramp-get-remote-path): Use it. (tramp-make-copy-program-file-name): Fix quoting for "psftp" method. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-get-method-parameter): Replace argument METHOD by VEC. Check also for hits in `tramp-connection-properties'. Adapt docstring. (tramp-get-remote-tmpdir): Cache only the local name of tmpdir. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/trampver.el Update release number. * test/automated/tramp-tests.el (tramp--instrument-test-case): Add "^make-symbolic-link not supported$" to `debug-ignored-errors'. (tramp-test13-make-directory, tramp--test-adb-p) (tramp--test-smb-or-windows-nt-p): Simplify. (tramp--test-ftp-p, tramp--test-gvfs-p): New defuns. (tramp--test-special-characters): Fix docstring. Add gvfs and ftp tests. (tramp--test-utf8): Fix docstring.
2015-07-21 12:59:18 +00:00
(tramp-open-shell vec (tramp-get-method-parameter vec 'tramp-remote-shell))
(tramp-message vec 5 "Setting up remote shell environment")
;; Disable line editing.
(tramp-send-command vec "set +o vi +o emacs" t)
;; Dump option settings in the traces.
(when (>= tramp-verbose 9)
(tramp-send-command vec "set -o" t))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Disable echo expansion.
(tramp-send-command
vec "stty -inlcr -onlcr -echo kill '^U' erase '^H'" t)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Check whether the echo has really been disabled. Some
;; implementations, like busybox of embedded GNU/Linux, don't
;; support disabling.
(tramp-send-command vec "echo foo" t)
(with-current-buffer (process-buffer proc)
(goto-char (point-min))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(when (looking-at-p "echo foo")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-set-connection-property proc "remote-echo" t)
(tramp-message vec 5 "Remote echo still on. Ok.")
;; Make sure backspaces and their echo are enabled and no line
;; width magic interferes with them.
(tramp-send-command vec "stty icanon erase ^H cols 32767" t))))
(tramp-message vec 5 "Setting shell prompt")
(tramp-send-command
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
vec (format "PS1=%s PS2='' PS3='' PROMPT_COMMAND=''"
(tramp-shell-quote-argument tramp-end-of-output))
t)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Check whether the output of "uname -sr" has been changed. If
;; yes, this is a strong indication that we must expire all
;; connection properties. We start again with
;; `tramp-maybe-open-connection', it will be caught there.
(tramp-message vec 5 "Checking system information")
(let* ((old-uname (tramp-get-connection-property vec "uname" nil))
(uname
;; If we are in `make-process', we don't need to recompute.
(if (and old-uname
(tramp-get-connection-property vec "process-name" nil))
old-uname
(tramp-set-connection-property
vec "uname"
(tramp-send-command-and-read vec "echo \\\"`uname -sr`\\\"")))))
(when (and (stringp old-uname) (not (string-equal old-uname uname)))
(tramp-message
vec 3
"Connection reset, because remote host changed from `%s' to `%s'"
old-uname uname)
;; We want to keep the password.
(tramp-cleanup-connection vec t t)
(throw 'uname-changed (tramp-maybe-open-connection vec)))
;; Try to set up the coding system correctly.
;; CCC this can't be the right way to do it. Hm.
(tramp-message vec 5 "Determining coding system")
(with-current-buffer (process-buffer proc)
;; Use MULE to select the right EOL convention for communicating
;; with the process.
(let ((cs (or (and (memq 'utf-8-hfs (coding-system-list))
(string-prefix-p "Darwin" uname)
(cons 'utf-8-hfs 'utf-8-hfs))
(and (memq 'utf-8 (coding-system-list))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(string-match-p "utf-?8" (tramp-get-remote-locale vec))
(cons 'utf-8 'utf-8))
(process-coding-system proc)
(cons 'undecided 'undecided)))
cs-decode cs-encode)
(when (symbolp cs) (setq cs (cons cs cs)))
(setq cs-decode (or (car cs) 'undecided)
cs-encode (or (cdr cs) 'undecided)
cs-encode
(coding-system-change-eol-conversion
cs-encode (if (string-prefix-p "Darwin" uname) 'mac 'unix)))
(tramp-send-command vec "(echo foo ; echo bar)" t)
(goto-char (point-min))
(when (search-forward "\r" nil t)
(setq cs-decode (coding-system-change-eol-conversion cs-decode 'dos)))
(set-process-coding-system proc cs-decode cs-encode)
(tramp-message
vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode)))
;; Check whether the remote host suffers from buggy
;; `send-process-string'. This is known for FreeBSD (see comment
;; in `send_process', file process.c). I've tested sending 624
;; bytes successfully, sending 625 bytes failed. Emacs makes a
;; hack when this host type is detected locally. It cannot handle
;; remote hosts, though.
(with-tramp-connection-property proc "chunksize"
(cond
((and (integerp tramp-chunksize) (> tramp-chunksize 0))
tramp-chunksize)
(t
(tramp-message
vec 5 "Checking remote host type for `send-process-string' bug")
(if (string-match-p "FreeBSD\\|DragonFly" uname) 500 0))))
;; Set remote PATH variable.
(tramp-set-remote-path vec)
;; Search for a good shell before searching for a command which
;; checks if a file exists. This is done because Tramp wants to
;; use "test foo; echo $?" to check if various conditions hold,
;; and there are buggy /bin/sh implementations which don't execute
;; the "echo $?" part if the "test" part has an error. In
;; particular, the OpenSolaris /bin/sh is a problem. There are
;; also other problems with /bin/sh of OpenSolaris, like
;; redirection of stderr in function declarations, or changing
;; HISTFILE in place. Therefore, OpenSolaris' /bin/sh is replaced
;; by bash, when detected.
(tramp-find-shell vec)
;; Disable unexpected output.
(tramp-send-command
vec
(format "mesg n 2>%s; biff n 2>%s"
(tramp-get-remote-null-device vec)
(tramp-get-remote-null-device vec))
t)
;; IRIX64 bash expands "!" even when in single quotes. This
;; destroys our shell functions, we must disable it. See
;; <https://stackoverflow.com/questions/3291692/irix-bash-shell-expands-expression-in-single-quotes-yet-shouldnt>.
(when (string-prefix-p "IRIX64" uname)
(tramp-send-command vec "set +H" t))
;; Disable tab expansion.
(if (string-match-p "BSD\\|DragonFly\\|Darwin" uname)
(tramp-send-command vec "stty tabs" t)
(tramp-send-command vec "stty tab0" t))
;; Set utf8 encoding. Needed for macOS, for example. This is
;; non-POSIX, so we must expect errors on some systems.
(tramp-send-command
vec (concat "stty iutf8 2>" (tramp-get-remote-null-device vec)) t)
;; Set `remote-tty' process property.
(let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\"" 'noerror)))
(unless (zerop (length tty))
(process-put proc 'remote-tty tty)
(tramp-set-connection-property proc "remote-tty" tty)))
;; Dump stty settings in the traces.
(when (>= tramp-verbose 9)
(tramp-send-command vec "stty -a" t))
;; Set the environment.
(tramp-message vec 5 "Setting default environment")
(let (unset vars)
(dolist (item (reverse
(append `(,(tramp-get-remote-locale vec))
(copy-sequence tramp-remote-process-environment))))
(setq item (split-string item "=" 'omit))
Tramp requires Emacs 24.4 * doc/misc/tramp.texi (Frequently Asked Questions): Use `with-eval-after-load'. in example. * doc/misc/trampver.texi: Set variable emacsver. * lisp/net/tramp.el (tramp-send-string, tramp-call-process) (tramp-call-process-region, tramp-process-lines): * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes) (tramp-gvfs-handle-file-notify-add-watch) * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-notify-add-watch, tramp-find-executable) (tramp-set-remote-path) (tramp-open-connection-setup-interactive-shell) (tramp-maybe-open-connection, tramp-send-command): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process) (tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl): (tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'. * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-ftp.el: Use `with-eval-after-load'. * lisp/net/tramp-cmds.el (tramp-cleanup-connection) (tramp-cleanup-all-connections): Cancel timer. * lisp/net/tramp-compat.el (subr-x): Require. (default-toplevel-value): Don't make it a defalias. * lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'. Do not special handle `split-string'. * lisp/net/tramp.el: Require Emacs 24.4. (tramp-password-prompt-regexp): Use `password-word-equivalents'. (tramp-user-error): Use `user-error'. (tramp-replace-environment-variables): Use `substitute-env-vars'. (tramp-wait-for-regexp): Rearrange `with-current-buffer' call. (tramp-get-local-gid): Use `group-gid'. * lisp/net/trampver.el: Check for Emacs 24.4. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate) (tramp-test03-file-name-host-rules) (tramp-test03-file-name-method-rules): Don't check for `user-error'.
2019-06-28 14:32:12 +00:00
(setcdr item (string-join (cdr item) "="))
(if (and (stringp (cdr item)) (not (string-equal (cdr item) "")))
(push (format "%s %s" (car item) (cdr item)) vars)
(push (car item) unset)))
(when vars
(tramp-send-command
vec
(format
"while read var val; do export $var=\"$val\"; done <<'%s'\n%s\n%s"
tramp-end-of-heredoc
Tramp requires Emacs 24.4 * doc/misc/tramp.texi (Frequently Asked Questions): Use `with-eval-after-load'. in example. * doc/misc/trampver.texi: Set variable emacsver. * lisp/net/tramp.el (tramp-send-string, tramp-call-process) (tramp-call-process-region, tramp-process-lines): * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes) (tramp-gvfs-handle-file-notify-add-watch) * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-notify-add-watch, tramp-find-executable) (tramp-set-remote-path) (tramp-open-connection-setup-interactive-shell) (tramp-maybe-open-connection, tramp-send-command): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process) (tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl): (tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'. * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-ftp.el: Use `with-eval-after-load'. * lisp/net/tramp-cmds.el (tramp-cleanup-connection) (tramp-cleanup-all-connections): Cancel timer. * lisp/net/tramp-compat.el (subr-x): Require. (default-toplevel-value): Don't make it a defalias. * lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'. Do not special handle `split-string'. * lisp/net/tramp.el: Require Emacs 24.4. (tramp-password-prompt-regexp): Use `password-word-equivalents'. (tramp-user-error): Use `user-error'. (tramp-replace-environment-variables): Use `substitute-env-vars'. (tramp-wait-for-regexp): Rearrange `with-current-buffer' call. (tramp-get-local-gid): Use `group-gid'. * lisp/net/trampver.el: Check for Emacs 24.4. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate) (tramp-test03-file-name-host-rules) (tramp-test03-file-name-method-rules): Don't check for `user-error'.
2019-06-28 14:32:12 +00:00
(string-join vars "\n")
tramp-end-of-heredoc)
t))
(when unset
(tramp-send-command
Tramp requires Emacs 24.4 * doc/misc/tramp.texi (Frequently Asked Questions): Use `with-eval-after-load'. in example. * doc/misc/trampver.texi: Set variable emacsver. * lisp/net/tramp.el (tramp-send-string, tramp-call-process) (tramp-call-process-region, tramp-process-lines): * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes) (tramp-gvfs-handle-file-notify-add-watch) * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-notify-add-watch, tramp-find-executable) (tramp-set-remote-path) (tramp-open-connection-setup-interactive-shell) (tramp-maybe-open-connection, tramp-send-command): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process) (tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl): (tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'. * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-ftp.el: Use `with-eval-after-load'. * lisp/net/tramp-cmds.el (tramp-cleanup-connection) (tramp-cleanup-all-connections): Cancel timer. * lisp/net/tramp-compat.el (subr-x): Require. (default-toplevel-value): Don't make it a defalias. * lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'. Do not special handle `split-string'. * lisp/net/tramp.el: Require Emacs 24.4. (tramp-password-prompt-regexp): Use `password-word-equivalents'. (tramp-user-error): Use `user-error'. (tramp-replace-environment-variables): Use `substitute-env-vars'. (tramp-wait-for-regexp): Rearrange `with-current-buffer' call. (tramp-get-local-gid): Use `group-gid'. * lisp/net/trampver.el: Check for Emacs 24.4. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate) (tramp-test03-file-name-host-rules) (tramp-test03-file-name-method-rules): Don't check for `user-error'.
2019-06-28 14:32:12 +00:00
vec (format "unset %s" (string-join unset " ")) t)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Old text from documentation of tramp-methods:
;; Using a uuencode/uudecode inline method is discouraged, please use one
;; of the base64 methods instead since base64 encoding is much more
;; reliable and the commands are more standardized between the different
;; Unix versions. But if you can't use base64 for some reason, please
;; note that the default uudecode command does not work well for some
;; Unices, in particular AIX and Irix. For AIX, you might want to use
;; the following command for uudecode:
;;
;; sed '/^begin/d;/^[` ]$/d;/^end/d' | iconv -f uucode -t ISO8859-1
;;
;; For Irix, no solution is known yet.
(autoload 'uudecode-decode-region "uudecode")
(defconst tramp-local-coding-commands
`((b64 base64-encode-region base64-decode-region)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(uu tramp-uuencode-region uudecode-decode-region)
(pack ,tramp-perl-pack ,tramp-perl-unpack))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"List of local coding commands for inline transfer.
Each item is a list that looks like this:
\(FORMAT ENCODING DECODING)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
FORMAT is a symbol describing the encoding/decoding format. It can be
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
`b64' for base64 encoding, `uu' for uu encoding, or `pack' for simple packing.
ENCODING and DECODING can be strings, giving commands, or symbols,
giving functions. If they are strings, then they can contain
the \"%s\" format specifier. If that specifier is present, the input
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
file name will be put into the command line at that spot. If the
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
specifier is not present, the input should be read from standard
input.
If they are functions, they will be called with two arguments, start
and end of region, and are expected to replace the region contents
with the encoded or decoded results, respectively.")
(defconst tramp-remote-coding-commands
'((b64 "base64" "base64 -d -i")
;; "-i" is more robust with older base64 from GNU coreutils.
;; However, I don't know whether all base64 versions do supports
;; this option.
(b64 "base64" "base64 -d")
(b64 "openssl enc -base64" "openssl enc -d -base64")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(b64 "mimencode -b" "mimencode -u -b")
(b64 "mmencode -b" "mmencode -u -b")
(b64 "recode data..base64" "recode base64..data")
(b64 tramp-perl-encode-with-module tramp-perl-decode-with-module)
(b64 tramp-perl-encode tramp-perl-decode)
;; These are painfully slow, so we put them on the end.
(b64 tramp-hexdump-awk-encode tramp-awk-decode)
(b64 tramp-od-awk-encode tramp-awk-decode)
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
(uu "uuencode xxx" "uudecode -o /dev/stdout" "test -c /dev/stdout")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(uu "uuencode xxx" "uudecode -o -")
(uu "uuencode xxx" "uudecode -p")
(uu "uuencode xxx" tramp-uudecode)
(pack tramp-perl-pack tramp-perl-unpack))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"List of remote coding commands for inline transfer.
Each item is a list that looks like this:
\(FORMAT ENCODING DECODING [TEST])
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
FORMAT is a symbol describing the encoding/decoding format. It can be
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
`b64' for base64 encoding, `uu' for uu encoding, or `pack' for simple packing.
ENCODING and DECODING can be strings, giving commands, or symbols,
giving variables. If they are strings, then they can contain
the \"%s\" format specifier. If that specifier is present, the input
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
file name will be put into the command line at that spot. If the
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
specifier is not present, the input should be read from standard
input.
If they are variables, this variable is a string containing a
Perl or Shell implementation for this functionality. This
program will be transferred to the remote host, and it is
available as shell function with the same name. A \"%t\" format
specifier in the variable value denotes a temporary file.
\"%a\", \"%h\" and \"%o\" format specifiers are replaced by the
respective `awk', `hexdump' and `od' commands. \"%n\" is
replaced by \"2>/dev/null\".
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
The optional TEST command can be used for further tests, whether
ENCODING and DECODING are applicable.")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-find-inline-encoding (vec)
"Find an inline transfer encoding that works.
Goes through the list `tramp-local-coding-commands' and
`tramp-remote-coding-commands'."
(save-excursion
(let ((local-commands tramp-local-coding-commands)
(magic "xyzzy")
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
(p (tramp-get-connection-process vec))
loc-enc loc-dec rem-enc rem-dec rem-test litem ritem found)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(while (and local-commands (not found))
(setq litem (pop local-commands))
(catch 'wont-work-local
(let ((format (nth 0 litem))
(remote-commands tramp-remote-coding-commands))
2020-01-24 13:41:44 +00:00
(setq loc-enc (nth 1 litem)
loc-dec (nth 2 litem))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; If the local encoder or decoder is a string, the
;; corresponding command has to work locally.
(if (not (stringp loc-enc))
(tramp-message
vec 5 "Checking local encoding function `%s'" loc-enc)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-message
vec 5 "Checking local encoding command `%s' for sanity" loc-enc)
(unless (stringp (setq loc-enc (tramp-expand-script nil loc-enc)))
(throw 'wont-work-local nil))
(unless (zerop (tramp-call-local-coding-command loc-enc nil nil))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(throw 'wont-work-local nil)))
(if (not (stringp loc-dec))
(tramp-message
vec 5 "Checking local decoding function `%s'" loc-dec)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-message
vec 5 "Checking local decoding command `%s' for sanity" loc-dec)
(unless (stringp (setq loc-dec (tramp-expand-script nil loc-dec)))
(throw 'wont-work-local nil))
(unless (zerop (tramp-call-local-coding-command loc-dec nil nil))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(throw 'wont-work-local nil)))
;; Search for remote coding commands with the same format
(while (and remote-commands (not found))
(setq ritem (pop remote-commands))
(catch 'wont-work-remote
(when (equal format (nth 0 ritem))
2020-01-24 13:41:44 +00:00
(setq rem-enc (nth 1 ritem)
rem-dec (nth 2 ritem)
rem-test (nth 3 ritem))
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
;; Check the remote test command if exists.
(when (stringp rem-test)
(tramp-message
vec 5 "Checking remote test command `%s'" rem-test)
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
(unless (tramp-send-command-and-check vec rem-test t)
(throw 'wont-work-remote nil)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Check if remote encoding and decoding commands can be
;; called remotely with null input and output. This makes
;; sure there are no syntax errors and the command is really
;; found. Note that we do not redirect stdout to /dev/null,
;; for two reasons: when checking the decoding command, we
;; actually check the output it gives. And also, when
;; redirecting "mimencode" output to /dev/null, then as root
;; it might change the permissions of /dev/null!
(unless (stringp rem-enc)
(let ((name (symbol-name rem-enc))
(value (symbol-value rem-enc)))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(while (string-match "-" name)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq name (replace-match "_" nil t name)))
(tramp-maybe-send-script vec value name)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq rem-enc name)))
(tramp-message
vec 5
"Checking remote encoding command `%s' for sanity" rem-enc)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(unless (tramp-send-command-and-check
vec
(format
"%s <%s" rem-enc (tramp-get-remote-null-device vec))
t)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(throw 'wont-work-remote nil))
(unless (stringp rem-dec)
(let ((name (symbol-name rem-dec))
(value (symbol-value rem-dec)))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(while (string-match "-" name)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq name (replace-match "_" nil t name)))
(tramp-maybe-send-script vec value name)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq rem-dec name)))
(tramp-message
vec 5
"Checking remote decoding command `%s' for sanity" rem-dec)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(unless (tramp-send-command-and-check
vec
(format "echo %s | %s | %s" magic rem-enc rem-dec)
t)
(throw 'wont-work-remote nil))
(with-current-buffer (tramp-get-connection-buffer vec)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(goto-char (point-min))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(unless (looking-at-p (regexp-quote magic))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(throw 'wont-work-remote nil)))
;; `rem-enc' and `rem-dec' could be a string meanwhile.
2020-01-24 13:41:44 +00:00
(setq rem-enc (nth 1 ritem)
rem-dec (nth 2 ritem)
found t)))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(when found
;; Set connection properties. Since the commands are risky
;; (due to output direction), we cache them in the process cache.
(tramp-message vec 5 "Using local encoding `%s'" loc-enc)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(tramp-set-connection-property p "local-encoding" loc-enc)
(tramp-message vec 5 "Using local decoding `%s'" loc-dec)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(tramp-set-connection-property p "local-decoding" loc-dec)
(tramp-message vec 5 "Using remote encoding `%s'" rem-enc)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(tramp-set-connection-property p "remote-encoding" rem-enc)
(tramp-message vec 5 "Using remote decoding `%s'" rem-dec)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(tramp-set-connection-property p "remote-decoding" rem-dec)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-call-local-coding-command (cmd input output)
"Call the local encoding or decoding command.
If CMD contains \"%s\", provide input file INPUT there in command.
Otherwise, INPUT is passed via standard input.
INPUT can also be nil which means `null-device'.
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
OUTPUT can be a string (which specifies a file name), or t (which
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
means standard output and thus the current buffer), or nil (which
means discard it)."
(tramp-call-process
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
nil tramp-encoding-shell
(when (and input (not (tramp-compat-string-search "%s" cmd))) input)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(if (eq output t) t nil)
nil
tramp-encoding-command-switch
(concat
(if (tramp-compat-string-search "%s" cmd) (format cmd input) cmd)
(if (stringp output) (concat " >" output) ""))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defconst tramp-inline-compress-commands
'(;; Suppress warnings about obsolete environment variable GZIP.
("env GZIP= gzip" "env GZIP= gzip -d")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
("bzip2" "bzip2 -d")
("xz" "xz -d")
("zstd --rm" "zstd -d --rm")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
("compress" "compress -d"))
"List of compress and decompress commands for inline transfer.
Each item is a list that looks like this:
\(COMPRESS DECOMPRESS)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
COMPRESS or DECOMPRESS are strings with the respective commands.")
(defun tramp-find-inline-compress (vec)
"Find an inline transfer compress command that works.
Goes through the list `tramp-inline-compress-commands'."
(save-excursion
(let ((commands tramp-inline-compress-commands)
(magic "xyzzy")
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
(p (tramp-get-connection-process vec))
item compress decompress found)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(while (and commands (not found))
(catch 'next
(setq item (pop commands)
compress (nth 0 item)
decompress (nth 1 item))
(tramp-message
vec 5
"Checking local compress commands `%s', `%s' for sanity"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
compress decompress)
(with-temp-buffer
(unless (zerop
(tramp-call-local-coding-command
(format
"echo %s | %s | %s" magic
;; Windows shells need the program file name
;; after the pipe symbol be quoted if they use
;; forward slashes as directory separators.
(mapconcat
#'tramp-unquote-shell-quote-argument
(split-string compress) " ")
(mapconcat
#'tramp-unquote-shell-quote-argument
(split-string decompress) " "))
nil t))
(throw 'next nil))
(goto-char (point-min))
(unless (looking-at-p (regexp-quote magic))
(throw 'next nil)))
(tramp-message
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
vec 5
"Checking remote compress commands `%s', `%s' for sanity"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
compress decompress)
(unless (tramp-send-command-and-check
vec (format "echo %s | %s | %s" magic compress decompress) t)
(throw 'next nil))
2019-07-13 11:34:33 +00:00
(with-current-buffer (tramp-get-buffer vec)
(goto-char (point-min))
(unless (looking-at-p (regexp-quote magic))
2019-07-13 11:34:33 +00:00
(throw 'next nil)))
(setq found t)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Did we find something?
(if found
(progn
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
;; Set connection properties. Since the commands are
;; risky (due to output direction), we cache them in the
;; process cache.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-message
vec 5 "Using inline transfer compress command `%s'" compress)
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
(tramp-set-connection-property p "inline-compress" compress)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-message
vec 5 "Using inline transfer decompress command `%s'" decompress)
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
(tramp-set-connection-property p "inline-decompress" decompress))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Sync with Tramp 2.2.6-pre. * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind `print-length' and `print-level' to nil, in order to avoid truncation. Reported by Christopher Schmidt <christopher@ristopher.com>. * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process. * net/tramp-compat.el (tramp-compat-condition-case-unless-debug): New defmacro. (tramp-compat-copy-directory): Add optional argument COPY-CONTENTS. It is not handled yet. * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring. (tramp-ftp-file-name-p): Simplify. * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): * net/tramp-gw.el (tramp-gw-open-connection): Add hop to connection vector. * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring. (tramp-methods): Do not use `tramp-password-end-of-line'. (tramp-completion-function-alist-putty): Handle UNIX case. (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin". (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat) Return uid and gid as real numbers. They could run out of integer range on cygwin. (tramp-do-copy-or-rename-file-out-of-band): Better trace format. (tramp-sh-handle-expand-file-name): Handle hops. (tramp-open-connection-setup-interactive-shell): Use `tramp-cleanup'. Move check for busyboxes ... (tramp-find-shell): ... here. Simplify implementation. Set "remote-shell" property also for alternative shells. (tramp-remote-coding-commands): Check "test -c /dev/stdout". If failing, a regular file would be written otherwise. Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>. (tramp-find-inline-encoding): Cache the coding commands in the process cache. Apply test command on the remote side, if defined. (tramp-find-inline-compress): Cache the compress commands in the process cache. (tramp-compute-multi-hops): Save `tramp-default-proxies-alist' when requested. Handle hops. (tramp-current-connection): New defvar. (tramp-maybe-open-connection): Use `tramp-cleanup'. Throw `suppress', if there was a failed connection shortly before. Handle user interrupt. (Bug#10187) (tramp-get-inline-compress, tramp-get-inline-coding): Read connection properties from the process cache. * net/tramp-smb.el (tramp-smb-server-version) (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar): New defconsts. (tramp-smb-prompt): Extend for powershell prompt. (tramp-smb-file-name-handler-alist): Add handlers for `process-file', `shell-command' and `start-file-process'. (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): New defcustoms. (tramp-smb-file-name-p): Simplify. (tramp-smb-action-with-tar, tramp-smb-handle-process-file) (tramp-smb-kill-winexe-function, tramp-smb-call-winexe) (tramp-smb-shell-quote-argument): New defuns. (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument. Implement using "tar". By this, time-stamps are preserved. (tramp-smb-handle-copy-file): Handle also the case of directories. (tramp-smb-do-file-attributes-with-stat) (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities): Use `tramp-get-connection-buffer'). (tramp-smb-handle-rename-file): Use "rename", when source and target are on the same share. (tramp-smb-maybe-open-connection): Handle wrong passwords. Use `tramp-smb-server-version'. (tramp-smb-wait-for-output): Remove prompt. * net/tramp.el (top): Require 'cl. (tramp-methods, tramp-rsh-end-of-line): Remove `tramp-password-end-of-line' from docstring. (tramp-save-ad-hoc-proxies): New defcustom. (tramp-completion-function-alist): Adapt docstring. (tramp-default-password-end-of-line): Remove defcustom. (tramp-shell-prompt-pattern): Allow "[]" style prompts. (Bug#11065) (tramp-user-regexp, tramp-file-name-regexp-unified) (tramp-file-name-regexp-url): Extend regexp by hop separator. (tramp-postfix-hop-format, tramp-postfix-hop-regexp) (tramp-remote-file-name-spec-regexp): New defconst. (tramp-file-name-structure): Extend structure for hops. (tramp-get-method-parameter): Move up. (tramp-file-name-p, tramp-dissect-file-name) (with-parsed-tramp-file-name): Handle hops. (tramp-file-name-hop): New defun. (tramp-make-tramp-file-name): New optional arg HOP. (tramp-message-show-progress-reporter-message): New defvar. (tramp-with-progress-reporter): Use it. We cannot use `tramp-message-show-message' here, because this suppresses also error buffers. (tramp-error-with-buffer): Suppress buffer view, if `tramp-message-show-message' is nil. Use `tramp-get-connection-buffer'. (tramp-cleanup): New defun. (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'. (tramp-file-name-handler): If `debug-on-error' is set, propagate an error unchanged. (tramp-completion-handle-file-name-all-completions): Handle hops. Fix an error when called from ido. (tramp-completion-dissect-file-name): Use better local variable name. Add hop to the vector. (tramp-handle-insert-file-contents): Use progress-reporter for the whole scenario. (tramp-action-password): Let-bind `enable-recursive-minibuffers' to `t'. (tramp-check-for-regexp): Simplify search. (tramp-enter-password): Remove it. Move implementation ... (tramp-action-password): ... here. (tramp-mode-string-to-int, tramp-local-host-p) (tramp-make-tramp-temp-file, tramp-read-passwd) (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff): Set tramp-autoload cookie. * net/trampver.el: Update release number. * net/tramp.el (tramp-set-completion-function): Fix docstring. (tramp-parse-group, tramp-parse-file) (tramp-parse-shostkeys-sknownhosts): New defuns. (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts) (tramp-parse-shosts-group, tramp-parse-sconfig) (tramp-parse-sconfig-group, tramp-parse-shostkeys) (tramp-parse-sknownhosts, tramp-parse-hosts) (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc): Use them. (tramp-parse-passwd-group, tramp-parse-netrc-group) (tramp-parse-putty-group): Don't narrow. (tramp-parse-putty): Make a loop. (tramp-file-name-handler): Catch the `suppress' signal.
2012-06-11 10:30:07 +00:00
(tramp-set-connection-property p "inline-compress" nil)
(tramp-set-connection-property p "inline-decompress" nil)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-message
vec 2 "Couldn't find an inline transfer compress command")))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-ssh-controlmaster-options (vec)
"Return the Control* arguments of the local ssh."
(cond
;; No options to be computed.
((or (null tramp-use-ssh-controlmaster-options)
Sync with Tramp repository * doc/misc/tramp.texi (Configuration): Note, that Tramp must be required prior changing its configuration. (Connection caching, Predefined connection information) (Remote shell setup): Fix typos. (Predefined connection information): Describe, how to overwrite parameters of `tramp-methods'. (Remote programs, Remote processes, Traces and Profiles): Simplify example. (Remote programs): Remove superfluous comment. * doc/misc/trampver.texi: Update release number. * lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun. (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it. (tramp-gvfs-handle-make-directory): Reimplement PARENTS handling, "gvfs-mkdir -p ..." does not work robust. (tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call. * lisp/net/tramp-sh.el (tramp-methods): Add `tramp-remote-shell-login' parameter where it fits. (tramp-get-remote-path): Use it. (tramp-make-copy-program-file-name): Fix quoting for "psftp" method. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-get-method-parameter): Replace argument METHOD by VEC. Check also for hits in `tramp-connection-properties'. Adapt docstring. (tramp-get-remote-tmpdir): Cache only the local name of tmpdir. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/trampver.el Update release number. * test/automated/tramp-tests.el (tramp--instrument-test-case): Add "^make-symbolic-link not supported$" to `debug-ignored-errors'. (tramp-test13-make-directory, tramp--test-adb-p) (tramp--test-smb-or-windows-nt-p): Simplify. (tramp--test-ftp-p, tramp--test-gvfs-p): New defuns. (tramp--test-special-characters): Fix docstring. Add gvfs and ftp tests. (tramp--test-utf8): Fix docstring.
2015-07-21 12:59:18 +00:00
(null (assoc "%c" (tramp-get-method-parameter vec 'tramp-login-args))))
"")
;; There is already a value to be used.
((stringp tramp-ssh-controlmaster-options) tramp-ssh-controlmaster-options)
;; Determine the options.
(t (setq tramp-ssh-controlmaster-options "")
(let ((case-fold-search t))
(ignore-errors
(when (executable-find "ssh")
Require method in remote file name syntax * lisp/minibuffer.el (completion--nth-completion): Do not bind `non-essential'. * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Do not call `tramp-check-proper-method-and-host'. * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Better traces. (tramp-maybe-open-connection): Do not use argument for ´tramp-completion-mode-p'. * lisp/net/tramp.el (tramp-default-method-marker): New defconst. (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): Use `eq' instead of `eqal'. (tramp-method-regexp, tramp-domain-regexp) (tramp-remote-file-name-spec-regexp) (tramp-file-name-regexp-unified) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate): Adapt regexp. (tramp-completion-file-name-handler-alist) (tramp-run-real-handler): Autoload them. (tramp-find-method): Handle `tramp-default-method-marker'. (tramp-check-proper-method-and-host) (tramp-completion-run-real-handler): Remove them. (tramp-error-with-buffer, tramp-connectable-p): Do not use argument for ´tramp-completion-mode-p'. (tramp-find-foreign-file-name-handler): Remove COMPLETION argument. Do not apply heuristic for completion. (tramp-file-name-handler): Do not modify `non-essential'. (tramp-completion-file-name-handler): Change implementation. (tramp-autoload-file-name-handler) (tramp-completion-handle-file-name-all-completions): Call `tramp-run-real-handler'. (tramp-completion-mode-p): Do not autoload. Remove argument. Do not apply heuristic for completion. (tramp-completion-dissect-file-name): Simplify implementation. (tramp-handle-file-name-as-directory): Call `tramp-connectable-p'. * test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax) (tramp-test02-file-name-dissect) (tramp-test03-file-name-defaults) (tramp-test06-directory-file-name): Adapt to the new syntax. (tramp-test11-copy-file, tramp-test12-rename-file) (tramp--test-check-files): Deactivate temporarily tests with quoted file names. (tramp-test16-directory-files, tramp-test17-insert-directory): Adapt tests. (tramp-test24-file-name-completion): Do not check for completion mode. (tramp-test31-make-auto-save-file-name): Deactivate temporarily two tests.
2017-03-13 17:05:59 +00:00
(with-tramp-progress-reporter
vec 4 "Computing ControlMaster options"
(with-temp-buffer
Require method in remote file name syntax * lisp/minibuffer.el (completion--nth-completion): Do not bind `non-essential'. * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Do not call `tramp-check-proper-method-and-host'. * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Better traces. (tramp-maybe-open-connection): Do not use argument for ´tramp-completion-mode-p'. * lisp/net/tramp.el (tramp-default-method-marker): New defconst. (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): Use `eq' instead of `eqal'. (tramp-method-regexp, tramp-domain-regexp) (tramp-remote-file-name-spec-regexp) (tramp-file-name-regexp-unified) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate): Adapt regexp. (tramp-completion-file-name-handler-alist) (tramp-run-real-handler): Autoload them. (tramp-find-method): Handle `tramp-default-method-marker'. (tramp-check-proper-method-and-host) (tramp-completion-run-real-handler): Remove them. (tramp-error-with-buffer, tramp-connectable-p): Do not use argument for ´tramp-completion-mode-p'. (tramp-find-foreign-file-name-handler): Remove COMPLETION argument. Do not apply heuristic for completion. (tramp-file-name-handler): Do not modify `non-essential'. (tramp-completion-file-name-handler): Change implementation. (tramp-autoload-file-name-handler) (tramp-completion-handle-file-name-all-completions): Call `tramp-run-real-handler'. (tramp-completion-mode-p): Do not autoload. Remove argument. Do not apply heuristic for completion. (tramp-completion-dissect-file-name): Simplify implementation. (tramp-handle-file-name-as-directory): Call `tramp-connectable-p'. * test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax) (tramp-test02-file-name-dissect) (tramp-test03-file-name-defaults) (tramp-test06-directory-file-name): Adapt to the new syntax. (tramp-test11-copy-file, tramp-test12-rename-file) (tramp--test-check-files): Deactivate temporarily tests with quoted file names. (tramp-test16-directory-files, tramp-test17-insert-directory): Adapt tests. (tramp-test24-file-name-completion): Do not check for completion mode. (tramp-test31-make-auto-save-file-name): Deactivate temporarily two tests.
2017-03-13 17:05:59 +00:00
(tramp-call-process vec "ssh" nil t nil "-o" "ControlMaster")
(goto-char (point-min))
(when (search-forward-regexp "missing.+argument" nil t)
Require method in remote file name syntax * lisp/minibuffer.el (completion--nth-completion): Do not bind `non-essential'. * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Do not call `tramp-check-proper-method-and-host'. * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Better traces. (tramp-maybe-open-connection): Do not use argument for ´tramp-completion-mode-p'. * lisp/net/tramp.el (tramp-default-method-marker): New defconst. (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): Use `eq' instead of `eqal'. (tramp-method-regexp, tramp-domain-regexp) (tramp-remote-file-name-spec-regexp) (tramp-file-name-regexp-unified) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate): Adapt regexp. (tramp-completion-file-name-handler-alist) (tramp-run-real-handler): Autoload them. (tramp-find-method): Handle `tramp-default-method-marker'. (tramp-check-proper-method-and-host) (tramp-completion-run-real-handler): Remove them. (tramp-error-with-buffer, tramp-connectable-p): Do not use argument for ´tramp-completion-mode-p'. (tramp-find-foreign-file-name-handler): Remove COMPLETION argument. Do not apply heuristic for completion. (tramp-file-name-handler): Do not modify `non-essential'. (tramp-completion-file-name-handler): Change implementation. (tramp-autoload-file-name-handler) (tramp-completion-handle-file-name-all-completions): Call `tramp-run-real-handler'. (tramp-completion-mode-p): Do not autoload. Remove argument. Do not apply heuristic for completion. (tramp-completion-dissect-file-name): Simplify implementation. (tramp-handle-file-name-as-directory): Call `tramp-connectable-p'. * test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax) (tramp-test02-file-name-dissect) (tramp-test03-file-name-defaults) (tramp-test06-directory-file-name): Adapt to the new syntax. (tramp-test11-copy-file, tramp-test12-rename-file) (tramp--test-check-files): Deactivate temporarily tests with quoted file names. (tramp-test16-directory-files, tramp-test17-insert-directory): Adapt tests. (tramp-test24-file-name-completion): Do not check for completion mode. (tramp-test31-make-auto-save-file-name): Deactivate temporarily two tests.
2017-03-13 17:05:59 +00:00
(setq tramp-ssh-controlmaster-options
"-o ControlMaster=auto")))
(unless (zerop (length tramp-ssh-controlmaster-options))
(with-temp-buffer
;; We use a non-existing IP address, in order to
;; avoid useless connections, and DNS timeouts.
;; Setting ConnectTimeout is needed since OpenSSH 7.
Require method in remote file name syntax * lisp/minibuffer.el (completion--nth-completion): Do not bind `non-essential'. * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Do not call `tramp-check-proper-method-and-host'. * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Better traces. (tramp-maybe-open-connection): Do not use argument for ´tramp-completion-mode-p'. * lisp/net/tramp.el (tramp-default-method-marker): New defconst. (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): Use `eq' instead of `eqal'. (tramp-method-regexp, tramp-domain-regexp) (tramp-remote-file-name-spec-regexp) (tramp-file-name-regexp-unified) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate): Adapt regexp. (tramp-completion-file-name-handler-alist) (tramp-run-real-handler): Autoload them. (tramp-find-method): Handle `tramp-default-method-marker'. (tramp-check-proper-method-and-host) (tramp-completion-run-real-handler): Remove them. (tramp-error-with-buffer, tramp-connectable-p): Do not use argument for ´tramp-completion-mode-p'. (tramp-find-foreign-file-name-handler): Remove COMPLETION argument. Do not apply heuristic for completion. (tramp-file-name-handler): Do not modify `non-essential'. (tramp-completion-file-name-handler): Change implementation. (tramp-autoload-file-name-handler) (tramp-completion-handle-file-name-all-completions): Call `tramp-run-real-handler'. (tramp-completion-mode-p): Do not autoload. Remove argument. Do not apply heuristic for completion. (tramp-completion-dissect-file-name): Simplify implementation. (tramp-handle-file-name-as-directory): Call `tramp-connectable-p'. * test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax) (tramp-test02-file-name-dissect) (tramp-test03-file-name-defaults) (tramp-test06-directory-file-name): Adapt to the new syntax. (tramp-test11-copy-file, tramp-test12-rename-file) (tramp--test-check-files): Deactivate temporarily tests with quoted file names. (tramp-test16-directory-files, tramp-test17-insert-directory): Adapt tests. (tramp-test24-file-name-completion): Do not check for completion mode. (tramp-test31-make-auto-save-file-name): Deactivate temporarily two tests.
2017-03-13 17:05:59 +00:00
(tramp-call-process
vec "ssh" nil t nil
"-o" "ConnectTimeout=1" "-o" "ControlPath=%C" "0.0.0.1")
Require method in remote file name syntax * lisp/minibuffer.el (completion--nth-completion): Do not bind `non-essential'. * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Do not call `tramp-check-proper-method-and-host'. * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Better traces. (tramp-maybe-open-connection): Do not use argument for ´tramp-completion-mode-p'. * lisp/net/tramp.el (tramp-default-method-marker): New defconst. (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): Use `eq' instead of `eqal'. (tramp-method-regexp, tramp-domain-regexp) (tramp-remote-file-name-spec-regexp) (tramp-file-name-regexp-unified) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate): Adapt regexp. (tramp-completion-file-name-handler-alist) (tramp-run-real-handler): Autoload them. (tramp-find-method): Handle `tramp-default-method-marker'. (tramp-check-proper-method-and-host) (tramp-completion-run-real-handler): Remove them. (tramp-error-with-buffer, tramp-connectable-p): Do not use argument for ´tramp-completion-mode-p'. (tramp-find-foreign-file-name-handler): Remove COMPLETION argument. Do not apply heuristic for completion. (tramp-file-name-handler): Do not modify `non-essential'. (tramp-completion-file-name-handler): Change implementation. (tramp-autoload-file-name-handler) (tramp-completion-handle-file-name-all-completions): Call `tramp-run-real-handler'. (tramp-completion-mode-p): Do not autoload. Remove argument. Do not apply heuristic for completion. (tramp-completion-dissect-file-name): Simplify implementation. (tramp-handle-file-name-as-directory): Call `tramp-connectable-p'. * test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax) (tramp-test02-file-name-dissect) (tramp-test03-file-name-defaults) (tramp-test06-directory-file-name): Adapt to the new syntax. (tramp-test11-copy-file, tramp-test12-rename-file) (tramp--test-check-files): Deactivate temporarily tests with quoted file names. (tramp-test16-directory-files, tramp-test17-insert-directory): Adapt tests. (tramp-test24-file-name-completion): Do not check for completion mode. (tramp-test31-make-auto-save-file-name): Deactivate temporarily two tests.
2017-03-13 17:05:59 +00:00
(goto-char (point-min))
(setq tramp-ssh-controlmaster-options
(concat tramp-ssh-controlmaster-options
Require method in remote file name syntax * lisp/minibuffer.el (completion--nth-completion): Do not bind `non-essential'. * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Do not call `tramp-check-proper-method-and-host'. * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Better traces. (tramp-maybe-open-connection): Do not use argument for ´tramp-completion-mode-p'. * lisp/net/tramp.el (tramp-default-method-marker): New defconst. (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): Use `eq' instead of `eqal'. (tramp-method-regexp, tramp-domain-regexp) (tramp-remote-file-name-spec-regexp) (tramp-file-name-regexp-unified) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate): Adapt regexp. (tramp-completion-file-name-handler-alist) (tramp-run-real-handler): Autoload them. (tramp-find-method): Handle `tramp-default-method-marker'. (tramp-check-proper-method-and-host) (tramp-completion-run-real-handler): Remove them. (tramp-error-with-buffer, tramp-connectable-p): Do not use argument for ´tramp-completion-mode-p'. (tramp-find-foreign-file-name-handler): Remove COMPLETION argument. Do not apply heuristic for completion. (tramp-file-name-handler): Do not modify `non-essential'. (tramp-completion-file-name-handler): Change implementation. (tramp-autoload-file-name-handler) (tramp-completion-handle-file-name-all-completions): Call `tramp-run-real-handler'. (tramp-completion-mode-p): Do not autoload. Remove argument. Do not apply heuristic for completion. (tramp-completion-dissect-file-name): Simplify implementation. (tramp-handle-file-name-as-directory): Call `tramp-connectable-p'. * test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax) (tramp-test02-file-name-dissect) (tramp-test03-file-name-defaults) (tramp-test06-directory-file-name): Adapt to the new syntax. (tramp-test11-copy-file, tramp-test12-rename-file) (tramp--test-check-files): Deactivate temporarily tests with quoted file names. (tramp-test16-directory-files, tramp-test17-insert-directory): Adapt tests. (tramp-test24-file-name-completion): Do not check for completion mode. (tramp-test31-make-auto-save-file-name): Deactivate temporarily two tests.
2017-03-13 17:05:59 +00:00
(if (search-forward-regexp "unknown.+key" nil t)
" -o ControlPath='tramp.%%r@%%h:%%p'"
" -o ControlPath='tramp.%%C'"))))
(with-temp-buffer
(tramp-call-process vec "ssh" nil t nil "-o" "ControlPersist")
(goto-char (point-min))
(when (search-forward-regexp "missing.+argument" nil t)
(setq tramp-ssh-controlmaster-options
(concat tramp-ssh-controlmaster-options
" -o ControlPersist=no")))))))))
tramp-ssh-controlmaster-options)))
(defun tramp-scp-strict-file-name-checking (vec)
"Return the strict file name checking argument of the local scp."
(cond
;; No options to be computed.
((null (assoc "%x" (tramp-get-method-parameter vec 'tramp-copy-args)))
"")
;; There is already a value to be used.
((stringp tramp-scp-strict-file-name-checking)
tramp-scp-strict-file-name-checking)
;; Determine the options.
(t (setq tramp-scp-strict-file-name-checking "")
(let ((case-fold-search t))
(ignore-errors
(when (executable-find "scp")
(with-tramp-progress-reporter
vec 4 "Computing strict file name argument"
(with-temp-buffer
(tramp-call-process vec "scp" nil t nil "-T")
(goto-char (point-min))
(unless
(search-forward-regexp
"\\(illegal\\|unknown\\) option -- T" nil t)
(setq tramp-scp-strict-file-name-checking "-T")))))))
tramp-scp-strict-file-name-checking)))
(defun tramp-timeout-session (vec)
"Close the connection VEC after a session timeout.
If there is just some editing, retry it after 5 seconds."
(if (and (tramp-get-connection-property
(tramp-get-connection-process vec) "locked" nil)
(tramp-file-name-equal-p vec (car tramp-current-connection)))
(progn
(tramp-message
vec 5 "Cannot timeout session, trying it again in %s seconds." 5)
* lisp/net/*.el: Use lexical-binding Also remove some redundant `:group` arguments. * lisp/net/eudc-export.el: Use lexical-binding. (eudc-create-bbdb-record): Use `cl-progv` and `apply` to avoid `eval`. * lisp/net/eudc-hotlist.el: Use lexical-binding. * lisp/net/eudc.el (eudc-print-attribute-value): Use `funcall` to avoid `eval`. * lisp/net/eudcb-bbdb.el: Use lexical-binding. (eudc-bbdb-filter-non-matching-record): Use `funcall` to avoid `eval`. Move `bbdb-val` binding to avoid `setq`. Use `seq-some` instead of `eval+or`. (eudc-bbdb-format-record-as-result): Use `dolist` and `pcase`. Use `funcall` to avoid `eval`. (eudc-bbdb-query-internal): Simplify a bit. * lisp/net/eudcb-ldap.el: Use lexical-binding. (eudc-ldap-get-host-parameter): Use `defalias` to avoid `eval-and-compile`. * lisp/net/telnet.el: Use lexical-binding. * lisp/net/quickurl.el: Use lexical-binding. * lisp/net/newst-ticker.el: Use lexical-binding. * lisp/net/newst-reader.el: Use lexical-binding. * lisp/net/goto-addr.el: Use lexical-binding. * lisp/net/gnutls.el: Use lexical-binding. * lisp/net/eudcb-macos-contacts.el: Use lexical-binding. * lisp/net/eudcb-mab.el: Use lexical-binding. * lisp/net/net-utils.el: Use lexical-binding. (finger): Remove unused var `found`. * lisp/net/network-stream.el (open-protocol-stream): Remove redundant `defalias`. * lisp/net/newst-plainview.el: Use lexical-binding. (newsticker-hide-entry, newsticker-show-entry): Remove unused var `is-invisible`. (w3m-fill-column, w3-maximum-line-length): Declare vars. * lisp/net/tramp.el (tramp-compute-multi-hops): * lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory): * lisp/net/tramp-cmds.el (tramp-default-rename-file): * lisp/net/webjump.el (webjump): Don't forget lexical-binding for `eval`.
2021-03-08 15:11:22 +00:00
(run-at-time 5 nil #'tramp-timeout-session vec))
(tramp-message
; Sync with Tramp repository * doc/misc/tramp.texi (Frequently Asked Questions): Mention Emacs 28. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.4-pre". * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file): Use `tramp-file-local-name'. (tramp-adb-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-cmds.el (tramp-rename-files): Use `tramp-file-local-name'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-process-file, tramp-set-remote-path) (tramp-find-inline-encoding, tramp-get-remote-touch): Use `tramp-file-local-name'. (tramp-sh-handle-make-process): Support `stderr' as file name. Delete temporary stderr file. (tramp-sh-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-process-file): Use `tramp-file-local-name'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-set-file-uid-gid): Use `tramp-unquote-file-local-name'. (tramp-sudoedit-handle-make-symbolic-link): Use `tramp-file-local-name'. (tramp-sudoedit-handle-file-system-info): Fix a scoping error. * lisp/net/tramp.el: Bump version to 2.4.4-pre. (tramp-ignored-file-name-regexp, tramp-time-dont-know) (tramp-time-doesnt-exist): Fix typo. (tramp-file-local-name): Extend for non-remote file names. (tramp-unquote-file-local-name): New defun. (tramp-completion-make-tramp-file-name): Simplify. (tramp-set-connection-local-variables-for-buffer) (tramp-equal-remote, tramp-handle-make-auto-save-file-name): Use `tramp-tramp-file-p'. (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-truename, tramp-get-remote-tmpdir) (tramp-make-tramp-temp-file): Use `tramp-file-local-name'. (tramp-handle-shell-command, tramp-handle-start-file-process): Implement asynchronous `error-buffer'.
2020-01-06 11:11:53 +00:00
vec 3 "Timeout session %s" (tramp-make-tramp-file-name vec 'noloc))
(tramp-cleanup-connection vec 'keep-debug nil 'keep-processes)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-maybe-open-connection (vec)
"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."
;; During completion, don't reopen a new connection.
(unless (tramp-connectable-p vec)
(throw 'non-essential 'non-essential))
(let ((p (tramp-get-connection-process vec))
(process-name (tramp-get-connection-property vec "process-name" nil))
(process-environment (copy-sequence process-environment))
(pos (with-current-buffer (tramp-get-connection-buffer vec) (point))))
;; If Tramp opens the same connection within a short time frame,
;; there is a problem. We shall signal this.
(unless (or (process-live-p p)
Introduce a defstruct `tramp-file-name' as central data structure. This solves also Bug#27009. * lisp/net/tramp.el (tramp-current-domain) (tramp-current-port): New defvars. (tramp-file-name): New defstruct. (tramp-file-name-user-domain, tramp-file-name-host-port) (tramp-file-name-equal-p): New defuns. (tramp-file-name-p, tramp-file-name-method) (tramp-file-name-user, tramp-file-name-host) (tramp-file-name-localname, tramp-file-name-hop) (tramp-file-name-real-user, tramp-file-name-domain) (tramp-file-name-real-host, tramp-file-name-port): Remove defuns. They are provided by the defstruct, or not needed anymore. (tramp-dissect-file-name, tramp-buffer-name) (tramp-make-tramp-file-name, tramp-get-buffer) (tramp-set-connection-local-variables) (tramp-debug-buffer-name, tramp-message) (tramp-error-with-buffer, with-parsed-tramp-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-remote-p, tramp-handle-file-symlink-p) (tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-process-actions) (tramp-check-cached-permissions, tramp-local-host-p) (tramp-get-remote-tmpdir, tramp-call-process) (tramp-call-process-region, tramp-read-passwd) (tramp-clear-passwd): * lisp/net/tramp-adb.el (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-process-file) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-get-file-property, tramp-set-file-property) (tramp-flush-file-property, tramp-flush-directory-property) (tramp-get-connection-property) (tramp-set-connection-property, tramp-connection-property-p) (tramp-flush-connection-property, tramp-cache-print) (tramp-list-connections, tramp-dump-connection-properties) (tramp-parse-connection-properties): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-url-file-name, tramp-gvfs-handler-askpassword) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-mount-spec, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid) (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-compute-multi-hops) (tramp-maybe-open-connection) (tramp-make-copy-program-file-name, tramp-get-remote-path) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-expand-file-name) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-maybe-open-connection): Adapt according to defstruct.
2017-05-24 14:16:53 +00:00
(not (tramp-file-name-equal-p
vec (car tramp-current-connection)))
Avoid some double-rounding of Lisp timestamps Also, simplify some time-related Lisp timestamp code while we’re in the neighborhood. * lisp/battery.el (battery-linux-proc-acpi) (battery-linux-sysfs, battery-upower, battery-bsd-apm): * lisp/calendar/timeclock.el (timeclock-seconds-to-string) (timeclock-log, timeclock-last-period) (timeclock-entry-length, timeclock-entry-list-span) (timeclock-find-discrep, timeclock-generate-report): * lisp/cedet/ede/detect.el (ede-detect-qtest): * lisp/completion.el (cmpl-hours-since-origin): * lisp/ecomplete.el (ecomplete-decay-1): * lisp/emacs-lisp/ert.el (ert--results-update-stats-display) (ert--results-update-stats-display-maybe): * lisp/emacs-lisp/timer-list.el (list-timers): * lisp/emacs-lisp/timer.el (timer-until) (timer-event-handler): * lisp/erc/erc-backend.el (erc-server-send-ping) (erc-server-send-queue, erc-handle-parsed-server-response) (erc-handle-unknown-server-response): * lisp/erc/erc-track.el (erc-buffer-visible): * lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p) (erc-cmd-PING, erc-send-current-line): * lisp/eshell/em-pred.el (eshell-pred-file-time): * lisp/eshell/em-unix.el (eshell-show-elapsed-time): * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event:org-timestamp): * lisp/gnus/gnus-int.el (gnus-backend-trace): * lisp/gnus/gnus-sum.el (gnus-user-date): * lisp/gnus/mail-source.el (mail-source-delete-crash-box): * lisp/gnus/nnmaildir.el (nnmaildir--scan): * lisp/ibuf-ext.el (ibuffer-mark-old-buffers): * lisp/gnus/nnmaildir.el (nnmaildir--scan): * lisp/mouse.el (mouse--down-1-maybe-follows-link) (mouse--click-1-maybe-follows-link): * lisp/mpc.el (mpc--faster-toggle): * lisp/net/rcirc.el (rcirc-handler-ctcp-KEEPALIVE) (rcirc-sentinel): * lisp/net/tramp-cache.el (tramp-get-file-property): * lisp/net/tramp-sh.el (tramp-sh-handle-file-newer-than-file-p) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): * lisp/org/org-clock.el (org-clock-resolve): (org-resolve-clocks, org-clock-in, org-clock-out, org-clock-sum): * lisp/org/org-timer.el (org-timer-start) (org-timer-pause-or-continue, org-timer-seconds): * lisp/org/org.el (org-evaluate-time-range): * lisp/org/ox-publish.el (org-publish-cache-ctime-of-src): * lisp/pixel-scroll.el (pixel-scroll-in-rush-p): * lisp/play/hanoi.el (hanoi-move-ring): * lisp/proced.el (proced-format-time): * lisp/progmodes/cpp.el (cpp-progress-message): * lisp/progmodes/flymake.el (flymake--handle-report): * lisp/progmodes/js.el (js--wait-for-matching-output): * lisp/subr.el (progress-reporter-do-update): * lisp/term/xterm.el (xterm--read-event-for-query): * lisp/time.el (display-time-update, emacs-uptime): * lisp/tooltip.el (tooltip-delay): * lisp/url/url-cookie.el (url-cookie-parse-file-netscape): * lisp/url/url-queue.el (url-queue-prune-old-entries): * lisp/url/url.el (url-retrieve-synchronously): * lisp/xt-mouse.el (xterm-mouse-event): Avoid double-rounding of time-related values. Simplify. * lisp/calendar/icalendar.el (icalendar--decode-isodatetime): When hoping for the best (unlikely), use a better decoded time. (icalendar--convert-sexp-to-ical): Avoid unnecessary encode-time. * lisp/calendar/timeclock.el (timeclock-when-to-leave): * lisp/cedet/ede/detect.el (ede-detect-qtest): * lisp/desktop.el (desktop-create-buffer): * lisp/emacs-lisp/benchmark.el (benchmark-elapse): * lisp/gnus/gnus-art.el (article-lapsed-string): * lisp/gnus/gnus-group.el (gnus-group-timestamp-delta): * lisp/gnus/nnmail.el (nnmail-expired-article-p): * lisp/gnus/nnmaildir.el (nnmaildir-request-expire-articles): * lisp/nxml/rng-maint.el (rng-time-function): * lisp/org/org-clock.el (org-clock-get-clocked-time) (org-clock-resolve, org-resolve-clocks, org-resolve-clocks-if-idle): * lisp/org/org-habit.el (org-habit-insert-consistency-graphs): * lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info) (vhdl-fix-case-region-1): Use time-since instead of open-coding most of it. * lisp/erc/erc-dcc.el (erc-dcc-get-sentinel): * lisp/erc/erc.el (erc-string-to-emacs-time, erc-time-gt): Now obsolete. All uses changed. (erc-time-diff): Accept all Lisp time values. All uses changed. * lisp/gnus/gnus-demon.el (gnus-demon-idle-since): * lisp/gnus/gnus-score.el (gnus-score-headers): * lisp/gnus/nneething.el (nneething-make-head): * lisp/gnus/nnheader.el (nnheader-message-maybe): * lisp/gnus/nnimap.el (nnimap-keepalive): * lisp/image.el (image-animate-timeout): * lisp/mail/feedmail.el (feedmail-rfc822-date): * lisp/net/imap.el (imap-wait-for-tag): * lisp/net/newst-backend.el (newsticker--image-get): * lisp/net/rcirc.el (rcirc-handler-317, rcirc-handler-333): * lisp/obsolete/xesam.el (xesam-refresh-entry): * lisp/org/org-agenda.el (org-agenda-show-clocking-issues) (org-agenda-check-clock-gap, org-agenda-to-appt): * lisp/org/org-capture.el (org-capture-set-target-location): * lisp/org/org-clock.el (org-clock-resolve-clock) (org-clocktable-steps): * lisp/org/org-colview.el (org-columns-edit-value) (org-columns, org-agenda-columns): * lisp/org/org-duration.el (org-duration-from-minutes): * lisp/org/org-element.el (org-element-cache-sync-duration) (org-element-cache-sync-break) (org-element--cache-interrupt-p, org-element--cache-sync): * lisp/org/org-habit.el (org-habit-get-faces) * lisp/org/org-indent.el (org-indent-add-properties): * lisp/org/org-table.el (org-table-sum): * lisp/org/org-timer.el (org-timer-show-remaining-time) (org-timer-set-timer): * lisp/org/org.el (org-babel-load-file, org-today) (org-auto-repeat-maybe, org-2ft, org-time-stamp) (org-read-date-analyze, org-time-stamp-to-now) (org-small-year-to-year, org-goto-calendar): * lisp/org/ox.el (org-export-insert-default-template): * lisp/ses.el (ses--time-check): * lisp/type-break.el (type-break-time-warning) (type-break-statistics, type-break-demo-boring): * lisp/url/url-cache.el (url-cache-expired) (url-cache-prune-cache): * lisp/vc/vc-git.el (vc-git-stash-snapshot): * lisp/erc/erc-match.el (erc-log-matches-come-back): Simplify.
2019-02-23 02:32:31 +00:00
(time-less-p
Sync with Tramp 2.5.0-pre * doc/misc/tramp.texi: Protext Tramp x.y and Emacs x.y by @w{}. (GVFS-based methods): Move "GNOME Online Accounts" index. (Customizing Methods, Android shell setup, File name completion) (Frequently Asked Questions): Fix typos. * doc/misc/trampver.texi: Change version to "2.5.0-pre". * lisp/net/trampver.el: Change version to "2.5.0-pre". (inhibit-message): Don't declare. * lisp/net/tramp.el: Bump version to 2.5.0-pre. Require Emacs 25.1. (tramp-debug-message): Simplify. (tramp-message): Don't use `tramp-message-show-message'. (tramp-with-demoted-errors, with-parsed-tramp-file-name) (with-tramp-file-property, with-tramp-connection-property): Adapt `declare' form. (with-tramp-progress-reporter): Suppress progress reporter when noninteractive. (tramp-completion-mode, tramp-completion-mode-p): Remove. * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (format-message): Remove compatibility code. (tramp-compat-directory-name-p) (tramp-compat-tramp-file-name-slots): Remove. * lisp/net/tramp.el (tramp-debug-message, tramp-message) (tramp-backtrace, tramp-error, tramp-error-with-buffer) (tramp-user-error, tramp-with-demoted-errors) (tramp-signal-hook-function): * lisp/net/tramp-compat.el (tramp-compat-funcall) * lisp/net/tramp-gvfs.el (tramp-dbus-function): Add `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-get-method-parameter) (tramp-dissect-file-name, tramp-error, tramp-error-with-buffer) (tramp-user-error, with-parsed-tramp-file-name) (with-tramp-progress-reporter, tramp-file-name-handler) (tramp-completion-file-name-handler, tramp-autoload-file-name-handler) (tramp-register-file-name-handlers, tramp-connectable-p) (tramp-handle-file-modes, tramp-handle-file-regular-p) (tramp-handle-file-truename, tramp-handle-insert-directory) (tramp-handle-load, tramp-set-file-uid-gid): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name): * lisp/net/tramp-cache.el (tramp-get-file-property, tramp-cache-print): * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (tramp-compat-exec-path): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-dbus-byte-array-to-string) (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler) (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-insert-directory, tramp-sh-file-name-handler) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler) (tramp-smb-handle-copy-file, tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-insert-directory) (tramp-smb-handle-rename-file, tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-file-truename): Use `if-let', `when-let', `directory-name-p', `inhibit-message', `non-essential and `cl-struct-slot-info'. Don't use `seconds-to-time'. * test/lisp/net/tramp-archive-tests.el (tramp-message-show-message): Don't set. * test/lisp/net/tramp-tests.el (inhibit-message): Don't declare. (tramp-message-show-message): Don't set. (tramp-test06-directory-file-name): Use `non-essential'. (tramp-test10-write-region): Use `inhibit-message'. (tramp-test36-vc-registered): No special handling for old Emacsen. (tramp--test-emacs25-p): Remove. (tramp-test45-unload): Special case of `tramp-completion-mode'.
2020-01-19 13:11:07 +00:00
(time-since (cdr tramp-current-connection))
(or tramp-connection-min-time-diff 0)))
(throw 'suppress 'suppress))
;; If too much time has passed since last command was sent, look
;; whether process is still alive. If it isn't, kill it. When
;; using ssh, it can sometimes happen that the remote end has hung
;; up but the local ssh client doesn't recognize this until it
;; tries to send some data to the remote end. So that's why we
;; try to send a command from time to time, then look again
;; whether the process is really alive.
(condition-case nil
Sync with Tramp 2.5.0-pre * doc/misc/tramp.texi: Protext Tramp x.y and Emacs x.y by @w{}. (GVFS-based methods): Move "GNOME Online Accounts" index. (Customizing Methods, Android shell setup, File name completion) (Frequently Asked Questions): Fix typos. * doc/misc/trampver.texi: Change version to "2.5.0-pre". * lisp/net/trampver.el: Change version to "2.5.0-pre". (inhibit-message): Don't declare. * lisp/net/tramp.el: Bump version to 2.5.0-pre. Require Emacs 25.1. (tramp-debug-message): Simplify. (tramp-message): Don't use `tramp-message-show-message'. (tramp-with-demoted-errors, with-parsed-tramp-file-name) (with-tramp-file-property, with-tramp-connection-property): Adapt `declare' form. (with-tramp-progress-reporter): Suppress progress reporter when noninteractive. (tramp-completion-mode, tramp-completion-mode-p): Remove. * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (format-message): Remove compatibility code. (tramp-compat-directory-name-p) (tramp-compat-tramp-file-name-slots): Remove. * lisp/net/tramp.el (tramp-debug-message, tramp-message) (tramp-backtrace, tramp-error, tramp-error-with-buffer) (tramp-user-error, tramp-with-demoted-errors) (tramp-signal-hook-function): * lisp/net/tramp-compat.el (tramp-compat-funcall) * lisp/net/tramp-gvfs.el (tramp-dbus-function): Add `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-get-method-parameter) (tramp-dissect-file-name, tramp-error, tramp-error-with-buffer) (tramp-user-error, with-parsed-tramp-file-name) (with-tramp-progress-reporter, tramp-file-name-handler) (tramp-completion-file-name-handler, tramp-autoload-file-name-handler) (tramp-register-file-name-handlers, tramp-connectable-p) (tramp-handle-file-modes, tramp-handle-file-regular-p) (tramp-handle-file-truename, tramp-handle-insert-directory) (tramp-handle-load, tramp-set-file-uid-gid): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name): * lisp/net/tramp-cache.el (tramp-get-file-property, tramp-cache-print): * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (tramp-compat-exec-path): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-dbus-byte-array-to-string) (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler) (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-insert-directory, tramp-sh-file-name-handler) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler) (tramp-smb-handle-copy-file, tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-insert-directory) (tramp-smb-handle-rename-file, tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-file-truename): Use `if-let', `when-let', `directory-name-p', `inhibit-message', `non-essential and `cl-struct-slot-info'. Don't use `seconds-to-time'. * test/lisp/net/tramp-archive-tests.el (tramp-message-show-message): Don't set. * test/lisp/net/tramp-tests.el (inhibit-message): Don't declare. (tramp-message-show-message): Don't set. (tramp-test06-directory-file-name): Use `non-essential'. (tramp-test10-write-region): Use `inhibit-message'. (tramp-test36-vc-registered): No special handling for old Emacsen. (tramp--test-emacs25-p): Remove. (tramp-test45-unload): Special case of `tramp-completion-mode'.
2020-01-19 13:11:07 +00:00
(when (and (time-less-p
60 (time-since
(tramp-get-connection-property p "last-cmd-time" 0)))
(process-live-p p))
(tramp-send-command vec "echo are you awake" t t)
(unless (and (process-live-p p)
(tramp-wait-for-output p 10))
;; The error will be caught locally.
(tramp-error vec 'file-error "Awake did fail")))
(file-error
(tramp-cleanup-connection vec t)
(setq p nil)))
;; New connection must be opened.
(condition-case err
(unless (process-live-p p)
(with-tramp-progress-reporter
vec 3
(if (zerop (length (tramp-file-name-user vec)))
(format "Opening connection %s for %s using %s"
process-name
(tramp-file-name-host vec)
(tramp-file-name-method vec))
(format "Opening connection %s for %s@%s using %s"
process-name
(tramp-file-name-user vec)
(tramp-file-name-host vec)
(tramp-file-name-method vec)))
(catch 'uname-changed
;; Start new process.
(when (and p (processp p))
(delete-process p))
(setenv "TERM" tramp-terminal-type)
(setenv "LC_ALL" (tramp-get-local-locale vec))
(if (stringp tramp-histfile-override)
(setenv "HISTFILE" tramp-histfile-override)
(if tramp-histfile-override
(progn
(setenv "HISTFILE")
(setenv "HISTFILESIZE" "0")
(setenv "HISTSIZE" "0"))))
(setenv "PROMPT_COMMAND")
(setenv "PS1" tramp-initial-end-of-output)
(unless (stringp tramp-encoding-shell)
(tramp-error vec 'file-error "`tramp-encoding-shell' not set"))
(let* ((current-host tramp-system-name)
(target-alist (tramp-compute-multi-hops vec))
;; Needed for `tramp-get-remote-null-device'.
(previous-hop nil)
;; We will apply `tramp-ssh-controlmaster-options'
;; only for the first hop.
(options (tramp-ssh-controlmaster-options vec))
(process-connection-type tramp-process-connection-type)
(process-adaptive-read-buffering nil)
2016-05-31 06:19:54 +00:00
;; There are unfortunate settings for "cmdproxy" on
;; W32 systems.
(process-coding-system-alist nil)
(coding-system-for-read nil)
(extra-args (tramp-get-sh-extra-args tramp-encoding-shell))
;; This must be done in order to avoid our file
;; name handler.
(p (let ((default-directory
(tramp-compat-temporary-file-directory)))
(apply
#'start-process
(tramp-get-connection-name vec)
(tramp-get-connection-buffer vec)
(append
(list tramp-encoding-shell)
(and extra-args (split-string extra-args))
(and tramp-encoding-command-interactive
(list tramp-encoding-command-interactive)))))))
;; Set sentinel and query flag. Initialize variables.
(set-process-sentinel p #'tramp-process-sentinel)
(process-put p 'vector vec)
(process-put p 'adjust-window-size-function #'ignore)
Remove XEmacs compatibility in Tramp * doc/misc/tramp.texi: Replace flags by their hard coded name. Remove unused flags and the enclosed alternative text for XEmacs. * doc/misc/trampver.texi: Use "Tramp" CamelCase. Rename "emacs" and "xemacs" flags to "unified" and "separate". Remove flags "emacsgw", "emacsname", "emacsdir", "ftppackagename", "emacsothername", "emacsotherdir" and "emacsotherfilename". (trampver): * lisp/net/trampver.el (tramp-version): Set to "2.3.0-pre". * lisp/net/tramp.el (bkup-backup-directory-info) (directory-sep-char, ls-lisp-use-insert-directory-program) (outline-regexp, tramp-backup-directory-alist) (tramp-default-method, tramp-shell-prompt-pattern, tramp-syntax) (tramp-file-name-regexp-unified) (tramp-file-name-regexp-separate) (tramp-completion-file-name-regexp-unified) (tramp-completion-file-name-regexp-separate, tramp-chunksize) (tramp-get-method-parameter, tramp-find-method, tramp-find-user) (tramp-debug-message, tramp-progress-reporter-update) (with-tramp-progress-reporter) (tramp-rfn-eshadow-setup-minibuffer) (rfn-eshadow-setup-minibuffer-hook, tramp-unload-hook) (tramp-rfn-eshadow-update-overlay) (rfn-eshadow-update-overlay-hook, tramp-default-file-modes) (tramp-file-name-for-operation) (tramp-completion-file-name-handler) (tramp-autoload-file-name-handler, tramp-completion-mode-p) (tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-handle-dired-uncache, tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-handle-load) (tramp-handle-shell-command) (tramp-handle-verify-visited-file-modtime) (tramp-handle-file-notify-valid-p, tramp-accept-process-output) (tramp-check-for-regexp, tramp-wait-for-regexp) (tramp-send-string, tramp-mode-string-to-int) (tramp-get-local-gid, tramp-check-cached-permissions) (tramp-get-remote-tmpdir, tramp-make-tramp-temp-file) (auto-save-file-name-transforms) (tramp-handle-make-auto-save-file-name, tramp-read-passwd) (tramp-clear-passwd, tramp-time-diff): * lisp/net/tramp-adb.el (directory-listing-before-filename-regexp) (directory-sep-char, tramp-adb-file-name-handler-alist) (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb--gnu-switches-to-ash) (tramp-adb-handle-file-local-copy) (tramp-adb-handle-write-region, tramp-adb-handle-set-file-modes) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process, tramp-adb-get-device) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-persistency-file-name) (tramp-cache-print): * lisp/net/tramp-cmds.el (tramp-cleanup-all-connections) (tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-funcall) (tramp-advice-file-expand-wildcards) (tramp-compat-temporary-file-directory) (tramp-compat-make-temp-file, tramp-compat-copy-file) (tramp-compat-delete-directory, ) (tramp-compat-process-running-p): * lisp/net/tramp-ftp.el (tramp-methods) <ftp>: (tramp-default-method-alist, tramp-foreign-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist) (tramp-gvfs-do-copy-or-rename-file, tramp-gvfs-handle-copy-file) (tramp-gvfs-handle-file-local-copy) (tramp-gvfs-handle-file-name-all-completions) (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-monitor-file-process-filter) (tramp-gvfs-handle-file-readable-p) (tramp-gvfs-handle-rename-file, tramp-gvfs-handle-write-region) (tramp-gvfs-file-name, tramp-gvfs-handler-askquestion) (tramp-gvfs-maybe-open-connection) (tramp-gvfs-parse-device-names): * lisp/net/tramp-gw.el (tramp-gw-aux-proc-sentinel) (tramp-gw-open-connection, tramp-gw-open-network-stream): * lisp/net/tramp-sh.el (directory-sep-char) (tramp-sh-file-name-handler-alist) (tramp-sh-handle-file-truename) (tramp-sh-handle-set-visited-file-modtime) (tramp-sh-handle-verify-visited-file-modtime) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-file-acl) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-copy-file, tramp-sh-handle-rename-file) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (dired-compress-file-suffixes, dired-remove-file) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-file-local-copy) (tramp-sh-handle-write-region, tramp-sh-handle-vc-registered) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-maybe-send-script) (tramp-find-executable) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-compute-multi-hops) (tramp-maybe-open-connection, tramp-convert-file-attributes) (tramp-get-remote-path, tramp-get-remote-touch): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-directory-files, tramp-smb-handle-file-acl) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-process-file, tramp-smb-handle-rename-file) (tramp-smb-handle-set-file-acl, tramp-smb-handle-set-file-modes) (tramp-smb-handle-write-region, tramp-smb-get-file-entries) (tramp-smb-get-cifs-capabilities) (tramp-smb-maybe-open-connection): * lisp/net/trampver.el (tramp-repository-get-version): Remove XEmacs compat code. * lisp/net/tramp-cmds.el (mml-mode, mml-insert-empty-tag) (reporter-dump-variable): Declare functions. * lisp/net/tramp.el (tramp-bkup-backup-directory-info) (tramp-advice-minibuffer-electric-separator) (tramp-advice-minibuffer-electric-tilde) (tramp-handle-unhandled-file-name-directory): * lisp/net/tramp-compat.el (tramp-compat-with-temp-message) (tramp-compat-font-lock-add-keywords) (tramp-compat-load, tramp-compat-number-sequence) (tramp-compat-split-string, tramp-compat-delete-dups): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-file-contents-literally): Remove. * lisp/net/tramp-sh.el (tramp-methods) <psftp>: This does not work recursively.
2016-01-14 13:12:17 +00:00
(set-process-query-on-exit-flag p nil)
(setq tramp-current-connection (cons vec (current-time)))
Tramp requires Emacs 24.4 * doc/misc/tramp.texi (Frequently Asked Questions): Use `with-eval-after-load'. in example. * doc/misc/trampver.texi: Set variable emacsver. * lisp/net/tramp.el (tramp-send-string, tramp-call-process) (tramp-call-process-region, tramp-process-lines): * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes) (tramp-gvfs-handle-file-notify-add-watch) * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-notify-add-watch, tramp-find-executable) (tramp-set-remote-path) (tramp-open-connection-setup-interactive-shell) (tramp-maybe-open-connection, tramp-send-command): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process) (tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl): (tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'. * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-ftp.el: Use `with-eval-after-load'. * lisp/net/tramp-cmds.el (tramp-cleanup-connection) (tramp-cleanup-all-connections): Cancel timer. * lisp/net/tramp-compat.el (subr-x): Require. (default-toplevel-value): Don't make it a defalias. * lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'. Do not special handle `split-string'. * lisp/net/tramp.el: Require Emacs 24.4. (tramp-password-prompt-regexp): Use `password-word-equivalents'. (tramp-user-error): Use `user-error'. (tramp-replace-environment-variables): Use `substitute-env-vars'. (tramp-wait-for-regexp): Rearrange `with-current-buffer' call. (tramp-get-local-gid): Use `group-gid'. * lisp/net/trampver.el: Check for Emacs 24.4. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate) (tramp-test03-file-name-host-rules) (tramp-test03-file-name-method-rules): Don't check for `user-error'.
2019-06-28 14:32:12 +00:00
(tramp-message vec 6 "%s" (string-join (process-command p) " "))
;; Set connection-local variables.
(tramp-set-connection-local-variables vec)
;; Check whether process is alive.
(tramp-barf-if-no-shell-prompt
p 10
"Couldn't find local shell prompt for %s" tramp-encoding-shell)
;; Now do all the connections as specified.
(while target-alist
(let* ((hop (car target-alist))
(l-method (tramp-file-name-method hop))
(l-user (tramp-file-name-user hop))
(l-domain (tramp-file-name-domain hop))
(l-host (tramp-file-name-host hop))
(l-port (tramp-file-name-port hop))
(remote-shell
(tramp-get-method-parameter hop 'tramp-remote-shell))
(extra-args (tramp-get-sh-extra-args remote-shell))
(async-args
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
(tramp-compat-flatten-tree
(tramp-get-method-parameter hop 'tramp-async-args)))
(connection-timeout
(tramp-get-method-parameter
Sync with Tramp repository * doc/misc/tramp.texi (Configuration): Note, that Tramp must be required prior changing its configuration. (Connection caching, Predefined connection information) (Remote shell setup): Fix typos. (Predefined connection information): Describe, how to overwrite parameters of `tramp-methods'. (Remote programs, Remote processes, Traces and Profiles): Simplify example. (Remote programs): Remove superfluous comment. * doc/misc/trampver.texi: Update release number. * lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun. (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it. (tramp-gvfs-handle-make-directory): Reimplement PARENTS handling, "gvfs-mkdir -p ..." does not work robust. (tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call. * lisp/net/tramp-sh.el (tramp-methods): Add `tramp-remote-shell-login' parameter where it fits. (tramp-get-remote-path): Use it. (tramp-make-copy-program-file-name): Fix quoting for "psftp" method. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-get-method-parameter): Replace argument METHOD by VEC. Check also for hits in `tramp-connection-properties'. Adapt docstring. (tramp-get-remote-tmpdir): Cache only the local name of tmpdir. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/trampver.el Update release number. * test/automated/tramp-tests.el (tramp--instrument-test-case): Add "^make-symbolic-link not supported$" to `debug-ignored-errors'. (tramp-test13-make-directory, tramp--test-adb-p) (tramp--test-smb-or-windows-nt-p): Simplify. (tramp--test-ftp-p, tramp--test-gvfs-p): New defuns. (tramp--test-special-characters): Fix docstring. Add gvfs and ftp tests. (tramp--test-utf8): Fix docstring.
2015-07-21 12:59:18 +00:00
hop 'tramp-connection-timeout))
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
(command
(tramp-get-method-parameter hop 'tramp-login-program))
;; We don't create the temporary file. In
;; fact, it is just a prefix for the
;; ControlPath option of ssh; the real
;; temporary file has another name, and it is
;; created and protected by ssh. It is also
;; removed by ssh when the connection is
;; closed. The temporary file name is cached
;; in the main connection process, therefore
;; we cannot use `tramp-get-connection-process'.
(tmpfile
(with-tramp-connection-property
(tramp-get-process vec) "temp-file"
(tramp-compat-make-temp-name)))
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
r-shell)
;; Check, whether there is a restricted shell.
(dolist (elt tramp-restricted-shell-hosts-alist)
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(when (string-match-p elt current-host)
(setq r-shell t)))
(setq current-host l-host)
Sync with Tramp 2.4.0-pre * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.0-pre". * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Use `tramp-handle-file-directory-p'. (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb-handle-process-file): Adapt `tramp-make-tramp-file-name' call. (tramp-adb-handle-file-directory-p): Remove. (tramp-adb-maybe-open-connection): Do not set tramp-current-*. * lisp/net/tramp-cache.el (tramp-get-hash-table): Adapt `tramp-make-tramp-file-name' call. * lisp/net/tramp-cmds.el (tramp-cleanup-connection): Do not set tramp-current-*. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use `tramp-handle-file-directory-p'. (tramp-gvfs-dbus-event-error): Trace with verbosity 6. (tramp-gvfs-do-copy-or-rename-file): Use `file-truename'. (tramp-gvfs-handle-file-directory-p): Remove. (tramp-gvfs-handler-askpassword): Do not set tramp-current-*. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-start-file-process) (tramp-maybe-open-connection, tramp-get-remote-path): Do not set tramp-current-*. (tramp-maybe-open-connection): Set "password-vector" property. * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use `tramp-handle-file-accessible-directory-p' and `tramp-handle-file-directory-p'. (tramp-smb-handle-copy-directory, tramp-smb-handle-file-acl) (tramp-smb-handle-set-file-acl) (tramp-smb-maybe-open-connection): Do not set tramp-current-*. (tramp-smb-handle-file-directory-p): Remove. (tramp-smb-handle-make-symbolic-link): Use `tramp-get-connection-buffer' rather than `buffer-name'. * lisp/net/tramp.el (tramp-current-method, tramp-current-user) (tramp-current-domain, tramp-current-host) (tramp-current-port): Remove. (tramp-dissect-file-name): No special handling of localname anymore. (tramp-make-tramp-file-name): Reimplemnt with new signature. (tramp-completion-make-tramp-file-name): Fix docstring. (tramp-get-buffer, tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-check-cached-permissions, tramp-local-host-p) (tramp-get-remote-tmpdir, tramp-clear-passwd): Adapt `tramp-make-tramp-file-name' call. (tramp-completion-handle-file-name-all-completions) (tramp-action-login, tramp-read-passwd): Do not set tramp-current-*. (tramp-handle-file-directory-p): New defun. (tramp-handle-verify-visited-file-modtime): Remove superfluous `with-parsed-tramp-file-name'. (tramp-process-actions, tramp-read-passwd): Use "password-vector" property. (tramp-call-process, tramp-call-process-region): No special setting of vec. (tramp-read-passwd): Handle "login-as" property. * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Special code for "smb".
2017-12-09 12:22:52 +00:00
;; Set password prompt vector.
(tramp-set-connection-property
p "password-vector"
(make-tramp-file-name
:method l-method :user l-user :domain l-domain
:host l-host :port l-port))
;; Set session timeout.
(when (tramp-get-method-parameter
hop 'tramp-session-timeout)
(tramp-set-connection-property
p "session-timeout"
(tramp-get-method-parameter
hop 'tramp-session-timeout)))
;; Replace `login-args' place holders.
(setq
command
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
(mapconcat
#'identity
(append
;; We do not want to see the trailing local
;; prompt in `start-file-process'.
(unless r-shell '("exec"))
`(,command)
;; Add arguments for asynchronous processes.
(when process-name async-args)
(tramp-expand-args
hop 'tramp-login-args
?h (or l-host "") ?u (or l-user "") ?p (or l-port "")
?c (format-spec options (format-spec-make ?t tmpfile))
?n (concat
"2>" (tramp-get-remote-null-device previous-hop))
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
?l (concat remote-shell " " extra-args " -i"))
;; A restricted shell does not allow "exec".
(when r-shell '("&&" "exit" "||" "exit")))
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
" "))
;; Send the command.
(tramp-message vec 3 "Sending command `%s'" command)
(tramp-send-command vec command t t)
(tramp-process-actions
p vec
(min
pos (with-current-buffer (process-buffer p) (point-max)))
tramp-actions-before-shell
(or connection-timeout tramp-connection-timeout))
(tramp-message
vec 3 "Found remote shell prompt on `%s'" l-host)
;; Next hop.
(setq options ""
target-alist (cdr target-alist)
previous-hop hop)))
;; Activate session timeout.
(when (tramp-get-connection-property p "session-timeout" nil)
(run-at-time
(tramp-get-connection-property p "session-timeout" nil) nil
* lisp/net/*.el: Use lexical-binding Also remove some redundant `:group` arguments. * lisp/net/eudc-export.el: Use lexical-binding. (eudc-create-bbdb-record): Use `cl-progv` and `apply` to avoid `eval`. * lisp/net/eudc-hotlist.el: Use lexical-binding. * lisp/net/eudc.el (eudc-print-attribute-value): Use `funcall` to avoid `eval`. * lisp/net/eudcb-bbdb.el: Use lexical-binding. (eudc-bbdb-filter-non-matching-record): Use `funcall` to avoid `eval`. Move `bbdb-val` binding to avoid `setq`. Use `seq-some` instead of `eval+or`. (eudc-bbdb-format-record-as-result): Use `dolist` and `pcase`. Use `funcall` to avoid `eval`. (eudc-bbdb-query-internal): Simplify a bit. * lisp/net/eudcb-ldap.el: Use lexical-binding. (eudc-ldap-get-host-parameter): Use `defalias` to avoid `eval-and-compile`. * lisp/net/telnet.el: Use lexical-binding. * lisp/net/quickurl.el: Use lexical-binding. * lisp/net/newst-ticker.el: Use lexical-binding. * lisp/net/newst-reader.el: Use lexical-binding. * lisp/net/goto-addr.el: Use lexical-binding. * lisp/net/gnutls.el: Use lexical-binding. * lisp/net/eudcb-macos-contacts.el: Use lexical-binding. * lisp/net/eudcb-mab.el: Use lexical-binding. * lisp/net/net-utils.el: Use lexical-binding. (finger): Remove unused var `found`. * lisp/net/network-stream.el (open-protocol-stream): Remove redundant `defalias`. * lisp/net/newst-plainview.el: Use lexical-binding. (newsticker-hide-entry, newsticker-show-entry): Remove unused var `is-invisible`. (w3m-fill-column, w3-maximum-line-length): Declare vars. * lisp/net/tramp.el (tramp-compute-multi-hops): * lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory): * lisp/net/tramp-cmds.el (tramp-default-rename-file): * lisp/net/webjump.el (webjump): Don't forget lexical-binding for `eval`.
2021-03-08 15:11:22 +00:00
#'tramp-timeout-session vec))
;; Make initial shell settings.
(tramp-open-connection-setup-interactive-shell p vec)
;; Mark it as connected.
(tramp-set-connection-property p "connected" t)))))
;; Cleanup, and propagate the signal.
((error quit)
(tramp-cleanup-connection vec t)
(signal (car err) (cdr err))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-send-command (vec command &optional neveropen nooutput)
"Send the COMMAND to connection VEC.
Erases temporary buffer before sending the command. If optional
arg NEVEROPEN is non-nil, never try to open the connection. This
is meant to be used from `tramp-maybe-open-connection' only. The
function waits for output unless NOOUTPUT is set."
(unless neveropen (tramp-maybe-open-connection vec))
(let ((p (tramp-get-connection-process vec)))
(when (tramp-get-connection-property p "remote-echo" nil)
;; We mark the command string that it can be erased in the output buffer.
(tramp-set-connection-property p "check-remote-echo" t)
;; If we put `tramp-echo-mark' after a trailing newline (which
;; is assumed to be unquoted) `tramp-send-string' doesn't see
;; that newline and adds `tramp-rsh-end-of-line' right after
;; `tramp-echo-mark', so the remote shell sees two consecutive
;; trailing line endings and sends two prompts after executing
;; the command, which confuses `tramp-wait-for-output'.
Tramp requires Emacs 24.4 * doc/misc/tramp.texi (Frequently Asked Questions): Use `with-eval-after-load'. in example. * doc/misc/trampver.texi: Set variable emacsver. * lisp/net/tramp.el (tramp-send-string, tramp-call-process) (tramp-call-process-region, tramp-process-lines): * lisp/net/tramp-adb.el (tramp-adb-handle-file-truename) (tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection): * lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes) (tramp-gvfs-handle-file-notify-add-watch) * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-file-notify-add-watch, tramp-find-executable) (tramp-set-remote-path) (tramp-open-connection-setup-interactive-shell) (tramp-maybe-open-connection, tramp-send-command): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-handle-start-file-process) (tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl): (tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'. * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-ftp.el: Use `with-eval-after-load'. * lisp/net/tramp-cmds.el (tramp-cleanup-connection) (tramp-cleanup-all-connections): Cancel timer. * lisp/net/tramp-compat.el (subr-x): Require. (default-toplevel-value): Don't make it a defalias. * lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'. Do not special handle `split-string'. * lisp/net/tramp.el: Require Emacs 24.4. (tramp-password-prompt-regexp): Use `password-word-equivalents'. (tramp-user-error): Use `user-error'. (tramp-replace-environment-variables): Use `substitute-env-vars'. (tramp-wait-for-regexp): Rearrange `with-current-buffer' call. (tramp-get-local-gid): Use `group-gid'. * lisp/net/trampver.el: Check for Emacs 24.4. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect) (tramp-test02-file-name-dissect-simplified) (tramp-test02-file-name-dissect-separate) (tramp-test03-file-name-host-rules) (tramp-test03-file-name-method-rules): Don't check for `user-error'.
2019-06-28 14:32:12 +00:00
(when (and (not (string-empty-p command))
(string-equal (substring command -1) "\n"))
(setq command (substring command 0 -1)))
;; No need to restore a trailing newline here since `tramp-send-string'
;; makes sure that the string ends in `tramp-rsh-end-of-line', anyway.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq command (format "%s%s%s" tramp-echo-mark command tramp-echo-mark)))
;; Send the command.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-message vec 6 "%s" command)
(tramp-send-string vec command)
(unless nooutput (tramp-wait-for-output p))))
(defun tramp-wait-for-output (proc &optional timeout)
"Wait for output from remote command."
(unless (buffer-live-p (process-buffer proc))
(delete-process proc)
(tramp-error proc 'file-error "Process `%s' not available, try again" proc))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(with-current-buffer (process-buffer proc)
(let* (;; Initially, `tramp-end-of-output' is "#$ ". There might
;; be leading escape sequences, which must be ignored.
Sync with Tramp repository. * lisp/net/tramp-adb.el (tramp-adb-handle-start-file-process): * lisp/net/tramp-sh.el (tramp-sh-handle-start-file-process) * lisp/net/tramp-smb.el (tramp-smb-handle-start-file-process): Create BUFFER if it doesn't exist. Reported by Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes) (tramp-gvfs-file-attributes-with-gvfs-ls-regexp) (tramp-gvfs-file-attributes-with-gvfs-info-regexp): New defconst. (tramp-gvfs-get-directory-attributes) (tramp-gvfs-get-root-attributes) (tramp-gvfs-get-file-attributes): New defun. (tramp-gvfs-handle-file-attributes) (tramp-gvfs-handle-file-name-all-completions): Use them. (tramp-gvfs-handle-file-directory-p): Use `file-truename'. (tramp-gvfs-maybe-open-connection): Set :noquery flag for process. (tramp-gvfs-send-command): Add locale settings to `process-environment'. (top): Suppress D-Bus error messages during zeroconf initialization. * lisp/net/tramp.el (tramp-unknown-id-string) (tramp-unknown-id-integer): New defconst. (tramp-check-cached-permissions) * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes) * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-convert-file-attributes, tramp-get-remote-uid) (tramp-get-remote-gid): Use them. * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp): Rename from `tramp-color-escape-sequence-regexp'. (tramp-sh-handle-insert-directory) (tramp-convert-file-attributes): Adapt callees. (tramp-device-escape-sequence-regexp): New defconst. (tramp-wait-for-output): Use it. Reported by Matthías Páll Gissurarson <icetritlo@gmail.com>. * lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions): Simplify. * test/lisp/net/tramp-tests.el (tramp-test26-process-file) (tramp-test28-shell-command): Use `tramp-display-escape-sequence-regexp'.
2016-05-28 10:14:58 +00:00
;; Busyboxes built with the EDITING_ASK_TERMINAL config
;; option send also escape sequences, which must be
;; ignored.
(regexp (format "[^#$\n]*%s\\(%s\\)?\r?$"
(regexp-quote tramp-end-of-output)
tramp-device-escape-sequence-regexp))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Sometimes, the commands do not return a newline but a
;; null byte before the shell prompt, for example "git
;; ls-files -c -z ...".
(regexp1 (format "\\(^\\|\000\\)%s" regexp))
(found (tramp-wait-for-regexp proc timeout regexp1)))
(if found
(let ((inhibit-read-only t))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; A simple-minded busybox has sent " ^H" sequences.
;; Delete them.
(goto-char (point-min))
(when (re-search-forward "^\\(.\b\\)+$" (point-at-eol) t)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(forward-line 1)
(delete-region (point-min) (point)))
;; Delete the prompt.
(when (tramp-search-regexp regexp)
(delete-region (point) (point-max))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(if timeout
(tramp-error
proc 'file-error
"[[Remote prompt `%s' not found in %d secs]]"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
tramp-end-of-output timeout)
(tramp-error
proc 'file-error
"[[Remote prompt `%s' not found]]" tramp-end-of-output)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Return value is whether end-of-output sentinel was found.
found)))
(defun tramp-send-command-and-check
(vec command &optional subshell dont-suppress-err exit-status)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Run COMMAND and check its exit status.
Adapt Tramp docstrings according to checkdoc * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 12:10:58 +00:00
Send `echo $?' along with the COMMAND for checking the exit status.
If COMMAND is nil, just send `echo $?'. Return t if the exit
status is 0, and nil otherwise.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
If the optional argument SUBSHELL is non-nil, the command is
executed in a subshell, ie surrounded by parentheses. If
DONT-SUPPRESS-ERR is non-nil, stderr won't be sent to \"/dev/null\".
Optional argument EXIT-STATUS, if non-nil, triggers the return of
the exit status."
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-send-command
vec
(concat (if subshell "( " "")
command
(if command
(if dont-suppress-err
"; " (format " 2>%s; " (tramp-get-remote-null-device vec)))
"")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"echo tramp_exit_status $?"
(if subshell " )" "")))
(with-current-buffer (tramp-get-connection-buffer vec)
Tramp code cleanup * lisp/net/tramp.el (tramp-shell-prompt-pattern) (tramp-wrong-passwd-regexp, tramp-method-regexp-alist) (tramp-domain-regexp, tramp-host-regexp, tramp-ipv6-regexp) (tramp-port-regexp, tramp-debug-outline-regexp) (tramp-drop-volume-letter, tramp-parse-shostkeys) (tramp-handle-file-name-case-insensitive-p): * lisp/net/tramp-adb.el (tramp-adb-send-command-and-check): * lisp/net/tramp-ftp.el (tramp-ftp-enable-ange-ftp): * lisp/net/tramp-gvfs.el (tramp-gvfs-monitor-process-filter): * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp) (tramp-device-escape-sequence-regexp): * lisp/net/tramp-smb.el (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-set-file-acl, tramp-smb-read-file-entry): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-selinux-context): Use character classes in regexp. * lisp/net/tramp-adb.el (tramp-adb-ls-date-year-regexp) (tramp-adb-ls-date-time-regexp): New defconst. (tramp-adb-ls-date-regexp, tramp-adb-ls-toolbox-regexp) (tramp-adb-sh-fix-ls-output): Use them. (tramp-adb-handle-set-file-times, tramp-adb-maybe-open-connection): Apply `eval-when-compile' on constant concat data. (tramp-do-parse-file-attributes-with-ls): Suppress `signal-hook-function'. (tramp-adb--gnu-switches-to-ash): Remove unused function. (tramp-adb-handle-set-file-modes): Qhote argument. (tramp-adb-maybe-open-connection): Set file property rather than flush. * lisp/net/tramp-cmds.el (tramp-rename-these-files): Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-attributes) (tramp-gvfs-file-attributes-with-gvfs-ls-regexp): Embed them in `eval-and-compile'. (tramp-gvfs-get-directory-attributes): Apply `eval-when-compile' on constant concat data.
2020-07-10 08:45:14 +00:00
(unless (tramp-search-regexp "tramp_exit_status [[:digit:]]+")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-error
vec 'file-error "Couldn't find exit status of `%s'" command))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(skip-chars-forward "^ ")
(prog1
(if exit-status
(read (current-buffer))
(zerop (read (current-buffer))))
(let ((inhibit-read-only t))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(delete-region (match-beginning 0) (point-max))))))
(defun tramp-barf-unless-okay (vec command fmt &rest args)
"Run COMMAND, check exit status, throw error if exit status not okay.
Similar to `tramp-send-command-and-check' but accepts two more arguments
FMT and ARGS which are passed to `error'."
(or (tramp-send-command-and-check vec command)
(apply #'tramp-error vec 'file-error fmt args)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-send-command-and-read (vec command &optional noerror marker)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
"Run COMMAND and return the output, which must be a Lisp expression.
If MARKER is a regexp, read the output after that string.
In case there is no valid Lisp expression and NOERROR is nil, it
raises an error."
(when (if noerror
(ignore-errors (tramp-send-command-and-check vec command))
(tramp-barf-unless-okay
vec command "`%s' returns with error" command))
(with-current-buffer (tramp-get-connection-buffer vec)
(goto-char (point-min))
;; Read the marker.
(when (stringp marker)
(condition-case nil
(re-search-forward marker)
(error (unless noerror
(tramp-error
vec 'file-error
"`%s' does not return the marker `%s': `%s'"
command marker (buffer-string))))))
;; Read the expression.
(condition-case nil
(prog1
(let ((signal-hook-function
(unless noerror signal-hook-function)))
(read (current-buffer)))
;; Error handling.
(when (re-search-forward "\\S-" (point-at-eol) t)
(error nil)))
(error (unless noerror
(tramp-error
vec 'file-error
"`%s' does not return a valid Lisp expression: `%s'"
command (buffer-string))))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Reduce autoloaded objects in Tramp * lisp/net/tramp-adb.el (tramp-adb-program) (tramp-adb-connect-if-not-connected, tramp-adb-prompt): Remove autoload cookie. * lisp/net/tramp-cache.el (tramp-connection-properties) (tramp-persistency-file-name): Remove autoload cookie. * lisp/net/tramp-ftp.el (tramp-ftp-enable-ange-ftp): Use `tramp-autoload' cookie. * lisp/net/tramp-gvfs.el (tramp-gvfs-zeroconf-domain): Remove autoload cookie. * lisp/net/tramp-rclone.el (tramp-rclone-program): Remove autoload cookie. (tramp-set-completion-function): Use `tramp--with-startup'. * lisp/net/tramp-sh.el (tramp-inline-compress-start-size) (tramp-copy-size-limit, tramp-histfile-override) (tramp-use-ssh-controlmaster-options, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args): Remove autoload cookie. (tramp-stat-marker, tramp-stat-quoted-marker): Move to tramp.el. * lisp/net/tramp-smb.el (tramp-smb-program) (tramp-smb-acl-program, tramp-smb-conf) (tramp-smb-winexe-program, tramp-smb-winexe-shell-command) (tramp-smb-winexe-shell-command-switch): Remove autoload cookie. * lisp/net/tramp-sudoedit.el (server, tramp-sh): Do not require. * lisp/net/tramp.el (tramp--startup-hook): Define. (tramp-stat-marker, tramp-stat-quoted-marker): New defconsts, taken from tramp-sh.el. * test/lisp/net/tramp-archive-tests.el (tramp-copy-size-limit) (tramp-persistency-file-name): Declare. * test/lisp/net/tramp-tests.el (tramp-connection-properties) (tramp-display-escape-sequence-regexp) (tramp-inline-compress-start-size, tramp-remote-path): Declare.
2018-12-17 10:50:06 +00:00
;; FIXME: Move to tramp.el?
;;;###tramp-autoload
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-convert-file-attributes (vec attr)
"Convert `file-attributes' ATTR generated by perl script, stat or ls.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
Convert file mode bits to string and set virtual device number.
Return ATTR."
(when attr
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(save-match-data
;; Remove color escape sequences from symlink.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(when (stringp (car attr))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(while (string-match tramp-display-escape-sequence-regexp (car attr))
(setcar attr (replace-match "" nil nil (car attr)))))
;; Convert uid and gid. Use `tramp-unknown-id-integer' as
;; indication of unusable value.
(when (and (numberp (nth 2 attr)) (< (nth 2 attr) 0))
(setcar (nthcdr 2 attr) tramp-unknown-id-integer))
(when (and (floatp (nth 2 attr))
(<= (nth 2 attr) most-positive-fixnum))
(setcar (nthcdr 2 attr) (round (nth 2 attr))))
(when (and (numberp (nth 3 attr)) (< (nth 3 attr) 0))
(setcar (nthcdr 3 attr) tramp-unknown-id-integer))
(when (and (floatp (nth 3 attr))
(<= (nth 3 attr) most-positive-fixnum))
(setcar (nthcdr 3 attr) (round (nth 3 attr))))
;; Convert last access time.
(unless (listp (nth 4 attr))
(setcar (nthcdr 4 attr) (seconds-to-time (nth 4 attr))))
;; Convert last modification time.
(unless (listp (nth 5 attr))
(setcar (nthcdr 5 attr) (seconds-to-time (nth 5 attr))))
;; Convert last status change time.
(unless (listp (nth 6 attr))
(setcar (nthcdr 6 attr) (seconds-to-time (nth 6 attr))))
;; Convert file size.
(when (< (nth 7 attr) 0)
(setcar (nthcdr 7 attr) -1))
(when (and (floatp (nth 7 attr))
(<= (nth 7 attr) most-positive-fixnum))
(setcar (nthcdr 7 attr) (round (nth 7 attr))))
;; Convert file mode bits to string.
(unless (stringp (nth 8 attr))
(setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr)))
(when (stringp (car attr))
(aset (nth 8 attr) 0 ?l)))
;; Convert directory indication bit.
(when (string-prefix-p "d" (nth 8 attr))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(setcar attr t))
;; Convert symlink from `tramp-do-file-attributes-with-stat'.
;; Decode also multibyte string.
(when (consp (car attr))
(setcar attr
(and (stringp (caar attr))
(string-match ".+ -> .\\(.+\\)." (caar attr))
(decode-coding-string
(match-string 1 (caar attr)) 'utf-8))))
;; Set file's gid change bit.
(setcar (nthcdr 9 attr)
(if (numberp (nth 3 attr))
(not (= (nth 3 attr)
(tramp-get-remote-gid vec 'integer)))
(not (string-equal
(nth 3 attr)
(tramp-get-remote-gid vec 'string)))))
;; Convert inode.
(when (floatp (nth 10 attr))
(setcar (nthcdr 10 attr)
(condition-case nil
(let ((high (nth 10 attr))
middle low)
(if (<= high most-positive-fixnum)
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(floor high)
;; The low 16 bits.
(setq low (mod high #x10000)
high (/ high #x10000))
(if (<= high most-positive-fixnum)
(cons (floor high) (floor low))
;; The middle 24 bits.
(setq middle (mod high #x1000000)
high (/ high #x1000000))
(cons (floor high)
(cons (floor middle) (floor low))))))
;; Inodes can be incredible huge. We must hide this.
(error (tramp-get-inode vec)))))
;; Set virtual device number.
(setcar (nthcdr 11 attr)
(tramp-get-device vec)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
attr))
(defun tramp-shell-case-fold (string)
Adapt Tramp docstrings according to checkdoc * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 12:10:58 +00:00
"Convert STRING to shell glob pattern which ignores case."
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(mapconcat
(lambda (c)
(if (equal (downcase c) (upcase c))
(vector c)
(format "[%c%c]" (downcase c) (upcase c))))
string
""))
(defun tramp-make-copy-program-file-name (vec)
"Create a file name suitable for `scp', `pscp', or `nc' and workalikes."
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(let ((method (tramp-file-name-method vec))
(user (tramp-file-name-user vec))
Introduce a defstruct `tramp-file-name' as central data structure. This solves also Bug#27009. * lisp/net/tramp.el (tramp-current-domain) (tramp-current-port): New defvars. (tramp-file-name): New defstruct. (tramp-file-name-user-domain, tramp-file-name-host-port) (tramp-file-name-equal-p): New defuns. (tramp-file-name-p, tramp-file-name-method) (tramp-file-name-user, tramp-file-name-host) (tramp-file-name-localname, tramp-file-name-hop) (tramp-file-name-real-user, tramp-file-name-domain) (tramp-file-name-real-host, tramp-file-name-port): Remove defuns. They are provided by the defstruct, or not needed anymore. (tramp-dissect-file-name, tramp-buffer-name) (tramp-make-tramp-file-name, tramp-get-buffer) (tramp-set-connection-local-variables) (tramp-debug-buffer-name, tramp-message) (tramp-error-with-buffer, with-parsed-tramp-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-remote-p, tramp-handle-file-symlink-p) (tramp-handle-find-backup-file-name) (tramp-handle-insert-file-contents, tramp-process-actions) (tramp-check-cached-permissions, tramp-local-host-p) (tramp-get-remote-tmpdir, tramp-call-process) (tramp-call-process-region, tramp-read-passwd) (tramp-clear-passwd): * lisp/net/tramp-adb.el (tramp-adb-parse-device-names) (tramp-adb-handle-expand-file-name) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-process-file) (tramp-adb-maybe-open-connection): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-get-file-property, tramp-set-file-property) (tramp-flush-file-property, tramp-flush-directory-property) (tramp-get-connection-property) (tramp-set-connection-property, tramp-connection-property-p) (tramp-flush-connection-property, tramp-cache-print) (tramp-list-connections, tramp-dump-connection-properties) (tramp-parse-connection-properties): * lisp/net/tramp-cmds.el (tramp-cleanup-connection): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-url-file-name, tramp-gvfs-handler-askpassword) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-mount-spec, tramp-gvfs-get-remote-uid) (tramp-gvfs-get-remote-gid) (tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-do-copy-or-rename-file-out-of-band) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-compute-multi-hops) (tramp-maybe-open-connection) (tramp-make-copy-program-file-name, tramp-get-remote-path) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-expand-file-name) (tramp-smb-handle-file-acl, tramp-smb-handle-process-file) (tramp-smb-handle-set-file-acl) (tramp-smb-maybe-open-connection): Adapt according to defstruct.
2017-05-24 14:16:53 +00:00
(host (tramp-file-name-host vec))
(localname
(directory-file-name (tramp-file-name-unquote-localname vec))))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(when (string-match-p tramp-ipv6-regexp host)
(setq host (format "[%s]" host)))
;; This does not work for MS Windows scp, if there are characters
;; to be quoted. OpenSSH 8 supports disabling of strict file name
;; checking in scp, we use it when available.
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(unless (string-match-p "ftp$" method)
(setq localname (tramp-unquote-shell-quote-argument localname)))
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(cond
Sync with Tramp repository * doc/misc/tramp.texi (Configuration): Note, that Tramp must be required prior changing its configuration. (Connection caching, Predefined connection information) (Remote shell setup): Fix typos. (Predefined connection information): Describe, how to overwrite parameters of `tramp-methods'. (Remote programs, Remote processes, Traces and Profiles): Simplify example. (Remote programs): Remove superfluous comment. * doc/misc/trampver.texi: Update release number. * lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun. (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it. (tramp-gvfs-handle-make-directory): Reimplement PARENTS handling, "gvfs-mkdir -p ..." does not work robust. (tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call. * lisp/net/tramp-sh.el (tramp-methods): Add `tramp-remote-shell-login' parameter where it fits. (tramp-get-remote-path): Use it. (tramp-make-copy-program-file-name): Fix quoting for "psftp" method. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-get-method-parameter): Replace argument METHOD by VEC. Check also for hits in `tramp-connection-properties'. Adapt docstring. (tramp-get-remote-tmpdir): Cache only the local name of tmpdir. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/trampver.el Update release number. * test/automated/tramp-tests.el (tramp--instrument-test-case): Add "^make-symbolic-link not supported$" to `debug-ignored-errors'. (tramp-test13-make-directory, tramp--test-adb-p) (tramp--test-smb-or-windows-nt-p): Simplify. (tramp--test-ftp-p, tramp--test-gvfs-p): New defuns. (tramp--test-special-characters): Fix docstring. Add gvfs and ftp tests. (tramp--test-utf8): Fix docstring.
2015-07-21 12:59:18 +00:00
((tramp-get-method-parameter vec 'tramp-remote-copy-program)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
localname)
((zerop (length user)) (format "%s:%s" host localname))
(t (format "%s@%s:%s" user host localname)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-method-out-of-band-p (vec size)
"Return t if this is an out-of-band method, nil otherwise."
(and
;; It shall be an out-of-band method.
Sync with Tramp repository * doc/misc/tramp.texi (Configuration): Note, that Tramp must be required prior changing its configuration. (Connection caching, Predefined connection information) (Remote shell setup): Fix typos. (Predefined connection information): Describe, how to overwrite parameters of `tramp-methods'. (Remote programs, Remote processes, Traces and Profiles): Simplify example. (Remote programs): Remove superfluous comment. * doc/misc/trampver.texi: Update release number. * lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun. (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it. (tramp-gvfs-handle-make-directory): Reimplement PARENTS handling, "gvfs-mkdir -p ..." does not work robust. (tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call. * lisp/net/tramp-sh.el (tramp-methods): Add `tramp-remote-shell-login' parameter where it fits. (tramp-get-remote-path): Use it. (tramp-make-copy-program-file-name): Fix quoting for "psftp" method. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-get-method-parameter): Replace argument METHOD by VEC. Check also for hits in `tramp-connection-properties'. Adapt docstring. (tramp-get-remote-tmpdir): Cache only the local name of tmpdir. (all): Adapt `tramp-get-method-parameter' calls. * lisp/net/trampver.el Update release number. * test/automated/tramp-tests.el (tramp--instrument-test-case): Add "^make-symbolic-link not supported$" to `debug-ignored-errors'. (tramp-test13-make-directory, tramp--test-adb-p) (tramp--test-smb-or-windows-nt-p): Simplify. (tramp--test-ftp-p, tramp--test-gvfs-p): New defuns. (tramp--test-special-characters): Fix docstring. Add gvfs and ftp tests. (tramp--test-utf8): Fix docstring.
2015-07-21 12:59:18 +00:00
(tramp-get-method-parameter vec 'tramp-copy-program)
;; There must be a size, otherwise the file doesn't exist.
(numberp size)
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Either the file size is large enough, or (in rare cases) there
;; does not exist a remote encoding.
(or (null tramp-copy-size-limit)
(> size tramp-copy-size-limit)
(null (tramp-get-inline-coding vec "remote-encoding" size)))))
;; Variables local to connection.
(defun tramp-get-remote-path (vec)
Adapt Tramp docstrings according to checkdoc * lisp/net/tramp.el (tramp-backup-directory-alist) (tramp-echoed-echo-mark-regexp, tramp-syntax-values) (tramp-lookup-syntax, tramp-build-prefix-format) (tramp-build-prefix-regexp, tramp-build-method-regexp) (tramp-build-postfix-method-format) (tramp-build-postfix-method-regexp) (tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp) (tramp-build-postfix-ipv6-format) (tramp-build-postfix-ipv6-regexp) (tramp-build-postfix-host-format) (tramp-build-postfix-host-regexp, tramp-unknown-id-string) (tramp-unknown-id-integer, tramp-build-file-name-regexp) (tramp-build-completion-file-name-regexp, tramp-chunksize) (tramp-find-method, tramp-find-user, tramp-find-host) (tramp-dissect-file-name, tramp-get-buffer) (tramp-get-connection-buffer, tramp-debug-message, tramp-error) (with-tramp-connection-property, tramp-run-real-handler) (tramp-file-name-for-operation, tramp-file-name-handler) (tramp-completion-file-name-handler) (tramp-completion-handle-file-name-completion) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-mode-string-to-int) (tramp-file-mode-from-int): * lisp/net/tramp-adb.el (tramp-adb-file-name-p): * lisp/net/tramp-archive.el (tramp-archive-run-real-handler) (tramp-archive-file-name-handler) (tramp-archive-dissect-file-name) (with-parsed-tramp-archive-file-name) (tramp-archive-gvfs-file-name, tramp-archive-handle-access-file): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-compat.el (tramp-unload-file-name-handlers) (tramp-compat-funcall, tramp-compat-tramp-file-name-slots): * lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler) (tramp-ftp-file-name-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p) (tramp-gvfs-file-name-handler) (tramp-gvfs-stringify-dbus-message) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted): * lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay-regexp): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-p) (tramp-rclone-file-name-handler, tramp-rclone-send-command): * lisp/net/tramp-sh.el (tramp-sh--quoting-style-options) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter, tramp-find-executable) (tramp-set-remote-path, tramp-open-shell, tramp-find-shell) (tramp-send-command-and-check, tramp-shell-case-fold) (tramp-get-remote-path): * lisp/net/tramp-smb.el (tramp-smb-file-name-p) (tramp-smb-file-name-handler) (tramp-smb-do-file-attributes-with-stat) (tramp-smb-handle-substitute-in-file-name) (tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p) (tramp-sudoedit-file-name-handler) (tramp-sudoedit-send-command-string): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all): * test/lisp/net/tramp-tests.el (tramp--test-gvfs-p) (tramp--test-with-proper-process-name-and-buffer) (tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 12:10:58 +00:00
"Compile list of remote directories for PATH.
2016-08-21 11:17:30 +00:00
Nonexistent directories are removed from spec."
(with-current-buffer (tramp-get-connection-buffer vec)
;; Expand connection-local variables.
(tramp-set-connection-local-variables vec)
(with-tramp-connection-property
;; When `tramp-own-remote-path' is in `tramp-remote-path', we
;; cache the result for the session only. Otherwise, the
;; result is cached persistently.
(if (memq 'tramp-own-remote-path tramp-remote-path)
(tramp-get-process vec) vec)
"remote-path"
(let* ((remote-path (copy-tree tramp-remote-path))
(elt1 (memq 'tramp-default-remote-path remote-path))
(elt2 (memq 'tramp-own-remote-path remote-path))
(default-remote-path
(when elt1
(or
(tramp-send-command-and-read
vec
(format
"echo \\\"`getconf PATH 2>%s`\\\""
(tramp-get-remote-null-device vec))
'noerror)
;; Default if "getconf" is not available.
(progn
(tramp-message
vec 3
Add remote processes to Tramp sshfs method * doc/misc/tramp.texi (FUSE setup): Method sshfs supports also remote processes. * lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Move setting of `tramp-cache-unload-hook' out of function. * lisp/net/tramp.el (tramp-expand-args): New defun. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it. * lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Adapt `tramp-mount-args'. Add `tramp-login-args', `tramp-direct-async', `tramp-remote-shell', `tramp-remote-shell-login' and `tramp-remote-shell-args'. (tramp-connection-properties): Set "direct-async-process" fir sshfs. (tramp-sshfs-file-name-handler-alist): Add `exec-path', `make-process', `process-file', `set-file-modes', `shell-command', `start-file-process', `tramp-get-remote-gid', `tramp-get-remote-uid' and `tramp-set-file-uid-gid'. (tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file) (tramp-sshfs-handle-set-file-modes): New defuns. * test/lisp/net/tramp-tests.el (tramp-test20-file-modes) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test43-asynchronous-requests): Run also for tramp-sshfs. (tramp--test-shell-file-name): New defun. (tramp-test28-process-file) (tramp-test34-explicit-shell-file-name) (tramp-test43-asynchronous-requests): Use it. (tramp-test40-special-characters-with-stat) (tramp-test40-special-characters-with-perl) (tramp-test40-special-characters-with-ls) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Remove superfluous skip.
2021-03-11 16:16:50 +00:00
"`getconf PATH' not successful, using default value \"%s\"."
"/bin:/usr/bin")
"/bin:/usr/bin"))))
(own-remote-path
;; The login shell could return more than just the $PATH
;; string. So we use `tramp-end-of-heredoc' as marker.
(when elt2
(or
(tramp-send-command-and-read
vec
(format
"%s %s %s 'echo %s \\\"$PATH\\\"'"
(tramp-get-method-parameter vec 'tramp-remote-shell)
(mapconcat
#'identity
(tramp-get-method-parameter vec 'tramp-remote-shell-login)
" ")
(mapconcat
#'identity
(tramp-get-method-parameter vec 'tramp-remote-shell-args)
" ")
(tramp-shell-quote-argument tramp-end-of-heredoc))
'noerror (regexp-quote tramp-end-of-heredoc))
(progn
(tramp-message
vec 2 "Could not retrieve `tramp-own-remote-path'")
nil)))))
;; Replace place holder `tramp-default-remote-path'.
(when elt1
(setcdr elt1
(append
(split-string (or default-remote-path "") ":" 'omit)
(cdr elt1)))
(setq remote-path (delq 'tramp-default-remote-path remote-path)))
;; Replace place holder `tramp-own-remote-path'.
(when elt2
(setcdr elt2
(append
(split-string (or own-remote-path "") ":" 'omit)
(cdr elt2)))
(setq remote-path (delq 'tramp-own-remote-path remote-path)))
;; Remove double entries.
(setq elt1 remote-path)
(while (consp elt1)
(while (and (car elt1) (setq elt2 (member (car elt1) (cdr elt1))))
(setcar elt2 nil))
(setq elt1 (cdr elt1)))
;; Remove non-existing directories.
(delq
nil
(mapcar
(lambda (x)
(and
(stringp x)
(file-directory-p (tramp-make-tramp-file-name vec x 'nohop))
x))
remote-path))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-get-remote-locale (vec)
"Determine remote locale, supporting UTF8 if possible."
(with-tramp-connection-property vec "locale"
(tramp-send-command vec "locale -a")
(let ((candidates '("en_US.utf8" "C.utf8" "en_US.UTF-8" "C.UTF-8"))
locale)
(with-current-buffer (tramp-get-connection-buffer vec)
(while candidates
(goto-char (point-min))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(if (string-match-p (format "^%s\r?$" (regexp-quote (car candidates)))
(buffer-string))
(setq locale (car candidates)
candidates nil)
(setq candidates (cdr candidates)))))
;; Return value.
(format "LC_ALL=%s" (or locale "C")))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-get-ls-command (vec)
"Determine remote `ls' command."
(with-tramp-connection-property vec "ls"
(tramp-message vec 5 "Finding a suitable `ls' command")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(or
(catch 'ls-found
(dolist (cmd '("ls" "gnuls" "gls"))
(let ((dl (tramp-get-remote-path vec))
result)
(while (and dl (setq result (tramp-find-executable vec cmd dl t t)))
;; Check parameters. On busybox, "ls" output coloring is
;; enabled by default sometimes. So we try to disable it
;; when possible. $LS_COLORING is not supported there.
;; Some "ls" versions are sensitive to the order of
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; arguments, they fail when "-al" is after the
;; "--color=never" argument (for example on FreeBSD).
(when (tramp-send-command-and-check
vec (format "%s -lnd /" result))
(when (tramp-send-command-and-check
vec (format
"%s --color=never -al %s"
result (tramp-get-remote-null-device vec)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(setq result (concat result " --color=never")))
(throw 'ls-found result))
(setq dl (cdr dl))))))
(tramp-error vec 'file-error "Couldn't find a proper `ls' command"))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-get-ls-command-with (vec option)
"Return OPTION, if the remote `ls' command supports the OPTION option."
(with-tramp-connection-property vec (concat "ls" option)
(tramp-message vec 5 "Checking, whether `ls %s' works" option)
;; Some "ls" versions are sensitive to the order of arguments,
;; they fail when "-al" is after the "--dired" argument (for
;; example on FreeBSD). Busybox does not support this kind of
;; options.
(and
(not
(tramp-send-command-and-check
vec
(format
"%s --help 2>&1 | grep -iq busybox" (tramp-get-ls-command vec))))
(tramp-send-command-and-check
vec (format
"%s %s -al %s"
(tramp-get-ls-command vec) option (tramp-get-remote-null-device vec)))
option)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-get-test-command (vec)
"Determine remote `test' command."
(with-tramp-connection-property vec "test"
(tramp-message vec 5 "Finding a suitable `test' command")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(if (tramp-send-command-and-check vec "test 0")
"test"
(tramp-find-executable vec "test" (tramp-get-remote-path vec)))))
(defun tramp-get-test-nt-command (vec)
"Check, whether the remote `test' command supports the -nt option."
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Does `test A -nt B' work? Use abominable `find' construct if it
;; doesn't. BSD/OS 4.0 wants the parentheses around the command,
;; for otherwise the shell crashes.
(with-tramp-connection-property vec "test-nt"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(or
(progn
(tramp-send-command
vec (format "( %s / -nt / )" (tramp-get-test-command vec)))
(with-current-buffer (tramp-get-buffer vec)
(goto-char (point-min))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(when (looking-at-p (regexp-quote tramp-end-of-output))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(format "%s %%s -nt %%s" (tramp-get-test-command vec)))))
(progn
(tramp-send-command
vec
(format
"tramp_test_nt () {\n%s -n \"`find $1 -prune -newer $2 -print`\"\n}"
(tramp-get-test-command vec)))
"tramp_test_nt %s %s"))))
(defun tramp-get-file-exists-command (vec)
"Determine remote command for file existing check."
(with-tramp-connection-property vec "file-exists"
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-message vec 5 "Finding command to check if file exists")
(tramp-find-file-exists-command vec)))
(defun tramp-get-remote-ln (vec)
"Determine remote `ln' command."
(with-tramp-connection-property vec "ln"
(tramp-message vec 5 "Finding a suitable `ln' command")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-find-executable vec "ln" (tramp-get-remote-path vec))))
(defun tramp-get-remote-perl (vec)
"Determine remote `perl' command."
(with-tramp-connection-property vec "perl"
(tramp-message vec 5 "Finding a suitable `perl' command")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(let ((result
(or (tramp-find-executable vec "perl5" (tramp-get-remote-path vec))
(tramp-find-executable vec "perl" (tramp-get-remote-path vec)))))
;; Perform a basic check.
(and result
(null (tramp-send-command-and-check
vec (format "%s -e 'print \"Hello\n\";'" result)))
(setq result nil))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; We must check also for some Perl modules.
(when result
(with-tramp-connection-property vec "perl-file-spec"
(tramp-send-command-and-check
vec (format "%s -e 'use File::Spec;'" result)))
(with-tramp-connection-property vec "perl-cwd-realpath"
(tramp-send-command-and-check
vec (format "%s -e 'use Cwd \"realpath\";'" result))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
result)))
(defun tramp-get-remote-stat (vec)
"Determine remote `stat' command."
(with-tramp-connection-property vec "stat"
;; stat on Solaris is buggy. We've got reports for "SunOS 5.10"
;; and "SunOS 5.11" so far.
(unless (string-match-p
tramp-sunos-unames (tramp-get-connection-property vec "uname" ""))
(tramp-message vec 5 "Finding a suitable `stat' command")
(let ((result (tramp-find-executable
vec "stat" (tramp-get-remote-path vec)))
tmp)
;; Check whether stat(1) returns usable syntax. "%s" does not
;; work on older AIX systems. Recent GNU stat versions
;; (8.24?) use shell quoted format for "%N", we check the
;; boundaries "`" and "'" and their localized variants,
;; therefore. See Bug#23422 in coreutils. Since GNU stat
;; 8.26, environment variable QUOTING_STYLE is supported.
(when result
(setq result (concat "env QUOTING_STYLE=locale " result)
tmp (tramp-send-command-and-read
vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror))
(unless (and (listp tmp) (stringp (car tmp))
(string-match-p "^[\"`‘„”«「]/[\"'’“”»」]$" (car tmp))
(integerp (cadr tmp)))
(setq result nil)))
result))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-get-remote-readlink (vec)
"Determine remote `readlink' command."
(with-tramp-connection-property vec "readlink"
(tramp-message vec 5 "Finding a suitable `readlink' command")
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(let ((result (tramp-find-executable
vec "readlink" (tramp-get-remote-path vec))))
(when (and result
(tramp-send-command-and-check
vec (format "%s --canonicalize-missing /" result)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
result))))
(defun tramp-get-remote-trash (vec)
"Determine remote `trash' command.
This command is returned only if `delete-by-moving-to-trash' is non-nil."
(and delete-by-moving-to-trash
(with-tramp-connection-property vec "trash"
(tramp-message vec 5 "Finding a suitable `trash' command")
(tramp-find-executable vec "trash" (tramp-get-remote-path vec)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-get-remote-touch (vec)
"Determine remote `touch' command."
(with-tramp-connection-property vec "touch"
(tramp-message vec 5 "Finding a suitable `touch' command")
(let ((result (tramp-find-executable
vec "touch" (tramp-get-remote-path vec)))
(tmpfile (tramp-make-tramp-temp-name vec)))
;; Busyboxes do support the "-t" option only when they have been
;; built with the DESKTOP config option. Let's check it.
(when result
(tramp-set-connection-property
vec "touch-t"
(tramp-send-command-and-check
vec
(format
"%s -t %s %s"
result
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(format-time-string "%Y%m%d%H%M.%S")
; Sync with Tramp repository * doc/misc/tramp.texi (Frequently Asked Questions): Mention Emacs 28. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.4-pre". * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file, tramp-adb-handle-process-file): Use `tramp-file-local-name'. (tramp-adb-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-cmds.el (tramp-rename-files): Use `tramp-file-local-name'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-process-file, tramp-set-remote-path) (tramp-find-inline-encoding, tramp-get-remote-touch): Use `tramp-file-local-name'. (tramp-sh-handle-make-process): Support `stderr' as file name. Delete temporary stderr file. (tramp-sh-handle-exec-path): Expand `default-directory'. * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-process-file): Use `tramp-file-local-name'. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-set-file-uid-gid): Use `tramp-unquote-file-local-name'. (tramp-sudoedit-handle-make-symbolic-link): Use `tramp-file-local-name'. (tramp-sudoedit-handle-file-system-info): Fix a scoping error. * lisp/net/tramp.el: Bump version to 2.4.4-pre. (tramp-ignored-file-name-regexp, tramp-time-dont-know) (tramp-time-doesnt-exist): Fix typo. (tramp-file-local-name): Extend for non-remote file names. (tramp-unquote-file-local-name): New defun. (tramp-completion-make-tramp-file-name): Simplify. (tramp-set-connection-local-variables-for-buffer) (tramp-equal-remote, tramp-handle-make-auto-save-file-name): Use `tramp-tramp-file-p'. (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-truename, tramp-get-remote-tmpdir) (tramp-make-tramp-temp-file): Use `tramp-file-local-name'. (tramp-handle-shell-command, tramp-handle-start-file-process): Implement asynchronous `error-buffer'.
2020-01-06 11:11:53 +00:00
(tramp-file-local-name tmpfile))))
(delete-file tmpfile))
result)))
(defun tramp-get-remote-df (vec)
"Determine remote `df' command."
(with-tramp-connection-property vec "df"
(tramp-message vec 5 "Finding a suitable `df' command")
(let ((df (tramp-find-executable vec "df" (tramp-get-remote-path vec)))
result)
(when df
(cond
;; coreutils.
((tramp-send-command-and-check
vec
(format
"%s /"
(setq result
(format "%s --block-size=1 --output=size,used,avail" df))))
(tramp-set-connection-property vec "df-blocksize" 1)
result)
;; POSIX.1
((tramp-send-command-and-check
vec (format "%s /" (setq result (format "%s -k" df))))
(tramp-set-connection-property vec "df-blocksize" 1024)
result))))))
(defun tramp-get-remote-gio-monitor (vec)
"Determine remote `gio-monitor' command."
(with-tramp-connection-property vec "gio-monitor"
(tramp-message vec 5 "Finding a suitable `gio-monitor' command")
(tramp-find-executable vec "gio" (tramp-get-remote-path vec) t t)))
(defun tramp-get-remote-inotifywait (vec)
"Determine remote `inotifywait' command."
(with-tramp-connection-property vec "inotifywait"
(tramp-message vec 5 "Finding a suitable `inotifywait' command")
(tramp-find-executable vec "inotifywait" (tramp-get-remote-path vec) t t)))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-get-remote-id (vec)
"Determine remote `id' command."
(with-tramp-connection-property vec "id"
(tramp-message vec 5 "Finding POSIX `id' command")
(catch 'id-found
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(dolist (cmd '("id" "gid"))
(let ((dl (tramp-get-remote-path vec))
result)
(while (and dl (setq result (tramp-find-executable vec cmd dl t t)))
;; Check POSIX parameter.
(when (tramp-send-command-and-check vec (format "%s -u" result))
(throw 'id-found result))
(setq dl (cdr dl))))))))
(defun tramp-get-remote-uid-with-id (vec id-format)
"Implement `tramp-get-remote-uid' for Tramp files using `id'."
(tramp-send-command-and-read
vec
(format "%s -u%s %s"
(tramp-get-remote-id vec)
(if (equal id-format 'integer) "" "n")
(if (equal id-format 'integer)
"" "| sed -e s/^/\\\"/ -e s/\\$/\\\"/"))))
(defun tramp-get-remote-uid-with-perl (vec id-format)
"Implement `tramp-get-remote-uid' for Tramp files using a Perl script."
(tramp-send-command-and-read
vec
(format "%s -le '%s'"
(tramp-get-remote-perl vec)
(if (equal id-format 'integer)
"print $>"
"print \"\\\"\", scalar getpwuid($>), \"\\\"\""))))
(defun tramp-get-remote-python (vec)
"Determine remote `python' command."
(with-tramp-connection-property vec "python"
(tramp-message vec 5 "Finding a suitable `python' command")
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
(or (tramp-find-executable vec "python" (tramp-get-remote-path vec))
(tramp-find-executable vec "python2" (tramp-get-remote-path vec))
(tramp-find-executable vec "python3" (tramp-get-remote-path vec)))))
(defun tramp-get-remote-uid-with-python (vec id-format)
"Implement `tramp-get-remote-uid' for Tramp files using `python'."
(tramp-send-command-and-read
vec
(format "%s -c \"%s\""
(tramp-get-remote-python vec)
(if (equal id-format 'integer)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
"import os; print (os.getuid())"
"import os, pwd; print ('\\\"' + pwd.getpwuid(os.getuid())[0] + '\\\"')"))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-get-remote-gid-with-id (vec id-format)
"Implement `tramp-get-remote-gid' for Tramp files using `id'."
(tramp-send-command-and-read
vec
(format "%s -g%s %s"
(tramp-get-remote-id vec)
(if (equal id-format 'integer) "" "n")
(if (equal id-format 'integer)
"" "| sed -e s/^/\\\"/ -e s/\\$/\\\"/"))))
(defun tramp-get-remote-gid-with-perl (vec id-format)
"Implement `tramp-get-remote-gid' for Tramp files using a Perl script."
(tramp-send-command-and-read
vec
(format "%s -le '%s'"
(tramp-get-remote-perl vec)
(if (equal id-format 'integer)
"print ($)=~/(\\d+)/)"
"print \"\\\"\", scalar getgrgid($)), \"\\\"\""))))
(defun tramp-get-remote-gid-with-python (vec id-format)
"Implement `tramp-get-remote-gid' for Tramp files using `python'."
(tramp-send-command-and-read
vec
(format "%s -c \"%s\""
(tramp-get-remote-python vec)
(if (equal id-format 'integer)
Backport Tramp changes from trunk. * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. (tramp-adb-handle-write-region): Improve messages. (tramp-adb-maybe-open-connection): Don't set `tramp-current-*' variables. * net/tramp-cache.el (tramp-flush-file-function): Simplify check. Suppress debug messages. * net/tramp-ftp.el (top): Remove special handling for URL syntax. (tramp-ftp-file-name-handler): * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add. (tramp-gvfs-methods-mounttracker) (tramp-gvfs-mountlocation-signature): Check `tramp-gvfs-enabled' during initialization. (tramp-gvfs-handle-delete-file): Flush file properties, not directory properties. (tramp-gvfs-handle-file-attributes): Use `string-to-number' when reading "unix::mode". (tramp-gvfs-handle-file-name-all-completions): Use "-h" option for "gvfs-ls". (tramp-gvfs-url-file-name): Apply `cons' where appropriate. `user' and `localname' could be nil. (tramp-gvfs-send-command): Simplify traces. * net/tramp-sh.el (vc-handled-backends, vc-bzr-program) (vc-git-program, vc-hg-program): Declare. (tramp-methods) <sftp>: Remove. It has never worked satisfactorily. (tramp-methods) <nc>: Add new method. (tramp-methods) <telnet>: Redirect stderr to "/dev/null". (tramp-methods) <plink, plinkx, pscp, psftp>: Improve `tramp-login-args'. (tramp-default-user-alist): Add "nc". (top): Remove completion function for "sftp". Add completion functions for "nc" and "psftp". (tramp-sh-handle-set-visited-file-modtime): (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. (tramp-do-copy-or-rename-file-out-of-band): Use cached "remote-copy-args" value, if available. (Bug#18199) Tweak docstring. Implement support for "nc" method. (tramp-sh-handle-expand-file-name, tramp-local-coding-commands) (tramp-remote-coding-commands, tramp-call-local-coding-command): Tweak docstring. (tramp-sh-handle-start-file-process): Expand `default-directory'. (tramp-sh-handle-write-region): Tweak error message. (tramp-sh-handle-vc-registered): Remove backends when the remote binary does not exist. (tramp-open-connection-setup-interactive-shell): Prefer utf-8 coding. (Bug#17859) (tramp-find-inline-encoding): Do not raise an error. (tramp-make-copy-program-file-name): Tweak docstring. Handle also the "nc" case. Quote result also locally. (tramp-get-remote-id): Check also for "gid". (tramp-get-remote-python): * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-set-file-acl): Use `start-process'. (tramp-smb-handle-insert-directory): Use progress reporter. (tramp-smb-handle-rename-file): Flush also file properties of FILENAME. * net/tramp.el (tramp-methods): Tweak docstring. (tramp-file-name-handler): Apply `cons' where appropriate. (tramp-handle-file-accessible-directory-p): Check for `file-readable-p' instead of `file-executable-p'. (tramp-handle-shell-command): Use `display-buffer'. (Bug#18326) (tramp-handle-unhandled-file-name-directory): Return "/". (tramp-check-cached-permissions): Use `tramp-compat-file-attributes'. (tramp-call-process): Add new argument VEC. Adapt callees in all tramp*.el files. * net/trampver.el: Update release number.
2014-11-01 13:34:45 +00:00
"import os; print (os.getgid())"
"import os, grp; print ('\\\"' + grp.getgrgid(os.getgid())[0] + '\\\"')"))))
(defun tramp-get-remote-busybox (vec)
"Determine remote `busybox' command."
(with-tramp-connection-property vec "busybox"
(tramp-message vec 5 "Finding a suitable `busybox' command")
(tramp-find-executable vec "busybox" (tramp-get-remote-path vec))))
(defun tramp-get-remote-awk (vec)
"Determine remote `awk' command."
(with-tramp-connection-property vec "awk"
(tramp-message vec 5 "Finding a suitable `awk' command")
(or (tramp-find-executable vec "awk" (tramp-get-remote-path vec))
(let* ((busybox (tramp-get-remote-busybox vec))
(command (format "%s %s" busybox "awk")))
(and busybox
(tramp-send-command-and-check
vec (concat command " {} <" (tramp-get-remote-null-device vec)))
command)))))
(defun tramp-get-remote-hexdump (vec)
"Determine remote `hexdump' command."
(with-tramp-connection-property vec "hexdump"
(tramp-message vec 5 "Finding a suitable `hexdump' command")
(or (tramp-find-executable vec "hexdump" (tramp-get-remote-path vec))
(let* ((busybox (tramp-get-remote-busybox vec))
(command (format "%s %s" busybox "hexdump")))
(and busybox
(tramp-send-command-and-check
vec (concat command " <" (tramp-get-remote-null-device vec)))
command)))))
(defun tramp-get-remote-od (vec)
"Determine remote `od' command."
(with-tramp-connection-property vec "od"
(tramp-message vec 5 "Finding a suitable `od' command")
(or (tramp-find-executable vec "od" (tramp-get-remote-path vec))
(let* ((busybox (tramp-get-remote-busybox vec))
(command (format "%s %s" busybox "od")))
(and busybox
(tramp-send-command-and-check
vec
(concat command " -A n <" (tramp-get-remote-null-device vec)))
command)))))
Finish implementation of {set-}file-modes FLAG arg in Tramp * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use 'nofollow for temporary files. Use `tramp-compat-set-file-modes'. (tramp-adb-handle-write-region): Do not use 'nofollow for temporary files. (tramp-adb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-compat.el (tramp-compat-file-modes) (tramp-compat-set-file-modes): New defaliases. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): Make explicit check (eq flag 'nofollow). * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG. (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region): Do not use 'nofollow for temporary files. (tramp-get-remote-chmod-h): New defun. * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Implement FLAG. (tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'. * lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG. (tramp-handle-file-modes): Use `file-truename' instead of `file-chase-links'. The latter function does not work for remote file names. (tramp-handle-write-region): Call `tramp-default-file-modes' with 'nofollow if needed. Do not use 'nofollow for temporary files. * test/lisp/net/tramp-tests.el (tramp--test-ignore-make-symbolic-link-error): Check also for "Cannot chmod .* with nofollow flag" error. (tramp-test20-file-modes): Extend test. (tramp--test-emacs28-p): New defun.
2020-02-25 12:25:57 +00:00
(defun tramp-get-remote-chmod-h (vec)
"Check whether remote `chmod' supports nofollow argument."
Finish implementation of {set-}file-modes FLAG arg in Tramp * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use 'nofollow for temporary files. Use `tramp-compat-set-file-modes'. (tramp-adb-handle-write-region): Do not use 'nofollow for temporary files. (tramp-adb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-compat.el (tramp-compat-file-modes) (tramp-compat-set-file-modes): New defaliases. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): Make explicit check (eq flag 'nofollow). * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG. (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region): Do not use 'nofollow for temporary files. (tramp-get-remote-chmod-h): New defun. * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Implement FLAG. (tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'. * lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG. (tramp-handle-file-modes): Use `file-truename' instead of `file-chase-links'. The latter function does not work for remote file names. (tramp-handle-write-region): Call `tramp-default-file-modes' with 'nofollow if needed. Do not use 'nofollow for temporary files. * test/lisp/net/tramp-tests.el (tramp--test-ignore-make-symbolic-link-error): Check also for "Cannot chmod .* with nofollow flag" error. (tramp-test20-file-modes): Extend test. (tramp--test-emacs28-p): New defun.
2020-02-25 12:25:57 +00:00
(with-tramp-connection-property vec "chmod-h"
(tramp-message vec 5 "Finding a suitable `chmod' command with nofollow")
(let ((tmpfile (tramp-make-tramp-temp-name vec)))
(prog1
(tramp-send-command-and-check
vec
(format
"ln -s foo %s && chmod -h %s 0777"
(tramp-file-local-name tmpfile) (tramp-file-local-name tmpfile)))
(delete-file tmpfile)))))
Finish implementation of {set-}file-modes FLAG arg in Tramp * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use 'nofollow for temporary files. Use `tramp-compat-set-file-modes'. (tramp-adb-handle-write-region): Do not use 'nofollow for temporary files. (tramp-adb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-compat.el (tramp-compat-file-modes) (tramp-compat-set-file-modes): New defaliases. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): Make explicit check (eq flag 'nofollow). * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG. (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region): Do not use 'nofollow for temporary files. (tramp-get-remote-chmod-h): New defun. * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Implement FLAG. (tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'. * lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG. (tramp-handle-file-modes): Use `file-truename' instead of `file-chase-links'. The latter function does not work for remote file names. (tramp-handle-write-region): Call `tramp-default-file-modes' with 'nofollow if needed. Do not use 'nofollow for temporary files. * test/lisp/net/tramp-tests.el (tramp--test-ignore-make-symbolic-link-error): Check also for "Cannot chmod .* with nofollow flag" error. (tramp-test20-file-modes): Extend test. (tramp--test-emacs28-p): New defun.
2020-02-25 12:25:57 +00:00
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; Some predefined connection properties.
(defun tramp-get-inline-compress (vec prop size)
"Return the compress command related to PROP.
PROP is either `inline-compress' or `inline-decompress'.
SIZE is the length of the file to be compressed.
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
If no corresponding command is found, nil is returned."
(when (and (integerp tramp-inline-compress-start-size)
(> size tramp-inline-compress-start-size))
(with-tramp-connection-property (tramp-get-process vec) prop
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(tramp-find-inline-compress vec)
(tramp-get-connection-property (tramp-get-process vec) prop nil))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(defun tramp-get-inline-coding (vec prop size)
"Return the coding command related to PROP.
2011-11-20 07:30:16 +00:00
PROP is either `remote-encoding', `remote-decoding',
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
`local-encoding' or `local-decoding'.
SIZE is the length of the file to be coded. Depending on SIZE,
compression might be applied.
If no corresponding command is found, nil is returned.
Otherwise, either a string is returned which contains a `%s' mark
to be used for the respective input or output file; or a Lisp
function cell is returned to be applied on a buffer."
;; We must catch the errors, because we want to return nil, when
;; no inline coding is found.
(ignore-errors
(let ((coding
(with-tramp-connection-property (tramp-get-process vec) prop
(tramp-find-inline-encoding vec)
(tramp-get-connection-property (tramp-get-process vec) prop nil)))
(prop1 (if (tramp-compat-string-search "encoding" prop)
"inline-compress" "inline-decompress"))
compress)
;; The connection property might have been cached. So we must
;; send the script to the remote side - maybe.
(when (and coding (symbolp coding)
(tramp-compat-string-search "remote" prop))
(let ((name (symbol-name coding)))
Rework Tramp wrt string-match-p, looking-at-p, save-match-data * lisp/net/tramp.el (tramp-find-method, tramp-find-user) (tramp-find-host, tramp-dissect-file-name, tramp-make-tramp-file-name) (tramp-completion-make-tramp-file-name, tramp-debug-message) (tramp-message, tramp-progress-reporter-update) (tramp-set-completion-function) (tramp-rfn-eshadow-update-overlay) (tramp-find-file-name-coding-system-alist) (tramp-file-name-for-operation) (tramp-use-absolute-autoload-file-names) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-handle-directory-files) (tramp-handle-file-name-case-insensitive-p) (tramp-handle-file-name-completion, tramp-handle-file-truename) (tramp-handle-insert-directory, tramp-handle-load) (tramp-handle-shell-command, tramp-action-yesno) (tramp-action-yn, tramp-process-actions) (tramp-mode-string-to-int, tramp-get-local-locale) (tramp-local-host-p): * lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb--gnu-switches-to-ash, tramp-adb-sh-fix-ls-output) (tramp-adb-handle-file-name-all-completions) (tramp-adb-handle-shell-command) (tramp-adb-handle-start-file-process): * lisp/net/tramp-archive.el (tramp-archive-dissect-file-name): * lisp/net/tramp-cache.el (tramp-get-hash-table) (tramp-flush-directory-properties, tramp-flush-file-function): * lisp/net/tramp-cmds.el (tramp-reporter-dump-variable) (tramp-append-tramp-buffers): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name) (tramp-gvfs-get-file-attributes) (tramp-gvfs-handle-file-attributes) (tramp-gvfs-monitor-process-filter) (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry) (tramp-gvfs-mount-spec, tramp-gvfs-maybe-open-connection): * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-stat) (tramp-sh-handle-file-selinux-context) (tramp-sh-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-file-name-all-completions) (tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-directory) (tramp-sh-handle-expand-file-name) (tramp-sh-handle-start-file-process) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-handle-file-notify-add-watch) (tramp-sh-gio-monitor-process-filter) (tramp-sh-gvfs-monitor-dir-process-filter) (tramp-sh-inotifywait-process-filter) (tramp-sh-handle-file-system-info, tramp-maybe-send-script) (tramp-find-executable, tramp-open-shell, tramp-find-shell) (tramp-open-connection-setup-interactive-shell) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-convert-file-attributes) (tramp-make-copy-program-file-name, tramp-get-remote-locale) (tramp-get-test-nt-command, tramp-get-remote-stat) (tramp-get-inline-coding): * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files) (tramp-smb-action-get-acl, tramp-smb-handle-file-attributes) (tramp-smb-handle-file-name-all-completions) (tramp-smb-handle-file-system-info) (tramp-smb-handle-file-writable-p) (tramp-smb-handle-insert-directory) (tramp-smb-handle-make-directory) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-start-file-process, tramp-smb-get-localname) (tramp-smb-read-file-entry): Use `string-match-p' and `looking-at-p'. Remove superfluous `save-match-data'. Apply `eval-when-compile' on constant concat data. * lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p-p): Use `string-prefix-p'. (tramp-compat-file-name-unquote): Do not use match data.
2018-12-06 15:00:05 +00:00
(while (string-match "-" name)
(setq name (replace-match "_" nil t name)))
(tramp-maybe-send-script vec (symbol-value coding) name)
(setq coding name)))
(when coding
;; Check for the `compress' command.
(setq compress (tramp-get-inline-compress vec prop1 size))
;; Return the value.
(cond
((and compress (symbolp coding))
(if (tramp-compat-string-search "decompress" prop1)
`(lambda (beg end)
(,coding beg end)
(let ((coding-system-for-write 'binary)
(coding-system-for-read 'binary))
(apply
#'tramp-call-process-region ',vec (point-min) (point-max)
(car (split-string ,compress)) t t nil
(cdr (split-string ,compress)))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
`(lambda (beg end)
(let ((coding-system-for-write 'binary)
(coding-system-for-read 'binary))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(apply
#'tramp-call-process-region ',vec beg end
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(car (split-string ,compress)) t t nil
(cdr (split-string ,compress))))
(,coding (point-min) (point-max)))))
((symbolp coding)
coding)
((and compress (tramp-compat-string-search "decoding" prop))
2011-01-15 20:03:38 +00:00
(format
;; Windows shells need the program file name after
;; the pipe symbol be quoted if they use forward
;; slashes as directory separators.
(cond
((and (tramp-compat-string-search "local" prop)
(eq system-type 'windows-nt))
"(%s | \"%s\")")
((tramp-compat-string-search "local" prop) "(%s | %s)")
(t "(%s | %s >%%s)"))
2011-01-15 20:03:38 +00:00
coding compress))
(compress
2011-01-15 20:03:38 +00:00
(format
;; Windows shells need the program file name after
;; the pipe symbol be quoted if they use forward
;; slashes as directory separators.
(if (and (tramp-compat-string-search "local" prop)
(eq system-type 'windows-nt))
2011-01-15 20:03:38 +00:00
"(%s <%%s | \"%s\")"
"(%s <%%s | %s)")
compress coding))
((tramp-compat-string-search "decoding" prop)
(cond
((tramp-compat-string-search "local" prop) (format "%s" coding))
(t (format "%s >%%s" coding))))
(t
(format "%s <%%s" coding)))))))
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
(add-hook 'tramp-unload-hook
(lambda ()
(unload-feature 'tramp-sh 'force)))
(provide 'tramp-sh)
;;; TODO:
;; * Don't use globbing for directories with many files, as this is
;; likely to produce long command lines, and some shells choke on
;; long command lines.
;;
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; * When editing a remote CVS controlled file as a different user, VC
;; gets confused about the file locking status. Try to find out why
;; the workaround doesn't work.
;;
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; * WIBNI if we had a command "trampclient"? If I was editing in
2011-11-20 02:29:42 +00:00
;; some shell with root privileges, it would be nice if I could
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; just call
;; trampclient filename.c
;; as an editor, and the _current_ shell would connect to an Emacs
2011-11-20 02:29:42 +00:00
;; server and would be used in an existing non-privileged Emacs
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; session for doing the editing in question.
;; That way, I need not tell Emacs my password again and be afraid
;; that it makes it into core dumps or other ugly stuff (I had Emacs
;; once display a just typed password in the context of a keyboard
;; sequence prompt for a question immediately following in a shell
;; script run within Emacs -- nasty).
;; And if I have some ssh session running to a different computer,
;; having the possibility of passing a local file there to a local
;; Emacs session (in case I can arrange for a connection back) would
;; be nice.
;; Likely the corresponding Tramp server should not allow the
;; equivalent of the emacsclient -eval option in order to make this
;; reasonably unproblematic. And maybe trampclient should have some
;; way of passing credentials, like by using an SSL socket or
;; something. (David Kastrup)
;;
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; * Avoid the local shell entirely for starting remote processes. If
;; so, I think even a signal, when delivered directly to the local
;; SSH instance, would correctly be propagated to the remote process
;; automatically; possibly SSH would have to be started with
;; "-t". (Markus Triska)
;;
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; * It makes me wonder if tramp couldn't fall back to ssh when scp
;; isn't on the remote host. (Mark A. Hershberger)
;;
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; * Use lsh instead of ssh. (Alfred M. Szmidt)
;;
;; * Optimize out-of-band copying when both methods are scp-like (not
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; rsync).
;;
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;; * Keep a second connection open for out-of-band methods like scp or
;; rsync.
;;
;; * Implement completion for "/method:user@host:~<abc> TAB".
;;
;; * I think you could get the best of both worlds by using an
;; approach similar to Tramp but running a little tramp-daemon on
;; the other end, such that we can use a more efficient
;; communication protocol (e.g. when saving a file we could locally
;; diff it against the last version (of which the remote daemon
;; would also keep a copy), and then only send the diff).
;;
;; This said, even using such a daemon it might be difficult to get
;; good performance: part of the problem is the number of
;; round-trips. E.g. when saving a file we have to check if the
;; file was modified in the mean time and whether saving into a new
;; inode would change the owner (etc...), which each require a
;; round-trip. To get rid of these round-trips, we'd have to
;; shortcut this code and delegate the higher-level "save file"
;; operation to the remote server, which then has to perform those
;; tasks but still obeying the locally set customizations about how
;; to do each one of those tasks.
;;
;; We could either put higher-level ops in there (like
;; `save-buffer'), which implies replicating the whole `save-buffer'
;; behavior, which is a lot of work and likely to be not 100%
;; faithful.
;;
;; Or we could introduce new low-level ops that are asynchronous,
;; and then rewrite save-buffer to use them. IOW save-buffer would
;; start with a bunch of calls like `start-getting-file-attributes'
;; which could immediately be passed on to the remote side, and
;; later on checks the return value of those calls as and when
;; needed. (Stefan Monnier)
;;
;; * Implement detaching/re-attaching remote sessions. By this, a
;; session could be reused after a connection loss. Use dtach, or
;; screen, or tmux, or mosh.
;;
;; * One interesting solution (with other applications as well) would
;; be to stipulate, as a directory or connection-local variable, an
;; additional rc file on the remote machine that is sourced every
;; time Tramp connects. <https://emacs.stackexchange.com/questions/62306>
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. * net/tramp.el (top): Don't show loading message. Require just 'tramp-compat, everything else is required there. Use `ignore-errors' where appropriate. (tramp-inline-compress-start-size, tramp-copy-size-limit) (tramp-terminal-type, tramp-end-of-output) (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) (tramp-completion-function-alist-ssh) (tramp-completion-function-alist-telnet) (tramp-completion-function-alist-su) (tramp-completion-function-alist-putty, tramp-remote-path) (tramp-remote-process-environment, tramp-sh-extra-args) (tramp-actions-before-shell, tramp-uudecode) (tramp-perl-file-truename, tramp-perl-file-name-all-completions) (tramp-perl-file-attributes) (tramp-perl-directory-files-and-attributes) (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode) (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-handle-file-name-as-directory) (tramp-handle-file-name-directory) (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) (tramp-handle-file-exists-p, tramp-handle-file-attributes) (tramp-do-file-attributes-with-ls) (tramp-do-file-attributes-with-perl) (tramp-do-file-attributes-with-stat) (tramp-handle-set-visited-file-modtime) (tramp-handle-verify-visited-file-modtime) (tramp-handle-set-file-modes, tramp-handle-set-file-times) (tramp-set-file-uid-gid, tramp-remote-selinux-p) (tramp-handle-file-selinux-context) (tramp-handle-set-file-selinux-context) (tramp-handle-file-executable-p, tramp-handle-file-readable-p) (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) (tramp-handle-file-directory-p, tramp-handle-file-regular-p) (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) (tramp-handle-file-ownership-preserved-p) (tramp-handle-directory-file-name, tramp-handle-directory-files) (tramp-handle-directory-files-and-attributes) (tramp-do-directory-files-and-attributes-with-perl) (tramp-do-directory-files-and-attributes-with-stat) (tramp-handle-file-name-all-completions) (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) (tramp-handle-copy-file, tramp-handle-copy-directory) (tramp-handle-rename-file, tramp-do-copy-or-rename-file) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-make-directory, tramp-handle-delete-directory) (tramp-handle-delete-file) (tramp-handle-dired-recursive-delete-directory) (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) (tramp-handle-insert-directory) (tramp-handle-unhandled-file-name-directory) (tramp-handle-expand-file-name) (tramp-handle-substitute-in-file-name) (tramp-handle-executable-find, tramp-process-sentinel) (tramp-handle-start-file-process, tramp-handle-process-file) (tramp-handle-call-process-region, tramp-handle-shell-command) (tramp-handle-file-local-copy, tramp-handle-file-remote-p) (tramp-handle-insert-file-contents) (tramp-handle-insert-file-contents-literally) (tramp-handle-find-backup-file-name) (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) (tramp-vc-registered-file-names, tramp-handle-vc-registered) (tramp-sh-file-name-handler, tramp-vc-file-name-handler) (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) (tramp-find-file-exists-command, tramp-open-shell) (tramp-find-shell, tramp-barf-if-no-shell-prompt) (tramp-open-connection-setup-interactive-shell) (tramp-local-coding-commands, tramp-remote-coding-commands) (tramp-find-inline-encoding, tramp-call-local-coding-command) (tramp-inline-compress-commands, tramp-find-inline-compress) (tramp-compute-multi-hops, tramp-maybe-open-connection) (tramp-send-command , tramp-wait-for-output) (tramp-send-command-and-check, tramp-barf-unless-okay) (tramp-send-command-and-read, tramp-mode-string-to-int) (tramp-convert-file-attributes, tramp-check-cached-permissions) (tramp-file-mode-from-int, tramp-file-mode-permissions) (tramp-shell-case-fold, tramp-make-copy-program-file-name) (tramp-method-out-of-band-p, tramp-local-host-p) (tramp-get-remote-path, tramp-get-remote-tmpdir) (tramp-get-ls-command, tramp-get-ls-command-with-dired) (tramp-get-test-command, tramp-get-test-nt-command) (tramp-get-file-exists-command, tramp-get-remote-ln) (tramp-get-remote-perl, tramp-get-remote-stat) (tramp-get-remote-readlink, tramp-get-remote-trash) (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) (tramp-get-local-uid, tramp-get-local-gid) (tramp-get-inline-compress, tramp-get-inline-coding, ): Move to tramp-sh.el. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): Move initialization to tramp-sh.el. (tramp-temp-name-prefix): Make it a defconst. (tramp-dissect-file-name): Don't check anymore for multi-hop methods. (tramp-debug-outline-regexp): Add a docstring. (tramp-debug-outline-level): Renamed from `tramp-outline-level'. (tramp-get-debug-buffer): Use it. * net/tramp-cache.el (top): Set tramp-autoload cookie for initialization forms. (tramp-set-connection-property): Don't protect `tramp-message' call, it isn't necessary any longer. (tramp-dump-connection-properties): Use `ignore-errors'. * net/tramp-compat.el (top): Require 'advice, 'format-spec, 'password-cache and 'auth-source. * net/tramp-gvfs.el (top): * net/tramp-smb.el (top): Require 'tramp-sh. * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. * net/tramp-sh.el: New file, derived from tramp.el. (top): Initialize `tramp-methods', `tramp-default-method-alist', `tramp-default-user-alist', tramp-foreign-file-name-handler-alist. Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use `ignore-errors' where appropriate. (tramp-sh-file-name-handler-alist): Renamed from `tramp-file-name-handler-alist'. (tramp-send-command-and-check): Return t or nil. Remove all `zerop' checks, where called. (tramp-handle-set-file-modes) (tramp-do-copy-or-rename-file-directly) (tramp-handle-delete-directory, tramp-handle-delete-file) (tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'. (tramp-sh-file-name-handler, tramp-send-command-and-check) (tramp-get-remote-ln): Set tramp-autoload cookie. * net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
;;; tramp-sh.el ends here