]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 7 Aug 2014 09:13:54 +0000 (11:13 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 7 Aug 2014 09:13:54 +0000 (11:13 +0200)
Use cached "remote-copy-args" value, if available.

lisp/ChangeLog
lisp/net/tramp-sh.el

index d8eb7e7dc6c5c044e1726f9593ecb22152a1b371..8889c046f6256d6d9c28f275250424571a0bf0d9 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-07  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
+       Use cached "remote-copy-args" value, if available.  (Bug#18199)
+
 2014-08-07  Leo Liu  <sdl.web@gmail.com>
 
        * help.el (temp-buffer-setup-hook,temp-buffer-show-hook): Revert
index e234162bd4afc74b8947bb8abdd5fa5bd42ed26d..569d347353262a71af299827eb068e83b7d871f2 100644 (file)
@@ -218,7 +218,9 @@ detected as prompt when being sent on echoing hosts, therefore.")
     ;; 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 busyboxes.
+    ;; 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
@@ -2334,6 +2336,7 @@ The method used must be an out-of-band method."
                            method 'tramp-copy-program)
              copy-keep-date (tramp-get-method-parameter
                              method 'tramp-copy-keep-date)
+
              copy-args
              (delete
               ;; " " has either been a replacement of "%k" (when
@@ -2349,6 +2352,7 @@ The method used must be an out-of-band method."
                        copy-args
                        (let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
                          (if (member "" y) '(" ") y))))))
+
              copy-env
              (delq
               nil
@@ -2357,23 +2361,20 @@ The method used must be an out-of-band method."
                  (setq x (mapcar (lambda (y) (format-spec y spec)) x))
                  (unless (member "" x) (mapconcat 'identity x " ")))
                (tramp-get-method-parameter method 'tramp-copy-env)))
-             remote-copy-program (tramp-get-method-parameter
-                                  method 'tramp-remote-copy-program)
-             remote-copy-args
-             (delete
-              ;; " " has either been a replacement of "%k" (when
-              ;; keep-date argument is non-nil), or a replacement
-              ;; for the whole keep-date sublist.
-              " "
-              (dolist
-                  (x
-                   (tramp-get-method-parameter method 'tramp-remote-copy-args)
-                   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)))))))
+
+             remote-copy-program
+             (tramp-get-method-parameter method 'tramp-remote-copy-program))
+
+       (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.
        (unless (executable-find copy-program)