aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2015-06-01 21:11:24 +0200
committerMichael Albinus2015-06-01 21:11:24 +0200
commite3a0f3daf12e208e88d712b09ef82096849b9431 (patch)
treeb83b181a0d046549d29583f23846c50e66e9ae4f
parent40b33be830310726048dddaee3fdfba5c8a3480f (diff)
downloademacs-e3a0f3daf12e208e88d712b09ef82096849b9431.tar.gz
emacs-e3a0f3daf12e208e88d712b09ef82096849b9431.zip
Sync with Tramp repository
* lisp/net/tramp.el (tramp-message): Dump connection buffer error messages. (tramp-handle-make-auto-save-file-name): When calling `make-auto-save-file-name' internally, make sure it uses Unix-like behavior, not Windows-like behavior. * lisp/net/tramp-sh.el (tramp-set-file-uid-gid): Add a timeout for the local case, because "chown" might fail on w32. * lisp/net/trampver.el (tramp-repository-get-version): Don't run for XEmacs.
-rw-r--r--lisp/net/tramp-sh.el14
-rw-r--r--lisp/net/tramp.el13
-rw-r--r--lisp/net/trampver.el20
3 files changed, 30 insertions, 17 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 5864acd8559..fda5945a18a 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1459,12 +1459,14 @@ be non-negative integers."
1459 (tramp-shell-quote-argument localname)))))) 1459 (tramp-shell-quote-argument localname))))))
1460 1460
1461 ;; We handle also the local part, because there doesn't exist 1461 ;; We handle also the local part, because there doesn't exist
1462 ;; `set-file-uid-gid'. On W32 "chown" might not work. 1462 ;; `set-file-uid-gid'. On W32 "chown" might not work. We add a
1463 (let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer))) 1463 ;; timeout for this.
1464 (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer)))) 1464 (with-timeout (5 nil)
1465 (tramp-call-process 1465 (let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer)))
1466 nil "chown" nil nil nil 1466 (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer))))
1467 (format "%d:%d" uid gid) (tramp-shell-quote-argument filename)))))) 1467 (tramp-call-process
1468 nil "chown" nil nil nil
1469 (format "%d:%d" uid gid) (tramp-shell-quote-argument filename)))))))
1468 1470
1469(defun tramp-remote-selinux-p (vec) 1471(defun tramp-remote-selinux-p (vec)
1470 "Check, whether SELINUX is enabled on the remote host." 1472 "Check, whether SELINUX is enabled on the remote host."
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 40bba145454..fc23a0bfeb5 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1530,6 +1530,12 @@ applicable)."
1530 (let ((tramp-verbose 0)) 1530 (let ((tramp-verbose 0))
1531 (setq vec-or-proc 1531 (setq vec-or-proc
1532 (tramp-get-connection-property vec-or-proc "vector" nil)))) 1532 (tramp-get-connection-property vec-or-proc "vector" nil))))
1533 ;; Append connection buffer for error messages.
1534 (when (= level 1)
1535 (let ((tramp-verbose 0))
1536 (with-current-buffer (tramp-get-connection-buffer vec-or-proc)
1537 (setq fmt-string (concat fmt-string "\n%s")
1538 arguments (append arguments (list (buffer-string)))))))
1533 ;; Do it. 1539 ;; Do it.
1534 (when (vectorp vec-or-proc) 1540 (when (vectorp vec-or-proc)
1535 (apply 'tramp-debug-message 1541 (apply 'tramp-debug-message
@@ -4020,8 +4026,11 @@ this file, if that variable is non-nil."
4020 (file-exists-p tramp-auto-save-directory)) 4026 (file-exists-p tramp-auto-save-directory))
4021 (make-directory tramp-auto-save-directory t)) 4027 (make-directory tramp-auto-save-directory t))
4022 4028
4023 (let ((auto-save-file-name-transforms 4029 (let ((system-type 'not-windows)
4024 (if (null tramp-auto-save-directory) auto-save-file-name-transforms)) 4030 (auto-save-file-name-transforms
4031 (if (and (null tramp-auto-save-directory)
4032 (boundp 'auto-save-file-name-transforms))
4033 (symbol-value 'auto-save-file-name-transforms)))
4025 (buffer-file-name 4034 (buffer-file-name
4026 (if (null tramp-auto-save-directory) 4035 (if (null tramp-auto-save-directory)
4027 buffer-file-name 4036 buffer-file-name
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index c5e57053513..eb22b6080be 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -40,15 +40,17 @@
40 40
41(defun tramp-repository-get-version () 41(defun tramp-repository-get-version ()
42 "Try to return as a string the repository revision of the Tramp sources." 42 "Try to return as a string the repository revision of the Tramp sources."
43 (let ((dir (funcall 'locate-dominating-file (locate-library "tramp") ".git"))) 43 (unless (featurep 'xemacs)
44 (when dir 44 (let ((dir
45 (with-temp-buffer 45 (funcall 'locate-dominating-file (locate-library "tramp") ".git")))
46 (let ((default-directory (file-name-as-directory dir))) 46 (when dir
47 (and (zerop 47 (with-temp-buffer
48 (ignore-errors 48 (let ((default-directory (file-name-as-directory dir)))
49 (call-process "git" nil '(t nil) nil "rev-parse" "HEAD"))) 49 (and (zerop
50 (not (zerop (buffer-size))) 50 (ignore-errors
51 (replace-regexp-in-string "\n" "" (buffer-string)))))))) 51 (call-process "git" nil '(t nil) nil "rev-parse" "HEAD")))
52 (not (zerop (buffer-size)))
53 (replace-regexp-in-string "\n" "" (buffer-string)))))))))
52 54
53;; Check for (X)Emacs version. 55;; Check for (X)Emacs version.
54(let ((x (if (or (>= emacs-major-version 22) 56(let ((x (if (or (>= emacs-major-version 22)