[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103600: * net/tramp-sh.el (tramp-do-
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103600: * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do |
Date: |
Wed, 09 Mar 2011 12:04:27 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103600
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Wed 2011-03-09 12:04:27 +0100
message:
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do
not use `tramp-file-name-port', because this returns also
`tramp-default-port'.
modified:
lisp/ChangeLog
lisp/net/tramp-sh.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-03-09 10:45:19 +0000
+++ b/lisp/ChangeLog 2011-03-09 11:04:27 +0000
@@ -1,3 +1,9 @@
+2011-03-09 Michael Albinus <address@hidden>
+
+ * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do
+ not use `tramp-file-name-port', because this returns also
+ `tramp-default-port'.
+
2011-03-09 Deniz Dogan <address@hidden>
* net/rcirc.el (rcirc-handler-001): Remove useless
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2011-02-05 09:52:07 +0000
+++ b/lisp/net/tramp-sh.el 2011-03-09 11:04:27 +0000
@@ -2251,11 +2251,15 @@
'identity)
(if t2 (tramp-make-copy-program-file-name v) newname)))
- ;; Check for port number. Until now, there's no need for handling
- ;; like method, user, host.
- (setq host (tramp-file-name-real-host v)
- port (tramp-file-name-port v)
- port (or (and port (number-to-string port)) ""))
+ ;; 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)
+ (setq host (string-to-number (match-string 1 host))
+ port (string-to-number (match-string 2 host))))
;; Compose copy command.
(setq spec (format-spec-make
@@ -2270,7 +2274,7 @@
copy-args
(delete
;; " " has either been a replacement of "%k" (when
- ;; keep-date argument is non-nil), or a replacemtent
+ ;; keep-date argument is non-nil), or a replacement
;; for the whole keep-date sublist.
" "
(dolist
@@ -2281,7 +2285,7 @@
(append
copy-args
(let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
- (if (zerop (length (car y))) '(" ") y))))))
+ (if (member "" y) '(" ") y))))))
copy-env
(delq
nil
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103600: * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do,
Michael Albinus <=