Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 --- Tramp access functions for (s)sh-like connections
|
|
|
|
|
2015-01-01 22:26:41 +00:00
|
|
|
;; Copyright (C) 1998-2015 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>
|
|
|
|
;; 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 <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(require 'tramp)
|
|
|
|
|
2013-08-15 17:02:09 +00:00
|
|
|
;; Pacify byte-compiler.
|
|
|
|
(eval-when-compile
|
|
|
|
(require 'cl)
|
2013-08-17 10:20:15 +00:00
|
|
|
(require 'dired))
|
|
|
|
(defvar directory-sep-char)
|
|
|
|
(defvar tramp-gw-tunnel-method)
|
|
|
|
(defvar tramp-gw-socks-method)
|
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
|
|
|
|
2015-03-15 15:07:03 +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
|
|
|
(defcustom tramp-inline-compress-start-size 4096
|
2012-04-09 13:05:48 +00:00
|
|
|
"The minimum size of compressing where inline transfer.
|
2011-12-12 05:32:49 +00:00
|
|
|
When inline transfer, compress transferred data of 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
|
|
|
whose size is this value or above (up to `tramp-copy-size-limit').
|
|
|
|
If it is nil, no compression at all will be applied."
|
|
|
|
:group 'tramp
|
|
|
|
:type '(choice (const nil) integer))
|
|
|
|
|
2015-03-15 15:07:03 +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
|
|
|
(defcustom tramp-copy-size-limit 10240
|
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 maximum file size where inline copying is preferred over an \
|
|
|
|
out-of-the-band copy.
|
|
|
|
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
|
|
|
|
:type '(choice (const nil) integer))
|
|
|
|
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(defcustom tramp-terminal-type "dumb"
|
2012-04-09 13:05:48 +00:00
|
|
|
"Value of TERM environment variable for logging in to remote host.
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
Because Tramp wants to parse the output of the remote shell, it is easily
|
|
|
|
confused by ANSI color escape sequences and suchlike. Often, shell init
|
|
|
|
files conditionalize this setup based on the TERM environment variable."
|
|
|
|
:group 'tramp
|
|
|
|
:type 'string)
|
|
|
|
|
2014-12-17 19:05:15 +00:00
|
|
|
;;;###tramp-autoload
|
2015-02-02 19:47:31 +00:00
|
|
|
(defcustom tramp-histfile-override t
|
2014-12-20 11:14:04 +00:00
|
|
|
"When invoking a shell, override the HISTFILE with this value.
|
2015-02-02 19:47:31 +00:00
|
|
|
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.
|
2015-02-02 11:38:36 +00:00
|
|
|
|
2015-02-03 08:24:57 +00:00
|
|
|
The value t, the default value, 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\"."
|
2014-12-17 19:05:15 +00:00
|
|
|
:group 'tramp
|
2014-12-20 12:09:49 +00:00
|
|
|
:version "25.1"
|
2014-12-17 19:05:15 +00:00
|
|
|
:type '(choice (const :tag "Do not override HISTFILE" nil)
|
2015-02-02 19:47:31 +00:00
|
|
|
(const :tag "Unset HISTFILE" t)
|
2014-12-17 19:05:15 +00:00
|
|
|
(string :tag "Redirect to a file")))
|
|
|
|
|
2014-02-19 19:24:32 +00:00
|
|
|
;;;###tramp-autoload
|
2011-07-04 12:12:38 +00:00
|
|
|
(defconst tramp-color-escape-sequence-regexp "\e[[;0-9]+m"
|
|
|
|
"Escape sequences produced by the \"ls\" command.")
|
|
|
|
|
2011-02-05 09:52:07 +00:00
|
|
|
;; 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
|
2011-02-03 11:28:16 +00:00
|
|
|
;; 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
|
|
|
|
detected as prompt when being sent on echoing hosts, therefore.")
|
|
|
|
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(defconst tramp-initial-end-of-output "#$ "
|
|
|
|
"Prompt when establishing a connection.")
|
|
|
|
|
2014-02-05 14:11:50 +00:00
|
|
|
(defconst tramp-end-of-heredoc (md5 tramp-end-of-output)
|
|
|
|
"String used to recognize end of heredoc strings.")
|
|
|
|
|
2015-03-15 15:07:03 +00:00
|
|
|
;;;###tramp-autoload
|
|
|
|
(defcustom tramp-use-ssh-controlmaster-options t
|
|
|
|
"Whether to use `tramp-ssh-controlmaster-options'."
|
|
|
|
:group 'tramp
|
|
|
|
:version "24.4"
|
|
|
|
: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'.")
|
|
|
|
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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
|
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
'("rcp"
|
|
|
|
(tramp-login-program "rsh")
|
|
|
|
(tramp-login-args (("%h") ("-l" "%u")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
(tramp-copy-program "rcp")
|
2011-03-12 15:19:29 +00:00
|
|
|
(tramp-copy-args (("-p" "%k") ("-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
|
|
|
(tramp-copy-keep-date t)
|
|
|
|
(tramp-copy-recursive t)))
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
'("remcp"
|
|
|
|
(tramp-login-program "remsh")
|
|
|
|
(tramp-login-args (("%h") ("-l" "%u")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
(tramp-copy-program "rcp")
|
2011-03-12 15:19:29 +00:00
|
|
|
(tramp-copy-args (("-p" "%k")))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-copy-keep-date t)))
|
|
|
|
;;;###tramp-autoload
|
2010-12-02 19:34:31 +00:00
|
|
|
(add-to-list 'tramp-methods
|
2013-02-23 12:40:14 +00:00
|
|
|
'("scp"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-login-program "ssh")
|
2013-02-23 12:40:14 +00:00
|
|
|
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
|
Use ControlMaster where applicable. (Bug#13677)
* net/tramp.el (tramp-ssh-controlmaster-template): New defvar,
replacing `tramp-detect-ssh-controlmaster'.
(tramp-default-method): Use it.
* net/tramp-sh.el (tramp-methods) [scp, scp1, scp2, scpx, sftp]:
[rsync, ssh, ssh1, ssh2, sshx]: Add ControlPath and ControlMaster
arguments.
[scpc, rsyncc]: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc", "ssh1_old"
and "ssh2_old".
(tramp-do-copy-or-rename-file-out-of-band): Change trace level.
(tramp-maybe-open-connection): Reuse tmpfile for ControlPath.
2013-02-13 16:23:15 +00:00
|
|
|
("-e" "none") ("%h")))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-async-args (("-q")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
(tramp-copy-program "scp")
|
2013-02-23 12:40:14 +00:00
|
|
|
(tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r") ("%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
|
|
|
(tramp-copy-keep-date t)
|
|
|
|
(tramp-copy-recursive t)
|
|
|
|
(tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null")
|
|
|
|
("-o" "UserKnownHostsFile=/dev/null")
|
|
|
|
("-o" "StrictHostKeyChecking=no")))
|
|
|
|
(tramp-default-port 22)))
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
2013-02-23 12:40:14 +00:00
|
|
|
'("scpx"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-login-program "ssh")
|
2013-02-23 12:40:14 +00:00
|
|
|
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
|
Use ControlMaster where applicable. (Bug#13677)
* net/tramp.el (tramp-ssh-controlmaster-template): New defvar,
replacing `tramp-detect-ssh-controlmaster'.
(tramp-default-method): Use it.
* net/tramp-sh.el (tramp-methods) [scp, scp1, scp2, scpx, sftp]:
[rsync, ssh, ssh1, ssh2, sshx]: Add ControlPath and ControlMaster
arguments.
[scpc, rsyncc]: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc", "ssh1_old"
and "ssh2_old".
(tramp-do-copy-or-rename-file-out-of-band): Change trace level.
(tramp-maybe-open-connection): Reuse tmpfile for ControlPath.
2013-02-13 16:23:15 +00:00
|
|
|
("-e" "none") ("-t" "-t") ("%h") ("/bin/sh")))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-async-args (("-q")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
(tramp-copy-program "scp")
|
2013-02-23 12:40:14 +00:00
|
|
|
(tramp-copy-args (("-P" "%p") ("-p" "%k")
|
|
|
|
("-q") ("-r") ("%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
|
|
|
(tramp-copy-keep-date t)
|
2010-12-31 19:57:05 +00:00
|
|
|
(tramp-copy-recursive 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
|
|
|
(tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null")
|
|
|
|
("-o" "UserKnownHostsFile=/dev/null")
|
|
|
|
("-o" "StrictHostKeyChecking=no")))
|
|
|
|
(tramp-default-port 22)))
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
2013-02-23 12:40:14 +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
|
|
|
(tramp-login-program "ssh")
|
2013-02-23 12:40:14 +00:00
|
|
|
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%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
|
|
|
("-e" "none") ("%h")))
|
|
|
|
(tramp-async-args (("-q")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
(tramp-copy-program "rsync")
|
2011-03-12 15:19:29 +00:00
|
|
|
(tramp-copy-args (("-t" "%k") ("-r")))
|
2013-02-23 12:40:14 +00:00
|
|
|
(tramp-copy-env (("RSYNC_RSH") ("ssh" "%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
|
|
|
(tramp-copy-keep-date t)
|
|
|
|
(tramp-copy-keep-tmpfile t)
|
|
|
|
(tramp-copy-recursive t)))
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
'("rsh"
|
|
|
|
(tramp-login-program "rsh")
|
|
|
|
(tramp-login-args (("%h") ("-l" "%u")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
'("remsh"
|
|
|
|
(tramp-login-program "remsh")
|
|
|
|
(tramp-login-args (("%h") ("-l" "%u")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
2013-02-23 12:40:14 +00:00
|
|
|
'("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
|
|
|
(tramp-login-program "ssh")
|
2013-02-23 12:40:14 +00:00
|
|
|
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
|
Use ControlMaster where applicable. (Bug#13677)
* net/tramp.el (tramp-ssh-controlmaster-template): New defvar,
replacing `tramp-detect-ssh-controlmaster'.
(tramp-default-method): Use it.
* net/tramp-sh.el (tramp-methods) [scp, scp1, scp2, scpx, sftp]:
[rsync, ssh, ssh1, ssh2, sshx]: Add ControlPath and ControlMaster
arguments.
[scpc, rsyncc]: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc", "ssh1_old"
and "ssh2_old".
(tramp-do-copy-or-rename-file-out-of-band): Change trace level.
(tramp-maybe-open-connection): Reuse tmpfile for ControlPath.
2013-02-13 16:23:15 +00:00
|
|
|
("-e" "none") ("%h")))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-async-args (("-q")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
(tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null")
|
|
|
|
("-o" "UserKnownHostsFile=/dev/null")
|
|
|
|
("-o" "StrictHostKeyChecking=no")))
|
|
|
|
(tramp-default-port 22)))
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
2013-02-23 12:40:14 +00:00
|
|
|
'("sshx"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-login-program "ssh")
|
2013-02-23 12:40:14 +00:00
|
|
|
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
|
Use ControlMaster where applicable. (Bug#13677)
* net/tramp.el (tramp-ssh-controlmaster-template): New defvar,
replacing `tramp-detect-ssh-controlmaster'.
(tramp-default-method): Use it.
* net/tramp-sh.el (tramp-methods) [scp, scp1, scp2, scpx, sftp]:
[rsync, ssh, ssh1, ssh2, sshx]: Add ControlPath and ControlMaster
arguments.
[scpc, rsyncc]: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc", "ssh1_old"
and "ssh2_old".
(tramp-do-copy-or-rename-file-out-of-band): Change trace level.
(tramp-maybe-open-connection): Reuse tmpfile for ControlPath.
2013-02-13 16:23:15 +00:00
|
|
|
("-e" "none") ("-t" "-t") ("%h") ("/bin/sh")))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-async-args (("-q")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
(tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null")
|
|
|
|
("-o" "UserKnownHostsFile=/dev/null")
|
|
|
|
("-o" "StrictHostKeyChecking=no")))
|
|
|
|
(tramp-default-port 22)))
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
'("telnet"
|
|
|
|
(tramp-login-program "telnet")
|
2014-11-01 13:34:45 +00:00
|
|
|
(tramp-login-args (("%h") ("%p") ("2>/dev/null")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
(tramp-default-port 23)))
|
|
|
|
;;;###tramp-autoload
|
2014-11-01 13:34:45 +00:00
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
'("nc"
|
|
|
|
(tramp-login-program "telnet")
|
|
|
|
(tramp-login-args (("%h") ("%p") ("2>/dev/null")))
|
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(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")))
|
|
|
|
(tramp-default-port 23)))
|
|
|
|
;;;###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
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
'("su"
|
|
|
|
(tramp-login-program "su")
|
|
|
|
(tramp-login-args (("-") ("%u")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
2013-07-11 09:52:54 +00:00
|
|
|
(tramp-remote-shell-args ("-c"))
|
|
|
|
(tramp-connection-timeout 10)))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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
|
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
'("sudo"
|
|
|
|
(tramp-login-program "sudo")
|
|
|
|
(tramp-login-args (("-u" "%u") ("-s") ("-H") ("-p" "Password:")))
|
2014-03-21 13:02:25 +00:00
|
|
|
;; Local $SHELL could be a nasty one, like zsh or fish. Let's override it.
|
|
|
|
(tramp-login-env (("SHELL") ("/bin/sh")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
2013-07-11 09:52:54 +00:00
|
|
|
(tramp-remote-shell-args ("-c"))
|
|
|
|
(tramp-connection-timeout 10)))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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
|
2010-12-14 20:33:33 +00:00
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
'("ksu"
|
|
|
|
(tramp-login-program "ksu")
|
|
|
|
(tramp-login-args (("%u") ("-q")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
2013-07-11 09:52:54 +00:00
|
|
|
(tramp-remote-shell-args ("-c"))
|
|
|
|
(tramp-connection-timeout 10)))
|
2010-12-14 20:33:33 +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
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
'("krlogin"
|
|
|
|
(tramp-login-program "krlogin")
|
|
|
|
(tramp-login-args (("%h") ("-l" "%u") ("-x")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
2014-11-01 13:34:45 +00:00
|
|
|
`("plink"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-login-program "plink")
|
2014-11-01 13:34:45 +00:00
|
|
|
;; ("%h") must be a single element, see `tramp-compute-multi-hops'.
|
|
|
|
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
|
|
|
|
("%h") ("\"")
|
|
|
|
(,(format
|
|
|
|
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
|
|
|
|
tramp-terminal-type
|
|
|
|
tramp-initial-end-of-output))
|
|
|
|
("/bin/sh") ("\"")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
(tramp-default-port 22)))
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
`("plinkx"
|
|
|
|
(tramp-login-program "plink")
|
2014-11-01 13:34:45 +00:00
|
|
|
(tramp-login-args (("-load") ("%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
|
|
|
(,(format
|
|
|
|
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
|
|
|
|
tramp-terminal-type
|
|
|
|
tramp-initial-end-of-output))
|
2014-11-01 13:34:45 +00:00
|
|
|
("/bin/sh") ("\"")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
2014-11-01 13:34:45 +00:00
|
|
|
`("pscp"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-login-program "plink")
|
2014-11-01 13:34:45 +00:00
|
|
|
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
|
|
|
|
("%h") ("\"")
|
|
|
|
(,(format
|
|
|
|
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
|
|
|
|
tramp-terminal-type
|
|
|
|
tramp-initial-end-of-output))
|
|
|
|
("/bin/sh") ("\"")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
(tramp-copy-program "pscp")
|
2012-01-22 12:55:36 +00:00
|
|
|
(tramp-copy-args (("-l" "%u") ("-P" "%p") ("-scp") ("-p" "%k")
|
2010-12-02 19:34:31 +00:00
|
|
|
("-q") ("-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
|
|
|
(tramp-copy-keep-date t)
|
2010-12-02 19:34:31 +00:00
|
|
|
(tramp-copy-recursive 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
|
|
|
(tramp-default-port 22)))
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
2014-11-01 13:34:45 +00:00
|
|
|
`("psftp"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-login-program "plink")
|
2014-11-01 13:34:45 +00:00
|
|
|
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
|
|
|
|
("%h") ("\"")
|
|
|
|
(,(format
|
|
|
|
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
|
|
|
|
tramp-terminal-type
|
|
|
|
tramp-initial-end-of-output))
|
|
|
|
("/bin/sh") ("\"")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-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
|
|
|
(tramp-copy-program "pscp")
|
2012-01-22 12:55:36 +00:00
|
|
|
(tramp-copy-args (("-l" "%u") ("-P" "%p") ("-sftp") ("-p" "%k")
|
2010-12-02 19:34:31 +00:00
|
|
|
("-q") ("-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
|
|
|
(tramp-copy-keep-date t)
|
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-copy-recursive 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
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-methods
|
|
|
|
'("fcp"
|
|
|
|
(tramp-login-program "fsh")
|
|
|
|
(tramp-login-args (("%h") ("-l" "%u") ("sh" "-i")))
|
2011-09-04 18:14:34 +00:00
|
|
|
(tramp-remote-shell "/bin/sh")
|
|
|
|
(tramp-remote-shell-args ("-i") ("-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
|
|
|
(tramp-copy-program "fcp")
|
2011-03-12 15:19:29 +00:00
|
|
|
(tramp-copy-args (("-p" "%k")))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-copy-keep-date t)))
|
|
|
|
|
2010-12-30 09:04:15 +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
|
|
|
(add-to-list 'tramp-default-method-alist
|
|
|
|
`(,tramp-local-host-regexp "\\`root\\'" "su"))
|
|
|
|
|
2010-12-30 09:04:15 +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
|
|
|
(add-to-list 'tramp-default-user-alist
|
2010-12-14 20:33:33 +00:00
|
|
|
`(,(concat "\\`" (regexp-opt '("su" "sudo" "ksu")) "\\'")
|
|
|
|
nil "root"))
|
2010-12-27 10:56:26 +00:00
|
|
|
;; Do not add "ssh" based methods, otherwise ~/.ssh/config would be ignored.
|
2012-01-22 12:55:36 +00:00
|
|
|
;; Do not add "plink" based methods, they ask interactively for the user.
|
2010-12-30 09:04:15 +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
|
|
|
(add-to-list 'tramp-default-user-alist
|
2010-12-14 20:33:33 +00:00
|
|
|
`(,(concat
|
|
|
|
"\\`"
|
2014-11-01 13:34:45 +00:00
|
|
|
(regexp-opt
|
|
|
|
'("rcp" "remcp" "rsh" "telnet" "nc" "krlogin" "fcp"))
|
2010-12-14 20:33:33 +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
|
|
|
nil ,(user-login-name)))
|
|
|
|
|
2011-06-04 13:58:37 +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.")
|
|
|
|
|
2011-06-04 13:58:37 +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-ssh
|
|
|
|
'((tramp-parse-rhosts "/etc/hosts.equiv")
|
|
|
|
(tramp-parse-rhosts "/etc/shosts.equiv")
|
|
|
|
(tramp-parse-shosts "/etc/ssh_known_hosts")
|
|
|
|
(tramp-parse-sconfig "/etc/ssh_config")
|
|
|
|
(tramp-parse-shostkeys "/etc/ssh2/hostkeys")
|
|
|
|
(tramp-parse-sknownhosts "/etc/ssh2/knownhosts")
|
|
|
|
(tramp-parse-rhosts "~/.rhosts")
|
|
|
|
(tramp-parse-rhosts "~/.shosts")
|
|
|
|
(tramp-parse-shosts "~/.ssh/known_hosts")
|
|
|
|
(tramp-parse-sconfig "~/.ssh/config")
|
|
|
|
(tramp-parse-shostkeys "~/.ssh2/hostkeys")
|
|
|
|
(tramp-parse-sknownhosts "~/.ssh2/knownhosts"))
|
|
|
|
"Default list of (FUNCTION FILE) pairs to be examined for ssh methods.")
|
|
|
|
|
2011-06-04 13:58:37 +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-telnet
|
|
|
|
'((tramp-parse-hosts "/etc/hosts"))
|
|
|
|
"Default list of (FUNCTION FILE) pairs to be examined for telnet methods.")
|
|
|
|
|
2011-06-04 13:58:37 +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-su
|
|
|
|
'((tramp-parse-passwd "/etc/passwd"))
|
|
|
|
"Default list of (FUNCTION FILE) pairs to be examined for su methods.")
|
|
|
|
|
2011-06-04 13:58:37 +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-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 (memq system-type '(windows-nt))
|
|
|
|
"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
|
|
|
|
2011-06-04 13:58:37 +00:00
|
|
|
;;;###tramp-autoload
|
|
|
|
(eval-after-load 'tramp
|
|
|
|
'(progn
|
|
|
|
(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)
|
2014-11-01 13:34:45 +00:00
|
|
|
(tramp-set-completion-function "nc" tramp-completion-function-alist-telnet)
|
2011-06-04 13:58:37 +00:00
|
|
|
(tramp-set-completion-function "su" tramp-completion-function-alist-su)
|
|
|
|
(tramp-set-completion-function "sudo" tramp-completion-function-alist-su)
|
|
|
|
(tramp-set-completion-function "ksu" tramp-completion-function-alist-su)
|
|
|
|
(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)
|
2014-11-01 13:34:45 +00:00
|
|
|
(tramp-set-completion-function "psftp" tramp-completion-function-alist-ssh)
|
2011-06-04 13:58:37 +00:00
|
|
|
(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
|
|
|
|
|
|
|
;; "getconf PATH" yields:
|
|
|
|
;; HP-UX: /usr/bin:/usr/ccs/bin:/opt/ansic/bin:/opt/langtools/bin:/opt/fortran/bin
|
|
|
|
;; Solaris: /usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin
|
|
|
|
;; GNU/Linux (Debian, Suse): /bin:/usr/bin
|
|
|
|
;; FreeBSD: /usr/bin:/bin:/usr/sbin:/sbin: - beware trailing ":"!
|
|
|
|
;; IRIX64: /usr/bin
|
2012-01-15 16:03:30 +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
|
|
|
(defcustom tramp-remote-path
|
2012-08-29 12:49:44 +00:00
|
|
|
'(tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin"
|
|
|
|
"/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin"
|
|
|
|
"/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin"
|
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
|
|
|
"/opt/bin" "/opt/sbin" "/opt/local/bin")
|
2012-04-09 13:05:48 +00:00
|
|
|
"List of directories to search for executables on remote host.
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
For every remote host, this variable will be set buffer local,
|
|
|
|
keeping the list of existing directories on that host.
|
|
|
|
|
|
|
|
You can use `~' in this list, but when searching for a shell which groks
|
|
|
|
tilde expansion, all directory names starting with `~' will be ignored.
|
|
|
|
|
|
|
|
`Default Directories' represent the list of directories given by
|
|
|
|
the command \"getconf PATH\". It is recommended to use this
|
|
|
|
entry on top of this list, because these are the default
|
2011-02-03 11:28:16 +00:00
|
|
|
directories for POSIX compatible commands. On remote hosts which
|
|
|
|
do not offer the getconf command (like cygwin), the value
|
|
|
|
\"/bin:/usr/bin\" is used instead 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
|
|
|
|
|
|
|
`Private Directories' are the settings of the $PATH environment,
|
|
|
|
as given in your `~/.profile'."
|
|
|
|
:group 'tramp
|
|
|
|
:type '(repeat (choice
|
|
|
|
(const :tag "Default Directories" tramp-default-remote-path)
|
|
|
|
(const :tag "Private Directories" tramp-own-remote-path)
|
|
|
|
(string :tag "Directory"))))
|
|
|
|
|
2013-02-16 17:44:00 +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
|
|
|
(defcustom tramp-remote-process-environment
|
2014-05-06 08:42:53 +00:00
|
|
|
`("TMOUT=0" "LC_CTYPE=''"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 "TERM=%s" tramp-terminal-type)
|
|
|
|
"EMACS=t" ;; Deprecated.
|
|
|
|
,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version)
|
2015-02-15 09:57:33 +00:00
|
|
|
"CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH=" "PAGER=cat"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
"autocorrect=" "correct=")
|
2012-04-09 13:05:48 +00:00
|
|
|
"List of environment variables to be set on the remote host.
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
|
|
|
|
Each element should be a string of the form ENVVARNAME=VALUE. An
|
2011-11-17 09:09:20 +00:00
|
|
|
entry ENVVARNAME= disables the corresponding environment variable,
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
which might have been set in the init files like ~/.profile.
|
|
|
|
|
|
|
|
Special handling is applied to the PATH environment, which should
|
2011-02-05 09:52:07 +00:00
|
|
|
not be set here. Instead, it should be set via `tramp-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
|
|
|
:group 'tramp
|
2014-05-06 08:42:53 +00:00
|
|
|
:version "24.4"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 '(repeat string))
|
|
|
|
|
2015-03-15 15:07:03 +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
|
|
|
(defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile"))
|
2012-04-09 13:05:48 +00:00
|
|
|
"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.
|
|
|
|
|
|
|
|
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
|
|
|
|
;; This might be the wrong way to test whether the widget type
|
|
|
|
;; `alist' is available. Who knows the right way to test it?
|
|
|
|
:type (if (get 'alist 'widget-type)
|
|
|
|
'(alist :key-type string :value-type string)
|
|
|
|
'(repeat (cons string string))))
|
|
|
|
|
|
|
|
(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-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-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
|
2014-05-06 09:51:05 +00:00
|
|
|
"(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.")
|
|
|
|
|
|
|
|
(defconst tramp-perl-file-truename
|
|
|
|
"%s -e '
|
|
|
|
use File::Spec;
|
|
|
|
use Cwd \"realpath\";
|
|
|
|
|
|
|
|
sub recursive {
|
|
|
|
my ($volume, @dirs) = @_;
|
|
|
|
my $real = realpath(File::Spec->catpath(
|
|
|
|
$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 = realpath($ARGV[0]);
|
|
|
|
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), \"\");
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($ARGV[0] =~ /\\/$/) {
|
|
|
|
$result = $result . \"/\";
|
|
|
|
}
|
|
|
|
|
|
|
|
print \"\\\"$result\\\"\\n\";
|
|
|
|
' \"$1\" 2>/dev/null"
|
|
|
|
"Perl script to produce output suitable for use with `file-truename'
|
|
|
|
on the remote file system.
|
|
|
|
Escape sequence %s is replaced with name of Perl binary.
|
|
|
|
This string is passed to `format', so percent characters need to be doubled.")
|
|
|
|
|
|
|
|
(defconst tramp-perl-file-name-all-completions
|
|
|
|
"%s -e 'sub case {
|
|
|
|
my $str = shift;
|
|
|
|
if ($ARGV[2]) {
|
|
|
|
return lc($str);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
return $str;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
opendir(d, $ARGV[0]) || die(\"$ARGV[0]: $!\\nfail\\n\");
|
|
|
|
@files = readdir(d); closedir(d);
|
|
|
|
foreach $f (@files) {
|
|
|
|
if (case(substr($f, 0, length($ARGV[1]))) eq case($ARGV[1])) {
|
|
|
|
if (-d \"$ARGV[0]/$f\") {
|
|
|
|
print \"$f/\\n\";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
print \"$f\\n\";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
print \"ok\\n\"
|
|
|
|
' \"$1\" \"$2\" \"$3\" 2>/dev/null"
|
|
|
|
"Perl script to produce output suitable for use with
|
|
|
|
`file-name-all-completions' on the remote file system. Escape
|
|
|
|
sequence %s is replaced with name of Perl binary. This string is
|
|
|
|
passed to `format', so percent characters need to be doubled.")
|
|
|
|
|
|
|
|
;; 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
|
2010-10-04 19:44:08 +00:00
|
|
|
;; 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
|
|
|
|
"%s -e '
|
|
|
|
@stat = lstat($ARGV[0]);
|
|
|
|
if (!@stat) {
|
|
|
|
print \"nil\\n\";
|
|
|
|
exit 0;
|
|
|
|
}
|
|
|
|
if (($stat[2] & 0170000) == 0120000)
|
|
|
|
{
|
|
|
|
$type = readlink($ARGV[0]);
|
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.0 %%u t (%%u . %%u) -1)\\n\",
|
|
|
|
$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] >> 16 & 0xffff,
|
|
|
|
$stat[1] & 0xffff
|
|
|
|
);' \"$1\" \"$2\" 2>/dev/null"
|
|
|
|
"Perl script to produce output suitable for use with `file-attributes'
|
|
|
|
on the remote file system.
|
|
|
|
Escape sequence %s is replaced with name of Perl binary.
|
|
|
|
This string is passed to `format', so percent characters need to be doubled.")
|
|
|
|
|
|
|
|
(defconst tramp-perl-directory-files-and-attributes
|
|
|
|
"%s -e '
|
|
|
|
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);
|
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]) . \"\\\"\";
|
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.0 %%u t (%%u . %%u) (%%u . %%u))\\n\",
|
|
|
|
$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] >> 16 & 0xffff,
|
|
|
|
$stat[1] & 0xffff,
|
|
|
|
$stat[0] >> 16 & 0xffff,
|
|
|
|
$stat[0] & 0xffff);
|
|
|
|
}
|
|
|
|
printf(\")\\n\");' \"$1\" \"$2\" 2>/dev/null"
|
|
|
|
"Perl script implementing `directory-files-attributes' as Lisp `read'able
|
|
|
|
output.
|
|
|
|
Escape sequence %s is replaced with name of Perl binary.
|
|
|
|
This string is passed to `format', so percent characters need to be doubled.")
|
|
|
|
|
|
|
|
;; These two use base64 encoding.
|
|
|
|
(defconst tramp-perl-encode-with-module
|
|
|
|
"%s -MMIME::Base64 -0777 -ne 'print encode_base64($_)' 2>/dev/null"
|
|
|
|
"Perl program to use for encoding a file.
|
|
|
|
Escape sequence %s is replaced with name of Perl binary.
|
|
|
|
This string is passed to `format', so percent characters need to be doubled.
|
|
|
|
This implementation requires the MIME::Base64 Perl module to be installed
|
|
|
|
on the remote host.")
|
|
|
|
|
|
|
|
(defconst tramp-perl-decode-with-module
|
|
|
|
"%s -MMIME::Base64 -0777 -ne 'print decode_base64($_)' 2>/dev/null"
|
|
|
|
"Perl program to use for decoding a file.
|
|
|
|
Escape sequence %s is replaced with name of Perl binary.
|
|
|
|
This string is passed to `format', so percent characters need to be doubled.
|
|
|
|
This implementation requires the MIME::Base64 Perl module to be installed
|
|
|
|
on the remote host.")
|
|
|
|
|
|
|
|
(defconst tramp-perl-encode
|
|
|
|
"%s -e '
|
|
|
|
# This script contributed by Juanma Barranquero <lektu@terra.es>.
|
2015-01-01 22:27:34 +00:00
|
|
|
# Copyright (C) 2002-2015 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+/);
|
|
|
|
};
|
2012-11-27 14:55:25 +00:00
|
|
|
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)
|
2012-11-27 14:55:25 +00:00
|
|
|
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
|
|
|
|
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);
|
|
|
|
}' 2>/dev/null"
|
|
|
|
"Perl program to use for encoding a file.
|
|
|
|
Escape sequence %s is replaced with name of Perl binary.
|
|
|
|
This string is passed to `format', so percent characters need to be doubled.")
|
|
|
|
|
|
|
|
(defconst tramp-perl-decode
|
|
|
|
"%s -e '
|
|
|
|
# This script contributed by Juanma Barranquero <lektu@terra.es>.
|
2015-01-01 22:27:34 +00:00
|
|
|
# Copyright (C) 2002-2015 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;
|
|
|
|
}' 2>/dev/null"
|
|
|
|
"Perl program to use for decoding a file.
|
|
|
|
Escape sequence %s is replaced with name of Perl binary.
|
|
|
|
This string is passed to `format', so percent characters need to be doubled.")
|
|
|
|
|
2013-04-22 10:26:09 +00:00
|
|
|
(defconst tramp-perl-pack
|
|
|
|
"%s -e 'binmode STDIN; binmode STDOUT; print pack(q{u*}, join q{}, <>)'"
|
|
|
|
"Perl program to use for encoding a file.
|
|
|
|
Escape sequence %s is replaced with name of Perl binary.")
|
|
|
|
|
|
|
|
(defconst tramp-perl-unpack
|
|
|
|
"%s -e 'binmode STDIN; binmode STDOUT; print unpack(q{u*}, join q{}, <>)'"
|
|
|
|
"Perl program to use for decoding a file.
|
|
|
|
Escape sequence %s is replaced with name of Perl 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
|
|
|
(defconst tramp-vc-registered-read-file-names
|
|
|
|
"echo \"(\"
|
|
|
|
while read file; do
|
|
|
|
if %s \"$file\"; then
|
|
|
|
echo \"(\\\"$file\\\" \\\"file-exists-p\\\" t)\"
|
|
|
|
else
|
|
|
|
echo \"(\\\"$file\\\" \\\"file-exists-p\\\" nil)\"
|
|
|
|
fi
|
|
|
|
if %s \"$file\"; then
|
|
|
|
echo \"(\\\"$file\\\" \\\"file-readable-p\\\" t)\"
|
|
|
|
else
|
|
|
|
echo \"(\\\"$file\\\" \\\"file-readable-p\\\" nil)\"
|
|
|
|
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.")
|
|
|
|
|
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.
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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
|
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
|
|
|
'(;; `access-file' performed by default handler.
|
2010-10-04 19:44:08 +00:00
|
|
|
(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.
|
2010-10-04 19:44:08 +00:00
|
|
|
(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)
|
2010-10-04 19:44:08 +00:00
|
|
|
(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-call-process' performed by default handler.
|
|
|
|
(dired-compress-file . tramp-sh-handle-dired-compress-file)
|
|
|
|
(dired-recursive-delete-directory
|
|
|
|
. tramp-sh-handle-dired-recursive-delete-directory)
|
|
|
|
(dired-uncache . tramp-handle-dired-uncache)
|
2010-10-04 19:44:08 +00:00
|
|
|
(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' performed by default handler.
|
|
|
|
(file-executable-p . tramp-sh-handle-file-executable-p)
|
|
|
|
(file-exists-p . tramp-sh-handle-file-exists-p)
|
|
|
|
;; `file-in-directory-p' performed by default handler.
|
2010-10-04 19:44:08 +00:00
|
|
|
(file-local-copy . tramp-sh-handle-file-local-copy)
|
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-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-sh-handle-file-newer-than-file-p)
|
|
|
|
(file-notify-add-watch . tramp-sh-handle-file-notify-add-watch)
|
|
|
|
(file-notify-rm-watch . tramp-handle-file-notify-rm-watch)
|
|
|
|
(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-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)
|
|
|
|
;; `find-file-noselect' performed by default handler.
|
|
|
|
;; `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)
|
|
|
|
(insert-file-contents-literally
|
2010-10-04 19:44:08 +00:00
|
|
|
. tramp-sh-handle-insert-file-contents-literally)
|
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)
|
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-symbolic-link . tramp-sh-handle-make-symbolic-link)
|
|
|
|
(process-file . tramp-sh-handle-process-file)
|
|
|
|
(rename-file . tramp-sh-handle-rename-file)
|
2012-12-17 14:38:07 +00:00
|
|
|
(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-sh-handle-start-file-process)
|
|
|
|
(substitute-in-file-name . tramp-handle-substitute-in-file-name)
|
|
|
|
(unhandled-file-name-directory . tramp-handle-unhandled-file-name-directory)
|
2013-07-04 09:39:36 +00:00
|
|
|
(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.")
|
|
|
|
|
|
|
|
;; This must be the last entry, because `identity' always matches.
|
|
|
|
;;;###tramp-autoload
|
|
|
|
(add-to-list 'tramp-foreign-file-name-handler-alist
|
|
|
|
'(identity . tramp-sh-file-name-handler) 'append)
|
|
|
|
|
|
|
|
;;; File Name Handler Functions:
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun tramp-sh-handle-make-symbolic-link
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 linkname &optional ok-if-already-exists)
|
|
|
|
"Like `make-symbolic-link' for Tramp files.
|
|
|
|
If LINKNAME is a non-Tramp file, it is used verbatim as the target of
|
|
|
|
the symlink. If LINKNAME is a Tramp file, only the localname component is
|
|
|
|
used as the target of the symlink.
|
|
|
|
|
|
|
|
If LINKNAME is a Tramp file and the localname component is relative, then
|
|
|
|
it is expanded first, before the localname component is taken. Note that
|
|
|
|
this can give surprising results if the user/host for the source and
|
|
|
|
target of the symlink differ."
|
|
|
|
(with-parsed-tramp-file-name linkname l
|
|
|
|
(let ((ln (tramp-get-remote-ln l))
|
|
|
|
(cwd (tramp-run-real-handler
|
|
|
|
'file-name-directory (list l-localname))))
|
|
|
|
(unless ln
|
|
|
|
(tramp-error
|
|
|
|
l 'file-error
|
|
|
|
"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? "
|
|
|
|
l-localname)))))
|
|
|
|
(tramp-error
|
|
|
|
l 'file-already-exists "File %s already exists" l-localname)
|
|
|
|
(delete-file linkname)))
|
|
|
|
|
|
|
|
;; If FILENAME is a Tramp name, use just the localname component.
|
|
|
|
(when (tramp-tramp-file-p filename)
|
|
|
|
(setq filename
|
|
|
|
(tramp-file-name-localname
|
|
|
|
(tramp-dissect-file-name (expand-file-name filename)))))
|
|
|
|
|
|
|
|
(tramp-flush-file-property l (file-name-directory l-localname))
|
|
|
|
(tramp-flush-file-property l l-localname)
|
|
|
|
|
2011-12-02 19:23:19 +00:00
|
|
|
;; 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 FILENAME belongs to.
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-and-check
|
|
|
|
l
|
|
|
|
(format
|
|
|
|
"cd %s && %s -sf %s %s"
|
|
|
|
(tramp-shell-quote-argument cwd)
|
|
|
|
ln
|
|
|
|
(tramp-shell-quote-argument filename)
|
|
|
|
(tramp-shell-quote-argument l-localname))
|
|
|
|
t))))
|
|
|
|
|
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."
|
2014-02-24 15:48:32 +00:00
|
|
|
(format
|
|
|
|
"%s%s"
|
|
|
|
(with-parsed-tramp-file-name (expand-file-name filename) nil
|
|
|
|
(tramp-make-tramp-file-name
|
|
|
|
method user host
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-file-property v localname "file-truename"
|
2011-11-16 21:32:46 +00:00
|
|
|
(let ((result nil)) ; 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)
|
2014-04-13 10:31:48 +00:00
|
|
|
(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)))))
|
2011-11-16 21:32:46 +00:00
|
|
|
|
|
|
|
;; 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. We bind `directory-sep-char' here for
|
|
|
|
;; XEmacs on Windows, which would otherwise use backslash.
|
|
|
|
(t (let* ((directory-sep-char ?/)
|
|
|
|
(steps (tramp-compat-split-string localname "/"))
|
|
|
|
(localnamedir (tramp-run-real-handler
|
|
|
|
'file-name-as-directory (list localname)))
|
|
|
|
(is-dir (string= localname localnamedir))
|
|
|
|
(thisstep nil)
|
|
|
|
(numchase 0)
|
|
|
|
;; Don't make the following value larger than
|
|
|
|
;; necessary. People expect an error message in
|
|
|
|
;; a timely fashion when something is wrong;
|
|
|
|
;; otherwise they might think that Emacs is hung.
|
|
|
|
;; Of course, correctness has to come first.
|
|
|
|
(numchase-limit 20)
|
|
|
|
symlink-target)
|
|
|
|
(while (and steps (< numchase numchase-limit))
|
|
|
|
(setq thisstep (pop steps))
|
|
|
|
(tramp-message
|
|
|
|
v 5 "Check %s"
|
|
|
|
(mapconcat 'identity
|
|
|
|
(append '("") (reverse result) (list thisstep))
|
|
|
|
"/"))
|
|
|
|
(setq symlink-target
|
|
|
|
(nth 0 (file-attributes
|
|
|
|
(tramp-make-tramp-file-name
|
|
|
|
method user host
|
|
|
|
(mapconcat 'identity
|
|
|
|
(append '("")
|
|
|
|
(reverse result)
|
|
|
|
(list thisstep))
|
|
|
|
"/")))))
|
|
|
|
(cond ((string= "." thisstep)
|
|
|
|
(tramp-message v 5 "Ignoring step `.'"))
|
|
|
|
((string= ".." thisstep)
|
|
|
|
(tramp-message v 5 "Processing step `..'")
|
|
|
|
(pop result))
|
|
|
|
((stringp symlink-target)
|
|
|
|
;; It's a symlink, follow it.
|
|
|
|
(tramp-message
|
|
|
|
v 5 "Follow symlink to %s" symlink-target)
|
|
|
|
(setq numchase (1+ numchase))
|
|
|
|
(when (file-name-absolute-p symlink-target)
|
|
|
|
(setq result nil))
|
|
|
|
;; If the symlink was absolute, we'll get a
|
|
|
|
;; string like "/user@host:/some/target";
|
|
|
|
;; extract the "/some/target" part from it.
|
|
|
|
(when (tramp-tramp-file-p symlink-target)
|
|
|
|
(unless (tramp-equal-remote filename symlink-target)
|
|
|
|
(tramp-error
|
|
|
|
v 'file-error
|
|
|
|
"Symlink target `%s' on wrong host"
|
|
|
|
symlink-target))
|
|
|
|
(setq symlink-target localname))
|
|
|
|
(setq steps
|
|
|
|
(append (tramp-compat-split-string
|
|
|
|
symlink-target "/")
|
|
|
|
steps)))
|
|
|
|
(t
|
|
|
|
;; It's a file.
|
|
|
|
(setq result (cons thisstep result)))))
|
|
|
|
(when (>= numchase numchase-limit)
|
|
|
|
(tramp-error
|
|
|
|
v 'file-error
|
|
|
|
"Maximum number (%d) of symlinks exceeded" numchase-limit))
|
|
|
|
(setq result (reverse result))
|
|
|
|
;; Combine list to form string.
|
|
|
|
(setq result
|
|
|
|
(if result
|
|
|
|
(mapconcat 'identity (cons "" result) "/")
|
|
|
|
"/"))
|
|
|
|
(when (and is-dir
|
|
|
|
(or (string= "" result)
|
|
|
|
(not (string= (substring result -1) "/"))))
|
|
|
|
(setq result (concat result "/"))))))
|
|
|
|
|
|
|
|
(tramp-message v 4 "True name of `%s' is `%s'" localname result)
|
2014-02-24 15:48:32 +00:00
|
|
|
result))))
|
|
|
|
|
|
|
|
;; Preserve trailing "/".
|
|
|
|
(if (string-equal (file-name-nondirectory 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
|
|
|
|
|
|
|
;; Basic functions.
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(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."
|
|
|
|
(with-parsed-tramp-file-name filename nil
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-file-property v localname "file-exists-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
|
|
|
(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)))))))
|
|
|
|
|
2010-10-04 19:44:08 +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))
|
2014-11-05 11:24:04 +00:00
|
|
|
(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)
|
|
|
|
(save-excursion
|
|
|
|
(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-do-file-attributes-with-ls (vec localname &optional id-format)
|
|
|
|
"Implement `file-attributes' for Tramp files using the ls(1) command."
|
|
|
|
(let (symlinkp dirp
|
|
|
|
res-inode res-filemodes res-numlinks
|
|
|
|
res-uid res-gid res-size res-symlink-target)
|
|
|
|
(tramp-message vec 5 "file attributes with ls: %s" localname)
|
|
|
|
(tramp-send-command
|
|
|
|
vec
|
|
|
|
(format "(%s %s || %s -h %s) && %s %s %s"
|
|
|
|
(tramp-get-file-exists-command vec)
|
|
|
|
(tramp-shell-quote-argument localname)
|
|
|
|
(tramp-get-test-command vec)
|
|
|
|
(tramp-shell-quote-argument localname)
|
|
|
|
(tramp-get-ls-command vec)
|
|
|
|
(if (eq id-format 'integer) "-ildn" "-ild")
|
|
|
|
(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
|
|
|
|
(condition-case err
|
|
|
|
(read (current-buffer))
|
|
|
|
(invalid-read-syntax
|
|
|
|
(when (and (equal (cadr err)
|
|
|
|
"Integer constant overflow in reader")
|
|
|
|
(string-match
|
|
|
|
"^[0-9]+\\([0-9][0-9][0-9][0-9][0-9]\\)\\'"
|
|
|
|
(car (cddr err))))
|
|
|
|
(let* ((big (read (substring (car (cddr err)) 0
|
|
|
|
(match-beginning 1))))
|
|
|
|
(small (read (match-string 1 (car (cddr err)))))
|
|
|
|
(twiddle (/ small 65536)))
|
|
|
|
(cons (+ big twiddle)
|
|
|
|
(- small (* twiddle 65536))))))))
|
|
|
|
;; ... 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
|
|
|
|
(unless (numberp res-uid) (setq res-uid -1))
|
|
|
|
(unless (numberp res-gid) (setq res-gid -1)))
|
|
|
|
(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 "-> ")
|
2010-11-13 10:42:32 +00:00
|
|
|
(setq res-symlink-target (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
|
|
|
;; 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
|
2012-11-19 15:25:10 +00:00
|
|
|
;; 4. Last access time, as a list of integers. Normally this
|
|
|
|
;; would be in the same format as `current-time', but the
|
|
|
|
;; subseconds part is not currently implemented, and (0 0)
|
|
|
|
;; denotes an unknown 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
|
|
|
;; 5. Last modification time, likewise.
|
|
|
|
;; 6. Last status change time, likewise.
|
2012-11-18 17:10:35 +00:00
|
|
|
'(0 0) '(0 0) '(0 0) ;CCC how to find out?
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
;; 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.
|
|
|
|
-1
|
|
|
|
)))))
|
|
|
|
|
|
|
|
(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
|
|
|
|
;; On Opsware, pdksh (which is the true name of ksh there) doesn't
|
|
|
|
;; parse correctly the sequence "((". Therefore, we add a space.
|
2015-03-04 10:02:36 +00:00
|
|
|
"( (%s %s || %s -h %s) && %s -c '((\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 -1)' \"%s\" || echo 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-get-file-exists-command vec)
|
|
|
|
(tramp-shell-quote-argument localname)
|
|
|
|
(tramp-get-test-command vec)
|
|
|
|
(tramp-shell-quote-argument localname)
|
|
|
|
(tramp-get-remote-stat vec)
|
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 (eq id-format 'integer) "%ue0" "\"%U\"")
|
|
|
|
(if (eq id-format 'integer) "%ge0" "\"%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-shell-quote-argument localname))))
|
|
|
|
|
2010-10-04 19:44:08 +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"
|
|
|
|
(buffer-name)))
|
|
|
|
(if time-list
|
|
|
|
(tramp-run-real-handler 'set-visited-file-modtime (list time-list))
|
|
|
|
(let ((f (buffer-file-name))
|
|
|
|
coding-system-used)
|
|
|
|
(with-parsed-tramp-file-name f nil
|
2013-02-03 16:49:37 +00:00
|
|
|
(let* ((remote-file-name-inhibit-cache t)
|
|
|
|
(attr (file-attributes f))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
;; '(-1 65535) means file doesn't exists yet.
|
|
|
|
(modtime (or (nth 5 attr) '(-1 65535))))
|
|
|
|
(when (boundp 'last-coding-system-used)
|
|
|
|
(setq coding-system-used (symbol-value 'last-coding-system-used)))
|
|
|
|
;; We use '(0 0) as a don't-know value. See also
|
|
|
|
;; `tramp-do-file-attributes-with-ls'.
|
|
|
|
(if (not (equal modtime '(0 0)))
|
|
|
|
(tramp-run-real-handler 'set-visited-file-modtime (list modtime))
|
|
|
|
(progn
|
|
|
|
(tramp-send-command
|
|
|
|
v
|
|
|
|
(format "%s -ild %s"
|
|
|
|
(tramp-get-ls-command v)
|
|
|
|
(tramp-shell-quote-argument localname)))
|
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))
|
|
|
|
(when (boundp 'last-coding-system-used)
|
|
|
|
(set 'last-coding-system-used coding-system-used))
|
|
|
|
nil)))))
|
|
|
|
|
|
|
|
;; This function makes the same assumption as
|
2010-10-04 19:44:08 +00:00
|
|
|
;; `tramp-sh-handle-set-visited-file-modtime'.
|
2013-08-26 06:59:53 +00:00
|
|
|
(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."
|
2013-08-26 06:59:53 +00:00
|
|
|
(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)
|
|
|
|
(eq (visited-file-modtime) 0)
|
|
|
|
(not (tramp-file-name-handler 'file-remote-p f nil 'connected)))
|
|
|
|
t
|
|
|
|
(with-parsed-tramp-file-name f nil
|
2010-10-02 13:21:43 +00:00
|
|
|
(let* ((remote-file-name-inhibit-cache t)
|
|
|
|
(attr (file-attributes f))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 (nth 5 attr))
|
|
|
|
(mt (visited-file-modtime)))
|
|
|
|
|
|
|
|
(cond
|
|
|
|
;; File exists, and has a known modtime.
|
|
|
|
((and attr (not (equal modtime '(0 0))))
|
|
|
|
(< (abs (tramp-time-diff
|
|
|
|
modtime
|
|
|
|
;; For compatibility, deal with both the old
|
|
|
|
;; (HIGH . LOW) and the new (HIGH LOW) return
|
|
|
|
;; values of `visited-file-modtime'.
|
|
|
|
(if (atom (cdr mt))
|
|
|
|
(list (car mt) (cdr mt))
|
|
|
|
mt)))
|
|
|
|
2))
|
|
|
|
;; 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)
|
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 (equal mt '(-1 65535))))))))))
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun tramp-sh-handle-set-file-modes (filename mode)
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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
|
|
|
|
(tramp-flush-file-property v localname)
|
|
|
|
;; FIXME: extract the proper text from chmod's stderr.
|
|
|
|
(tramp-barf-unless-okay
|
|
|
|
v
|
|
|
|
(format "chmod %s %s"
|
|
|
|
(tramp-compat-decimal-to-octal mode)
|
|
|
|
(tramp-shell-quote-argument localname))
|
|
|
|
"Error while changing file's mode %s" filename)))
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun tramp-sh-handle-set-file-times (filename &optional 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
|
|
|
"Like `set-file-times' for Tramp files."
|
2013-10-17 19:39:22 +00:00
|
|
|
(if (tramp-tramp-file-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
|
|
|
(with-parsed-tramp-file-name filename nil
|
2014-02-19 19:24:32 +00:00
|
|
|
(when (tramp-get-remote-touch v)
|
|
|
|
(tramp-flush-file-property v localname)
|
|
|
|
(let ((time (if (or (null time) (equal time '(0 0)))
|
|
|
|
(current-time)
|
|
|
|
time))
|
|
|
|
;; With GNU Emacs, `format-time-string' has an
|
|
|
|
;; optional parameter UNIVERSAL. This is preferred,
|
|
|
|
;; because we could handle the case when the remote
|
|
|
|
;; host is located in a different time zone as the
|
|
|
|
;; local host.
|
|
|
|
(utc (not (featurep 'xemacs))))
|
|
|
|
(tramp-send-command-and-check
|
|
|
|
v (format
|
|
|
|
"%s %s %s %s"
|
|
|
|
(if utc "env TZ=UTC" "")
|
|
|
|
(tramp-get-remote-touch v)
|
|
|
|
(if (tramp-get-connection-property v "touch-t" nil)
|
|
|
|
(format "-t %s"
|
|
|
|
(if utc
|
|
|
|
(format-time-string "%Y%m%d%H%M.%S" time t)
|
|
|
|
(format-time-string "%Y%m%d%H%M.%S" time)))
|
|
|
|
"")
|
|
|
|
(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
|
|
|
|
|
|
|
;; We handle also the local part, because in older Emacsen,
|
|
|
|
;; without `set-file-times', this function is an alias for this.
|
|
|
|
;; We are local, so we don't need the UTC settings.
|
|
|
|
(zerop
|
2013-04-22 10:26:09 +00:00
|
|
|
(tramp-call-process
|
2014-11-01 13:34:45 +00:00
|
|
|
nil "touch" nil nil nil "-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
|
|
|
(format-time-string "%Y%m%d%H%M.%S" time)
|
|
|
|
(tramp-shell-quote-argument filename)))))
|
|
|
|
|
|
|
|
(defun tramp-set-file-uid-gid (filename &optional uid gid)
|
|
|
|
"Set the ownership for FILENAME.
|
|
|
|
If UID and GID are provided, these values are used; otherwise uid
|
2013-01-04 09:41:23 +00:00
|
|
|
and gid of the corresponding user is taken. Both parameters must
|
|
|
|
be non-negative integers."
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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.
|
2013-01-04 09:41:23 +00:00
|
|
|
(let ((last-coding-system-used last-coding-system-used))
|
2013-10-17 19:39:22 +00:00
|
|
|
(if (tramp-tramp-file-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
|
|
|
(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)
|
2013-01-04 09:41:23 +00:00
|
|
|
(let ((uid (or (and (natnump uid) uid)
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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)))
|
2013-01-04 09:41:23 +00:00
|
|
|
(gid (or (and (natnump gid) 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-get-remote-gid v 'integer))))
|
|
|
|
(tramp-send-command
|
|
|
|
v (format
|
|
|
|
"chown %d:%d %s" uid gid
|
|
|
|
(tramp-shell-quote-argument localname))))))
|
|
|
|
|
|
|
|
;; We handle also the local part, because there doesn't exist
|
|
|
|
;; `set-file-uid-gid'. On W32 "chown" might not work.
|
2013-01-04 09:41:23 +00:00
|
|
|
(let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer)))
|
|
|
|
(gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer))))
|
2013-04-22 10:26:09 +00:00
|
|
|
(tramp-call-process
|
2014-11-01 13:34:45 +00:00
|
|
|
nil "chown" nil 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
|
|
|
(format "%d:%d" uid gid) (tramp-shell-quote-argument filename))))))
|
|
|
|
|
|
|
|
(defun tramp-remote-selinux-p (vec)
|
|
|
|
"Check, whether SELINUX is enabled on the remote host."
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property
|
|
|
|
(tramp-get-connection-process vec) "selinux-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
|
|
|
(let ((result (tramp-find-executable
|
|
|
|
vec "getenforce" (tramp-get-remote-path vec) t t)))
|
|
|
|
(and result
|
|
|
|
(string-equal
|
|
|
|
(tramp-send-command-and-read
|
|
|
|
vec (format "echo \\\"`%S`\\\"" result))
|
|
|
|
"Enforcing")))))
|
|
|
|
|
2010-10-04 19:44:08 +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
|
2012-10-09 12:49:02 +00:00
|
|
|
(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 "\\([a-z0-9_]+\\):" "\\([a-z0-9_]+\\):"
|
|
|
|
"\\([a-z0-9_]+\\):" "\\([a-z0-9_]+\\)")))
|
|
|
|
(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))
|
2010-11-13 10:42:32 +00:00
|
|
|
(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))))
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(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
|
|
|
|
(if (and (consp context)
|
|
|
|
(tramp-remote-selinux-p v)
|
|
|
|
(tramp-send-command-and-check
|
|
|
|
v (format "chcon %s %s %s %s %s"
|
|
|
|
(if (stringp (nth 0 context))
|
|
|
|
(format "--user=%s" (nth 0 context)) "")
|
|
|
|
(if (stringp (nth 1 context))
|
|
|
|
(format "--role=%s" (nth 1 context)) "")
|
|
|
|
(if (stringp (nth 2 context))
|
|
|
|
(format "--type=%s" (nth 2 context)) "")
|
|
|
|
(if (stringp (nth 3 context))
|
|
|
|
(format "--range=%s" (nth 3 context)) "")
|
|
|
|
(tramp-shell-quote-argument localname))))
|
2012-12-30 10:58:13 +00:00
|
|
|
(progn
|
|
|
|
(tramp-set-file-property v localname "file-selinux-context" context)
|
|
|
|
t)
|
|
|
|
(tramp-set-file-property v localname "file-selinux-context" 'undef)
|
|
|
|
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
|
|
|
|
2012-12-17 14:38:07 +00:00
|
|
|
(defun tramp-remote-acl-p (vec)
|
|
|
|
"Check, whether ACL is enabled on the remote host."
|
|
|
|
(with-tramp-connection-property (tramp-get-connection-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
|
2013-01-24 09:50:02 +00:00
|
|
|
"getfacl -ac %s 2>/dev/null"
|
2012-12-17 14:38:07 +00:00
|
|
|
(tramp-shell-quote-argument localname))))
|
|
|
|
(with-current-buffer (tramp-get-connection-buffer v)
|
2012-12-19 13:01:16 +00:00
|
|
|
(goto-char (point-max))
|
|
|
|
(delete-blank-lines)
|
2012-12-29 19:11:11 +00:00
|
|
|
(when (> (point-max) (point-min))
|
2013-01-21 09:49:43 +00:00
|
|
|
(tramp-compat-funcall
|
|
|
|
'substring-no-properties (buffer-string))))))))
|
2012-12-17 14:38:07 +00:00
|
|
|
|
|
|
|
(defun tramp-sh-handle-set-file-acl (filename acl-string)
|
|
|
|
"Like `set-file-acl' for Tramp files."
|
2013-01-24 09:50:02 +00:00
|
|
|
(with-parsed-tramp-file-name (expand-file-name filename) nil
|
|
|
|
(if (and (stringp acl-string) (tramp-remote-acl-p v)
|
|
|
|
(progn
|
|
|
|
(tramp-send-command
|
2014-02-05 14:11:50 +00:00
|
|
|
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))
|
2013-01-24 09:50:02 +00:00
|
|
|
(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'.
|
|
|
|
(tramp-set-file-property v localname "file-acl-string" 'undef)
|
|
|
|
nil)))
|
2012-12-17 14:38:07 +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
|
|
|
;; Simple functions using the `test' command.
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(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
|
2012-10-09 12:49:02 +00:00
|
|
|
(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)))))
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(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
|
2012-10-09 12:49:02 +00:00
|
|
|
(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)))))
|
|
|
|
|
|
|
|
;; When the remote shell is started, it looks for a shell which groks
|
|
|
|
;; tilde expansion. Here, we assume that all shells which grok tilde
|
|
|
|
;; expansion will also provide a `test' command which groks `-nt' (for
|
|
|
|
;; newer than). If this breaks, tell me about it and I'll try to do
|
|
|
|
;; something smarter about it.
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun tramp-sh-handle-file-newer-than-file-p (file1 file2)
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-newer-than-file-p' for Tramp files."
|
|
|
|
(cond ((not (file-exists-p file1))
|
|
|
|
nil)
|
|
|
|
((not (file-exists-p file2))
|
|
|
|
t)
|
|
|
|
;; We are sure both files exist at this point.
|
|
|
|
(t
|
|
|
|
(save-excursion
|
|
|
|
;; We try to get the mtime of both files. If they are not
|
|
|
|
;; equal to the "dont-know" value, then we subtract the times
|
|
|
|
;; and obtain the result.
|
|
|
|
(let ((fa1 (file-attributes file1))
|
|
|
|
(fa2 (file-attributes file2)))
|
|
|
|
(if (and (not (equal (nth 5 fa1) '(0 0)))
|
|
|
|
(not (equal (nth 5 fa2) '(0 0))))
|
|
|
|
(> 0 (tramp-time-diff (nth 5 fa2) (nth 5 fa1)))
|
|
|
|
;; If one of them is the dont-know value, then we can
|
|
|
|
;; still try to run a shell command on the remote host.
|
|
|
|
;; However, this only works if both files are Tramp
|
|
|
|
;; files and both have the same method, same user, same
|
|
|
|
;; host.
|
|
|
|
(unless (tramp-equal-remote file1 file2)
|
|
|
|
(with-parsed-tramp-file-name
|
|
|
|
(if (tramp-tramp-file-p file1) file1 file2) nil
|
|
|
|
(tramp-error
|
|
|
|
v 'file-error
|
|
|
|
"Files %s and %s must have same method, user, host"
|
|
|
|
file1 file2)))
|
|
|
|
(with-parsed-tramp-file-name file1 nil
|
|
|
|
(tramp-run-test2
|
|
|
|
(tramp-get-test-nt-command v) file1 file2))))))))
|
|
|
|
|
|
|
|
;; Functions implemented using the basic functions above.
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(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
|
2014-11-01 13:34:45 +00:00
|
|
|
;; `file-directory-p' is used as predicate for file name completion.
|
2011-10-25 12:50:03 +00:00
|
|
|
;; 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))
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-file-property v localname "file-directory-p"
|
2011-10-25 12:50:03 +00:00
|
|
|
(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
|
|
|
|
2010-10-04 19:44:08 +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
|
2012-10-09 12:49:02 +00:00
|
|
|
(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
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-file-property v localname "file-ownership-preserved-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
|
|
|
(let ((attributes (file-attributes filename)))
|
|
|
|
;; 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
|
|
|
|
(= (nth 2 attributes) (tramp-get-remote-uid v 'integer))
|
|
|
|
(or (not group)
|
|
|
|
(= (nth 3 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.
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun tramp-sh-handle-directory-files-and-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
|
|
|
(directory &optional full match nosort id-format)
|
|
|
|
"Like `directory-files-and-attributes' for Tramp files."
|
2015-03-04 10:02:36 +00:00
|
|
|
(unless id-format (setq id-format 'integer))
|
|
|
|
(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)
|
|
|
|
(save-excursion
|
|
|
|
(mapcar
|
|
|
|
(lambda (x)
|
|
|
|
(cons (car x)
|
|
|
|
(tramp-convert-file-attributes v (cdr x))))
|
|
|
|
(or
|
|
|
|
(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)))))))))
|
|
|
|
result item)
|
|
|
|
|
|
|
|
(while temp
|
|
|
|
(setq item (pop temp))
|
|
|
|
(when (or (null match) (string-match match (car item)))
|
|
|
|
(when full
|
|
|
|
(setcar item (expand-file-name (car item) directory)))
|
|
|
|
(push item result)))
|
|
|
|
|
|
|
|
(or (if nosort
|
|
|
|
result
|
|
|
|
(sort result (lambda (x y) (string< (car x) (car y)))))
|
|
|
|
;; The scripts could fail, for example with huge file size.
|
|
|
|
(tramp-handle-directory-files-and-attributes
|
|
|
|
directory full match nosort 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-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))
|
|
|
|
|
|
|
|
(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
|
2014-11-01 13:34:45 +00:00
|
|
|
;; We must care about file names with spaces, or starting with
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 would confuse xargs. "ls -aQ" might be a solution,
|
|
|
|
;; but it does not work on all remote systems. Therefore, we
|
2015-03-04 10:02:36 +00:00
|
|
|
;; use \000 as file separator.
|
2015-03-10 07:49:20 +00:00
|
|
|
;; Apostrophes in the stat output are masked as \037 characters, in
|
2015-03-04 10:02:36 +00:00
|
|
|
;; order to make a proper shell escape of them in file names.
|
|
|
|
"cd %s && echo \"(\"; (%s %s -a | "
|
2012-07-05 06:57:57 +00:00
|
|
|
"xargs %s -c "
|
2015-03-04 10:02:36 +00:00
|
|
|
"'(\037%%n\037 (\037%%N\037) %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \037%%A\037 t %%ie0 -1)'"
|
|
|
|
" -- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/\037/\"/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)
|
2015-03-10 07:49:20 +00:00
|
|
|
;; On systems which have no quoting style, file names with
|
2015-03-04 10:02:36 +00:00
|
|
|
;; special characters could fail.
|
|
|
|
(if (tramp-get-ls-command-with-quoting-style vec)
|
|
|
|
"--quoting-style=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
|
|
|
(tramp-get-remote-stat vec)
|
2015-03-04 10:02:36 +00:00
|
|
|
(if (eq id-format 'integer) "%ue0" "\037%U\037")
|
|
|
|
(if (eq id-format 'integer) "%ge0" "\037%G\037"))))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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.
|
2010-10-04 19:44:08 +00:00
|
|
|
(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 (save-match-data (string-match "/" filename))
|
|
|
|
(with-parsed-tramp-file-name (expand-file-name directory) nil
|
|
|
|
|
|
|
|
(all-completions
|
|
|
|
filename
|
|
|
|
(mapcar
|
|
|
|
'list
|
|
|
|
(or
|
2014-11-01 13:34:45 +00:00
|
|
|
;; Try cache entries for `filename', `filename' with last
|
|
|
|
;; character removed, `filename' with last two characters
|
2010-10-02 13:21:43 +00:00
|
|
|
;; removed, ..., and finally the empty string - all
|
|
|
|
;; concatenated to the local directory name.
|
|
|
|
(let ((remote-file-name-inhibit-cache
|
|
|
|
(or remote-file-name-inhibit-cache
|
|
|
|
tramp-completion-reread-directory-timeout)))
|
|
|
|
|
2014-11-01 13:34:45 +00:00
|
|
|
;; This is inefficient for very long file names, pity
|
2010-10-02 13:21:43 +00:00
|
|
|
;; `reduce' is not available...
|
|
|
|
(car
|
|
|
|
(apply
|
|
|
|
'append
|
|
|
|
(mapcar
|
|
|
|
(lambda (x)
|
|
|
|
(let ((cache-hit
|
|
|
|
(tramp-get-file-property
|
|
|
|
v
|
|
|
|
(concat localname (substring filename 0 x))
|
|
|
|
"file-name-all-completions"
|
|
|
|
nil)))
|
|
|
|
(when cache-hit (list cache-hit))))
|
2011-09-23 09:38:41 +00:00
|
|
|
;; We cannot use a length of 0, because file properties
|
|
|
|
;; for "foo" and "foo/" are identical.
|
|
|
|
(tramp-compat-number-sequence (length filename) 1 -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
|
|
|
|
|
|
|
;; Cache expired or no matching cache entry found so we need
|
2010-10-02 13:21:43 +00:00
|
|
|
;; to perform a remote operation.
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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)
|
|
|
|
;; Get a list of directories and files, including reliably
|
|
|
|
;; tagging the directories with a trailing '/'. Because I
|
|
|
|
;; rock. --daniel@danann.net
|
|
|
|
|
|
|
|
;; Changed to perform `cd' in the same remote op and only
|
2010-10-02 13:21:43 +00:00
|
|
|
;; get entries starting with `filename'. Capture any `cd'
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 messages. Ensure any `cd' and `echo' aliases are
|
|
|
|
;; ignored.
|
|
|
|
(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 %s %d"
|
|
|
|
(tramp-shell-quote-argument localname)
|
|
|
|
(tramp-shell-quote-argument filename)
|
|
|
|
(if (symbol-value
|
|
|
|
;; `read-file-name-completion-ignore-case'
|
|
|
|
;; is introduced with Emacs 22.1.
|
|
|
|
(if (boundp
|
|
|
|
'read-file-name-completion-ignore-case)
|
|
|
|
'read-file-name-completion-ignore-case
|
|
|
|
'completion-ignore-case))
|
|
|
|
1 0)))
|
|
|
|
|
|
|
|
(format (concat
|
2015-03-04 10:02:36 +00:00
|
|
|
"(cd %s 2>&1 && (%s -a %s 2>/dev/null"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
;; `ls' with wildcard might fail with `Argument
|
|
|
|
;; list too long' error in some corner cases; if
|
|
|
|
;; `ls' fails after `cd' succeeded, chances are
|
|
|
|
;; that's the case, so let's retry without
|
|
|
|
;; wildcard. This will return "too many" entries
|
|
|
|
;; but that isn't harmful.
|
|
|
|
" || %s -a 2>/dev/null)"
|
2014-04-21 21:04:25 +00:00
|
|
|
" | while IFS= read f; do"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 -d \"$f\" 2>/dev/null;"
|
|
|
|
" then \\echo \"$f/\"; else \\echo \"$f\"; fi; done"
|
|
|
|
" && \\echo ok) || \\echo fail")
|
|
|
|
(tramp-shell-quote-argument localname)
|
|
|
|
(tramp-get-ls-command v)
|
|
|
|
;; When `filename' is empty, just `ls' without
|
2014-11-01 13:34:45 +00:00
|
|
|
;; `filename' argument is more efficient than `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
|
|
|
;; for very large directories and might avoid the
|
|
|
|
;; `Argument list too long' error.
|
|
|
|
;;
|
|
|
|
;; With and only with wildcard, we need to add
|
|
|
|
;; `-d' to prevent `ls' from descending into
|
|
|
|
;; sub-directories.
|
|
|
|
(if (zerop (length filename))
|
|
|
|
"."
|
2015-03-04 10:02:36 +00:00
|
|
|
(format "-d %s*" (tramp-shell-quote-argument 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
|
|
|
(tramp-get-ls-command v)
|
|
|
|
(tramp-get-test-command v))))
|
|
|
|
|
|
|
|
;; Now grab the output.
|
|
|
|
(with-current-buffer (tramp-get-buffer v)
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
2011-09-23 09:38:41 +00:00
|
|
|
;; Check result code, found in last line 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
|
|
|
(forward-line -1)
|
|
|
|
(if (looking-at "^fail$")
|
|
|
|
(progn
|
|
|
|
;; Grab error message from line before last line
|
2011-09-23 09:38:41 +00:00
|
|
|
;; (it was put there by `cd 2>&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
|
|
|
(forward-line -1)
|
|
|
|
(tramp-error
|
|
|
|
v 'file-error
|
2010-10-04 19:44:08 +00:00
|
|
|
"tramp-sh-handle-file-name-all-completions: %s"
|
2010-11-13 10:42:32 +00:00
|
|
|
(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
|
|
|
;; 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.
|
|
|
|
(unless (looking-at "^ok$")
|
|
|
|
(tramp-error
|
|
|
|
v 'file-error
|
|
|
|
"\
|
2010-10-04 19:44:08 +00:00
|
|
|
tramp-sh-handle-file-name-all-completions: internal error accessing `%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) (buffer-string))))
|
|
|
|
|
|
|
|
(while (zerop (forward-line -1))
|
2010-11-13 10:42:32 +00:00
|
|
|
(push (buffer-substring (point) (point-at-eol)) 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
|
|
|
|
|
|
|
;; Because the remote op went through OK we know the
|
2011-09-23 09:38:41 +00:00
|
|
|
;; directory we `cd'-ed to exists.
|
|
|
|
(tramp-set-file-property v localname "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
|
|
|
|
|
|
|
;; Because the remote op went through OK we know every
|
|
|
|
;; file listed by `ls' exists.
|
|
|
|
(mapc (lambda (entry)
|
|
|
|
(tramp-set-file-property
|
|
|
|
v (concat localname entry) "file-exists-p" t))
|
|
|
|
result)
|
|
|
|
|
2011-09-23 09:38:41 +00:00
|
|
|
;; Store result in the 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-set-file-property
|
|
|
|
v (concat localname filename)
|
2011-09-23 09:38:41 +00:00
|
|
|
"file-name-all-completions" 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
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(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))))
|
2013-11-05 14:18:41 +00:00
|
|
|
(when (and (numberp 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
|
|
|
(file-exists-p newname)
|
2013-11-05 14:18:41 +00:00
|
|
|
(yes-or-no-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
|
|
|
(format
|
|
|
|
"File %s already exists; make it a new name anyway? "
|
|
|
|
newname)))
|
|
|
|
(tramp-error
|
2013-11-05 14:18:41 +00:00
|
|
|
v2 'file-error "add-name-to-file: file %s already exists" newname))
|
|
|
|
(when ok-if-already-exists (setq ln (concat ln " -f")))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-flush-file-property v2 (file-name-directory v2-localname))
|
|
|
|
(tramp-flush-file-property v2 v2-localname)
|
|
|
|
(tramp-barf-unless-okay
|
|
|
|
v1
|
2013-11-05 14:18:41 +00:00
|
|
|
(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"
|
|
|
|
(buffer-name))))))
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(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
|
2012-12-17 14:38:07 +00:00
|
|
|
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))
|
|
|
|
(setq newname (expand-file-name newname))
|
|
|
|
(cond
|
|
|
|
;; At least one file a Tramp file?
|
|
|
|
((or (tramp-tramp-file-p filename)
|
|
|
|
(tramp-tramp-file-p newname))
|
|
|
|
(tramp-do-copy-or-rename-file
|
|
|
|
'copy filename newname ok-if-already-exists keep-date
|
2012-12-17 14:38:07 +00:00
|
|
|
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
|
|
|
;; Compat section.
|
2012-12-17 14:38:07 +00:00
|
|
|
(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
|
|
|
|
(list filename newname ok-if-already-exists keep-date
|
2012-12-17 14:38:07 +00:00
|
|
|
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
|
|
|
(preserve-uid-gid
|
|
|
|
(tramp-run-real-handler
|
|
|
|
'copy-file
|
|
|
|
(list filename newname ok-if-already-exists keep-date preserve-uid-gid)))
|
|
|
|
(t
|
|
|
|
(tramp-run-real-handler
|
|
|
|
'copy-file (list filename newname ok-if-already-exists keep-date)))))
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun tramp-sh-handle-copy-directory
|
2013-10-28 19:30:40 +00:00
|
|
|
(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)))
|
|
|
|
(with-parsed-tramp-file-name (if t1 dirname newname) nil
|
2013-10-28 19:30:40 +00:00
|
|
|
(if (and (not copy-contents)
|
|
|
|
(tramp-get-method-parameter method 'tramp-copy-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
|
|
|
;; 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))
|
2013-10-28 19:30:40 +00:00
|
|
|
(tramp-file-name-method
|
|
|
|
(tramp-dissect-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
|
|
|
;; scp or rsync DTRT.
|
|
|
|
(progn
|
|
|
|
(setq dirname (directory-file-name (expand-file-name dirname))
|
|
|
|
newname (directory-file-name (expand-file-name newname)))
|
|
|
|
(if (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)))
|
|
|
|
(if (not (file-directory-p (file-name-directory newname)))
|
|
|
|
(make-directory (file-name-directory newname) parents))
|
|
|
|
(tramp-do-copy-or-rename-file-out-of-band
|
|
|
|
'copy dirname newname keep-date))
|
|
|
|
;; We must do it file-wise.
|
|
|
|
(tramp-run-real-handler
|
2013-10-28 19:30:40 +00:00
|
|
|
'copy-directory
|
|
|
|
(if copy-contents
|
|
|
|
(list dirname newname keep-date parents copy-contents)
|
|
|
|
(list dirname newname keep-date 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
|
|
|
|
|
|
|
;; When newname did exist, we have wrong cached values.
|
|
|
|
(when t2
|
|
|
|
(with-parsed-tramp-file-name newname nil
|
|
|
|
(tramp-flush-file-property v (file-name-directory localname))
|
|
|
|
(tramp-flush-file-property v localname))))))
|
|
|
|
|
2010-10-04 19:44:08 +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.
|
|
|
|
(setq filename (expand-file-name filename))
|
|
|
|
(setq newname (expand-file-name newname))
|
|
|
|
;; At least one file a Tramp file?
|
|
|
|
(if (or (tramp-tramp-file-p filename)
|
|
|
|
(tramp-tramp-file-p newname))
|
|
|
|
(tramp-do-copy-or-rename-file
|
|
|
|
'rename filename newname ok-if-already-exists t t)
|
|
|
|
(tramp-run-real-handler
|
|
|
|
'rename-file (list filename newname ok-if-already-exists))))
|
|
|
|
|
|
|
|
(defun tramp-do-copy-or-rename-file
|
|
|
|
(op filename newname &optional ok-if-already-exists keep-date
|
2012-12-17 14:38:07 +00:00
|
|
|
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.
|
2012-12-17 14:38:07 +00:00
|
|
|
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
|
|
|
|
2010-10-04 19:44:08 +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))
|
|
|
|
(let ((t1 (tramp-tramp-file-p filename))
|
|
|
|
(t2 (tramp-tramp-file-p newname))
|
2012-11-19 15:25:10 +00:00
|
|
|
(length (nth 7 (file-attributes (file-truename filename))))
|
2012-12-17 14:38:07 +00:00
|
|
|
(attributes (and preserve-extended-attributes
|
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
|
|
|
(apply 'file-extended-attributes (list 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 (if t1 filename newname) nil
|
|
|
|
(when (and (not ok-if-already-exists) (file-exists-p newname))
|
|
|
|
(tramp-error
|
|
|
|
v 'file-already-exists "File %s already exists" newname))
|
|
|
|
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-progress-reporter
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
v 0 (format "%s %s to %s"
|
|
|
|
(if (eq op 'copy) "Copying" "Renaming")
|
|
|
|
filename newname)
|
|
|
|
|
|
|
|
(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.
|
2012-11-19 15:25:10 +00:00
|
|
|
((and
|
|
|
|
(tramp-method-out-of-band-p v1 length)
|
|
|
|
(tramp-method-out-of-band-p v2 length))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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
|
|
|
|
op filename newname 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
|
2014-11-01 13:34:45 +00:00
|
|
|
;; matter which file name handlers are used for 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
|
|
|
;; source and target file.
|
|
|
|
(t
|
|
|
|
(tramp-do-copy-or-rename-file-via-buffer
|
|
|
|
op filename newname 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.
|
2012-11-19 15:25:10 +00:00
|
|
|
((tramp-method-out-of-band-p v length)
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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
|
|
|
|
op filename newname keep-date))
|
|
|
|
|
|
|
|
;; Use the inline method via a Tramp buffer.
|
|
|
|
(t (tramp-do-copy-or-rename-file-via-buffer
|
|
|
|
op filename newname keep-date))))
|
|
|
|
|
|
|
|
(t
|
|
|
|
;; One of them must be a Tramp file.
|
|
|
|
(error "Tramp implementation says this cannot happen")))
|
|
|
|
|
2013-01-02 10:15:31 +00:00
|
|
|
;; Handle `preserve-extended-attributes'. We ignore possible
|
|
|
|
;; errors, because ACL strings could be incompatible.
|
2012-12-17 14:38:07 +00:00
|
|
|
(when attributes
|
2013-01-02 10:15:31 +00:00
|
|
|
(ignore-errors
|
|
|
|
(apply 'set-file-extended-attributes (list newname 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
|
|
|
|
|
|
|
;; 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
|
2013-11-04 14:32:40 +00:00
|
|
|
(tramp-flush-file-property v1 (file-name-directory v1-localname))
|
|
|
|
(tramp-flush-file-property v1 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
|
|
|
|
|
|
|
;; When newname did exist, we have wrong cached values.
|
|
|
|
(when t2
|
|
|
|
(with-parsed-tramp-file-name newname v2
|
2013-11-04 14:32:40 +00:00
|
|
|
(tramp-flush-file-property v2 (file-name-directory v2-localname))
|
|
|
|
(tramp-flush-file-property 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 keep-date)
|
|
|
|
"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."
|
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.
|
|
|
|
;; We remove `tramp-file-name-handler' from
|
|
|
|
;; `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-handlers
|
|
|
|
(remq 'tramp-file-name-handler inhibit-file-name-handlers)))
|
|
|
|
(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.
|
|
|
|
(when keep-date (set-file-times newname (nth 5 (file-attributes filename))))
|
|
|
|
;; 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))
|
|
|
|
(file-times (nth 5 (file-attributes filename)))
|
|
|
|
(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'"
|
|
|
|
op))))
|
|
|
|
(localname1
|
|
|
|
(if t1
|
|
|
|
(tramp-file-name-handler 'file-remote-p filename 'localname)
|
|
|
|
filename))
|
|
|
|
(localname2
|
|
|
|
(if t2
|
|
|
|
(tramp-file-name-handler 'file-remote-p newname 'localname)
|
|
|
|
newname))
|
|
|
|
(prefix (file-remote-p (if t1 filename newname)))
|
|
|
|
cmd-result)
|
|
|
|
|
|
|
|
(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."
|
|
|
|
(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)
|
2014-03-25 09:49:37 +00:00
|
|
|
;; No sticky bit when renaming.
|
|
|
|
(or (eq op 'copy)
|
|
|
|
(zerop
|
|
|
|
(logand
|
|
|
|
(file-modes (file-name-directory localname1))
|
|
|
|
(tramp-compat-octal-to-decimal "1000"))))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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)
|
|
|
|
(tramp-compat-copy-file
|
|
|
|
localname1 localname2 ok-if-already-exists
|
|
|
|
keep-date preserve-uid-gid)
|
|
|
|
(tramp-run-real-handler
|
|
|
|
'rename-file (list localname1 localname2 ok-if-already-exists))))
|
|
|
|
|
|
|
|
;; 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 t)
|
|
|
|
;; 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."
|
|
|
|
(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)
|
|
|
|
(tramp-compat-octal-to-decimal "0777"))
|
|
|
|
(tramp-set-file-uid-gid
|
|
|
|
(concat prefix tmpfile)
|
|
|
|
(tramp-get-local-uid 'integer)
|
|
|
|
(tramp-get-local-gid 'integer)))
|
|
|
|
(t2
|
|
|
|
(if (eq op 'copy)
|
|
|
|
(tramp-compat-copy-file
|
|
|
|
localname1 tmpfile t
|
|
|
|
keep-date preserve-uid-gid)
|
|
|
|
(tramp-run-real-handler
|
|
|
|
'rename-file
|
|
|
|
(list localname1 tmpfile t)))
|
|
|
|
;; We must change the ownership as local user.
|
|
|
|
;; Since this does not work reliable, we also
|
|
|
|
;; give read permissions.
|
|
|
|
(set-file-modes
|
|
|
|
tmpfile (tramp-compat-octal-to-decimal "0777"))
|
|
|
|
(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."
|
|
|
|
(tramp-get-buffer v)))
|
|
|
|
(t1
|
|
|
|
(tramp-run-real-handler
|
|
|
|
'rename-file
|
|
|
|
(list tmpfile localname2 ok-if-already-exists)))))
|
|
|
|
|
|
|
|
;; Save exit.
|
2010-11-20 13:12:27 +00:00
|
|
|
(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.
|
2010-11-20 13:12:27 +00:00
|
|
|
(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
|
|
|
|
(set-file-times newname file-times)
|
2010-11-20 13:12:27 +00:00
|
|
|
(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 keep-date)
|
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."
|
2010-12-02 19:34:31 +00:00
|
|
|
(let* ((t1 (tramp-tramp-file-p filename))
|
|
|
|
(t2 (tramp-tramp-file-p newname))
|
|
|
|
(orig-vec (tramp-dissect-file-name (if t1 filename newname)))
|
2014-11-01 13:34:45 +00:00
|
|
|
copy-program copy-args copy-env copy-keep-date port listener spec
|
|
|
|
options source target remote-copy-program remote-copy-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
|
|
|
|
|
|
|
(with-parsed-tramp-file-name (if t1 filename newname) nil
|
|
|
|
(if (and t1 t2)
|
|
|
|
|
2011-02-05 09:52:07 +00:00
|
|
|
;; Both are Tramp files. We shall optimize it when the
|
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 keep-date)
|
|
|
|
(tramp-do-copy-or-rename-file-out-of-band
|
|
|
|
'rename tmpfile newname keep-date))
|
|
|
|
;; Save exit.
|
2010-11-20 13:12:27 +00:00
|
|
|
(ignore-errors
|
|
|
|
(if dir-flag
|
|
|
|
(tramp-compat-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
|
|
|
|
2010-12-02 19:34:31 +00:00
|
|
|
;; Set variables for computing the prompt for reading
|
|
|
|
;; password.
|
|
|
|
(setq tramp-current-method (tramp-file-name-method v)
|
2012-01-22 12:55:36 +00:00
|
|
|
tramp-current-user (or (tramp-file-name-user v)
|
|
|
|
(tramp-get-connection-property
|
|
|
|
v "login-as" nil))
|
|
|
|
tramp-current-host (tramp-file-name-real-host v))
|
2010-12-02 19:34:31 +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
|
|
|
;; Expand hops. Might be necessary for gateway methods.
|
|
|
|
(setq v (car (tramp-compute-multi-hops v)))
|
|
|
|
(aset v 3 localname)
|
|
|
|
|
|
|
|
;; Check which ones of source and target are Tramp files.
|
2014-03-17 09:28:47 +00:00
|
|
|
(setq source (if t1
|
|
|
|
(tramp-make-copy-program-file-name v)
|
|
|
|
(shell-quote-argument 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
|
|
|
target (funcall
|
|
|
|
(if (and (file-directory-p filename)
|
|
|
|
(string-equal
|
|
|
|
(file-name-nondirectory filename)
|
|
|
|
(file-name-nondirectory newname)))
|
|
|
|
'file-name-directory
|
|
|
|
'identity)
|
2014-03-17 09:28:47 +00:00
|
|
|
(if t2
|
|
|
|
(tramp-make-copy-program-file-name v)
|
|
|
|
(shell-quote-argument 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
|
|
|
|
2011-03-09 11:04:27 +00:00
|
|
|
;; Check for host and port number. We cannot use
|
|
|
|
;; `tramp-file-name-port', because this returns also
|
|
|
|
;; `tramp-default-port', which might clash with settings in
|
|
|
|
;; "~/.ssh/config".
|
|
|
|
(setq host (tramp-file-name-host v)
|
|
|
|
port "")
|
|
|
|
(when (string-match tramp-host-with-port-regexp host)
|
2011-05-05 09:48:43 +00:00
|
|
|
(setq port (string-to-number (match-string 2 host))
|
|
|
|
host (string-to-number (match-string 1 host))))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
|
2012-01-22 12:55:36 +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)))
|
|
|
|
|
2014-11-01 13:34:45 +00:00
|
|
|
;; Check for listener port.
|
|
|
|
(when (tramp-get-method-parameter method 'tramp-remote-copy-args)
|
|
|
|
(setq listener (number-to-string (+ 50000 (random 10000))))
|
|
|
|
(while
|
|
|
|
(zerop (tramp-call-process v "nc" nil nil nil "-z" host listener))
|
|
|
|
(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.
|
2012-01-22 12:55:36 +00:00
|
|
|
(setq host (or host "")
|
|
|
|
user (or user "")
|
|
|
|
port (or port "")
|
|
|
|
spec (format-spec-make
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 (tramp-get-connection-property
|
2013-02-23 12:40:14 +00:00
|
|
|
(tramp-get-connection-process v) "temp-file" ""))
|
2015-03-15 15:07:03 +00:00
|
|
|
options (format-spec (tramp-ssh-controlmaster-options v) spec)
|
2013-02-23 12:40:14 +00:00
|
|
|
spec (format-spec-make
|
2014-11-01 13:34:45 +00:00
|
|
|
?h host ?u user ?p port ?r listener ?c options
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
?k (if keep-date " " ""))
|
|
|
|
copy-program (tramp-get-method-parameter
|
|
|
|
method 'tramp-copy-program)
|
|
|
|
copy-keep-date (tramp-get-method-parameter
|
|
|
|
method 'tramp-copy-keep-date)
|
2014-11-01 13:34:45 +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
|
|
|
copy-args
|
2010-12-02 19:34:31 +00:00
|
|
|
(delete
|
|
|
|
;; " " has either been a replacement of "%k" (when
|
2011-03-09 11:04:27 +00:00
|
|
|
;; keep-date argument is non-nil), or a replacement
|
2010-12-02 19:34:31 +00:00
|
|
|
;; for the whole keep-date sublist.
|
|
|
|
" "
|
|
|
|
(dolist
|
|
|
|
(x
|
|
|
|
(tramp-get-method-parameter method 'tramp-copy-args)
|
|
|
|
copy-args)
|
|
|
|
(setq copy-args
|
|
|
|
(append
|
|
|
|
copy-args
|
|
|
|
(let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
|
2011-03-09 11:04:27 +00:00
|
|
|
(if (member "" y) '(" ") y))))))
|
2014-11-01 13:34:45 +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
|
|
|
copy-env
|
|
|
|
(delq
|
|
|
|
nil
|
|
|
|
(mapcar
|
|
|
|
(lambda (x)
|
|
|
|
(setq x (mapcar (lambda (y) (format-spec y spec)) x))
|
|
|
|
(unless (member "" x) (mapconcat 'identity x " ")))
|
2014-11-01 13:34:45 +00:00
|
|
|
(tramp-get-method-parameter method 'tramp-copy-env)))
|
|
|
|
|
|
|
|
remote-copy-program
|
|
|
|
(tramp-get-method-parameter method 'tramp-remote-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
|
|
|
|
2014-11-01 13:34:45 +00:00
|
|
|
(dolist
|
|
|
|
(x
|
|
|
|
(or
|
|
|
|
(tramp-get-connection-property v "remote-copy-args" nil)
|
|
|
|
(tramp-get-method-parameter method 'tramp-remote-copy-args)))
|
|
|
|
(setq remote-copy-args
|
|
|
|
(append
|
|
|
|
remote-copy-args
|
|
|
|
(let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
|
|
|
|
(if (member "" y) '(" ") y)))))
|
|
|
|
|
|
|
|
;; 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
|
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
|
|
|
|
(append
|
|
|
|
(list remote-copy-program) remote-copy-args
|
|
|
|
(list (if t1 (concat "<" source) (concat ">" target)) "&"))
|
|
|
|
" "))
|
|
|
|
(tramp-send-command v remote-copy-program)
|
|
|
|
(with-timeout
|
|
|
|
(1 (tramp-error
|
|
|
|
v 'file-error
|
|
|
|
"Listener process not running on remote host: `%s'"
|
|
|
|
remote-copy-program))
|
|
|
|
(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
|
|
|
|
2010-12-02 19:34:31 +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)))
|
|
|
|
;; 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))
|
|
|
|
(while copy-env
|
2010-12-02 19:34:31 +00:00
|
|
|
(tramp-message
|
Use ControlMaster where applicable. (Bug#13677)
* net/tramp.el (tramp-ssh-controlmaster-template): New defvar,
replacing `tramp-detect-ssh-controlmaster'.
(tramp-default-method): Use it.
* net/tramp-sh.el (tramp-methods) [scp, scp1, scp2, scpx, sftp]:
[rsync, ssh, ssh1, ssh2, sshx]: Add ControlPath and ControlMaster
arguments.
[scpc, rsyncc]: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc", "ssh1_old"
and "ssh2_old".
(tramp-do-copy-or-rename-file-out-of-band): Change trace level.
(tramp-maybe-open-connection): Reuse tmpfile for ControlPath.
2013-02-13 16:23:15 +00:00
|
|
|
orig-vec 6 "%s=\"%s\"" (car copy-env) (cadr copy-env))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
(setenv (pop copy-env) (pop copy-env)))
|
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))))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 asynchronous process. By this, password can
|
2014-11-01 13:34:45 +00:00
|
|
|
;; be handled. We don't set a timeout, because the
|
|
|
|
;; copying of large files can last longer than 60
|
|
|
|
;; secs.
|
|
|
|
(let ((p (apply 'start-process-shell-command
|
|
|
|
(tramp-get-connection-name v)
|
|
|
|
(tramp-get-connection-buffer v)
|
|
|
|
copy-program
|
|
|
|
(append
|
|
|
|
copy-args
|
|
|
|
(list "&&" "echo" "tramp_exit_status" "0"
|
|
|
|
"||" "echo" "tramp_exit_status" "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
|
|
|
(tramp-message
|
2010-12-02 19:34:31 +00:00
|
|
|
orig-vec 6 "%s"
|
|
|
|
(mapconcat 'identity (process-command p) " "))
|
2013-10-17 19:39:22 +00:00
|
|
|
(tramp-set-connection-property p "vector" orig-vec)
|
2010-10-05 14:20:24 +00:00
|
|
|
(tramp-compat-set-process-query-on-exit-flag p nil)
|
2014-12-23 13:17:00 +00:00
|
|
|
|
2014-12-24 08:58:49 +00:00
|
|
|
;; We must adapt `tramp-local-end-of-line' for
|
|
|
|
;; sending the password.
|
|
|
|
(let ((tramp-local-end-of-line tramp-rsh-end-of-line))
|
2014-12-23 13:17:00 +00:00
|
|
|
(tramp-process-actions
|
|
|
|
p v nil tramp-actions-copy-out-of-band))
|
2012-12-05 14:06:06 +00:00
|
|
|
|
2012-12-05 15:50:32 +00:00
|
|
|
;; Check the return code.
|
|
|
|
(goto-char (point-max))
|
|
|
|
(unless
|
|
|
|
(re-search-backward "tramp_exit_status [0-9]+" nil t)
|
|
|
|
(tramp-error
|
|
|
|
orig-vec 'file-error
|
2013-10-17 19:39:22 +00:00
|
|
|
"Couldn't find exit status of `%s'"
|
|
|
|
(mapconcat 'identity (process-command p) " ")))
|
2012-12-05 15:50:32 +00:00
|
|
|
(skip-chars-forward "^ ")
|
|
|
|
(unless (zerop (read (current-buffer)))
|
|
|
|
(forward-line -1)
|
|
|
|
(tramp-error
|
|
|
|
orig-vec 'file-error
|
|
|
|
"Error copying: `%s'"
|
|
|
|
(buffer-substring (point-min) (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
|
|
|
|
2010-12-02 19:34:31 +00:00
|
|
|
;; Reset the transfer process properties.
|
|
|
|
(tramp-set-connection-property v "process-name" nil)
|
2014-11-01 13:34:45 +00:00
|
|
|
(tramp-set-connection-property v "process-buffer" nil)
|
|
|
|
;; 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))
|
|
|
|
(set-file-times newname (nth 5 (file-attributes filename))))
|
|
|
|
|
|
|
|
;; 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)
|
|
|
|
(tramp-compat-delete-directory filename 'recursive))))))
|
|
|
|
|
2010-10-04 19:44:08 +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
|
|
|
|
(tramp-flush-directory-property v (file-name-directory localname))
|
|
|
|
(save-excursion
|
|
|
|
(tramp-barf-unless-okay
|
|
|
|
v (format "%s %s"
|
|
|
|
(if parents "mkdir -p" "mkdir")
|
|
|
|
(tramp-shell-quote-argument localname))
|
|
|
|
"Couldn't make directory %s" dir))))
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun tramp-sh-handle-delete-directory (directory &optional 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
|
|
|
"Like `delete-directory' for Tramp files."
|
|
|
|
(setq directory (expand-file-name directory))
|
|
|
|
(with-parsed-tramp-file-name directory nil
|
|
|
|
(tramp-flush-file-property v (file-name-directory localname))
|
|
|
|
(tramp-flush-directory-property v localname)
|
|
|
|
(tramp-barf-unless-okay
|
2015-03-04 10:02:36 +00:00
|
|
|
v (format "cd / && %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
|
|
|
(if recursive "rm -rf" "rmdir")
|
|
|
|
(tramp-shell-quote-argument localname))
|
|
|
|
"Couldn't delete %s" directory)))
|
|
|
|
|
2010-10-04 19:44:08 +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
|
|
|
|
(tramp-flush-file-property v (file-name-directory localname))
|
|
|
|
(tramp-flush-file-property v localname)
|
|
|
|
(tramp-barf-unless-okay
|
|
|
|
v (format "%s %s"
|
|
|
|
(or (and trash (tramp-get-remote-trash v)) "rm -f")
|
|
|
|
(tramp-shell-quote-argument localname))
|
|
|
|
"Couldn't delete %s" filename)))
|
|
|
|
|
|
|
|
;; Dired.
|
|
|
|
|
|
|
|
;; CCC: This does not seem to be enough. Something dies when
|
|
|
|
;; we try and delete two directories under Tramp :/
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun tramp-sh-handle-dired-recursive-delete-directory (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
|
|
|
"Recursively delete the directory given.
|
|
|
|
This is like `dired-recursive-delete-directory' for Tramp files."
|
|
|
|
(with-parsed-tramp-file-name filename nil
|
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
|
|
|
;; Run a shell command 'rm -r <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
|
|
|
;; Code shamelessly stolen from the dired implementation and, um, hacked :)
|
|
|
|
(unless (file-exists-p filename)
|
|
|
|
(tramp-error v 'file-error "No such directory: %s" filename))
|
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
|
|
|
;; Which is better, -r or -R? (-r works for me <daniel@danann.net>).
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 "rm -rf %s" (tramp-shell-quote-argument localname))
|
2011-02-05 09:52:07 +00:00
|
|
|
;; Don't read the output, do it explicitly.
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 t)
|
|
|
|
;; Wait for the remote system to return to us...
|
|
|
|
;; This might take a while, allow it plenty of time.
|
|
|
|
(tramp-wait-for-output (tramp-get-connection-process v) 120)
|
|
|
|
;; Make sure that it worked...
|
|
|
|
(tramp-flush-file-property v (file-name-directory localname))
|
|
|
|
(tramp-flush-directory-property v localname)
|
|
|
|
(and (file-exists-p filename)
|
|
|
|
(tramp-error
|
|
|
|
v 'file-error "Failed to recursively delete %s" filename))))
|
|
|
|
|
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-dired-compress-file (file &rest _ok-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 `dired-compress-file' for Tramp files."
|
|
|
|
;; OK-FLAG is valid for XEmacs only, but not implemented.
|
|
|
|
;; Code stolen mainly from dired-aux.el.
|
|
|
|
(with-parsed-tramp-file-name file nil
|
|
|
|
(tramp-flush-file-property v localname)
|
|
|
|
(save-excursion
|
|
|
|
(let ((suffixes
|
|
|
|
(if (not (featurep 'xemacs))
|
|
|
|
;; Emacs case
|
|
|
|
(symbol-value 'dired-compress-file-suffixes)
|
|
|
|
;; XEmacs has `dired-compression-method-alist', which is
|
|
|
|
;; transformed into `dired-compress-file-suffixes' structure.
|
|
|
|
(mapcar
|
|
|
|
(lambda (x)
|
|
|
|
(list (concat (regexp-quote (nth 1 x)) "\\'")
|
|
|
|
nil
|
|
|
|
(mapconcat 'identity (nth 3 x) " ")))
|
|
|
|
(symbol-value 'dired-compression-method-alist))))
|
|
|
|
suffix)
|
|
|
|
;; See if any suffix rule matches this file name.
|
|
|
|
(while suffixes
|
|
|
|
(let (case-fold-search)
|
|
|
|
(if (string-match (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.
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-progress-reporter
|
2011-06-02 03:48:23 +00:00
|
|
|
v 0 (format "Uncompressing %s" 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
|
|
|
(when (tramp-send-command-and-check
|
|
|
|
v (concat (nth 2 suffix) " "
|
|
|
|
(tramp-shell-quote-argument localname)))
|
|
|
|
;; `dired-remove-file' is not defined in XEmacs.
|
|
|
|
(tramp-compat-funcall '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.
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-progress-reporter v 0 (format "Compressing %s" 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
|
|
|
(when (tramp-send-command-and-check
|
|
|
|
v (concat "gzip -f "
|
|
|
|
(tramp-shell-quote-argument localname)))
|
|
|
|
;; `dired-remove-file' is not defined in XEmacs.
|
|
|
|
(tramp-compat-funcall '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))))))))))
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun 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
|
|
|
(filename switches &optional wildcard full-directory-p)
|
|
|
|
"Like `insert-directory' for Tramp files."
|
|
|
|
(setq filename (expand-file-name filename))
|
2013-11-26 15:07:10 +00:00
|
|
|
(unless switches (setq 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
|
|
|
(with-parsed-tramp-file-name filename nil
|
|
|
|
(if (and (featurep 'ls-lisp)
|
|
|
|
(not (symbol-value 'ls-lisp-use-insert-directory-program)))
|
2014-02-20 14:24:13 +00:00
|
|
|
(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)))
|
|
|
|
(when (and (member "--dired" switches)
|
|
|
|
(not (tramp-get-ls-command-with-dired v)))
|
|
|
|
(setq switches (delete "--dired" switches)))
|
|
|
|
(when wildcard
|
|
|
|
(setq wildcard (tramp-run-real-handler
|
|
|
|
'file-name-nondirectory (list localname)))
|
|
|
|
(setq localname (tramp-run-real-handler
|
|
|
|
'file-name-directory (list localname))))
|
2013-09-03 20:14:58 +00:00
|
|
|
(unless (or full-directory-p (member "-d" switches))
|
|
|
|
(setq switches (append switches '("-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
|
|
|
(setq switches (mapconcat 'tramp-shell-quote-argument switches " "))
|
|
|
|
(when wildcard
|
|
|
|
(setq switches (concat switches " " wildcard)))
|
|
|
|
(tramp-message
|
|
|
|
v 4 "Inserting directory `ls %s %s', wildcard %s, fulldir %s"
|
|
|
|
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'.
|
|
|
|
(if full-directory-p
|
|
|
|
(tramp-send-command
|
|
|
|
v
|
2013-11-15 07:37:18 +00:00
|
|
|
(format "%s %s %s 2>/dev/null"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-ls-command v)
|
|
|
|
switches
|
|
|
|
(if wildcard
|
|
|
|
localname
|
|
|
|
(tramp-shell-quote-argument (concat localname ".")))))
|
|
|
|
(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'"
|
|
|
|
(tramp-shell-quote-argument
|
|
|
|
(tramp-run-real-handler 'file-name-directory (list localname))))
|
|
|
|
(tramp-send-command
|
|
|
|
v
|
2013-11-15 07:37:18 +00:00
|
|
|
(format "%s %s %s 2>/dev/null"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-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)))))))
|
2013-10-07 12:45:20 +00:00
|
|
|
|
|
|
|
(save-restriction
|
|
|
|
(let ((beg (point)))
|
|
|
|
(narrow-to-region (point) (point))
|
|
|
|
;; We cannot use `insert-buffer-substring' because the Tramp
|
|
|
|
;; buffer changes its contents before insertion due to calling
|
|
|
|
;; `expand-file' and alike.
|
|
|
|
(insert
|
|
|
|
(with-current-buffer (tramp-get-buffer v)
|
|
|
|
(buffer-string)))
|
|
|
|
|
|
|
|
;; Check for "--dired" output.
|
|
|
|
(forward-line -2)
|
|
|
|
(when (looking-at "//SUBDIRED//")
|
|
|
|
(forward-line -1))
|
|
|
|
(when (looking-at "//DIRED//\\s-+")
|
|
|
|
(let ((databeg (match-end 0))
|
|
|
|
(end (point-at-eol)))
|
|
|
|
;; Now read the numeric positions of file names.
|
|
|
|
(goto-char databeg)
|
|
|
|
(while (< (point) end)
|
|
|
|
(let ((start (+ beg (read (current-buffer))))
|
|
|
|
(end (+ beg (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.
|
|
|
|
(goto-char (point-at-bol))
|
|
|
|
(while (looking-at "//")
|
|
|
|
(forward-line 1)
|
|
|
|
(delete-region (match-beginning 0) (point)))
|
|
|
|
|
|
|
|
;; Some busyboxes are reluctant to discard colors.
|
2014-11-01 13:34:45 +00:00
|
|
|
(unless
|
|
|
|
(string-match "color" (tramp-get-connection-property v "ls" ""))
|
2013-10-07 12:45:20 +00:00
|
|
|
(goto-char beg)
|
|
|
|
(while (re-search-forward tramp-color-escape-sequence-regexp nil t)
|
|
|
|
(replace-match "")))
|
|
|
|
|
|
|
|
;; Decode the output, it could be multibyte.
|
|
|
|
(decode-coding-region
|
|
|
|
beg (point-max)
|
|
|
|
(or file-name-coding-system
|
|
|
|
(and (boundp 'default-file-name-coding-system)
|
|
|
|
(symbol-value 'default-file-name-coding-system))))
|
|
|
|
|
|
|
|
;; 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 "->" beg 'noerror)))
|
|
|
|
(search-backward
|
|
|
|
(if (zerop (length (file-name-nondirectory filename)))
|
|
|
|
"."
|
|
|
|
(file-name-nondirectory filename))
|
|
|
|
beg 'noerror)
|
|
|
|
(replace-match (file-relative-name filename) t))
|
|
|
|
|
|
|
|
(goto-char (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
|
|
|
|
|
|
|
;; Canonicalization of file names.
|
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(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.
|
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 "/"))
|
|
|
|
;; Unless NAME is absolute, concat DIR and NAME.
|
|
|
|
(unless (file-name-absolute-p name)
|
|
|
|
(setq name (concat (file-name-as-directory dir) name)))
|
|
|
|
;; If NAME is not a Tramp file, 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 "\\`su\\(do\\)?\\'" method))
|
|
|
|
(setq uname (concat uname user)))
|
|
|
|
(setq uname
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property v 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
|
2015-03-04 10:02:36 +00:00
|
|
|
v (format "cd %s && pwd" (tramp-shell-quote-argument 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
|
|
|
(with-current-buffer (tramp-get-buffer v)
|
|
|
|
(goto-char (point-min))
|
2010-11-13 10:42:32 +00:00
|
|
|
(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
|
|
|
(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)))
|
|
|
|
;; No tilde characters in file name, do normal
|
|
|
|
;; `expand-file-name' (this does "/./" and "/../"). We bind
|
|
|
|
;; `directory-sep-char' here for XEmacs on Windows, which would
|
|
|
|
;; otherwise use backslash. `default-directory' is bound,
|
|
|
|
;; because on Windows there would be problems with UNC shares or
|
|
|
|
;; Cygwin mounts.
|
|
|
|
(let ((directory-sep-char ?/)
|
|
|
|
(default-directory (tramp-compat-temporary-file-directory)))
|
|
|
|
(tramp-make-tramp-file-name
|
|
|
|
method user host
|
|
|
|
(tramp-drop-volume-letter
|
|
|
|
(tramp-run-real-handler
|
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
|
|
|
'expand-file-name (list localname)))
|
|
|
|
hop)))))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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:
|
|
|
|
|
|
|
|
(defun tramp-process-sentinel (proc event)
|
|
|
|
"Flush file caches."
|
|
|
|
(unless (memq (process-status proc) '(run open))
|
|
|
|
(let ((vec (tramp-get-connection-property proc "vector" nil)))
|
|
|
|
(when vec
|
2013-07-04 09:39:36 +00:00
|
|
|
(tramp-message vec 5 "Sentinel called: `%S' `%s'" proc event)
|
2011-07-04 12:12:38 +00:00
|
|
|
(tramp-flush-connection-property 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
|
|
|
(tramp-flush-directory-property vec "")))))
|
|
|
|
|
|
|
|
;; We use BUFFER also as connection buffer during setup. Because of
|
|
|
|
;; this, its original contents must be saved, and restored once
|
|
|
|
;; connection has been setup.
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun tramp-sh-handle-start-file-process (name buffer program &rest 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
|
|
|
"Like `start-file-process' for Tramp files."
|
2014-11-01 13:34:45 +00:00
|
|
|
(with-parsed-tramp-file-name (expand-file-name default-directory) nil
|
2013-12-06 15:34:06 +00:00
|
|
|
(let* (;; 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 (stringp program)
|
|
|
|
(string-match "sh$" program)
|
|
|
|
(string-equal "-c" (car args))
|
|
|
|
(= (length args) 2)))
|
|
|
|
;; 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)))
|
2014-11-22 11:37:04 +00:00
|
|
|
;; Use a human-friendly prompt, for example for `shell'.
|
|
|
|
(prompt (format "PS1=%s"
|
|
|
|
(format "%s %s"
|
|
|
|
(file-remote-p default-directory)
|
|
|
|
tramp-initial-end-of-output)))
|
|
|
|
;; We use as environment the difference to toplevel
|
|
|
|
;; `process-environment'.
|
|
|
|
env
|
|
|
|
(env
|
|
|
|
(dolist
|
|
|
|
(elt
|
|
|
|
(cons prompt (nreverse (copy-sequence process-environment)))
|
|
|
|
env)
|
|
|
|
(or (member elt (default-toplevel-value 'process-environment))
|
|
|
|
(setq env (cons elt env)))))
|
2013-12-06 15:34:06 +00:00
|
|
|
(command
|
|
|
|
(when (stringp program)
|
2014-11-22 11:37:04 +00:00
|
|
|
(format "cd %s && exec %s env %s %s"
|
2013-12-06 15:34:06 +00:00
|
|
|
(tramp-shell-quote-argument localname)
|
2014-02-10 13:22:14 +00:00
|
|
|
(if heredoc (format "<<'%s'" tramp-end-of-heredoc) "")
|
2014-11-22 11:37:04 +00:00
|
|
|
(mapconcat 'tramp-shell-quote-argument env " ")
|
2013-12-06 15:34:06 +00:00
|
|
|
(if heredoc
|
2014-02-06 08:49:34 +00:00
|
|
|
(format "%s\n(\n%s\n) </dev/tty\n%s"
|
2014-02-05 14:11:50 +00:00
|
|
|
program (car args) tramp-end-of-heredoc)
|
2013-12-06 15:34:06 +00:00
|
|
|
(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
|
2014-12-19 11:45:01 +00:00
|
|
|
;; `start-file-process' has been started several times in
|
2013-12-06 15:34:06 +00:00
|
|
|
;; `eshell' and friends.
|
|
|
|
(tramp-current-connection nil))
|
2012-08-17 09:18:18 +00:00
|
|
|
|
|
|
|
(unless buffer
|
|
|
|
;; BUFFER can be nil. We use a temporary buffer.
|
|
|
|
(setq buffer (generate-new-buffer tramp-temp-buffer-name)))
|
|
|
|
(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
|
2013-01-29 08:12:11 +00:00
|
|
|
;; We catch this event. Otherwise, `start-process' could
|
|
|
|
;; be called on the local host.
|
2013-01-29 14:52:20 +00:00
|
|
|
(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)
|
|
|
|
(buffer-read-only nil)
|
2014-02-08 13:35:15 +00:00
|
|
|
(mark (point-max)))
|
2013-01-29 14:52:20 +00:00
|
|
|
(clear-visited-file-modtime)
|
|
|
|
(narrow-to-region (point-max) (point-max))
|
|
|
|
;; We call `tramp-maybe-open-connection', in order
|
|
|
|
;; to cleanup the prompt afterwards.
|
|
|
|
(catch 'suppress
|
2013-01-29 08:12:11 +00:00
|
|
|
(tramp-maybe-open-connection v)
|
|
|
|
(widen)
|
|
|
|
(delete-region mark (point))
|
|
|
|
(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 (tramp-compat-process-get
|
|
|
|
(tramp-get-connection-process v) 'remote-tty)
|
|
|
|
(tramp-error
|
|
|
|
v 'file-error
|
|
|
|
"pty association is not supported for `%s'" name))))
|
|
|
|
(let ((p (tramp-get-connection-process v)))
|
2013-02-12 14:35:10 +00:00
|
|
|
;; Set query flag and process marker for this
|
|
|
|
;; process. We ignore errors, because the process
|
|
|
|
;; could have finished already.
|
2013-01-29 08:12:11 +00:00
|
|
|
(ignore-errors
|
2013-02-12 14:35:10 +00:00
|
|
|
(tramp-compat-set-process-query-on-exit-flag p t)
|
|
|
|
(set-marker (process-mark p) (point)))
|
2013-01-29 08:12:11 +00:00
|
|
|
;; Return process.
|
|
|
|
p))))
|
2012-08-17 09:18:18 +00:00
|
|
|
|
|
|
|
;; Save exit.
|
2010-12-13 15:27:36 +00:00
|
|
|
(if (string-match tramp-temp-buffer-name (buffer-name))
|
2013-01-29 14:52:20 +00:00
|
|
|
(ignore-errors
|
2010-12-13 15:27:36 +00:00
|
|
|
(set-process-buffer (tramp-get-connection-process v) nil)
|
|
|
|
(kill-buffer (current-buffer)))
|
2012-08-17 09:18:18 +00:00
|
|
|
(set-buffer-modified-p bmp))
|
|
|
|
(tramp-set-connection-property v "process-name" nil)
|
|
|
|
(tramp-set-connection-property v "process-buffer" 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
|
|
|
|
2010-10-04 19:44:08 +00:00
|
|
|
(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 default-directory nil
|
2014-11-22 11:37:04 +00:00
|
|
|
(let (command env 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
|
|
|
|
(cons program args) " "))
|
2014-11-22 11:37:04 +00:00
|
|
|
;; We use as environment the difference to toplevel `process-environment'.
|
|
|
|
(setq env
|
|
|
|
(dolist (elt (nreverse (copy-sequence process-environment)) env)
|
|
|
|
(or (member elt (default-toplevel-value 'process-environment))
|
|
|
|
(setq env (cons elt env)))))
|
|
|
|
(when env
|
|
|
|
(setq command
|
|
|
|
(format
|
|
|
|
"env %s %s"
|
|
|
|
(mapconcat 'tramp-shell-quote-argument env " ") 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 "/dev/null")
|
|
|
|
(setq infile (expand-file-name infile))
|
|
|
|
(if (tramp-equal-remote default-directory infile)
|
|
|
|
;; INFILE is on the same remote host.
|
|
|
|
(setq input (with-parsed-tramp-file-name infile nil localname))
|
|
|
|
;; INFILE must be copied to remote host.
|
|
|
|
(setq input (tramp-make-tramp-temp-file v)
|
|
|
|
tmpinput (tramp-make-tramp-file-name method user host input))
|
|
|
|
(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.
|
|
|
|
(setq stderr (with-parsed-tramp-file-name
|
|
|
|
(cadr destination) nil localname))
|
|
|
|
;; 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
|
|
|
|
method user host stderr))))
|
|
|
|
;; stderr to be discarded.
|
|
|
|
((null (cadr destination))
|
|
|
|
(setq stderr "/dev/null"))))
|
|
|
|
;; '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
|
|
|
|
(if (tramp-send-command-and-check
|
2015-03-04 10:02:36 +00:00
|
|
|
v (format "cd %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)
|
|
|
|
command)
|
|
|
|
t t)
|
|
|
|
0 1))
|
2014-06-22 09:20:38 +00:00
|
|
|
;; 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))))
|
2014-06-22 09:20:38 +00:00
|
|
|
(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)))
|
|
|
|
|
|
|
|
;; 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))
|
|
|
|
|
|
|
|
;; `process-file-side-effects' has been introduced with GNU
|
|
|
|
;; Emacs 23.2. If set to `nil', no remote file will be changed
|
|
|
|
;; by `program'. If it doesn't exist, we assume its default
|
2011-09-04 18:14:34 +00:00
|
|
|
;; value `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
|
|
|
(unless (and (boundp 'process-file-side-effects)
|
|
|
|
(not (symbol-value 'process-file-side-effects)))
|
|
|
|
(tramp-flush-directory-property v ""))
|
|
|
|
|
|
|
|
;; Return exit status.
|
|
|
|
(if (equal ret -1)
|
|
|
|
(keyboard-quit)
|
|
|
|
ret))))
|
|
|
|
|
2010-10-04 19:44:08 +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 filename)
|
|
|
|
(tramp-error
|
|
|
|
v 'file-error
|
|
|
|
"Cannot make local copy of non-existing file `%s'" filename))
|
|
|
|
|
2010-12-02 19:34:31 +00:00
|
|
|
(let* ((size (nth 7 (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))
|
|
|
|
(copy-file filename tmpfile t t))
|
|
|
|
|
|
|
|
;; Use inline encoding for file transfer.
|
|
|
|
(rem-enc
|
|
|
|
(save-excursion
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-progress-reporter
|
2013-04-22 10:26:09 +00:00
|
|
|
v 3
|
|
|
|
(format "Encoding remote file `%s' with `%s'" filename 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
|
|
|
(tramp-barf-unless-okay
|
|
|
|
v (format rem-enc (tramp-shell-quote-argument localname))
|
|
|
|
"Encoding remote file failed"))
|
|
|
|
|
2013-04-22 10:26:09 +00:00
|
|
|
(with-tramp-progress-reporter
|
|
|
|
v 3 (format "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
|
2015-03-04 10:02:36 +00:00
|
|
|
;; correctly. Unset `file-name-handler-alist'.
|
|
|
|
;; Otherwise, epa-file gets confused.
|
|
|
|
(let (file-name-handler-alist
|
|
|
|
(coding-system-for-write 'binary))
|
|
|
|
(with-temp-file tmpfile
|
|
|
|
(set-buffer-multibyte nil)
|
|
|
|
(insert-buffer-substring (tramp-get-buffer v))
|
|
|
|
(funcall loc-dec (point-min) (point-max))))
|
2013-04-22 10:26:09 +00:00
|
|
|
|
|
|
|
;; 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)
|
2013-11-11 15:18:07 +00:00
|
|
|
(write-region
|
|
|
|
(point-min) (point-max) tmpfile2 nil '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
|
|
|
(unwind-protect
|
|
|
|
(tramp-call-local-coding-command
|
|
|
|
loc-dec tmpfile2 tmpfile)
|
|
|
|
(delete-file tmpfile2)))))
|
|
|
|
|
|
|
|
;; Set proper permissions.
|
|
|
|
(set-file-modes tmpfile (tramp-default-file-modes filename))
|
|
|
|
;; Set local user ownership.
|
|
|
|
(tramp-set-file-uid-gid tmpfile)))
|
|
|
|
|
|
|
|
;; Oops, I don't know what to do.
|
|
|
|
(t (tramp-error
|
|
|
|
v 'file-error "Wrong method specification for `%s'" method)))
|
|
|
|
|
|
|
|
;; Error handling.
|
|
|
|
((error quit)
|
|
|
|
(delete-file tmpfile)
|
|
|
|
(signal (car err) (cdr err))))
|
|
|
|
|
|
|
|
(run-hooks 'tramp-handle-file-local-copy-hook)
|
|
|
|
tmpfile)))
|
|
|
|
|
|
|
|
;; This is needed for XEmacs only. Code stolen from files.el.
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun tramp-sh-handle-insert-file-contents-literally
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 &optional visit beg end replace)
|
|
|
|
"Like `insert-file-contents-literally' for Tramp files."
|
|
|
|
(let ((format-alist nil)
|
|
|
|
(after-insert-file-functions nil)
|
|
|
|
(coding-system-for-read 'no-conversion)
|
|
|
|
(coding-system-for-write 'no-conversion)
|
|
|
|
(find-buffer-file-type-function
|
|
|
|
(if (fboundp 'find-buffer-file-type)
|
|
|
|
(symbol-function 'find-buffer-file-type)
|
|
|
|
nil))
|
|
|
|
(inhibit-file-name-handlers '(jka-compr-handler image-file-handler))
|
|
|
|
(inhibit-file-name-operation 'insert-file-contents))
|
|
|
|
(unwind-protect
|
|
|
|
(progn
|
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
|
|
|
(fset 'find-buffer-file-type (lambda (_filename) 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
|
|
|
(insert-file-contents filename visit beg end replace))
|
|
|
|
;; Save exit.
|
|
|
|
(if find-buffer-file-type-function
|
|
|
|
(fset 'find-buffer-file-type find-buffer-file-type-function)
|
|
|
|
(fmakunbound 'find-buffer-file-type)))))
|
|
|
|
|
|
|
|
;; CCC grok LOCKNAME
|
2010-10-04 19:44:08 +00:00
|
|
|
(defun 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
|
|
|
(start end filename &optional append visit lockname confirm)
|
|
|
|
"Like `write-region' for Tramp files."
|
|
|
|
(setq filename (expand-file-name filename))
|
|
|
|
(with-parsed-tramp-file-name filename nil
|
|
|
|
;; Following part commented out because we don't know what to do about
|
|
|
|
;; file locking, and it does not appear to be a problem to ignore it.
|
|
|
|
;; Ange-ftp ignores it, too.
|
|
|
|
;; (when (and lockname (stringp lockname))
|
|
|
|
;; (setq lockname (expand-file-name lockname)))
|
|
|
|
;; (unless (or (eq lockname nil)
|
|
|
|
;; (string= lockname filename))
|
|
|
|
;; (error
|
2010-10-04 19:44:08 +00:00
|
|
|
;; "tramp-sh-handle-write-region: LOCKNAME must be nil or equal 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
|
|
|
|
|
|
|
;; XEmacs takes a coding system as the seventh argument, not `confirm'.
|
|
|
|
(when (and (not (featurep 'xemacs)) confirm (file-exists-p filename))
|
|
|
|
(unless (y-or-n-p (format "File %s exists; overwrite anyway? " filename))
|
|
|
|
(tramp-error v 'file-error "File not overwritten")))
|
|
|
|
|
|
|
|
(let ((uid (or (nth 2 (tramp-compat-file-attributes filename 'integer))
|
|
|
|
(tramp-get-remote-uid v 'integer)))
|
|
|
|
(gid (or (nth 3 (tramp-compat-file-attributes filename 'integer))
|
|
|
|
(tramp-get-remote-gid v 'integer))))
|
|
|
|
|
|
|
|
(if (and (tramp-local-host-p v)
|
|
|
|
;; `file-writable-p' calls `file-expand-file-name'. We
|
|
|
|
;; cannot use `tramp-run-real-handler' therefore.
|
|
|
|
(let (file-name-handler-alist)
|
|
|
|
(and
|
|
|
|
(file-writable-p (file-name-directory localname))
|
|
|
|
(or (file-directory-p localname)
|
|
|
|
(file-writable-p localname)))))
|
|
|
|
;; Short track: if we are on the local host, we can run directly.
|
|
|
|
(tramp-run-real-handler
|
|
|
|
'write-region
|
|
|
|
(list start end localname append 'no-message lockname confirm))
|
|
|
|
|
2012-06-06 13:32:36 +00:00
|
|
|
(let* ((modes (save-excursion (tramp-default-file-modes filename)))
|
|
|
|
;; 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 append (copy-file filename tmpfile 'ok))
|
|
|
|
|
|
|
|
;; 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-name-handler-alist
|
|
|
|
(file-coding-system-alist
|
|
|
|
(tramp-find-file-name-coding-system-alist filename tmpfile)))
|
|
|
|
(condition-case err
|
|
|
|
(tramp-run-real-handler
|
|
|
|
'write-region
|
|
|
|
(list start end tmpfile append 'no-message lockname confirm))
|
|
|
|
((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.
|
|
|
|
(when (boundp 'last-coding-system-used)
|
|
|
|
(setq coding-system-used
|
|
|
|
(symbol-value 'last-coding-system-used))))
|
|
|
|
|
|
|
|
;; The permissions of the temporary file should be set. If
|
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.
|
2011-02-05 09:52:07 +00:00
|
|
|
;; 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
|
|
|
|
(set-file-modes
|
|
|
|
tmpfile
|
|
|
|
(logior (or modes 0) (tramp-compat-octal-to-decimal "0400"))))
|
|
|
|
|
|
|
|
;; This is a bit lengthy due to the different methods
|
|
|
|
;; possible for file transfer. First, we check whether the
|
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.
|
|
|
|
(let* ((size (nth 7 (file-attributes tmpfile)))
|
|
|
|
(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))
|
|
|
|
(tramp-get-method-parameter
|
|
|
|
method 'tramp-copy-keep-tmpfile))
|
|
|
|
(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.
|
2013-04-22 10:26:09 +00:00
|
|
|
(with-tramp-progress-reporter
|
|
|
|
v 3 (format "Encoding local file `%s' using `%s'"
|
|
|
|
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.
|
2013-04-22 10:26:09 +00:00
|
|
|
(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)))
|
2013-04-22 10:26:09 +00:00
|
|
|
(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")
|
|
|
|
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.
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-progress-reporter
|
2013-04-22 10:26:09 +00:00
|
|
|
v 3 (format "Decoding remote file `%s' using `%s'"
|
|
|
|
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
|
2014-02-05 14:11:50 +00:00
|
|
|
(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)
|
2014-02-05 14:11:50 +00:00
|
|
|
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"
|
|
|
|
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.
|
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")
|
|
|
|
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 "
|
2014-11-01 13:34:45 +00:00
|
|
|
"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
|
|
|
|
(set 'last-coding-system-used coding-system-used))))
|
|
|
|
|
|
|
|
(tramp-flush-file-property v (file-name-directory localname))
|
|
|
|
(tramp-flush-file-property v localname)
|
|
|
|
|
|
|
|
;; 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))
|
2012-07-05 06:57:57 +00:00
|
|
|
(let ((file-attr (tramp-compat-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
|
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.
|
|
|
|
(nth 5 file-attr))
|
2012-07-05 06:57:57 +00:00
|
|
|
(when (and (= (nth 2 file-attr) uid)
|
|
|
|
(= (nth 3 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))
|
|
|
|
(when (or (eq visit t) (null visit) (stringp visit))
|
|
|
|
(tramp-message v 0 "Wrote %s" filename))
|
|
|
|
(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.
|
2010-10-04 19:44:08 +00:00
|
|
|
(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."
|
2010-09-15 20:27:11 +00:00
|
|
|
(tramp-compat-with-temp-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
|
|
|
(with-parsed-tramp-file-name file nil
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-progress-reporter
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
v 3 (format "Checking `vc-registered' for %s" file)
|
|
|
|
|
2014-03-25 08:16:49 +00:00
|
|
|
;; 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.
|
|
|
|
(ignore-errors (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))))))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
|
|
|
|
;; Second run. Now all `file-exists-p' or `file-readable-p'
|
|
|
|
;; calls shall be answered from the file cache. We unset
|
2014-03-25 08:16:49 +00:00
|
|
|
;; `process-file-side-effects' and `remote-file-name-inhibit-cache'
|
|
|
|
;; in order to keep the cache.
|
2014-11-01 13:34:45 +00:00
|
|
|
(let ((vc-handled-backends 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)
|
|
|
|
(boundp 'vc-bzr-program)
|
|
|
|
(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)
|
|
|
|
(boundp 'vc-git-program)
|
|
|
|
(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)
|
|
|
|
(boundp 'vc-hg-program)
|
|
|
|
(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.
|
2013-07-14 18:45:50 +00:00
|
|
|
(ignore-errors
|
|
|
|
(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."
|
|
|
|
(when (and tramp-locked (not tramp-locker))
|
|
|
|
(setq tramp-locked nil)
|
2014-03-07 14:07:12 +00:00
|
|
|
(tramp-error
|
|
|
|
(car-safe tramp-current-connection) 'file-error
|
|
|
|
"Forbidden reentrant call of Tramp"))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 ((tl tramp-locked))
|
2014-03-07 14:07:12 +00:00
|
|
|
(setq tramp-locked 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
|
|
|
(unwind-protect
|
2014-03-07 14:07:12 +00:00
|
|
|
(let ((tramp-locker t))
|
|
|
|
(save-match-data
|
|
|
|
(let ((fn (assoc operation tramp-sh-file-name-handler-alist)))
|
|
|
|
(if fn
|
|
|
|
(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
|
|
|
(setq tramp-locked tl))))
|
|
|
|
|
|
|
|
(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)))
|
|
|
|
(fn (assoc operation tramp-sh-file-name-handler-alist)))
|
|
|
|
(with-parsed-tramp-file-name filename nil
|
|
|
|
(cond
|
|
|
|
;; That's what we want: file names, for which checks are
|
2011-02-05 09:52:07 +00:00
|
|
|
;; applied. We assume that VC uses only `file-exists-p' and
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-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)
|
2012-07-05 06:57:57 +00:00
|
|
|
;; `process-file' and `start-file-process' shall be ignored.
|
|
|
|
((and fn (eq operation 'process-file) 0))
|
|
|
|
((and fn (eq operation 'start-file-process) 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 file name handlers like `expand-file-name'. They
|
|
|
|
;; must still work.
|
2012-07-05 06:57:57 +00:00
|
|
|
(fn (save-match-data (apply (cdr fn) 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
|
|
|
;; Default file name handlers, we don't care.
|
|
|
|
(t (tramp-run-real-handler operation args)))))))
|
|
|
|
|
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)
|
2013-07-04 09:39:36 +00:00
|
|
|
"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))
|
2013-10-17 19:39:22 +00:00
|
|
|
command events filter p sequence)
|
2013-07-05 13:34:01 +00:00
|
|
|
(cond
|
|
|
|
;; gvfs-monitor-dir.
|
|
|
|
((setq command (tramp-get-remote-gvfs-monitor-dir v))
|
|
|
|
(setq filter 'tramp-sh-file-gvfs-monitor-dir-process-filter
|
2013-10-17 19:39:22 +00:00
|
|
|
sequence `(,command ,localname)))
|
2013-07-05 13:34:01 +00:00
|
|
|
;; inotifywait.
|
|
|
|
((setq command (tramp-get-remote-inotifywait v))
|
|
|
|
(setq filter 'tramp-sh-file-inotifywait-process-filter
|
|
|
|
events
|
|
|
|
(cond
|
|
|
|
((and (memq 'change flags) (memq 'attribute-change flags))
|
|
|
|
"create,modify,move,delete,attrib")
|
|
|
|
((memq 'change flags) "create,modify,move,delete")
|
|
|
|
((memq 'attribute-change flags) "attrib"))
|
2013-10-17 19:39:22 +00:00
|
|
|
sequence `(,command "-mq" "-e" ,events ,localname)))
|
2013-07-05 13:34:01 +00:00
|
|
|
;; None.
|
|
|
|
(t (tramp-error
|
|
|
|
v 'file-notify-error
|
|
|
|
"No file notification program found on %s"
|
|
|
|
(file-remote-p file-name))))
|
2013-10-17 19:39:22 +00:00
|
|
|
;; Start process.
|
|
|
|
(setq p (apply
|
|
|
|
'start-file-process
|
|
|
|
(file-name-nondirectory command)
|
|
|
|
(generate-new-buffer
|
|
|
|
(format " *%s*" (file-name-nondirectory command)))
|
|
|
|
sequence))
|
2013-07-04 09:39:36 +00:00
|
|
|
;; Return the process object as watch-descriptor.
|
|
|
|
(if (not (processp p))
|
|
|
|
(tramp-error
|
2013-10-17 19:39:22 +00:00
|
|
|
v 'file-notify-error
|
|
|
|
"`%s' failed to start on remote host"
|
|
|
|
(mapconcat 'identity sequence " "))
|
|
|
|
(tramp-message v 6 "Run `%s', %S" (mapconcat 'identity sequence " ") p)
|
|
|
|
(tramp-set-connection-property p "vector" v)
|
2013-07-04 09:39:36 +00:00
|
|
|
(tramp-compat-set-process-query-on-exit-flag p nil)
|
2013-07-05 13:34:01 +00:00
|
|
|
(set-process-filter p filter)
|
2013-07-04 09:39:36 +00:00
|
|
|
p))))
|
|
|
|
|
2013-07-05 13:34:01 +00:00
|
|
|
(defun tramp-sh-file-gvfs-monitor-dir-process-filter (proc string)
|
|
|
|
"Read output from \"gvfs-monitor-dir\" and add corresponding file-notify events."
|
2013-07-05 15:17:16 +00:00
|
|
|
(let ((remote-prefix
|
|
|
|
(with-current-buffer (process-buffer proc)
|
|
|
|
(file-remote-p default-directory)))
|
2013-07-06 16:17:16 +00:00
|
|
|
(rest-string (tramp-compat-process-get proc 'rest-string)))
|
|
|
|
(when rest-string
|
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
|
|
|
(tramp-message proc 10 "Previous string:\n%s" rest-string))
|
|
|
|
(tramp-message proc 6 "%S\n%s" proc string)
|
2013-07-06 16:17:16 +00:00
|
|
|
(setq string (concat rest-string string)
|
2013-07-05 15:17:16 +00:00
|
|
|
;; Attribute change is returned in unused wording.
|
2013-09-08 15:04:10 +00:00
|
|
|
string (tramp-compat-replace-regexp-in-string
|
2013-07-05 15:17:16 +00:00
|
|
|
"ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string))
|
|
|
|
|
|
|
|
(while (string-match
|
2013-07-06 16:17:16 +00:00
|
|
|
(concat "^[\n\r]*"
|
|
|
|
"Directory Monitor Event:[\n\r]+"
|
|
|
|
"Child = \\([^\n\r]+\\)[\n\r]+"
|
|
|
|
"\\(Other = \\([^\n\r]+\\)[\n\r]+\\)?"
|
|
|
|
"Event = \\([^[:blank:]]+\\)[\n\r]+")
|
|
|
|
string)
|
2013-07-05 15:17:16 +00:00
|
|
|
(let ((object
|
|
|
|
(list
|
|
|
|
proc
|
|
|
|
(intern-soft
|
2013-09-08 15:04:10 +00:00
|
|
|
(tramp-compat-replace-regexp-in-string
|
2013-07-05 15:17:16 +00:00
|
|
|
"_" "-" (downcase (match-string 4 string))))
|
|
|
|
;; File names are returned as absolute paths. We must
|
|
|
|
;; add the remote prefix.
|
|
|
|
(concat remote-prefix (match-string 1 string))
|
|
|
|
(when (match-string 3 string)
|
|
|
|
(concat remote-prefix (match-string 3 string))))))
|
2013-07-06 16:17:16 +00:00
|
|
|
(setq string (replace-match "" nil nil string))
|
2013-07-05 13:34:01 +00:00
|
|
|
;; Usually, we would add an Emacs event now. Unfortunately,
|
|
|
|
;; `unread-command-events' does not accept several events at
|
|
|
|
;; once. Therefore, we apply the callback directly.
|
2013-07-06 16:17:16 +00:00
|
|
|
(tramp-compat-funcall 'file-notify-callback object)))
|
2013-07-05 15:17:16 +00:00
|
|
|
|
2013-07-06 16:17:16 +00:00
|
|
|
;; Save rest of the string.
|
|
|
|
(when (zerop (length string)) (setq string nil))
|
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
|
|
|
(when string (tramp-message proc 10 "Rest string:\n%s" string))
|
2013-07-06 16:17:16 +00:00
|
|
|
(tramp-compat-process-put proc 'rest-string string)))
|
2013-07-05 13:34:01 +00:00
|
|
|
|
|
|
|
(defun tramp-sh-file-inotifywait-process-filter (proc string)
|
2013-07-04 09:39:36 +00:00
|
|
|
"Read output from \"inotifywait\" and add corresponding file-notify events."
|
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
|
|
|
(tramp-message proc 6 "%S\n%s" proc string)
|
2013-07-04 09:39:36 +00:00
|
|
|
(dolist (line (split-string string "[\n\r]+" 'omit-nulls))
|
|
|
|
;; Check, whether there is a problem.
|
|
|
|
(unless
|
|
|
|
(string-match
|
2013-07-06 16:17:16 +00:00
|
|
|
(concat "^[^[:blank:]]+"
|
|
|
|
"[[:blank:]]+\\([^[:blank:]]+\\)+"
|
|
|
|
"\\([[:blank:]]+\\([^\n\r]+\\)\\)?")
|
|
|
|
line)
|
2013-07-04 09:39:36 +00:00
|
|
|
(tramp-error proc 'file-notify-error "%s" line))
|
|
|
|
|
2013-07-05 13:34:01 +00:00
|
|
|
(let ((object
|
|
|
|
(list
|
|
|
|
proc
|
|
|
|
(mapcar
|
|
|
|
(lambda (x)
|
2013-09-08 15:04:10 +00:00
|
|
|
(intern-soft
|
|
|
|
(tramp-compat-replace-regexp-in-string "_" "-" (downcase x))))
|
2013-07-05 13:34:01 +00:00
|
|
|
(split-string (match-string 1 line) "," 'omit-nulls))
|
|
|
|
(match-string 3 line))))
|
|
|
|
;; Usually, we would add an Emacs event now. Unfortunately,
|
|
|
|
;; `unread-command-events' does not accept several events at
|
|
|
|
;; once. Therefore, we apply the callback directly.
|
2013-07-04 09:39:36 +00:00
|
|
|
(tramp-compat-funcall 'file-notify-callback object))))
|
|
|
|
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-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."
|
2011-07-27 11:22:22 +00:00
|
|
|
;; 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)
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-progress-reporter vec 5 (format "Sending script `%s'" 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
|
|
|
;; The script could contain a call of Perl. This is masked with `%s'.
|
2013-04-22 10:26:09 +00:00
|
|
|
(when (and (string-match "%s" script)
|
|
|
|
(not (tramp-get-remote-perl vec)))
|
|
|
|
(tramp-error vec 'file-error "No Perl available on remote host"))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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
|
2015-03-04 10:02:36 +00:00
|
|
|
(format "%s () {\n%s\n}"
|
|
|
|
name (format script (tramp-get-remote-perl 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
|
|
|
"Script %s sending failed" name)
|
2011-07-27 11:22:22 +00:00
|
|
|
(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-set-auto-save ()
|
|
|
|
(when (and ;; ange-ftp has its own auto-save mechanism
|
|
|
|
(eq (tramp-find-foreign-file-name-handler (buffer-file-name))
|
|
|
|
'tramp-sh-file-name-handler)
|
|
|
|
auto-save-default)
|
|
|
|
(auto-save-mode 1)))
|
|
|
|
(add-hook 'find-file-hooks 'tramp-set-auto-save t)
|
|
|
|
(add-hook 'tramp-unload-hook
|
|
|
|
(lambda ()
|
|
|
|
(remove-hook 'find-file-hooks 'tramp-set-auto-save)))
|
|
|
|
|
|
|
|
(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)))))
|
|
|
|
|
|
|
|
(defun tramp-run-test2 (format-string file1 file2)
|
|
|
|
"Run `test'-like program on the remote system, given FILE1, FILE2.
|
|
|
|
FORMAT-STRING contains the program name, switches, and place holders.
|
|
|
|
Returns the exit code of the `test' program. Barfs if the methods,
|
|
|
|
hosts, or files, disagree."
|
|
|
|
(unless (tramp-equal-remote file1 file2)
|
|
|
|
(with-parsed-tramp-file-name (if (tramp-tramp-file-p file1) file1 file2) nil
|
|
|
|
(tramp-error
|
|
|
|
v 'file-error
|
|
|
|
"tramp-run-test2 only implemented for same method, user, host")))
|
|
|
|
(with-parsed-tramp-file-name file1 v1
|
|
|
|
(with-parsed-tramp-file-name file1 v2
|
|
|
|
(tramp-send-command-and-check
|
|
|
|
v1
|
|
|
|
(format format-string
|
|
|
|
(tramp-shell-quote-argument v1-localname)
|
|
|
|
(tramp-shell-quote-argument v2-localname))))))
|
|
|
|
|
|
|
|
(defun tramp-find-executable
|
|
|
|
(vec progname dirlist &optional ignore-tilde ignore-path)
|
|
|
|
"Searches for PROGNAME in $PATH and all directories mentioned in DIRLIST.
|
|
|
|
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
|
|
|
|
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
|
|
|
|
;; report always a correct error code; therefore we check the
|
2014-03-25 08:16:49 +00:00
|
|
|
;; 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
|
|
|
|
(string-match
|
|
|
|
(regexp-opt '("SunOS 5.10" "SunOS 5.11"))
|
|
|
|
(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))
|
|
|
|
(if (looking-at "^\\s-*1$")
|
|
|
|
(setq result (concat "\\" progname))))
|
|
|
|
(unless result
|
|
|
|
(when ignore-tilde
|
|
|
|
;; Remove all ~/foo directories from dirlist. In XEmacs,
|
|
|
|
;; `remove' is in CL, and we want to avoid CL dependencies.
|
|
|
|
(let (newdl d)
|
|
|
|
(while dirlist
|
|
|
|
(setq d (car dirlist))
|
|
|
|
(setq dirlist (cdr dirlist))
|
|
|
|
(unless (char-equal ?~ (aref d 0))
|
|
|
|
(setq newdl (cons d newdl))))
|
|
|
|
(setq dirlist (nreverse newdl))))
|
|
|
|
(tramp-send-command
|
|
|
|
vec
|
|
|
|
(format (concat "while read d; "
|
2015-02-09 00:00:17 +00:00
|
|
|
"do if test -x $d/%s && test -f $d/%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
|
|
|
"then echo tramp_executable $d/%s; "
|
2014-02-05 14:11:50 +00:00
|
|
|
"break; fi; done <<'%s'\n"
|
|
|
|
"%s\n%s")
|
|
|
|
progname progname progname
|
|
|
|
tramp-end-of-heredoc
|
|
|
|
(mapconcat 'identity 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 " ")
|
2010-11-13 10:42:32 +00:00
|
|
|
(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)))
|
|
|
|
|
|
|
|
(defun tramp-set-remote-path (vec)
|
|
|
|
"Sets the remote environment PATH to existing directories.
|
|
|
|
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."
|
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
|
|
|
(tramp-message vec 5 "Setting $PATH environment variable")
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 "PATH=%s; export PATH"
|
|
|
|
(mapconcat 'identity (tramp-get-remote-path vec) ":"))))
|
|
|
|
|
|
|
|
;; ------------------------------------------------------------
|
|
|
|
;; -- 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
|
2012-08-08 13:40:45 +00:00
|
|
|
(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"))
|
|
|
|
result))
|
|
|
|
|
|
|
|
(defun tramp-open-shell (vec shell)
|
|
|
|
"Opens shell SHELL."
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-progress-reporter
|
2011-06-02 03:48:23 +00:00
|
|
|
vec 5 (format "Opening remote shell `%s'" 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
|
|
|
;; Find arguments for this shell.
|
2014-05-06 08:42:53 +00:00
|
|
|
(let ((alist tramp-sh-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
|
|
|
item extra-args)
|
|
|
|
(while (and alist (null extra-args))
|
|
|
|
(setq item (pop alist))
|
|
|
|
(when (string-match (car item) shell)
|
|
|
|
(setq extra-args (cdr item))))
|
2014-12-13 00:15:10 +00:00
|
|
|
;; 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.
|
2015-02-03 08:24:57 +00:00
|
|
|
;; $HISTFILE is set according to `tramp-histfile-override'.
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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
|
2012-08-14 14:48:28 +00:00
|
|
|
vec (format
|
2015-02-02 11:38:36 +00:00
|
|
|
"exec env ENV='' %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s"
|
2015-02-03 08:24:57 +00:00
|
|
|
(if (stringp tramp-histfile-override)
|
|
|
|
(format "HISTFILE=%s"
|
|
|
|
(tramp-shell-quote-argument tramp-histfile-override))
|
|
|
|
(if tramp-histfile-override
|
|
|
|
"HISTFILE='' HISTFILESIZE=0 HISTSIZE=0"
|
|
|
|
""))
|
2012-08-14 14:48:28 +00:00
|
|
|
(tramp-shell-quote-argument tramp-end-of-output)
|
|
|
|
shell (or 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
|
|
|
t))
|
2012-08-14 14:48:28 +00:00
|
|
|
(tramp-set-connection-property
|
2014-05-06 08:42:53 +00:00
|
|
|
(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)
|
|
|
|
"Opens a shell on the remote host which groks tilde expansion."
|
2012-08-08 13:40:45 +00:00
|
|
|
(with-current-buffer (tramp-get-buffer vec)
|
2012-08-14 14:48:28 +00:00
|
|
|
(let ((default-shell
|
|
|
|
(or
|
|
|
|
(tramp-get-connection-property
|
|
|
|
(tramp-get-connection-process vec) "remote-shell" nil)
|
|
|
|
(tramp-get-method-parameter
|
|
|
|
(tramp-file-name-method vec) 'tramp-remote-shell)))
|
2012-08-08 13:40:45 +00:00
|
|
|
shell)
|
|
|
|
(setq shell
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec "remote-shell"
|
2012-08-08 13:40:45 +00:00
|
|
|
;; CCC: "root" does not exist always, see QNAP 459.
|
|
|
|
;; Which check could we apply instead?
|
|
|
|
(tramp-send-command vec "echo ~root" t)
|
|
|
|
(if (or (string-match "^~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 (regexp-opt '("SunOS 5.10" "SunOS 5.11"))
|
|
|
|
(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)
|
2013-06-19 13:14:24 +00:00
|
|
|
(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."
|
2013-07-10 14:58:26 +00:00
|
|
|
(let ((vec (tramp-get-connection-property proc "vector" nil)))
|
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
|
2013-07-10 14:58:26 +00:00
|
|
|
(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))
|
|
|
|
(tramp-open-shell
|
|
|
|
vec
|
2012-08-14 14:48:28 +00:00
|
|
|
(or (tramp-get-connection-property vec "remote-shell" nil)
|
|
|
|
(tramp-get-method-parameter
|
|
|
|
(tramp-file-name-method vec) 'tramp-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
|
|
|
|
|
|
|
;; Disable echo.
|
|
|
|
(tramp-message vec 5 "Setting up remote shell environment")
|
|
|
|
(tramp-send-command vec "stty -inlcr -echo kill '^U' erase '^H'" t)
|
|
|
|
;; 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))
|
|
|
|
(when (looking-at "echo foo")
|
|
|
|
(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
|
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
|
|
|
|
|
|
|
;; 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)
|
|
|
|
(if (featurep 'mule)
|
|
|
|
;; Use MULE to select the right EOL convention for communicating
|
|
|
|
;; with the process.
|
2014-11-20 19:10:15 +00:00
|
|
|
(let ((cs (or (and (memq 'utf-8 (coding-system-list))
|
2014-11-22 09:30:36 +00:00
|
|
|
(string-match "utf8" (tramp-get-remote-locale vec))
|
2014-11-20 19:10:15 +00:00
|
|
|
(cons 'utf-8 'utf-8))
|
2014-11-01 13:34:45 +00:00
|
|
|
(tramp-compat-funcall 'process-coding-system proc)
|
|
|
|
(cons 'undecided 'undecided)))
|
|
|
|
cs-decode cs-encode)
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 (symbolp cs) (setq cs (cons cs cs)))
|
|
|
|
(setq cs-decode (car cs))
|
|
|
|
(setq cs-encode (cdr cs))
|
|
|
|
(unless cs-decode (setq cs-decode 'undecided))
|
|
|
|
(unless cs-encode (setq cs-encode 'undecided))
|
2010-10-05 14:20:24 +00:00
|
|
|
(setq cs-encode (tramp-compat-coding-system-change-eol-conversion
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
cs-encode 'unix))
|
2014-11-01 13:34:45 +00:00
|
|
|
(tramp-send-command vec "echo foo ; echo bar" t)
|
|
|
|
(goto-char (point-min))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 (search-forward "\r" nil t)
|
2010-10-05 14:20:24 +00:00
|
|
|
(setq cs-decode (tramp-compat-coding-system-change-eol-conversion
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
cs-decode 'dos)))
|
|
|
|
(tramp-compat-funcall
|
|
|
|
'set-buffer-process-coding-system cs-decode cs-encode)
|
|
|
|
(tramp-message
|
|
|
|
vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode))
|
|
|
|
;; Look for ^M and do something useful if found.
|
|
|
|
(when (search-forward "\r" nil t)
|
|
|
|
;; We have found a ^M but cannot frob the process coding system
|
|
|
|
;; because we're running on a non-MULE Emacs. Let's try
|
|
|
|
;; stty, instead.
|
|
|
|
(tramp-send-command vec "stty -onlcr" t))))
|
2010-10-15 12:07:38 +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
|
|
|
(tramp-send-command vec "set +o vi +o emacs" t)
|
|
|
|
|
|
|
|
;; 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
|
2011-12-12 05:32:49 +00:00
|
|
|
;; `tramp-maybe-open-connection', it will be caught there.
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 system information")
|
|
|
|
(let ((old-uname (tramp-get-connection-property vec "uname" nil))
|
|
|
|
(new-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 new-uname)))
|
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-message
|
|
|
|
vec 3
|
|
|
|
"Connection reset, because remote host changed from `%s' to `%s'"
|
|
|
|
old-uname new-uname)
|
2013-09-10 07:45:33 +00:00
|
|
|
;; We want to keep the password.
|
|
|
|
(tramp-cleanup-connection vec t t)
|
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
|
|
|
(throw 'uname-changed (tramp-maybe-open-connection 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
|
|
|
|
|
|
|
;; 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.
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property proc "chunksize"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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
|
|
|
|
((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
|
|
|
|
"^FreeBSD" (tramp-get-connection-property vec "uname" ""))
|
|
|
|
500 0))))
|
|
|
|
|
|
|
|
;; Set remote PATH variable.
|
|
|
|
(tramp-set-remote-path vec)
|
|
|
|
|
|
|
|
;; Search for a good shell before searching for a command which
|
2012-08-08 13:40:45 +00:00
|
|
|
;; checks if a file exists. This is done because Tramp wants to use
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
;; "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 "mesg n; biff n" t)
|
|
|
|
|
|
|
|
;; IRIX64 bash expands "!" even when in single quotes. This
|
|
|
|
;; destroys our shell functions, we must disable it. See
|
|
|
|
;; <http://stackoverflow.com/questions/3291692/irix-bash-shell-expands-expression-in-single-quotes-yet-shouldnt>.
|
|
|
|
(when (string-match "^IRIX64" (tramp-get-connection-property vec "uname" ""))
|
|
|
|
(tramp-send-command vec "set +H" t))
|
|
|
|
|
2010-10-15 12:07:38 +00:00
|
|
|
;; On BSD-like systems, ?\t is expanded to spaces. Suppress this.
|
|
|
|
(when (string-match "BSD\\|Darwin"
|
|
|
|
(tramp-get-connection-property vec "uname" ""))
|
|
|
|
(tramp-send-command vec "stty -oxtabs" 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
|
|
|
;; Set `remote-tty' process property.
|
2011-07-04 12:12:38 +00:00
|
|
|
(let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\"" 'noerror)))
|
|
|
|
(unless (zerop (length tty))
|
|
|
|
(tramp-compat-process-put proc 'remote-tty tty)))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
|
2010-10-15 12:07:38 +00:00
|
|
|
;; Dump stty settings in the traces.
|
|
|
|
(when (>= tramp-verbose 9)
|
|
|
|
(tramp-send-command vec "stty -a" 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
|
|
|
;; Set the environment.
|
|
|
|
(tramp-message vec 5 "Setting default environment")
|
|
|
|
|
2014-11-22 09:30:36 +00:00
|
|
|
(let ((env (append `(,(tramp-get-remote-locale vec))
|
2013-12-02 13:52:23 +00:00
|
|
|
(copy-sequence tramp-remote-process-environment)))
|
2014-11-01 13:34:45 +00:00
|
|
|
unset vars item)
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 env
|
|
|
|
(setq item (tramp-compat-split-string (car env) "="))
|
|
|
|
(setcdr item (mapconcat 'identity (cdr item) "="))
|
|
|
|
(if (and (stringp (cdr item)) (not (string-equal (cdr item) "")))
|
2014-11-01 13:34:45 +00:00
|
|
|
(push (format "%s %s" (car item) (cdr item)) vars)
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
(push (car item) unset))
|
|
|
|
(setq env (cdr env)))
|
2014-11-01 13:34:45 +00:00
|
|
|
(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
|
|
|
|
(mapconcat 'identity vars "\n")
|
|
|
|
tramp-end-of-heredoc)
|
|
|
|
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
|
|
|
(when unset
|
|
|
|
(tramp-send-command
|
|
|
|
vec (format "unset %s" (mapconcat 'identity unset " ")) t))))
|
|
|
|
|
|
|
|
;; 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
|
2013-04-22 10:26:09 +00:00
|
|
|
`((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)
|
2013-04-22 10:26:09 +00:00
|
|
|
(pack ,(format tramp-perl-pack "perl") ,(format tramp-perl-unpack "perl")))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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\)
|
|
|
|
|
|
|
|
FORMAT is symbol describing the encoding/decoding format. It can be
|
|
|
|
`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
|
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
|
2010-11-13 10:42:32 +00:00
|
|
|
'((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")
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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)
|
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)
|
2013-04-22 10:26:09 +00:00
|
|
|
(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:
|
|
|
|
|
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
|
|
|
\(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
|
|
|
|
2014-05-06 09:51:05 +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
|
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.
|
|
|
|
|
2014-05-06 09:51:05 +00:00
|
|
|
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.
|
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))
|
|
|
|
(setq loc-enc (nth 1 litem))
|
|
|
|
(setq loc-dec (nth 2 litem))
|
|
|
|
;; 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)
|
|
|
|
(tramp-message
|
|
|
|
vec 5 "Checking local encoding command `%s' for sanity" loc-enc)
|
|
|
|
(unless (zerop (tramp-call-local-coding-command
|
|
|
|
loc-enc nil nil))
|
|
|
|
(throw 'wont-work-local nil)))
|
|
|
|
(if (not (stringp loc-dec))
|
|
|
|
(tramp-message
|
|
|
|
vec 5 "Checking local decoding function `%s'" loc-dec)
|
|
|
|
(tramp-message
|
|
|
|
vec 5 "Checking local decoding command `%s' for sanity" loc-dec)
|
|
|
|
(unless (zerop (tramp-call-local-coding-command
|
|
|
|
loc-dec nil nil))
|
|
|
|
(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))
|
|
|
|
(setq rem-enc (nth 1 ritem))
|
|
|
|
(setq rem-dec (nth 2 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
|
|
|
(setq rem-test (nth 3 ritem))
|
|
|
|
;; Check the remote test command if exists.
|
|
|
|
(when (stringp rem-test)
|
|
|
|
(tramp-message
|
|
|
|
vec 5 "Checking remote test command `%s'" rem-test)
|
|
|
|
(unless (tramp-send-command-and-check vec rem-test t)
|
|
|
|
(throw 'wont-work-remote nil)))
|
2014-03-10 13:36:39 +00:00
|
|
|
;; Check if remote perl exists when necessary.
|
|
|
|
(when (and (not (stringp rem-enc))
|
|
|
|
(not (tramp-get-remote-perl vec)))
|
|
|
|
(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!
|
|
|
|
(when (not (stringp rem-enc))
|
|
|
|
(let ((name (symbol-name rem-enc)))
|
|
|
|
(while (string-match (regexp-quote "-") name)
|
|
|
|
(setq name (replace-match "_" nil t name)))
|
|
|
|
(tramp-maybe-send-script vec (symbol-value rem-enc) name)
|
|
|
|
(setq rem-enc name)))
|
|
|
|
(tramp-message
|
|
|
|
vec 5
|
|
|
|
"Checking remote encoding command `%s' for sanity" rem-enc)
|
|
|
|
(unless (tramp-send-command-and-check
|
|
|
|
vec (format "%s </dev/null" rem-enc) t)
|
|
|
|
(throw 'wont-work-remote nil))
|
|
|
|
|
|
|
|
(when (not (stringp rem-dec))
|
2014-05-06 09:51:05 +00:00
|
|
|
(let ((name (symbol-name rem-dec))
|
|
|
|
(value (symbol-value rem-dec))
|
|
|
|
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
|
|
|
(while (string-match (regexp-quote "-") name)
|
|
|
|
(setq name (replace-match "_" nil t name)))
|
2014-05-17 09:00:54 +00:00
|
|
|
(when (string-match "\\(^\\|[^%]\\)%t" value)
|
2014-05-06 09:51:05 +00:00
|
|
|
(setq tmpfile
|
|
|
|
(make-temp-name
|
|
|
|
(expand-file-name
|
|
|
|
tramp-temp-name-prefix
|
|
|
|
(tramp-get-remote-tmpdir vec)))
|
|
|
|
value
|
|
|
|
(format-spec
|
|
|
|
value
|
|
|
|
(format-spec-make
|
|
|
|
?t
|
|
|
|
(tramp-file-name-handler
|
|
|
|
'file-remote-p tmpfile 'localname)))))
|
|
|
|
(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)
|
|
|
|
(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-buffer vec)
|
|
|
|
(goto-char (point-min))
|
|
|
|
(unless (looking-at (regexp-quote magic))
|
|
|
|
(throw 'wont-work-remote nil)))
|
|
|
|
|
|
|
|
;; `rem-enc' and `rem-dec' could be a string meanwhile.
|
|
|
|
(setq rem-enc (nth 1 ritem))
|
|
|
|
(setq rem-dec (nth 2 ritem))
|
|
|
|
(setq found t)))))))
|
|
|
|
|
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)
|
|
|
|
(tramp-set-connection-property p "local-encoding" loc-enc)
|
|
|
|
(tramp-message vec 5 "Using local decoding `%s'" loc-dec)
|
|
|
|
(tramp-set-connection-property p "local-decoding" loc-dec)
|
|
|
|
(tramp-message vec 5 "Using remote encoding `%s'" rem-enc)
|
|
|
|
(tramp-set-connection-property p "remote-encoding" rem-enc)
|
|
|
|
(tramp-message vec 5 "Using remote decoding `%s'" rem-dec)
|
|
|
|
(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 `/dev/null'.
|
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)."
|
2013-04-22 10:26:09 +00:00
|
|
|
(tramp-call-process
|
2014-11-01 13:34:45 +00:00
|
|
|
nil tramp-encoding-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
|
|
|
(when (and input (not (string-match "%s" cmd))) input)
|
|
|
|
(if (eq output t) t nil)
|
|
|
|
nil
|
|
|
|
tramp-encoding-command-switch
|
|
|
|
(concat
|
|
|
|
(if (string-match "%s" cmd) (format cmd input) cmd)
|
2013-04-22 10:26:09 +00:00
|
|
|
(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
|
|
|
|
'(("gzip" "gzip -d")
|
|
|
|
("bzip2" "bzip2 -d")
|
2011-09-19 06:53:45 +00:00
|
|
|
("xz" "xz -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
|
|
|
("compress" "compress -d"))
|
|
|
|
"List of compress and decompress commands for inline transfer.
|
|
|
|
Each item is a list that looks like this:
|
|
|
|
|
|
|
|
\(COMPRESS DECOMPRESS\)
|
|
|
|
|
|
|
|
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
|
2013-04-22 10:26:09 +00:00
|
|
|
"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)
|
2011-01-15 20:03:38 +00:00
|
|
|
(unless
|
|
|
|
(zerop
|
|
|
|
(tramp-call-local-coding-command
|
|
|
|
(format
|
|
|
|
;; Windows shells need the program file name after
|
|
|
|
;; the pipe symbol be quoted if they use forward
|
|
|
|
;; slashes as directory separators.
|
|
|
|
(if (memq system-type '(windows-nt))
|
|
|
|
"echo %s | \"%s\" | \"%s\""
|
|
|
|
"echo %s | %s | %s")
|
|
|
|
magic compress decompress) 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 'next nil))
|
|
|
|
(tramp-message
|
|
|
|
vec 5
|
2013-04-22 10:26:09 +00:00
|
|
|
"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))
|
|
|
|
(setq found t)))
|
|
|
|
|
|
|
|
;; 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")))))
|
|
|
|
|
|
|
|
(defun tramp-compute-multi-hops (vec)
|
|
|
|
"Expands VEC according to `tramp-default-proxies-alist'.
|
|
|
|
Gateway hops are already opened."
|
|
|
|
(let ((target-alist `(,vec))
|
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
|
|
|
(hops (or (tramp-file-name-hop vec) ""))
|
|
|
|
(item vec)
|
|
|
|
choices proxy)
|
|
|
|
|
|
|
|
;; Ad-hoc proxy definitions.
|
|
|
|
(dolist (proxy (reverse (split-string hops tramp-postfix-hop-regexp 'omit)))
|
|
|
|
(let ((user (tramp-file-name-user item))
|
|
|
|
(host (tramp-file-name-host item))
|
|
|
|
(proxy (concat
|
|
|
|
tramp-prefix-format proxy tramp-postfix-host-format)))
|
|
|
|
(tramp-message
|
|
|
|
vec 5 "Add proxy (\"%s\" \"%s\" \"%s\")"
|
|
|
|
(and (stringp host) (regexp-quote host))
|
|
|
|
(and (stringp user) (regexp-quote user))
|
|
|
|
proxy)
|
|
|
|
;; Add the hop.
|
|
|
|
(add-to-list
|
|
|
|
'tramp-default-proxies-alist
|
|
|
|
(list (and (stringp host) (regexp-quote host))
|
|
|
|
(and (stringp user) (regexp-quote user))
|
|
|
|
proxy))
|
|
|
|
(setq item (tramp-dissect-file-name proxy))))
|
|
|
|
;; Save the new value.
|
|
|
|
(when (and hops tramp-save-ad-hoc-proxies)
|
|
|
|
(customize-save-variable
|
|
|
|
'tramp-default-proxies-alist tramp-default-proxies-alist))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
|
|
|
|
;; Look for proxy hosts to be passed.
|
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
|
|
|
(setq choices tramp-default-proxies-alist)
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 choices
|
|
|
|
(setq item (pop choices)
|
|
|
|
proxy (eval (nth 2 item)))
|
|
|
|
(when (and
|
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
|
|
|
;; Host.
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
(string-match (or (eval (nth 0 item)) "")
|
|
|
|
(or (tramp-file-name-host (car target-alist)) ""))
|
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
|
|
|
;; User.
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
(string-match (or (eval (nth 1 item)) "")
|
|
|
|
(or (tramp-file-name-user (car target-alist)) "")))
|
|
|
|
(if (null proxy)
|
|
|
|
;; No more hops needed.
|
|
|
|
(setq choices nil)
|
|
|
|
;; Replace placeholders.
|
|
|
|
(setq proxy
|
|
|
|
(format-spec
|
|
|
|
proxy
|
|
|
|
(format-spec-make
|
|
|
|
?u (or (tramp-file-name-user (car target-alist)) "")
|
|
|
|
?h (or (tramp-file-name-host (car target-alist)) ""))))
|
|
|
|
(with-parsed-tramp-file-name proxy l
|
|
|
|
;; Add the hop.
|
2013-09-08 15:04:10 +00:00
|
|
|
(push l target-alist)
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
;; Start next search.
|
|
|
|
(setq choices tramp-default-proxies-alist)))))
|
|
|
|
|
|
|
|
;; Handle gateways.
|
2013-01-31 08:33:03 +00:00
|
|
|
(when (and (boundp 'tramp-gw-tunnel-method) (boundp 'tramp-gw-socks-method)
|
2013-01-29 14:52:20 +00:00
|
|
|
(string-match
|
|
|
|
(format
|
|
|
|
"^\\(%s\\|%s\\)$" tramp-gw-tunnel-method tramp-gw-socks-method)
|
|
|
|
(tramp-file-name-method (car target-alist))))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 ((gw (pop target-alist))
|
|
|
|
(hop (pop target-alist)))
|
|
|
|
;; Is the method prepared for gateways?
|
2010-12-02 19:34:31 +00:00
|
|
|
(unless (tramp-file-name-port hop)
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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
|
2010-12-02 19:34:31 +00:00
|
|
|
"Connection `%s' is not supported for gateway access." hop))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
;; Open the gateway connection.
|
2013-09-08 15:04:10 +00:00
|
|
|
(push
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
(vector
|
|
|
|
(tramp-file-name-method hop) (tramp-file-name-user hop)
|
2013-09-03 20:14:58 +00:00
|
|
|
(tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil)
|
2013-09-08 15:04:10 +00:00
|
|
|
target-alist)
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
;; For the password prompt, we need the correct values.
|
|
|
|
;; Therefore, we must remember the gateway vector. But we
|
|
|
|
;; cannot do it as connection property, because it shouldn't
|
|
|
|
;; be persistent. And we have no started process yet either.
|
2014-12-17 21:08:30 +00:00
|
|
|
(let ((tramp-verbose 0))
|
|
|
|
(tramp-set-file-property (car target-alist) "" "gateway" hop))))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
|
|
|
|
;; Foreign and out-of-band methods are not supported for multi-hops.
|
|
|
|
(when (cdr target-alist)
|
|
|
|
(setq choices target-alist)
|
|
|
|
(while choices
|
|
|
|
(setq item (pop choices))
|
|
|
|
(when
|
|
|
|
(or
|
|
|
|
(not
|
|
|
|
(tramp-get-method-parameter
|
|
|
|
(tramp-file-name-method item) 'tramp-login-program))
|
|
|
|
(tramp-get-method-parameter
|
|
|
|
(tramp-file-name-method item) 'tramp-copy-program))
|
|
|
|
(tramp-error
|
|
|
|
vec 'file-error
|
|
|
|
"Method `%s' is not supported for multi-hops."
|
|
|
|
(tramp-file-name-method item)))))
|
|
|
|
|
|
|
|
;; In case the host name is not used for the remote shell
|
|
|
|
;; command, the user could be misguided by applying a random
|
|
|
|
;; hostname.
|
|
|
|
(let* ((v (car target-alist))
|
|
|
|
(method (tramp-file-name-method v))
|
|
|
|
(host (tramp-file-name-host v)))
|
|
|
|
(unless
|
|
|
|
(or
|
|
|
|
;; There are multi-hops.
|
|
|
|
(cdr target-alist)
|
|
|
|
;; The host name is used for the remote shell command.
|
|
|
|
(member
|
|
|
|
'("%h") (tramp-get-method-parameter method 'tramp-login-args))
|
|
|
|
;; The host is local. We cannot use `tramp-local-host-p'
|
|
|
|
;; here, because it opens a connection as well.
|
|
|
|
(string-match tramp-local-host-regexp host))
|
|
|
|
(tramp-error
|
|
|
|
v 'file-error
|
|
|
|
"Host `%s' looks like a remote host, `%s' can only use the local host"
|
|
|
|
host method)))
|
|
|
|
|
|
|
|
;; Result.
|
|
|
|
target-alist))
|
|
|
|
|
2015-03-15 15:07:03 +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)
|
|
|
|
(null (assoc "%c" (tramp-get-method-parameter
|
|
|
|
(tramp-file-name-method 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")
|
|
|
|
(with-temp-buffer
|
|
|
|
(tramp-call-process vec "ssh" nil t nil "-o" "ControlMaster")
|
|
|
|
(goto-char (point-min))
|
|
|
|
(when (search-forward-regexp "missing.+argument" nil t)
|
|
|
|
(setq tramp-ssh-controlmaster-options "-o ControlMaster=auto")))
|
|
|
|
(unless (zerop (length tramp-ssh-controlmaster-options))
|
|
|
|
(with-temp-buffer
|
|
|
|
(tramp-call-process
|
|
|
|
vec "ssh" nil t nil
|
|
|
|
"-o" "ControlPath=%C" "host.does.not.exist")
|
|
|
|
(goto-char (point-min))
|
|
|
|
(setq tramp-ssh-controlmaster-options
|
|
|
|
(if (search-forward-regexp "unknown.+key" nil t)
|
|
|
|
(concat tramp-ssh-controlmaster-options
|
|
|
|
" -o ControlPath='tramp.%%r@%%h:%%p'")
|
|
|
|
(concat tramp-ssh-controlmaster-options
|
|
|
|
" -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)))
|
|
|
|
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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."
|
2013-09-13 06:03:06 +00:00
|
|
|
(tramp-check-proper-method-and-host vec)
|
2013-08-26 13:17:22 +00:00
|
|
|
|
2013-09-10 07:45:33 +00:00
|
|
|
(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 (and p (processp p) (memq (process-status p) '(run open)))
|
|
|
|
(not (equal (butlast (append vec nil) 2)
|
|
|
|
(car tramp-current-connection)))
|
|
|
|
(> (tramp-time-diff
|
|
|
|
(current-time) (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
|
|
|
|
(when (and (> (tramp-time-diff
|
|
|
|
(current-time)
|
|
|
|
(tramp-get-connection-property
|
|
|
|
p "last-cmd-time" '(0 0 0)))
|
|
|
|
60)
|
|
|
|
p (processp p) (memq (process-status p) '(run open)))
|
|
|
|
(tramp-send-command vec "echo are you awake" t t)
|
|
|
|
(unless (and (memq (process-status p) '(run open))
|
|
|
|
(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 (and p (processp p) (memq (process-status p) '(run open)))
|
|
|
|
|
|
|
|
;; If `non-essential' is non-nil, don't reopen a new connection.
|
|
|
|
(when (and (boundp 'non-essential) (symbol-value 'non-essential))
|
|
|
|
(throw 'non-essential 'non-essential))
|
|
|
|
|
|
|
|
(with-tramp-progress-reporter
|
|
|
|
vec 3
|
|
|
|
(if (zerop (length (tramp-file-name-user vec)))
|
|
|
|
(format "Opening connection for %s using %s"
|
2011-12-02 19:23:19 +00:00
|
|
|
(tramp-file-name-host vec)
|
2013-09-10 07:45:33 +00:00
|
|
|
(tramp-file-name-method vec))
|
|
|
|
(format "Opening connection for %s@%s using %s"
|
|
|
|
(tramp-file-name-user vec)
|
|
|
|
(tramp-file-name-host vec)
|
|
|
|
(tramp-file-name-method vec)))
|
2011-12-02 19:23:19 +00:00
|
|
|
|
2013-09-10 07:45:33 +00:00
|
|
|
(catch 'uname-changed
|
2011-12-02 19:23:19 +00:00
|
|
|
;; Start new process.
|
|
|
|
(when (and p (processp p))
|
|
|
|
(delete-process p))
|
|
|
|
(setenv "TERM" tramp-terminal-type)
|
2013-11-15 07:37:18 +00:00
|
|
|
(setenv "LC_ALL" "en_US.utf8")
|
2015-02-03 08:24:57 +00:00
|
|
|
(if (stringp tramp-histfile-override)
|
|
|
|
(setenv "HISTFILE" tramp-histfile-override)
|
|
|
|
(if tramp-histfile-override
|
|
|
|
(progn
|
|
|
|
(setenv "HISTFILE")
|
|
|
|
(setenv "HISTFILESIZE" "0")
|
|
|
|
(setenv "HISTSIZE" "0"))))
|
2011-12-02 19:23:19 +00:00
|
|
|
(setenv "PROMPT_COMMAND")
|
|
|
|
(setenv "PS1" tramp-initial-end-of-output)
|
|
|
|
(let* ((target-alist (tramp-compute-multi-hops vec))
|
2013-02-23 12:40:14 +00:00
|
|
|
;; We will apply `tramp-ssh-controlmaster-options'
|
|
|
|
;; only for the first hop.
|
2015-03-15 15:07:03 +00:00
|
|
|
(options (tramp-ssh-controlmaster-options vec))
|
2011-12-02 19:23:19 +00:00
|
|
|
(process-connection-type tramp-process-connection-type)
|
|
|
|
(process-adaptive-read-buffering nil)
|
|
|
|
(coding-system-for-read nil)
|
|
|
|
;; 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)
|
|
|
|
(if tramp-encoding-command-interactive
|
|
|
|
(list tramp-encoding-shell
|
|
|
|
tramp-encoding-command-interactive)
|
|
|
|
(list tramp-encoding-shell))))))
|
|
|
|
|
|
|
|
;; Set sentinel and query flag.
|
|
|
|
(tramp-set-connection-property p "vector" vec)
|
|
|
|
(set-process-sentinel p 'tramp-process-sentinel)
|
|
|
|
(tramp-compat-set-process-query-on-exit-flag p nil)
|
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
|
|
|
(setq tramp-current-connection
|
2013-07-10 14:58:26 +00:00
|
|
|
(cons (butlast (append vec nil) 2) (current-time))
|
2012-07-06 13:16:13 +00:00
|
|
|
tramp-current-host (system-name))
|
2011-07-04 12:12:38 +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
|
|
|
(tramp-message
|
2011-12-02 19:23:19 +00:00
|
|
|
vec 6 "%s" (mapconcat 'identity (process-command p) " "))
|
|
|
|
|
|
|
|
;; Check whether process is alive.
|
|
|
|
(tramp-barf-if-no-shell-prompt
|
2013-07-11 09:52:54 +00:00
|
|
|
p 10
|
2013-07-10 14:58:26 +00:00
|
|
|
"Couldn't find local shell prompt for %s" tramp-encoding-shell)
|
2011-12-02 19:23:19 +00:00
|
|
|
|
|
|
|
;; 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-host (tramp-file-name-host hop))
|
|
|
|
(l-port nil)
|
|
|
|
(login-program
|
|
|
|
(tramp-get-method-parameter
|
|
|
|
l-method 'tramp-login-program))
|
|
|
|
(login-args
|
|
|
|
(tramp-get-method-parameter
|
|
|
|
l-method 'tramp-login-args))
|
2014-03-21 13:02:25 +00:00
|
|
|
(login-env
|
|
|
|
(tramp-get-method-parameter
|
|
|
|
l-method 'tramp-login-env))
|
2011-12-02 19:23:19 +00:00
|
|
|
(async-args
|
|
|
|
(tramp-get-method-parameter
|
|
|
|
l-method 'tramp-async-args))
|
2013-07-11 09:52:54 +00:00
|
|
|
(connection-timeout
|
|
|
|
(tramp-get-method-parameter
|
|
|
|
l-method 'tramp-connection-timeout))
|
2011-12-02 19:23:19 +00:00
|
|
|
(gw-args
|
|
|
|
(tramp-get-method-parameter l-method 'tramp-gw-args))
|
2014-12-17 21:08:30 +00:00
|
|
|
(gw (let ((tramp-verbose 0))
|
|
|
|
(tramp-get-file-property hop "" "gateway" nil)))
|
2011-12-02 19:23:19 +00:00
|
|
|
(g-method (and gw (tramp-file-name-method gw)))
|
|
|
|
(g-user (and gw (tramp-file-name-user gw)))
|
|
|
|
(g-host (and gw (tramp-file-name-real-host gw)))
|
|
|
|
(command 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
|
Use ControlMaster where applicable. (Bug#13677)
* net/tramp.el (tramp-ssh-controlmaster-template): New defvar,
replacing `tramp-detect-ssh-controlmaster'.
(tramp-default-method): Use it.
* net/tramp-sh.el (tramp-methods) [scp, scp1, scp2, scpx, sftp]:
[rsync, ssh, ssh1, ssh2, sshx]: Add ControlPath and ControlMaster
arguments.
[scpc, rsyncc]: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc", "ssh1_old"
and "ssh2_old".
(tramp-do-copy-or-rename-file-out-of-band): Change trace level.
(tramp-maybe-open-connection): Reuse tmpfile for ControlPath.
2013-02-13 16:23:15 +00:00
|
|
|
;; closed. The temporary file name is cached
|
|
|
|
;; in the main connection process, therefore
|
|
|
|
;; we cannot use `tramp-get-connection-process'.
|
2011-12-02 19:23:19 +00:00
|
|
|
(tmpfile
|
Use ControlMaster where applicable. (Bug#13677)
* net/tramp.el (tramp-ssh-controlmaster-template): New defvar,
replacing `tramp-detect-ssh-controlmaster'.
(tramp-default-method): Use it.
* net/tramp-sh.el (tramp-methods) [scp, scp1, scp2, scpx, sftp]:
[rsync, ssh, ssh1, ssh2, sshx]: Add ControlPath and ControlMaster
arguments.
[scpc, rsyncc]: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc", "ssh1_old"
and "ssh2_old".
(tramp-do-copy-or-rename-file-out-of-band): Change trace level.
(tramp-maybe-open-connection): Reuse tmpfile for ControlPath.
2013-02-13 16:23:15 +00:00
|
|
|
(with-tramp-connection-property
|
|
|
|
(get-process (tramp-buffer-name vec)) "temp-file"
|
|
|
|
(make-temp-name
|
|
|
|
(expand-file-name
|
|
|
|
tramp-temp-name-prefix
|
|
|
|
(tramp-compat-temporary-file-directory)))))
|
2012-07-06 13:16:13 +00:00
|
|
|
spec r-shell)
|
2011-12-02 19:23:19 +00:00
|
|
|
|
|
|
|
;; Add arguments for asynchronous processes.
|
|
|
|
(when (and process-name async-args)
|
|
|
|
(setq login-args (append async-args login-args)))
|
|
|
|
|
|
|
|
;; Add gateway arguments if necessary.
|
2014-12-17 21:08:30 +00:00
|
|
|
(when gw
|
|
|
|
(tramp-set-connection-property p "gateway" t)
|
|
|
|
(when gw-args
|
|
|
|
(setq login-args (append gw-args login-args))))
|
2011-12-02 19:23:19 +00:00
|
|
|
|
|
|
|
;; Check for port number. Until now, there's no
|
|
|
|
;; need for handling like method, user, host.
|
|
|
|
(when (string-match tramp-host-with-port-regexp l-host)
|
|
|
|
(setq l-port (match-string 2 l-host)
|
|
|
|
l-host (match-string 1 l-host)))
|
|
|
|
|
2012-07-06 13:16:13 +00:00
|
|
|
;; Check, whether there is a restricted shell.
|
|
|
|
(dolist (elt tramp-restricted-shell-hosts-alist)
|
|
|
|
(when (string-match elt tramp-current-host)
|
|
|
|
(setq r-shell t)))
|
|
|
|
|
2011-12-02 19:23:19 +00:00
|
|
|
;; Set variables for computing the prompt for
|
|
|
|
;; reading password. They can also be derived
|
|
|
|
;; from a gateway.
|
|
|
|
(setq tramp-current-method (or g-method l-method)
|
|
|
|
tramp-current-user (or g-user l-user)
|
|
|
|
tramp-current-host (or g-host l-host))
|
|
|
|
|
2014-03-21 13:02:25 +00:00
|
|
|
;; Add login environment.
|
|
|
|
(when login-env
|
|
|
|
(setq
|
|
|
|
login-env
|
|
|
|
(mapcar
|
|
|
|
(lambda (x)
|
|
|
|
(setq x (mapcar (lambda (y) (format-spec y spec)) x))
|
|
|
|
(unless (member "" x) (mapconcat 'identity x " ")))
|
|
|
|
login-env))
|
|
|
|
(while login-env
|
|
|
|
(setq command
|
|
|
|
(format
|
|
|
|
"%s=%s %s"
|
|
|
|
(pop login-env)
|
|
|
|
(tramp-shell-quote-argument (pop login-env))
|
|
|
|
command)))
|
|
|
|
(setq command (concat "env " command)))
|
|
|
|
|
2013-11-15 07:37:18 +00:00
|
|
|
;; Replace `login-args' place holders.
|
2011-12-02 19:23:19 +00:00
|
|
|
(setq
|
|
|
|
l-host (or l-host "")
|
|
|
|
l-user (or l-user "")
|
|
|
|
l-port (or l-port "")
|
2013-02-23 12:40:14 +00:00
|
|
|
spec (format-spec-make ?t tmpfile)
|
|
|
|
options (format-spec options spec)
|
2011-12-02 19:23:19 +00:00
|
|
|
spec (format-spec-make
|
2013-02-23 12:40:14 +00:00
|
|
|
?h l-host ?u l-user ?p l-port ?c options)
|
2011-12-02 19:23:19 +00:00
|
|
|
command
|
|
|
|
(concat
|
|
|
|
;; We do not want to see the trailing local
|
|
|
|
;; prompt in `start-file-process'.
|
2012-07-06 13:16:13 +00:00
|
|
|
(unless r-shell "exec ")
|
2011-12-02 19:23:19 +00:00
|
|
|
command " "
|
|
|
|
(mapconcat
|
|
|
|
(lambda (x)
|
|
|
|
(setq x (mapcar (lambda (y) (format-spec y spec)) x))
|
|
|
|
(unless (member "" x) (mapconcat 'identity x " ")))
|
|
|
|
login-args " ")
|
|
|
|
;; Local shell could be a Windows COMSPEC. It
|
|
|
|
;; doesn't know the ";" syntax, but we must exit
|
2012-07-06 13:16:13 +00:00
|
|
|
;; always for `start-file-process'. It could
|
|
|
|
;; also be a restricted shell, which does not
|
|
|
|
;; allow "exec".
|
|
|
|
(when r-shell " && exit || exit")))
|
2011-12-02 19:23:19 +00:00
|
|
|
|
|
|
|
;; Send the command.
|
|
|
|
(tramp-message vec 3 "Sending command `%s'" command)
|
|
|
|
(tramp-send-command vec command t t)
|
|
|
|
(tramp-process-actions
|
2013-07-11 09:52:54 +00:00
|
|
|
p vec pos tramp-actions-before-shell
|
|
|
|
(or connection-timeout tramp-connection-timeout))
|
2011-12-02 19:23:19 +00:00
|
|
|
(tramp-message
|
|
|
|
vec 3 "Found remote shell prompt on `%s'" l-host))
|
|
|
|
;; Next hop.
|
2013-02-23 12:40:14 +00:00
|
|
|
(setq options ""
|
|
|
|
target-alist (cdr target-alist)))
|
2011-12-02 19:23:19 +00:00
|
|
|
|
|
|
|
;; Make initial shell settings.
|
2013-09-10 07:45:33 +00:00
|
|
|
(tramp-open-connection-setup-interactive-shell p vec)))))
|
2011-12-02 19:23:19 +00:00
|
|
|
|
2013-09-10 07:45:33 +00:00
|
|
|
;; When the user did interrupt, we must cleanup.
|
|
|
|
(quit
|
|
|
|
(tramp-cleanup-connection vec t)
|
|
|
|
;; Propagate the quit signal.
|
|
|
|
(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)
|
2014-11-01 14:08:00 +00:00
|
|
|
;; 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'.
|
|
|
|
(when (and (not (string= 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)))
|
2010-10-21 08:05:23 +00:00
|
|
|
;; 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))
|
|
|
|
(with-current-buffer (process-buffer proc)
|
|
|
|
(let* (;; Initially, `tramp-end-of-output' is "#$ ". There might
|
|
|
|
;; be leading escape sequences, which must be ignored.
|
|
|
|
(regexp (format "[^#$\n]*%s\r?$" (regexp-quote tramp-end-of-output)))
|
|
|
|
;; 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 (buffer-read-only)
|
|
|
|
;; A simple-minded busybox has sent " ^H" sequences.
|
|
|
|
;; Delete them.
|
|
|
|
(goto-char (point-min))
|
2010-11-13 10:42:32 +00:00
|
|
|
(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.
|
|
|
|
(goto-char (point-max))
|
|
|
|
(re-search-backward regexp nil t)
|
|
|
|
(delete-region (point) (point-max)))
|
|
|
|
(if timeout
|
|
|
|
(tramp-error
|
|
|
|
proc 'file-error
|
|
|
|
"[[Remote prompt `%s' not found in %d secs]]"
|
|
|
|
tramp-end-of-output timeout)
|
|
|
|
(tramp-error
|
|
|
|
proc 'file-error
|
|
|
|
"[[Remote prompt `%s' not found]]" tramp-end-of-output)))
|
|
|
|
;; Return value is whether end-of-output sentinel was found.
|
|
|
|
found)))
|
|
|
|
|
|
|
|
(defun tramp-send-command-and-check
|
|
|
|
(vec command &optional subshell dont-suppress-err)
|
|
|
|
"Run COMMAND and check its exit status.
|
2014-03-25 08:16:49 +00:00
|
|
|
Sends `echo $?' along with the COMMAND for checking the exit status.
|
|
|
|
If COMMAND is nil, just sends `echo $?'. Returns `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."
|
|
|
|
(tramp-send-command
|
|
|
|
vec
|
|
|
|
(concat (if subshell "( " "")
|
|
|
|
command
|
|
|
|
(if command (if dont-suppress-err "; " " 2>/dev/null; ") "")
|
|
|
|
"echo tramp_exit_status $?"
|
|
|
|
(if subshell " )" "")))
|
|
|
|
(with-current-buffer (tramp-get-connection-buffer vec)
|
|
|
|
(goto-char (point-max))
|
|
|
|
(unless (re-search-backward "tramp_exit_status [0-9]+" nil t)
|
|
|
|
(tramp-error
|
|
|
|
vec 'file-error "Couldn't find exit status of `%s'" command))
|
|
|
|
(skip-chars-forward "^ ")
|
|
|
|
(prog1
|
|
|
|
(zerop (read (current-buffer)))
|
|
|
|
(let (buffer-read-only)
|
|
|
|
(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'."
|
2011-07-24 09:56:26 +00:00
|
|
|
(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
|
|
|
|
2014-12-19 11:45: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.
|
2014-12-19 11:45:01 +00:00
|
|
|
If MARKER is a regexp, read the output after that string.
|
2011-07-04 12:12:38 +00:00
|
|
|
In case there is no valid Lisp expression and NOERROR is nil, it
|
|
|
|
raises an error."
|
2011-07-24 09:56:26 +00:00
|
|
|
(when (if noerror
|
|
|
|
(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))
|
2014-12-19 11:45:01 +00:00
|
|
|
;; 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.
|
2011-07-24 09:56:26 +00:00
|
|
|
(condition-case nil
|
|
|
|
(prog1 (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
|
|
|
|
|
|
|
(defun tramp-convert-file-attributes (vec attr)
|
2013-01-04 09:41:23 +00:00
|
|
|
"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
|
2011-07-04 12:12:38 +00:00
|
|
|
;; Remove color escape sequences from symlink.
|
|
|
|
(when (stringp (car attr))
|
|
|
|
(while (string-match tramp-color-escape-sequence-regexp (car attr))
|
|
|
|
(setcar attr (replace-match "" nil nil (car attr)))))
|
2013-01-04 09:41:23 +00:00
|
|
|
;; Convert uid and gid. Use -1 as indication of unusable value.
|
|
|
|
(when (and (numberp (nth 2 attr)) (< (nth 2 attr) 0))
|
|
|
|
(setcar (nthcdr 2 attr) -1))
|
|
|
|
(when (and (floatp (nth 2 attr))
|
|
|
|
(<= (nth 2 attr) (tramp-compat-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) -1))
|
|
|
|
(when (and (floatp (nth 3 attr))
|
|
|
|
(<= (nth 3 attr) (tramp-compat-most-positive-fixnum)))
|
|
|
|
(setcar (nthcdr 3 attr) (round (nth 3 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
|
|
|
;; Convert last access time.
|
|
|
|
(unless (listp (nth 4 attr))
|
|
|
|
(setcar (nthcdr 4 attr)
|
|
|
|
(list (floor (nth 4 attr) 65536)
|
|
|
|
(floor (mod (nth 4 attr) 65536)))))
|
|
|
|
;; Convert last modification time.
|
|
|
|
(unless (listp (nth 5 attr))
|
|
|
|
(setcar (nthcdr 5 attr)
|
|
|
|
(list (floor (nth 5 attr) 65536)
|
|
|
|
(floor (mod (nth 5 attr) 65536)))))
|
|
|
|
;; Convert last status change time.
|
|
|
|
(unless (listp (nth 6 attr))
|
|
|
|
(setcar (nthcdr 6 attr)
|
|
|
|
(list (floor (nth 6 attr) 65536)
|
|
|
|
(floor (mod (nth 6 attr) 65536)))))
|
|
|
|
;; Convert file size.
|
|
|
|
(when (< (nth 7 attr) 0)
|
|
|
|
(setcar (nthcdr 7 attr) -1))
|
|
|
|
(when (and (floatp (nth 7 attr))
|
|
|
|
(<= (nth 7 attr) (tramp-compat-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-match "^d" (nth 8 attr))
|
|
|
|
(setcar attr t))
|
|
|
|
;; Convert symlink from `tramp-do-file-attributes-with-stat'.
|
|
|
|
(when (consp (car attr))
|
|
|
|
(if (and (stringp (caar attr))
|
|
|
|
(string-match ".+ -> .\\(.+\\)." (caar attr)))
|
|
|
|
(setcar attr (match-string 1 (caar attr)))
|
|
|
|
(setcar attr nil)))
|
|
|
|
;; 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.
|
|
|
|
(unless (listp (nth 10 attr))
|
|
|
|
(setcar (nthcdr 10 attr)
|
|
|
|
(condition-case nil
|
|
|
|
(cons (floor (nth 10 attr) 65536)
|
|
|
|
(floor (mod (nth 10 attr) 65536)))
|
|
|
|
;; 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))
|
|
|
|
attr))
|
|
|
|
|
|
|
|
(defun tramp-shell-case-fold (string)
|
|
|
|
"Converts STRING to shell glob pattern which ignores case."
|
|
|
|
(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)
|
2014-11-01 13:34:45 +00:00
|
|
|
"Create a file name suitable to be passed to `scp' or `nc' and workalikes."
|
|
|
|
(let ((method (tramp-file-name-method vec))
|
|
|
|
(user (tramp-file-name-user 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
|
|
|
(host (tramp-file-name-real-host vec))
|
|
|
|
(localname (tramp-shell-quote-argument
|
|
|
|
(tramp-file-name-localname vec))))
|
2014-11-01 13:34:45 +00:00
|
|
|
(cond
|
|
|
|
((tramp-get-method-parameter method 'tramp-remote-copy-program)
|
|
|
|
localname)
|
|
|
|
((not (zerop (length user)))
|
|
|
|
(shell-quote-argument (format "%s@%s:%s" user host localname)))
|
|
|
|
(t (shell-quote-argument (format "%s:%s" 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.
|
|
|
|
(tramp-get-method-parameter (tramp-file-name-method vec) 'tramp-copy-program)
|
2011-06-23 13:03:04 +00:00
|
|
|
;; 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)
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 `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-connection-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
|
2011-02-03 11:28:16 +00:00
|
|
|
(or
|
|
|
|
(tramp-send-command-and-read
|
2011-07-04 12:12:38 +00:00
|
|
|
vec "echo \\\"`getconf PATH 2>/dev/null`\\\"" 'noerror)
|
2011-02-03 11:28:16 +00:00
|
|
|
;; Default if "getconf" is not available.
|
|
|
|
(progn
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 3
|
|
|
|
"`getconf PATH' not successful, using default value \"%s\"."
|
|
|
|
"/bin:/usr/bin")
|
|
|
|
"/bin:/usr/bin"))))
|
|
|
|
(own-remote-path
|
2014-12-19 11:45:01 +00:00
|
|
|
;; The login shell could return more than just the $PATH
|
|
|
|
;; string. So we use `tramp-end-of-heredoc' as marker.
|
2014-12-13 00:15:10 +00:00
|
|
|
(when elt2
|
2014-12-19 11:45:01 +00:00
|
|
|
(tramp-send-command-and-read
|
2014-12-13 00:15:10 +00:00
|
|
|
vec
|
|
|
|
(format
|
2014-12-19 11:45:01 +00:00
|
|
|
"%s -l %s 'echo %s \\\"$PATH\\\"'"
|
2014-12-13 00:15:10 +00:00
|
|
|
(tramp-get-method-parameter
|
|
|
|
(tramp-file-name-method vec) 'tramp-remote-shell)
|
|
|
|
(mapconcat
|
|
|
|
'identity
|
|
|
|
(tramp-get-method-parameter
|
|
|
|
(tramp-file-name-method vec) 'tramp-remote-shell-args)
|
2014-12-19 11:45:01 +00:00
|
|
|
" ")
|
|
|
|
(tramp-shell-quote-argument tramp-end-of-heredoc))
|
|
|
|
nil (regexp-quote 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
|
|
|
|
|
|
|
;; Replace place holder `tramp-default-remote-path'.
|
|
|
|
(when elt1
|
|
|
|
(setcdr elt1
|
|
|
|
(append
|
2014-02-27 05:11:50 +00:00
|
|
|
(tramp-compat-split-string (or default-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
|
|
|
(cdr elt1)))
|
|
|
|
(setq remote-path (delq 'tramp-default-remote-path remote-path)))
|
|
|
|
|
|
|
|
;; Replace place holder `tramp-own-remote-path'.
|
|
|
|
(when elt2
|
|
|
|
(setcdr elt2
|
|
|
|
(append
|
2014-02-27 05:11:50 +00:00
|
|
|
(tramp-compat-split-string (or own-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
|
|
|
(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
|
|
|
|
(tramp-file-name-method vec)
|
|
|
|
(tramp-file-name-user vec)
|
|
|
|
(tramp-file-name-host vec)
|
|
|
|
x))
|
|
|
|
x))
|
|
|
|
remote-path)))))
|
|
|
|
|
2013-12-02 13:52:23 +00:00
|
|
|
(defun tramp-get-remote-locale (vec)
|
|
|
|
(with-tramp-connection-property vec "locale"
|
|
|
|
(tramp-send-command vec "locale -a")
|
2014-11-22 09:30:36 +00:00
|
|
|
(let ((candidates '("en_US.utf8" "C.utf8"))
|
2013-12-02 13:52:23 +00:00
|
|
|
locale)
|
|
|
|
(with-current-buffer (tramp-get-connection-buffer vec)
|
|
|
|
(while candidates
|
|
|
|
(goto-char (point-min))
|
2015-03-04 10:02:36 +00:00
|
|
|
(if (string-match (format "^%s\r?$" (regexp-quote (car candidates)))
|
|
|
|
(buffer-string))
|
2013-12-02 13:52:23 +00:00
|
|
|
(setq locale (car candidates)
|
|
|
|
candidates nil)
|
|
|
|
(setq candidates (cdr candidates)))))
|
|
|
|
;; Return value.
|
2014-11-22 09:30:36 +00:00
|
|
|
(format "LC_ALL=%s" (or locale "C")))))
|
2013-12-02 13:52:23 +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
|
|
|
(defun tramp-get-ls-command (vec)
|
2013-11-08 09:31:50 +00:00
|
|
|
(with-tramp-connection-property vec "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
|
|
|
(tramp-message vec 5 "Finding a suitable `ls' command")
|
|
|
|
(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 sensible wrt the order of
|
|
|
|
;; 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 /dev/null" result))
|
|
|
|
(setq result (concat result " --color=never")))
|
|
|
|
(throw 'ls-found result))
|
|
|
|
(setq dl (cdr dl))))))
|
2013-11-08 09:31:50 +00:00
|
|
|
(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-dired (vec)
|
|
|
|
(save-match-data
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec "ls-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
|
|
|
(tramp-message vec 5 "Checking, whether `ls --dired' works")
|
|
|
|
;; Some "ls" versions are sensible wrt the order of arguments,
|
|
|
|
;; they fail when "-al" is after the "--dired" argument (for
|
|
|
|
;; example on FreeBSD).
|
|
|
|
(tramp-send-command-and-check
|
|
|
|
vec (format "%s --dired -al /dev/null" (tramp-get-ls-command vec))))))
|
|
|
|
|
2015-03-04 10:02:36 +00:00
|
|
|
(defun tramp-get-ls-command-with-quoting-style (vec)
|
|
|
|
(save-match-data
|
|
|
|
(with-tramp-connection-property vec "ls-quoting-style"
|
|
|
|
(tramp-message vec 5 "Checking, whether `ls --quoting-style=shell' works")
|
|
|
|
;; Some "ls" versions are sensible wrt the order of arguments,
|
|
|
|
;; they fail when "-al" is after the "--dired" argument (for
|
|
|
|
;; example on FreeBSD).
|
|
|
|
(tramp-send-command-and-check
|
|
|
|
vec (format "%s --quoting-style=shell -al /dev/null"
|
|
|
|
(tramp-get-ls-command 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-test-command (vec)
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec "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
|
|
|
(tramp-message vec 5 "Finding a suitable `test' command")
|
|
|
|
(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)
|
|
|
|
;; 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.
|
2012-10-09 12:49:02 +00:00
|
|
|
(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))
|
|
|
|
(when (looking-at (regexp-quote tramp-end-of-output))
|
|
|
|
(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)
|
2012-10-09 12:49:02 +00:00
|
|
|
(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)
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec "ln"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 a suitable `ln' command")
|
|
|
|
(tramp-find-executable vec "ln" (tramp-get-remote-path vec))))
|
|
|
|
|
|
|
|
(defun tramp-get-remote-perl (vec)
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec "perl"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 a suitable `perl' command")
|
|
|
|
(let ((result
|
|
|
|
(or (tramp-find-executable vec "perl5" (tramp-get-remote-path vec))
|
|
|
|
(tramp-find-executable
|
|
|
|
vec "perl" (tramp-get-remote-path vec)))))
|
|
|
|
;; We must check also for some Perl modules.
|
|
|
|
(when result
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec "perl-file-spec"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-and-check
|
|
|
|
vec (format "%s -e 'use File::Spec;'" result)))
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec "perl-cwd-realpath"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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-and-check
|
|
|
|
vec (format "%s -e 'use Cwd \"realpath\";'" result))))
|
|
|
|
result)))
|
|
|
|
|
|
|
|
(defun tramp-get-remote-stat (vec)
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec "stat"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 a suitable `stat' command")
|
|
|
|
(let ((result (tramp-find-executable
|
|
|
|
vec "stat" (tramp-get-remote-path vec)))
|
|
|
|
tmp)
|
2011-07-04 12:12:38 +00:00
|
|
|
;; Check whether stat(1) returns usable syntax. "%s" 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
|
|
|
;; work on older AIX systems.
|
|
|
|
(when result
|
|
|
|
(setq tmp
|
2011-07-04 12:12:38 +00:00
|
|
|
(tramp-send-command-and-read
|
|
|
|
vec (format "%s -c '(\"%%N\" %%s)' /" result) '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
|
|
|
(unless (and (listp tmp) (stringp (car tmp))
|
|
|
|
(string-match "^./.$" (car tmp))
|
|
|
|
(integerp (cadr tmp)))
|
|
|
|
(setq result nil)))
|
|
|
|
result)))
|
|
|
|
|
|
|
|
(defun tramp-get-remote-readlink (vec)
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec "readlink"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 a suitable `readlink' command")
|
|
|
|
(let ((result (tramp-find-executable
|
|
|
|
vec "readlink" (tramp-get-remote-path vec))))
|
|
|
|
(when (and result
|
2011-07-04 12:12:38 +00:00
|
|
|
(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)
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec "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-message vec 5 "Finding a suitable `trash' command")
|
|
|
|
(tramp-find-executable vec "trash" (tramp-get-remote-path vec))))
|
|
|
|
|
2014-02-19 19:24:32 +00:00
|
|
|
(defun tramp-get-remote-touch (vec)
|
|
|
|
(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
|
|
|
|
(make-temp-name
|
|
|
|
(expand-file-name
|
|
|
|
tramp-temp-name-prefix (tramp-get-remote-tmpdir 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
|
2014-11-01 13:34:45 +00:00
|
|
|
(format-time-string "%Y%m%d%H%M.%S")
|
2014-02-19 19:24:32 +00:00
|
|
|
(tramp-file-name-handler 'file-remote-p tmpfile 'localname))))
|
|
|
|
(delete-file tmpfile))
|
|
|
|
result)))
|
|
|
|
|
2013-07-05 13:34:01 +00:00
|
|
|
(defun tramp-get-remote-gvfs-monitor-dir (vec)
|
|
|
|
(with-tramp-connection-property vec "gvfs-monitor-dir"
|
|
|
|
(tramp-message vec 5 "Finding a suitable `gvfs-monitor-dir' command")
|
|
|
|
(tramp-find-executable
|
|
|
|
vec "gvfs-monitor-dir" (tramp-get-remote-path vec) t t)))
|
|
|
|
|
2013-07-04 09:39:36 +00:00
|
|
|
(defun tramp-get-remote-inotifywait (vec)
|
|
|
|
(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)
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec "id"
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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 POSIX `id' command")
|
2013-09-19 11:08:01 +00:00
|
|
|
(catch 'id-found
|
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))))))))
|
2013-09-19 11:08:01 +00:00
|
|
|
|
|
|
|
(defun tramp-get-remote-uid-with-id (vec id-format)
|
|
|
|
(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)
|
|
|
|
(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)
|
|
|
|
(with-tramp-connection-property vec "python"
|
|
|
|
(tramp-message vec 5 "Finding a suitable `python' command")
|
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)))))
|
2013-09-19 11:08:01 +00:00
|
|
|
|
|
|
|
(defun tramp-get-remote-uid-with-python (vec id-format)
|
|
|
|
(tramp-send-command-and-read
|
|
|
|
vec
|
|
|
|
(format "%s -c \"%s\""
|
|
|
|
(tramp-get-remote-python vec)
|
|
|
|
(if (equal id-format 'integer)
|
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-uid (vec id-format)
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec (format "uid-%s" id-format)
|
2014-11-01 16:47:09 +00:00
|
|
|
(let ((res
|
|
|
|
(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))))))
|
|
|
|
;; Ensure there is a valid result.
|
|
|
|
(cond
|
|
|
|
((and (equal id-format 'integer) (not (integerp res))) -1)
|
|
|
|
((and (equal id-format 'string) (not (stringp res))) "UNKNOWN")
|
|
|
|
(t res)))))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-and-check)
(tramp-get-remote-ln): Set tramp-autoload cookie.
* net/tramp-fish.el: Remove file.
2010-09-13 15:17:01 +00:00
|
|
|
|
2013-09-19 11:08:01 +00:00
|
|
|
(defun tramp-get-remote-gid-with-id (vec id-format)
|
|
|
|
(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)
|
|
|
|
(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)
|
|
|
|
(tramp-send-command-and-read
|
|
|
|
vec
|
|
|
|
(format "%s -c \"%s\""
|
|
|
|
(tramp-get-remote-python vec)
|
|
|
|
(if (equal id-format 'integer)
|
2014-11-01 13:34:45 +00:00
|
|
|
"import os; print (os.getgid())"
|
|
|
|
"import os, grp; print ('\\\"' + grp.getgrgid(os.getgid())[0] + '\\\"')"))))
|
2013-09-19 11:08:01 +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
|
|
|
(defun tramp-get-remote-gid (vec id-format)
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property vec (format "gid-%s" id-format)
|
2014-11-01 16:47:09 +00:00
|
|
|
(let ((res
|
|
|
|
(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))))))
|
|
|
|
;; Ensure there is a valid result.
|
|
|
|
(cond
|
|
|
|
((and (equal id-format 'integer) (not (integerp res))) -1)
|
|
|
|
((and (equal id-format 'string) (not (stringp res))) "UNKNOWN")
|
|
|
|
(t res)))))
|
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
* Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el.
* net/tramp.el (top): Don't show loading message. Require just
'tramp-compat, everything else is required there. Use
`ignore-errors' where appropriate.
(tramp-inline-compress-start-size, tramp-copy-size-limit)
(tramp-terminal-type, tramp-end-of-output)
(tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
(tramp-completion-function-alist-ssh)
(tramp-completion-function-alist-telnet)
(tramp-completion-function-alist-su)
(tramp-completion-function-alist-putty, tramp-remote-path)
(tramp-remote-process-environment, tramp-sh-extra-args)
(tramp-actions-before-shell, tramp-uudecode)
(tramp-perl-file-truename, tramp-perl-file-name-all-completions)
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes)
(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode)
(tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
(tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
(tramp-handle-make-symbolic-link, tramp-handle-load)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
(tramp-handle-file-exists-p, tramp-handle-file-attributes)
(tramp-do-file-attributes-with-ls)
(tramp-do-file-attributes-with-perl)
(tramp-do-file-attributes-with-stat)
(tramp-handle-set-visited-file-modtime)
(tramp-handle-verify-visited-file-modtime)
(tramp-handle-set-file-modes, tramp-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-remote-selinux-p)
(tramp-handle-file-selinux-context)
(tramp-handle-set-file-selinux-context)
(tramp-handle-file-executable-p, tramp-handle-file-readable-p)
(tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
(tramp-handle-file-directory-p, tramp-handle-file-regular-p)
(tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
(tramp-handle-file-ownership-preserved-p)
(tramp-handle-directory-file-name, tramp-handle-directory-files)
(tramp-handle-directory-files-and-attributes)
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-stat)
(tramp-handle-file-name-all-completions)
(tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
(tramp-handle-copy-file, tramp-handle-copy-directory)
(tramp-handle-rename-file, tramp-do-copy-or-rename-file)
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-handle-make-directory, tramp-handle-delete-directory)
(tramp-handle-delete-file)
(tramp-handle-dired-recursive-delete-directory)
(tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
(tramp-handle-insert-directory)
(tramp-handle-unhandled-file-name-directory)
(tramp-handle-expand-file-name)
(tramp-handle-substitute-in-file-name)
(tramp-handle-executable-find, tramp-process-sentinel)
(tramp-handle-start-file-process, tramp-handle-process-file)
(tramp-handle-call-process-region, tramp-handle-shell-command)
(tramp-handle-file-local-copy, tramp-handle-file-remote-p)
(tramp-handle-insert-file-contents)
(tramp-handle-insert-file-contents-literally)
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
(tramp-vc-registered-file-names, tramp-handle-vc-registered)
(tramp-sh-file-name-handler, tramp-vc-file-name-handler)
(tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
(tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
(tramp-find-file-exists-command, tramp-open-shell)
(tramp-find-shell, tramp-barf-if-no-shell-prompt)
(tramp-open-connection-setup-interactive-shell)
(tramp-local-coding-commands, tramp-remote-coding-commands)
(tramp-find-inline-encoding, tramp-call-local-coding-command)
(tramp-inline-compress-commands, tramp-find-inline-compress)
(tramp-compute-multi-hops, tramp-maybe-open-connection)
(tramp-send-command , tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-mode-string-to-int)
(tramp-convert-file-attributes, tramp-check-cached-permissions)
(tramp-file-mode-from-int, tramp-file-mode-permissions)
(tramp-shell-case-fold, tramp-make-copy-program-file-name)
(tramp-method-out-of-band-p, tramp-local-host-p)
(tramp-get-remote-path, tramp-get-remote-tmpdir)
(tramp-get-ls-command, tramp-get-ls-command-with-dired)
(tramp-get-test-command, tramp-get-test-nt-command)
(tramp-get-file-exists-command, tramp-get-remote-ln)
(tramp-get-remote-perl, tramp-get-remote-stat)
(tramp-get-remote-readlink, tramp-get-remote-trash)
(tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
(tramp-get-local-uid, tramp-get-local-gid)
(tramp-get-inline-compress, tramp-get-inline-coding, ): Move to
tramp-sh.el.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
Move initialization to tramp-sh.el.
(tramp-temp-name-prefix): Make it a defconst.
(tramp-dissect-file-name): Don't check anymore for multi-hop
methods.
(tramp-debug-outline-regexp): Add a docstring.
(tramp-debug-outline-level): Renamed from `tramp-outline-level'.
(tramp-get-debug-buffer): Use it.
* net/tramp-cache.el (top): Set tramp-autoload cookie for
initialization forms.
(tramp-set-connection-property): Don't protect `tramp-message'
call, it isn't necessary any longer.
(tramp-dump-connection-properties): Use `ignore-errors'.
* net/tramp-compat.el (top): Require 'advice, 'format-spec,
'password-cache and 'auth-source.
* net/tramp-gvfs.el (top):
* net/tramp-smb.el (top): Require 'tramp-sh.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
* net/tramp-sh.el: New file, derived from tramp.el.
(top): Initialize `tramp-methods', `tramp-default-method-alist',
`tramp-default-user-alist', tramp-foreign-file-name-handler-alist.
Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". Use
`ignore-errors' where appropriate.
(tramp-sh-file-name-handler-alist): Renamed from
`tramp-file-name-handler-alist'.
(tramp-send-command-and-check): Return t or nil. Remove all
`zerop' checks, where called.
(tramp-handle-set-file-modes)
(tramp-do-copy-or-rename-file-directly)
(tramp-handle-delete-directory, tramp-handle-delete-file)
(tramp-maybe-send-script, ): Use `tramp-barf-unless-okay'.
(tramp-sh-file-name-handler, tramp-send-command-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.
|
|
|
|
|
|
|
|
If no corresponding command is found, nil is returned."
|
|
|
|
(when (and (integerp tramp-inline-compress-start-size)
|
|
|
|
(> size tramp-inline-compress-start-size))
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property (tramp-get-connection-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)
|
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-get-connection-property
|
|
|
|
(tramp-get-connection-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."
|
2010-10-21 08:05:23 +00:00
|
|
|
;; We must catch the errors, because we want to return `nil', when
|
|
|
|
;; no inline coding is found.
|
|
|
|
(ignore-errors
|
|
|
|
(let ((coding
|
2012-10-09 12:49:02 +00:00
|
|
|
(with-tramp-connection-property
|
|
|
|
(tramp-get-connection-process vec) prop
|
2010-10-21 08:05:23 +00:00
|
|
|
(tramp-find-inline-encoding vec)
|
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-get-connection-property
|
|
|
|
(tramp-get-connection-process vec) prop nil)))
|
2010-10-21 08:05:23 +00:00
|
|
|
(prop1 (if (string-match "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) (string-match "remote" prop))
|
|
|
|
(let ((name (symbol-name coding)))
|
|
|
|
(while (string-match (regexp-quote "-") 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 (string-match "decompress" prop1)
|
|
|
|
`(lambda (beg end)
|
|
|
|
(,coding beg end)
|
|
|
|
(let ((coding-system-for-write 'binary)
|
2015-03-04 10:02:36 +00:00
|
|
|
(coding-system-for-read 'binary)
|
|
|
|
(default-directory
|
|
|
|
(tramp-compat-temporary-file-directory)))
|
2010-10-21 08:05:23 +00:00
|
|
|
(apply
|
|
|
|
'call-process-region (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)
|
2015-03-04 10:02:36 +00:00
|
|
|
(coding-system-for-read 'binary)
|
|
|
|
(default-directory
|
|
|
|
(tramp-compat-temporary-file-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
|
|
|
(apply
|
2010-10-21 08:05:23 +00:00
|
|
|
'call-process-region 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
|
2010-10-21 08:05:23 +00:00
|
|
|
(cdr (split-string ,compress))))
|
|
|
|
(,coding (point-min) (point-max)))))
|
|
|
|
((symbolp coding)
|
|
|
|
coding)
|
|
|
|
((and compress (string-match "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.
|
2013-04-22 10:26:09 +00:00
|
|
|
(cond
|
|
|
|
((and (string-match "local" prop)
|
|
|
|
(memq system-type '(windows-nt)))
|
|
|
|
"(%s | \"%s\")")
|
|
|
|
((string-match "local" prop) "(%s | %s)")
|
|
|
|
(t "(%s | %s >%%s)"))
|
2011-01-15 20:03:38 +00:00
|
|
|
coding compress))
|
2010-10-21 08:05:23 +00:00
|
|
|
(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 (string-match "local" prop)
|
|
|
|
(memq system-type '(windows-nt)))
|
|
|
|
"(%s <%%s | \"%s\")"
|
|
|
|
"(%s <%%s | %s)")
|
|
|
|
compress coding))
|
2010-10-21 08:05:23 +00:00
|
|
|
((string-match "decoding" prop)
|
2013-04-22 10:26:09 +00:00
|
|
|
(cond
|
|
|
|
((string-match "local" prop) (format "%s" coding))
|
|
|
|
(t (format "%s >%%s" coding))))
|
2010-10-21 08:05:23 +00:00
|
|
|
(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.
|
|
|
|
;; * Make it work for different encodings, and for different file name
|
|
|
|
;; encodings, too. (Daniel Pittman)
|
|
|
|
;; * Don't search for perl5 and perl. Instead, only search for perl and
|
|
|
|
;; then look if it's the right version (with `perl -v').
|
|
|
|
;; * 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.
|
|
|
|
;; * Allow out-of-band methods as _last_ multi-hop. Open a connection
|
|
|
|
;; until the last but one hop via `start-file-process'. Apply it
|
|
|
|
;; also for ftp and smb.
|
|
|
|
;; * 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)
|
|
|
|
;; * Reconnect directly to a compliant shell without first going
|
|
|
|
;; through the user's default shell. (Pete Forman)
|
|
|
|
;; * How can I interrupt the remote process with a signal
|
|
|
|
;; (interrupt-process seems not to work)? (Markus Triska)
|
|
|
|
;; * 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)
|
|
|
|
;; * It makes me wonder if tramp couldn't fall back to ssh when scp
|
|
|
|
;; isn't on the remote host. (Mark A. Hershberger)
|
|
|
|
;; * Use lsh instead of ssh. (Alfred M. Szmidt)
|
2011-02-05 09:52:07 +00:00
|
|
|
;; * 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).
|
|
|
|
;; * Keep a second connection open for out-of-band methods like scp or
|
|
|
|
;; rsync.
|
|
|
|
|
|
|
|
;;; tramp-sh.el ends here
|