72 |
;; In the Tramp CVS repository, the version numer is auto-frobbed from |
;; In the Tramp CVS repository, the version numer is auto-frobbed from |
73 |
;; the Makefile, so you should edit the top-level Makefile to change |
;; the Makefile, so you should edit the top-level Makefile to change |
74 |
;; the version number. |
;; the version number. |
75 |
(defconst tramp-version "2.0.20" |
(defconst tramp-version "2.0.21" |
76 |
"This version of tramp.") |
"This version of tramp.") |
77 |
|
|
78 |
(defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" |
(defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" |
2183 |
(fa2 (file-attributes file2))) |
(fa2 (file-attributes file2))) |
2184 |
(if (and (not (equal (nth 5 fa1) '(0 0))) |
(if (and (not (equal (nth 5 fa1) '(0 0))) |
2185 |
(not (equal (nth 5 fa2) '(0 0)))) |
(not (equal (nth 5 fa2) '(0 0)))) |
2186 |
(> 0 (car (subtract-time fa1 fa2))) |
(> 0 (car (subtract-time (nth 5 fa1) (nth 5 fa2)))) |
2187 |
;; If one of them is the dont-know value, then we can |
;; If one of them is the dont-know value, then we can |
2188 |
;; still try to run a shell command on the remote host. |
;; still try to run a shell command on the remote host. |
2189 |
;; However, this only works if both files are Tramp |
;; However, this only works if both files are Tramp |
2973 |
(let ((trampbuf (get-buffer-create "*tramp output*")) |
(let ((trampbuf (get-buffer-create "*tramp output*")) |
2974 |
(rcp-program (tramp-get-rcp-program |
(rcp-program (tramp-get-rcp-program |
2975 |
multi-method |
multi-method |
2976 |
(tramp-find-method multi-method method user host))) |
(tramp-find-method multi-method method user host) |
2977 |
|
user host)) |
2978 |
(rcp-args (tramp-get-rcp-args |
(rcp-args (tramp-get-rcp-args |
2979 |
multi-method |
multi-method |
2980 |
(tramp-find-method multi-method method user host))) |
(tramp-find-method multi-method method user host) |
2981 |
|
user host)) |
2982 |
tmpfil) |
tmpfil) |
2983 |
(unless (file-exists-p filename) |
(unless (file-exists-p filename) |
2984 |
(error "Cannot make local copy of non-existing file `%s'" |
(error "Cannot make local copy of non-existing file `%s'" |
3145 |
start end filename append visit)) |
start end filename append visit)) |
3146 |
(let ((curbuf (current-buffer)) |
(let ((curbuf (current-buffer)) |
3147 |
(rcp-program (tramp-get-rcp-program |
(rcp-program (tramp-get-rcp-program |
3148 |
multi-method (tramp-find-method multi-method method user host))) |
multi-method (tramp-find-method multi-method method user host) |
3149 |
|
user host)) |
3150 |
(rcp-args (tramp-get-rcp-args |
(rcp-args (tramp-get-rcp-args |
3151 |
multi-method |
multi-method |
3152 |
(tramp-find-method multi-method method user host))) |
(tramp-find-method multi-method method user host) |
3153 |
|
user host)) |
3154 |
(rem-enc (tramp-get-remote-encoding multi-method method user host)) |
(rem-enc (tramp-get-remote-encoding multi-method method user host)) |
3155 |
(rem-dec (tramp-get-remote-decoding multi-method method user host)) |
(rem-dec (tramp-get-remote-decoding multi-method method user host)) |
3156 |
(loc-enc (tramp-get-local-encoding multi-method method user host)) |
(loc-enc (tramp-get-local-encoding multi-method method user host)) |
4252 |
9 "Setting remote shell prompt...done") |
9 "Setting remote shell prompt...done") |
4253 |
) |
) |
4254 |
(t (tramp-message 5 "Remote `%s' groks tilde expansion, good" |
(t (tramp-message 5 "Remote `%s' groks tilde expansion, good" |
4255 |
(tramp-get-remote-sh multi-method method)))))) |
(tramp-get-remote-sh multi-method method user host)))))) |
4256 |
|
|
4257 |
(defun tramp-check-ls-command (multi-method method user host cmd) |
(defun tramp-check-ls-command (multi-method method user host cmd) |
4258 |
"Checks whether the given `ls' executable groks `-n'. |
"Checks whether the given `ls' executable groks `-n'. |
4506 |
(tramp-get-buffer multi-method method user host) |
(tramp-get-buffer multi-method method user host) |
4507 |
(tramp-get-telnet-program |
(tramp-get-telnet-program |
4508 |
multi-method |
multi-method |
4509 |
(tramp-find-method multi-method method user host)) |
(tramp-find-method multi-method method user host) |
4510 |
|
user host) |
4511 |
host |
host |
4512 |
(tramp-get-telnet-args |
(tramp-get-telnet-args |
4513 |
multi-method |
multi-method |
4514 |
(tramp-find-method multi-method method user host)))) |
(tramp-find-method multi-method method user host) |
4515 |
|
user host))) |
4516 |
(found nil) |
(found nil) |
4517 |
(pw nil)) |
(pw nil)) |
4518 |
(process-kill-without-query p) |
(process-kill-without-query p) |
4563 |
(buf (tramp-get-buffer multi-method method user host)) |
(buf (tramp-get-buffer multi-method method user host)) |
4564 |
(rsh-program (tramp-get-rsh-program |
(rsh-program (tramp-get-rsh-program |
4565 |
multi-method |
multi-method |
4566 |
(tramp-find-method multi-method method user host))) |
(tramp-find-method multi-method method user host) |
4567 |
|
user host)) |
4568 |
(rsh-args (tramp-get-rsh-args |
(rsh-args (tramp-get-rsh-args |
4569 |
multi-method |
multi-method |
4570 |
(tramp-find-method multi-method method user host)))) |
(tramp-find-method multi-method method user host) |
4571 |
|
user host))) |
4572 |
;; The following should be changed. We need a more general |
;; The following should be changed. We need a more general |
4573 |
;; mechanism to parse extra host args. |
;; mechanism to parse extra host args. |
4574 |
(when (string-match "\\([^#]*\\)#\\(.*\\)" host) |
(when (string-match "\\([^#]*\\)#\\(.*\\)" host) |
4638 |
(tramp-get-buffer multi-method method user host) |
(tramp-get-buffer multi-method method user host) |
4639 |
(tramp-get-su-program |
(tramp-get-su-program |
4640 |
multi-method |
multi-method |
4641 |
(tramp-find-method multi-method method user host)) |
(tramp-find-method multi-method method user host) |
4642 |
|
user host) |
4643 |
(mapcar |
(mapcar |
4644 |
'(lambda (x) |
'(lambda (x) |
4645 |
(format-spec x `((?u . ,(or user "root"))))) |
(format-spec x `((?u . ,(or user "root"))))) |
4646 |
(tramp-get-su-args |
(tramp-get-su-args |
4647 |
multi-method |
multi-method |
4648 |
(tramp-find-method multi-method method user host))))) |
(tramp-find-method multi-method method user host) |
4649 |
|
user host)))) |
4650 |
(found nil) |
(found nil) |
4651 |
(pw nil)) |
(pw nil)) |
4652 |
(process-kill-without-query p) |
(process-kill-without-query p) |
4888 |
;; Pittman reports that the unusual positioning of the single quotes |
;; Pittman reports that the unusual positioning of the single quotes |
4889 |
;; makes it work under `rc', too. |
;; makes it work under `rc', too. |
4890 |
(process-send-string nil (format "exec env 'PS1=$ ' %s%s" |
(process-send-string nil (format "exec env 'PS1=$ ' %s%s" |
4891 |
(tramp-get-remote-sh multi-method method) |
(tramp-get-remote-sh |
4892 |
|
multi-method method user host) |
4893 |
tramp-rsh-end-of-line)) |
tramp-rsh-end-of-line)) |
4894 |
(when tramp-debug-buffer |
(when tramp-debug-buffer |
4895 |
(save-excursion |
(save-excursion |
4897 |
(goto-char (point-max)) |
(goto-char (point-max)) |
4898 |
(tramp-insert-with-face |
(tramp-insert-with-face |
4899 |
'bold (format "$ exec env PS1='$ ' %s\n" |
'bold (format "$ exec env PS1='$ ' %s\n" |
4900 |
(tramp-get-remote-sh multi-method method))))) |
(tramp-get-remote-sh multi-method method user host))))) |
4901 |
(tramp-message 9 "Waiting 30s for remote `%s' to come up..." |
(tramp-message 9 "Waiting 30s for remote `%s' to come up..." |
4902 |
(tramp-get-remote-sh multi-method method)) |
(tramp-get-remote-sh multi-method method user host)) |
4903 |
(unless (tramp-wait-for-regexp |
(unless (tramp-wait-for-regexp |
4904 |
p 30 (format "\\(%s\\|%s\\)\\'" |
p 30 (format "\\(%s\\|%s\\)\\'" |
4905 |
shell-prompt-pattern tramp-shell-prompt-pattern)) |
shell-prompt-pattern tramp-shell-prompt-pattern)) |
4906 |
(pop-to-buffer (buffer-name)) |
(pop-to-buffer (buffer-name)) |
4907 |
(error "Remote `%s' didn't come up. See buffer `%s' for details" |
(error "Remote `%s' didn't come up. See buffer `%s' for details" |
4908 |
(tramp-get-remote-sh multi-method method) (buffer-name))) |
(tramp-get-remote-sh multi-method method user host) |
4909 |
|
(buffer-name))) |
4910 |
(tramp-message 9 "Setting up remote shell environment") |
(tramp-message 9 "Setting up remote shell environment") |
4911 |
(tramp-discard-garbage-erase-buffer p multi-method method user host) |
(tramp-discard-garbage-erase-buffer p multi-method method user host) |
4912 |
(process-send-string |
(process-send-string |
5132 |
(tramp-wait-for-output) |
(tramp-wait-for-output) |
5133 |
(unless (tramp-get-rcp-program |
(unless (tramp-get-rcp-program |
5134 |
multi-method |
multi-method |
5135 |
(tramp-find-method multi-method method user host)) |
(tramp-find-method multi-method method user host) |
5136 |
|
user host) |
5137 |
(tramp-message 5 "Sending the Perl `mime-encode' implementations.") |
(tramp-message 5 "Sending the Perl `mime-encode' implementations.") |
5138 |
(tramp-send-linewise |
(tramp-send-linewise |
5139 |
multi-method method user host |
multi-method method user host |
5174 |
;; Find the right encoding/decoding commands to use. |
;; Find the right encoding/decoding commands to use. |
5175 |
(unless (tramp-get-rcp-program |
(unless (tramp-get-rcp-program |
5176 |
multi-method |
multi-method |
5177 |
(tramp-find-method multi-method method user host)) |
(tramp-find-method multi-method method user host) |
5178 |
|
user host) |
5179 |
(tramp-find-inline-encoding multi-method method user host)) |
(tramp-find-inline-encoding multi-method method user host)) |
5180 |
;; If encoding/decoding command are given, test to see if they work. |
;; If encoding/decoding command are given, test to see if they work. |
5181 |
;; CCC: Maybe it would be useful to run the encoder both locally and |
;; CCC: Maybe it would be useful to run the encoder both locally and |
5380 |
(delete-process p)) |
(delete-process p)) |
5381 |
(funcall (tramp-get-connection-function |
(funcall (tramp-get-connection-function |
5382 |
multi-method |
multi-method |
5383 |
(tramp-find-method multi-method method user host)) |
(tramp-find-method multi-method method user host) |
5384 |
|
user host) |
5385 |
multi-method method user host)))) |
multi-method method user host)))) |
5386 |
|
|
5387 |
(defun tramp-send-command |
(defun tramp-send-command |
5871 |
to enter a password for the `tramp-rcp-program'." |
to enter a password for the `tramp-rcp-program'." |
5872 |
(tramp-get-rcp-program |
(tramp-get-rcp-program |
5873 |
multi-method |
multi-method |
5874 |
(tramp-find-method multi-method method user host))) |
(tramp-find-method multi-method method user host) |
5875 |
|
user host)) |
5876 |
|
|
5877 |
;; Variables local to connection. |
;; Variables local to connection. |
5878 |
|
|