emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v


From: Michael Albinus
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v
Date: Tue, 19 Dec 2006 06:56:28 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       06/12/19 06:56:27

Index: net/tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -b -r1.109 -r1.110
--- net/tramp.el        17 Dec 2006 12:58:04 -0000      1.109
+++ net/tramp.el        19 Dec 2006 06:56:27 -0000      1.110
@@ -326,35 +326,24 @@
               (tramp-login-program        "ssh")
               (tramp-copy-program         "scp")
               (tramp-remote-sh            "/bin/sh")
-              (tramp-login-args           ("-o" "address@hidden:%%p"
-                                          "-o" "ControlMaster=yes"
-                                          "-e" "none"))
-              (tramp-copy-args            ("-o" "address@hidden:%%p"
-                                          "-o" "ControlMaster=auto"))
+              (tramp-login-args           ("-e" "none"))
+              (tramp-copy-args            nil)
               (tramp-copy-keep-date-arg   "-p")
              (tramp-password-end-of-line nil))
      ("scp1"  (tramp-connection-function  tramp-open-connection-rsh)
               (tramp-login-program        "ssh")
               (tramp-copy-program         "scp")
               (tramp-remote-sh            "/bin/sh")
-              (tramp-login-args           ("-o" "address@hidden:%%p"
-                                          "-o" "ControlMaster=yes"
-                                          "-1" "-e" "none"))
-              (tramp-copy-args            ("-o" "address@hidden:%%p"
-                                          "-o" "ControlMaster=auto"
-                                          "-1"))
+              (tramp-login-args           ("-1" "-e" "none"))
+              (tramp-copy-args            ("-1"))
               (tramp-copy-keep-date-arg   "-p")
              (tramp-password-end-of-line nil))
      ("scp2"  (tramp-connection-function  tramp-open-connection-rsh)
               (tramp-login-program        "ssh")
               (tramp-copy-program         "scp")
               (tramp-remote-sh            "/bin/sh")
-              (tramp-login-args           ("-o" "address@hidden:%%p"
-                                          "-o" "ControlMaster=yes"
-                                          "-2" "-e" "none"))
-              (tramp-copy-args            ("-o" "address@hidden:%%p"
-                                          "-o" "ControlMaster=auto"
-                                          "-2"))
+              (tramp-login-args           ("-2" "-e" "none"))
+              (tramp-copy-args            ("-2"))
               (tramp-copy-keep-date-arg   "-p")
              (tramp-password-end-of-line nil))
      ("scp1_old"
@@ -483,6 +472,17 @@
               (tramp-copy-args            nil)
               (tramp-copy-keep-date-arg   nil)
              (tramp-password-end-of-line nil))
+     ("scpc"  (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-login-program        "ssh")
+              (tramp-copy-program         "scp")
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-login-args           ("-o" "address@hidden:%%p"
+                                          "-o" "ControlMaster=yes"
+                                          "-e" "none"))
+              (tramp-copy-args            ("-o" "address@hidden:%%p"
+                                          "-o" "ControlMaster=auto"))
+              (tramp-copy-keep-date-arg   "-p")
+             (tramp-password-end-of-line nil))
      ("scpx"  (tramp-connection-function  tramp-open-connection-rsh)
               (tramp-login-program        "ssh")
               (tramp-copy-program         "scp")
@@ -684,33 +684,32 @@
   :type '(repeat (list string function string)))
 
 (defcustom tramp-default-method
-  (or
+  (cond
    ;; An external copy method seems to be preferred, because it is
    ;; much more performant for large files, and it hasn't too serious
    ;; delays for small files.  But it must be ensured that there
-   ;; aren't permanent password queries.  Either the copy method shall
-   ;; reuse other channels (ControlMaster of OpenSSH does it), a
-   ;; password agent like "ssh-agent" or "Pageant" shall run, or the
-   ;; optional password.el package shall be active for password caching.
-   (and (fboundp 'executable-find)
-       ;; Check whether PuTTY is installed.
-       (executable-find "pscp")
-       (if (or
-            ;; password.el is loaded.
-            (fboundp 'password-read)
+   ;; aren't permanent password queries.  Either a password agent like
+   ;; "ssh-agent" or "Pageant" shall run, or the optional password.el
+   ;; package shall be active for password caching.
+   ((executable-find "pscp")
+    ;; PuTTY is installed.
+    (if        (or (fboundp 'password-read)
             ;; Pageant is running.
             (and (fboundp 'w32-window-exists-p)
                  (funcall (symbol-function 'w32-window-exists-p)
                           "Pageant" "Pageant")))
-           ;; We know that the password will not be retrieved again.
            "pscp"
-         ;; When "pscp" exists, there is also "plink".
          "plink"))
-   ;; Under UNIX, ControlMaster is activated.  This does not work
-   ;; under Cygwin, but ssh-agent must be enabled then anyway due to
-   ;; the pseudo-tty problem of Cygwin's OpenSSH implementation.  So
-   ;; it doesn't hurt to use "scp".
-   "scp")
+   ;; There is an ssh installation.
+   ((executable-find "scp")
+    (if        (or (fboundp 'password-read)
+           ;; ssh-agent is running.
+           (getenv "SSH_AUTH_SOCK")
+           (getnev "SSH_AGENT_PID"))
+       "scp"
+      "ssh"))
+   ;; Fallback.
+   (t "ftp"))
   "*Default method to use for transferring files.
 See `tramp-methods' for possibilities.
 Also see `tramp-default-method-alist'."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]