aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2014-03-17 10:28:47 +0100
committerMichael Albinus2014-03-17 10:28:47 +0100
commit8273986b5aaa1c6b48e4b350cc2fbe2a69f80056 (patch)
treedc851ace559717a5035f2ff524343b5454242be7
parent218feefcc075f3da15c87f06fa418048ffe5ae3a (diff)
downloademacs-8273986b5aaa1c6b48e4b350cc2fbe2a69f80056.tar.gz
emacs-8273986b5aaa1c6b48e4b350cc2fbe2a69f80056.zip
* net/tramp.el (tramp-action-out-of-band): Read pending output.
(tramp-call-process): Trace also DESTINATION. * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Quote file names when they are local. Remove superfluous trace.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/net/tramp-sh.el9
-rw-r--r--lisp/net/tramp.el6
3 files changed, 18 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b3f9a9073f6..2946ac5e0ac 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12014-03-17 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-action-out-of-band): Read pending output.
4 (tramp-call-process): Trace also DESTINATION.
5
6 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
7 Quote file names when they are local. Remove superfluous trace.
8
12014-03-17 Dmitry Gutov <dgutov@yandex.ru> 92014-03-17 Dmitry Gutov <dgutov@yandex.ru>
2 10
3 * newcomment.el (comment-beginning): If `comment-start-skip' 11 * newcomment.el (comment-beginning): If `comment-start-skip'
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ee37373a0fa..245d4f1ae8b 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2246,7 +2246,9 @@ The method used must be an out-of-band method."
2246 (aset v 3 localname) 2246 (aset v 3 localname)
2247 2247
2248 ;; Check which ones of source and target are Tramp files. 2248 ;; Check which ones of source and target are Tramp files.
2249 (setq source (if t1 (tramp-make-copy-program-file-name v) filename) 2249 (setq source (if t1
2250 (tramp-make-copy-program-file-name v)
2251 (shell-quote-argument filename))
2250 target (funcall 2252 target (funcall
2251 (if (and (file-directory-p filename) 2253 (if (and (file-directory-p filename)
2252 (string-equal 2254 (string-equal
@@ -2254,7 +2256,9 @@ The method used must be an out-of-band method."
2254 (file-name-nondirectory newname))) 2256 (file-name-nondirectory newname)))
2255 'file-name-directory 2257 'file-name-directory
2256 'identity) 2258 'identity)
2257 (if t2 (tramp-make-copy-program-file-name v) newname))) 2259 (if t2
2260 (tramp-make-copy-program-file-name v)
2261 (shell-quote-argument newname))))
2258 2262
2259 ;; Check for host and port number. We cannot use 2263 ;; Check for host and port number. We cannot use
2260 ;; `tramp-file-name-port', because this returns also 2264 ;; `tramp-file-name-port', because this returns also
@@ -2376,7 +2380,6 @@ The method used must be an out-of-band method."
2376 (buffer-substring (point-min) (point-at-eol)))))) 2380 (buffer-substring (point-min) (point-at-eol))))))
2377 2381
2378 ;; Reset the transfer process properties. 2382 ;; Reset the transfer process properties.
2379 (tramp-message orig-vec 6 "\n%s" (buffer-string))
2380 (tramp-set-connection-property v "process-name" nil) 2383 (tramp-set-connection-property v "process-name" nil)
2381 (tramp-set-connection-property v "process-buffer" nil))) 2384 (tramp-set-connection-property v "process-buffer" nil)))
2382 2385
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index face017946d..5ff68e0f0f9 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3468,6 +3468,8 @@ The terminal type can be configured with `tramp-terminal-type'."
3468 3468
3469(defun tramp-action-out-of-band (proc vec) 3469(defun tramp-action-out-of-band (proc vec)
3470 "Check, whether an out-of-band copy has finished." 3470 "Check, whether an out-of-band copy has finished."
3471 ;; There might be pending output for the exit status.
3472 (tramp-accept-process-output proc 0.1)
3471 (cond ((and (memq (process-status proc) '(stop exit)) 3473 (cond ((and (memq (process-status proc) '(stop exit))
3472 (zerop (process-exit-status proc))) 3474 (zerop (process-exit-status proc)))
3473 (tramp-message vec 3 "Process has finished.") 3475 (tramp-message vec 3 "Process has finished.")
@@ -4092,7 +4094,7 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1.
4092Furthermore, traces are written with verbosity of 6." 4094Furthermore, traces are written with verbosity of 6."
4093 (tramp-message 4095 (tramp-message
4094 (vector tramp-current-method tramp-current-user tramp-current-host nil nil) 4096 (vector tramp-current-method tramp-current-user tramp-current-host nil nil)
4095 6 "`%s %s' %s" program (mapconcat 'identity args " ") infile) 4097 6 "`%s %s' %s %s" program (mapconcat 'identity args " ") infile destination)
4096 (if (executable-find program) 4098 (if (executable-find program)
4097 (apply 'call-process program infile destination display args) 4099 (apply 'call-process program infile destination display args)
4098 1)) 4100 1))
@@ -4229,7 +4231,7 @@ T1 and T2 are time values (as returned by `current-time' for example)."
4229;; This function should produce a string which is grokked by a Unix 4231;; This function should produce a string which is grokked by a Unix
4230;; shell, even if the Emacs is running on Windows. Since this is the 4232;; shell, even if the Emacs is running on Windows. Since this is the
4231;; kludges section, we bind `system-type' in such a way that 4233;; kludges section, we bind `system-type' in such a way that
4232;; `shell-quote-arguments' behaves as if on Unix. 4234;; `shell-quote-argument' behaves as if on Unix.
4233;; 4235;;
4234;; Thanks to Mario DeWeerd for the hint that it is sufficient for this 4236;; Thanks to Mario DeWeerd for the hint that it is sufficient for this
4235;; function to work with Bourne-like shells. 4237;; function to work with Bourne-like shells.