aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2011-04-25 19:58:27 +0200
committerMichael Albinus2011-04-25 19:58:27 +0200
commit46155cd37f6c5432348d646c6e99b61b65c7d705 (patch)
treea4c6deebd6c492a878d5804c0c6aca0d9428c4fb
parent320f861c694fd7b25a0f477a83e90b8aaa856151 (diff)
downloademacs-46155cd37f6c5432348d646c6e99b61b65c7d705.tar.gz
emacs-46155cd37f6c5432348d646c6e99b61b65c7d705.zip
* net/tramp.el (tramp-process-actions): Add POS argument. Delete
region between POS and (pos). (tramp-do-copy-or-rename-file-out-of-band): Use `nil' position in `tramp-process-actions' call. (tramp-maybe-open-connection): Call `tramp-process-actions' with pos. * net/tramp-smb.el (tramp-smb-maybe-open-connection): Use `nil' position in `tramp-process-actions' call.
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/net/tramp-smb.el6
-rw-r--r--lisp/net/tramp.el20
3 files changed, 28 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 898b281ed2e..69e88468eb8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
12011-04-25 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-process-actions): Add POS argument. Delete
4 region between POS and (pos).
5 (tramp-do-copy-or-rename-file-out-of-band): Use `nil' position in
6 `tramp-process-actions' call.
7 (tramp-maybe-open-connection): Call `tramp-process-actions' with pos.
8
9 * net/tramp-smb.el (tramp-smb-maybe-open-connection): Use `nil'
10 position in `tramp-process-actions' call.
11
12011-04-24 Daniel Colascione <dan.colascione@gmail.com> 122011-04-24 Daniel Colascione <dan.colascione@gmail.com>
2 13
3 * progmodes/cc-engine.el (c-forward-decl-or-cast-1): Use 14 * progmodes/cc-engine.el (c-forward-decl-or-cast-1): Use
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 5e62bc45da3..3cd6fd0c96f 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1,7 +1,7 @@
1;;; tramp-smb.el --- Tramp access functions for SMB servers 1;;; tramp-smb.el --- Tramp access functions for SMB servers
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4;; 2009, 2010, 2011 Free Software Foundation, Inc. 4;; 2011 Free Software Foundation, Inc.
5 5
6;; Author: Michael Albinus <michael.albinus@gmx.de> 6;; Author: Michael Albinus <michael.albinus@gmx.de>
7;; Keywords: comm, processes 7;; Keywords: comm, processes
@@ -1328,7 +1328,7 @@ connection if a previous connection has died for some reason."
1328 1328
1329 ;; Play login scenario. 1329 ;; Play login scenario.
1330 (tramp-process-actions 1330 (tramp-process-actions
1331 p vec 1331 p vec nil
1332 (if share 1332 (if share
1333 tramp-smb-actions-with-share 1333 tramp-smb-actions-with-share
1334 tramp-smb-actions-without-share)) 1334 tramp-smb-actions-without-share))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index c80420eb17c..e3ec1a1c429 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4098,7 +4098,8 @@ The method used must be an out-of-band method."
4098 (tramp-message 4098 (tramp-message
4099 v 6 "%s" (mapconcat 'identity (process-command p) " ")) 4099 v 6 "%s" (mapconcat 'identity (process-command p) " "))
4100 (tramp-set-process-query-on-exit-flag p nil) 4100 (tramp-set-process-query-on-exit-flag p nil)
4101 (tramp-process-actions p v tramp-actions-copy-out-of-band)))) 4101 (tramp-process-actions
4102 p v nil tramp-actions-copy-out-of-band))))
4102 4103
4103 ;; Reset the transfer process properties. 4104 ;; Reset the transfer process properties.
4104 (tramp-set-connection-property v "process-name" nil) 4105 (tramp-set-connection-property v "process-name" nil)
@@ -6821,8 +6822,11 @@ The terminal type can be configured with `tramp-terminal-type'."
6821 (setq found (funcall action proc vec))))) 6822 (setq found (funcall action proc vec)))))
6822 found)) 6823 found))
6823 6824
6824(defun tramp-process-actions (proc vec actions &optional timeout) 6825(defun tramp-process-actions (proc vec pos actions &optional timeout)
6825 "Perform actions until success or TIMEOUT." 6826 "Perform ACTIONS until success or TIMEOUT.
6827PROC and VEC indicate the remote connection to be used. POS, if
6828set, is the starting point of the region to be deleted in the
6829connection buffer."
6826 ;; Preserve message for `progress-reporter'. 6830 ;; Preserve message for `progress-reporter'.
6827 (with-temp-message "" 6831 (with-temp-message ""
6828 ;; Enable auth-source and password-cache. 6832 ;; Enable auth-source and password-cache.
@@ -6847,7 +6851,10 @@ The terminal type can be configured with `tramp-terminal-type'."
6847 (cond 6851 (cond
6848 ((eq exit 'permission-denied) "Permission denied") 6852 ((eq exit 'permission-denied) "Permission denied")
6849 ((eq exit 'process-died) "Process died") 6853 ((eq exit 'process-died) "Process died")
6850 (t "Login failed")))))))) 6854 (t "Login failed"))))
6855 (when (numberp pos)
6856 (with-current-buffer (tramp-get-connection-buffer vec)
6857 (let (buffer-read-only) (delete-region pos (point)))))))))
6851 6858
6852;; Utility functions. 6859;; Utility functions.
6853 6860
@@ -7523,7 +7530,8 @@ connection if a previous connection has died for some reason."
7523 (catch 'uname-changed 7530 (catch 'uname-changed
7524 (let ((p (tramp-get-connection-process vec)) 7531 (let ((p (tramp-get-connection-process vec))
7525 (process-name (tramp-get-connection-property vec "process-name" nil)) 7532 (process-name (tramp-get-connection-property vec "process-name" nil))
7526 (process-environment (copy-sequence process-environment))) 7533 (process-environment (copy-sequence process-environment))
7534 (pos (with-current-buffer (tramp-get-connection-buffer vec) (point))))
7527 7535
7528 ;; If too much time has passed since last command was sent, look 7536 ;; If too much time has passed since last command was sent, look
7529 ;; whether process is still alive. If it isn't, kill it. When 7537 ;; whether process is still alive. If it isn't, kill it. When
@@ -7677,7 +7685,7 @@ connection if a previous connection has died for some reason."
7677 ;; Send the command. 7685 ;; Send the command.
7678 (tramp-message vec 3 "Sending command `%s'" command) 7686 (tramp-message vec 3 "Sending command `%s'" command)
7679 (tramp-send-command vec command t t) 7687 (tramp-send-command vec command t t)
7680 (tramp-process-actions p vec tramp-actions-before-shell 60) 7688 (tramp-process-actions p vec pos tramp-actions-before-shell 60)
7681 (tramp-message 7689 (tramp-message
7682 vec 3 "Found remote shell prompt on `%s'" l-host)) 7690 vec 3 "Found remote shell prompt on `%s'" l-host))
7683 ;; Next hop. 7691 ;; Next hop.