emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r116857: * net/tramp.el (tramp-methods, tramp-con


From: Michael Albinus
Subject: [Emacs-diffs] emacs-24 r116857: * net/tramp.el (tramp-methods, tramp-connection-timeout): Fix docstring.
Date: Tue, 25 Mar 2014 08:16:59 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116857
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: emacs-24
timestamp: Tue 2014-03-25 09:16:49 +0100
message:
  * net/tramp.el (tramp-methods, tramp-connection-timeout): Fix docstring.
  
  * net/tramp-sh.el (tramp-sh-handle-vc-registered): Revert change
  from 2014-03-07, it decreases performance unnecessarily.  Let-bind
  `remote-file-name-inhibit-cache' to nil in the second pass.
  (tramp-find-executable): Do not call "which" on SunOS.
  (tramp-send-command-and-check): Fix docstring.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/tramp-sh.el           trampsh.el-20100913133439-a1faifh29eqoi4nh-1
  lisp/net/tramp.el              tramp.el-20091113204419-o5vbwnq5f7feedwu-2427
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-03-25 02:47:39 +0000
+++ b/lisp/ChangeLog    2014-03-25 08:16:49 +0000
@@ -1,3 +1,13 @@
+2014-03-25  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-methods, tramp-connection-timeout): Fix docstring.
+
+       * net/tramp-sh.el (tramp-sh-handle-vc-registered): Revert change
+       from 2014-03-07, it decreases performance unnecessarily.  Let-bind
+       `remote-file-name-inhibit-cache' to nil in the second pass.
+       (tramp-find-executable): Do not call "which" on SunOS.
+       (tramp-send-command-and-check): Fix docstring.
+
 2014-03-24  Barry O'Reilly  <address@hidden>
 
        * simple.el (primitive-undo): Only process marker adjustments

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2014-03-21 13:02:25 +0000
+++ b/lisp/net/tramp-sh.el      2014-03-25 08:16:49 +0000
@@ -3311,55 +3311,57 @@
       (with-tramp-progress-reporter
          v 3 (format "Checking `vc-registered' for %s" file)
 
-       (unless remote-file-name-inhibit-cache
-         ;; There could be new files, created by the vc backend.  We
-         ;; cannot reuse the old cache entries, therefore.
-         (let (tramp-vc-registered-file-names
-               (remote-file-name-inhibit-cache (current-time))
-               (file-name-handler-alist
-                `((,tramp-file-name-regexp . tramp-vc-file-name-handler))))
-
-           ;; Here we collect only file names, which need an operation.
-           (ignore-errors (tramp-run-real-handler 'vc-registered (list file)))
-           (tramp-message v 10 "\n%s" tramp-vc-registered-file-names)
-
-           ;; Send just one command, in order to fill the cache.
-           (when tramp-vc-registered-file-names
-             (tramp-maybe-send-script
-              v
-              (format tramp-vc-registered-read-file-names
-                      (tramp-get-file-exists-command v)
-                      (format "%s -r" (tramp-get-test-command v)))
-              "tramp_vc_registered_read_file_names")
-
-             (dolist
-                 (elt
-                  (ignore-errors
-                    ;; We cannot use `tramp-send-command-and-read',
-                    ;; because this does not cooperate well with
-                    ;; heredoc documents.
-                    (tramp-send-command
-                     v
-                     (format
-                      "tramp_vc_registered_read_file_names <<'%s'\n%s\n%s\n"
-                      tramp-end-of-heredoc
-                      (mapconcat 'tramp-shell-quote-argument
-                                 tramp-vc-registered-file-names
-                                 "\n")
-                      tramp-end-of-heredoc))
-                    (with-current-buffer (tramp-get-connection-buffer v)
-                      ;; Read the expression.
-                      (goto-char (point-min))
-                      (read (current-buffer)))))
-
-               (tramp-set-file-property
-                v (car elt) (cadr elt) (cadr (cdr elt)))))))
+       ;; There could be new files, created by the vc backend.  We
+       ;; cannot reuse the old cache entries, therefore.  In
+       ;; `tramp-get-file-property', `remote-file-name-inhibit-cache'
+       ;; could also be a timestamp as `current-time' returns.  This
+       ;; means invalidate all cache entries with an older timestamp.
+       (let (tramp-vc-registered-file-names
+             (remote-file-name-inhibit-cache (current-time))
+             (file-name-handler-alist
+              `((,tramp-file-name-regexp . tramp-vc-file-name-handler))))
+
+         ;; Here we collect only file names, which need an operation.
+         (ignore-errors (tramp-run-real-handler 'vc-registered (list file)))
+         (tramp-message v 10 "\n%s" tramp-vc-registered-file-names)
+
+         ;; Send just one command, in order to fill the cache.
+         (when tramp-vc-registered-file-names
+           (tramp-maybe-send-script
+            v
+            (format tramp-vc-registered-read-file-names
+                    (tramp-get-file-exists-command v)
+                    (format "%s -r" (tramp-get-test-command v)))
+            "tramp_vc_registered_read_file_names")
+
+           (dolist
+               (elt
+                (ignore-errors
+                  ;; We cannot use `tramp-send-command-and-read',
+                  ;; because this does not cooperate well with
+                  ;; heredoc documents.
+                  (tramp-send-command
+                   v
+                   (format
+                    "tramp_vc_registered_read_file_names <<'%s'\n%s\n%s\n"
+                    tramp-end-of-heredoc
+                    (mapconcat 'tramp-shell-quote-argument
+                               tramp-vc-registered-file-names
+                               "\n")
+                    tramp-end-of-heredoc))
+                  (with-current-buffer (tramp-get-connection-buffer v)
+                    ;; Read the expression.
+                    (goto-char (point-min))
+                    (read (current-buffer)))))
+
+             (tramp-set-file-property
+              v (car elt) (cadr elt) (cadr (cdr elt))))))
 
        ;; Second run.  Now all `file-exists-p' or `file-readable-p'
        ;; calls shall be answered from the file cache.  We unset
-       ;; `process-file-side-effects' in order to keep the cache when
-       ;; `process-file' calls appear.
-       (let (process-file-side-effects)
+       ;; `process-file-side-effects' and `remote-file-name-inhibit-cache'
+       ;; in order to keep the cache.
+       (let (remote-file-name-inhibit-cache process-file-side-effects)
          (ignore-errors
            (tramp-run-real-handler 'vc-registered (list file))))))))
 
@@ -3604,8 +3606,13 @@
     (let (result)
       ;; Check whether the executable is in $PATH. "which(1)" does not
       ;; report always a correct error code; therefore we check the
-      ;; number of words it returns.
-      (unless ignore-path
+      ;; number of words it returns.  "SunOS 5.10" (and maybe "SunOS
+      ;; 5.11") have problems with this command, we disable the call
+      ;; therefore.
+      (unless (or ignore-path
+                 (string-match
+                  (regexp-opt '("SunOS 5.10" "SunOS 5.11"))
+                  (tramp-get-connection-property vec "uname" "")))
        (tramp-send-command vec (format "which \\%s | wc -w" progname))
        (goto-char (point-min))
        (if (looking-at "^\\s-*1$")
@@ -4677,8 +4684,9 @@
 (defun tramp-send-command-and-check
   (vec command &optional subshell dont-suppress-err)
   "Run COMMAND and check its exit status.
-Sends `echo $?' along with the COMMAND for checking the exit status.  If
-COMMAND is nil, just sends `echo $?'.  Returns the exit status found.
+Sends `echo $?' along with the COMMAND for checking the exit status.
+If COMMAND is nil, just sends `echo $?'.  Returns `t' if the exit
+status is 0, and `nil' otherwise.
 
 If the optional argument SUBSHELL is non-nil, the command is
 executed in a subshell, ie surrounded by parentheses.  If

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2014-03-23 09:22:16 +0000
+++ b/lisp/net/tramp.el 2014-03-25 08:16:49 +0000
@@ -241,7 +241,7 @@
   * `tramp-copy-program'
     This specifies the name of the program to use for remotely copying
     the file; this might be the absolute filename of rcp or the name of
-    a workalike program.
+    a workalike program.  It is always applied on the local host.
   * `tramp-copy-args'
     This specifies the list of parameters to pass to the above mentioned
     program, the hints for `tramp-login-args' also apply here.
@@ -1044,7 +1044,9 @@
 
 (defcustom tramp-connection-timeout 60
   "Defines the max time to wait for establishing a connection (in seconds).
-This can be overwritten for different connection types in `tramp-methods'."
+This can be overwritten for different connection types in `tramp-methods'.
+
+The timeout does not include the time reading a password."
   :group 'tramp
   :version "24.4"
   :type 'integer)


reply via email to

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