aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2014-08-07 11:13:54 +0200
committerMichael Albinus2014-08-07 11:13:54 +0200
commitfaafcff80c1a578584cc1de7d1300bbd760d8d2e (patch)
treef43006be059803e593c356b0e8c757a8bcd700c6 /lisp
parent59e42442085d4cf2032324acf0f5467278554c74 (diff)
downloademacs-faafcff80c1a578584cc1de7d1300bbd760d8d2e.tar.gz
emacs-faafcff80c1a578584cc1de7d1300bbd760d8d2e.zip
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Use cached "remote-copy-args" value, if available.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/tramp-sh.el37
2 files changed, 24 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d8eb7e7dc6c..8889c046f62 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-08-07 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
4 Use cached "remote-copy-args" value, if available. (Bug#18199)
5
12014-08-07 Leo Liu <sdl.web@gmail.com> 62014-08-07 Leo Liu <sdl.web@gmail.com>
2 7
3 * help.el (temp-buffer-setup-hook,temp-buffer-show-hook): Revert 8 * help.el (temp-buffer-setup-hook,temp-buffer-show-hook): Revert
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index e234162bd4a..569d3473532 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -218,7 +218,9 @@ detected as prompt when being sent on echoing hosts, therefore.")
218 ;; We use "-v" for better error tracking. 218 ;; We use "-v" for better error tracking.
219 (tramp-copy-args (("-w" "1") ("-v") ("%h") ("%r"))) 219 (tramp-copy-args (("-w" "1") ("-v") ("%h") ("%r")))
220 (tramp-remote-copy-program "nc") 220 (tramp-remote-copy-program "nc")
221 ;; We use "-p" as required for busyboxes. 221 ;; We use "-p" as required for newer busyboxes. For older
222 ;; busybox/nc versions, the value must be (("-l") ("%r")). This
223 ;; can be achieved by tweaking `tramp-connection-properties'.
222 (tramp-remote-copy-args (("-l") ("-p" "%r"))) 224 (tramp-remote-copy-args (("-l") ("-p" "%r")))
223 (tramp-default-port 23))) 225 (tramp-default-port 23)))
224;;;###tramp-autoload 226;;;###tramp-autoload
@@ -2334,6 +2336,7 @@ The method used must be an out-of-band method."
2334 method 'tramp-copy-program) 2336 method 'tramp-copy-program)
2335 copy-keep-date (tramp-get-method-parameter 2337 copy-keep-date (tramp-get-method-parameter
2336 method 'tramp-copy-keep-date) 2338 method 'tramp-copy-keep-date)
2339
2337 copy-args 2340 copy-args
2338 (delete 2341 (delete
2339 ;; " " has either been a replacement of "%k" (when 2342 ;; " " has either been a replacement of "%k" (when
@@ -2349,6 +2352,7 @@ The method used must be an out-of-band method."
2349 copy-args 2352 copy-args
2350 (let ((y (mapcar (lambda (z) (format-spec z spec)) x))) 2353 (let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
2351 (if (member "" y) '(" ") y)))))) 2354 (if (member "" y) '(" ") y))))))
2355
2352 copy-env 2356 copy-env
2353 (delq 2357 (delq
2354 nil 2358 nil
@@ -2357,23 +2361,20 @@ The method used must be an out-of-band method."
2357 (setq x (mapcar (lambda (y) (format-spec y spec)) x)) 2361 (setq x (mapcar (lambda (y) (format-spec y spec)) x))
2358 (unless (member "" x) (mapconcat 'identity x " "))) 2362 (unless (member "" x) (mapconcat 'identity x " ")))
2359 (tramp-get-method-parameter method 'tramp-copy-env))) 2363 (tramp-get-method-parameter method 'tramp-copy-env)))
2360 remote-copy-program (tramp-get-method-parameter 2364
2361 method 'tramp-remote-copy-program) 2365 remote-copy-program
2362 remote-copy-args 2366 (tramp-get-method-parameter method 'tramp-remote-copy-program))
2363 (delete 2367
2364 ;; " " has either been a replacement of "%k" (when 2368 (dolist
2365 ;; keep-date argument is non-nil), or a replacement 2369 (x
2366 ;; for the whole keep-date sublist. 2370 (or
2367 " " 2371 (tramp-get-connection-property v "remote-copy-args" nil)
2368 (dolist 2372 (tramp-get-method-parameter method 'tramp-remote-copy-args)))
2369 (x 2373 (setq remote-copy-args
2370 (tramp-get-method-parameter method 'tramp-remote-copy-args) 2374 (append
2371 remote-copy-args) 2375 remote-copy-args
2372 (setq remote-copy-args 2376 (let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
2373 (append 2377 (if (member "" y) '(" ") y)))))
2374 remote-copy-args
2375 (let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
2376 (if (member "" y) '(" ") y)))))))
2377 2378
2378 ;; Check for local copy program. 2379 ;; Check for local copy program.
2379 (unless (executable-find copy-program) 2380 (unless (executable-find copy-program)