[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v
From: |
Lars Hansen |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v |
Date: |
Fri, 24 Nov 2006 19:14:29 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Lars Hansen <lh> 06/11/24 19:14:29
Index: tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -b -r1.106 -r1.107
--- tramp.el 18 Nov 2006 17:42:32 -0000 1.106
+++ tramp.el 24 Nov 2006 19:14:29 -0000 1.107
@@ -673,8 +673,8 @@
(defcustom tramp-default-method
(if (and (fboundp 'executable-find)
- (executable-find "plink"))
- "plink"
+ (executable-find "pscp"))
+ "pscp"
"scp")
"*Default method to use for transferring files.
See `tramp-methods' for possibilities.
@@ -943,6 +943,17 @@
:group 'tramp
:type 'regexp)
+(defcustom tramp-copy-failed-regexp
+ (concat "\\(.+: "
+ (regexp-opt '("Permission denied"
+ "not a regular file"
+ "is a directory"
+ "No such file or directory") t)
+ "\\)\\s-*")
+ "Regular expression matching copy problems in (s)cp operations."
+ :group 'tramp
+ :type 'regexp)
+
(defcustom tramp-process-alive-regexp
""
"Regular expression indicating a process has finished.
@@ -1340,6 +1351,7 @@
(defcustom tramp-actions-copy-out-of-band
'((tramp-password-prompt-regexp tramp-action-password)
(tramp-wrong-passwd-regexp tramp-action-permission-denied)
+ (tramp-copy-failed-regexp tramp-action-copy-failed)
(tramp-process-alive-regexp tramp-action-out-of-band))
"List of pattern/action pairs.
This list is used for copying/renaming with out-of-band methods.
@@ -3174,12 +3186,13 @@
(message "Transferring %s to %s..." filename newname)
;; Use rcp-like program for file transfer.
+ (unwind-protect
(let ((p (apply 'start-process (buffer-name trampbuf) trampbuf
copy-program copy-args)))
(tramp-set-process-query-on-exit-flag p nil)
(tramp-process-actions p multi-method method user host
tramp-actions-copy-out-of-band))
- (kill-buffer trampbuf)
+ (kill-buffer trampbuf))
(message "Transferring %s to %s...done" filename newname)
;; Set the mode.
@@ -5353,6 +5366,11 @@
(kill-process p)
(throw 'tramp-action 'permission-denied))
+(defun tramp-action-copy-failed (p multi-method method user host)
+ "Signal copy failed."
+ (kill-process p)
+ (error "%s" (match-string 1)))
+
(defun tramp-action-yesno (p multi-method method user host)
"Ask the user for confirmation using `yes-or-no-p'.
Send \"yes\" to remote process on confirmation, abort otherwise.
@@ -5409,9 +5427,6 @@
(tramp-message 10 "'set mode' error ignored.")
(tramp-message 9 "Process has finished.")
(throw 'tramp-action 'ok))
- (goto-char (point-min))
- (when (re-search-forward "^.cp.?: \\(.+: Permission denied.?\\)$"
nil t)
- (error "Remote host: %s" (match-string 1)))
(tramp-message 9 "Process has died.")
(throw 'tramp-action 'process-died)))
(t nil)))