[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy 4e70a41 041/173: Now uses TRAMP via async.el
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ssh-deploy 4e70a41 041/173: Now uses TRAMP via async.el for SSH transfers |
Date: |
Sat, 20 Oct 2018 10:36:27 -0400 (EDT) |
branch: externals/ssh-deploy
commit 4e70a4115fd57fae10525e3fd1218a765a6d64d9
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Now uses TRAMP via async.el for SSH transfers
---
ssh-deploy.el | 32 ++++++++++++++++++++++++++++----
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/ssh-deploy.el b/ssh-deploy.el
index 2e48cfe..e5abc49 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -3,7 +3,7 @@
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
;; Created: 5 Jul 2016
-;; Modified: 14 Nov 2016
+;; Modified: 16 Nov 2016
;; Version: 1.40
;; Keywords: tools, convenience
;; URL: https://github.com/cjohansson/emacs-ssh-deploy
@@ -186,10 +186,21 @@
(if (= (process-exit-status proc) 0)
(message "Successfully ran shell
command.")
(message "Failed to run shell
command.")))))))
-
(defun ssh-deploy--download (remote local local-root)
"Download REMOTE to LOCAL with the LOCAL-ROOT via ssh or ftp."
- (ssh-deploy--download-via-tramp remote local local-root))
+ (if (or (string= (alist-get 'protocol remote) "ssh") (string= (alist-get
'protocol remote) "ftp"))
+ (progn
+ (let ((path (concat (alist-get 'server remote) ":" (alist-get 'path
remote))))
+ (message "Downloading path '%s' to '%s'.." path local)
+ (let ((file-or-directory (file-regular-p local)))
+ (if file-or-directory
+ (if (string= (alist-get 'protocol remote) "ssh")
+ (ssh-deploy--download-via-tramp remote local local-root)
+ (ssh-deploy--download-file-via-ftp remote local))
+ (if (string= (alist-get 'protocol remote) "ssh")
+ (ssh-deploy--download-via-tramp remote local local-root)
+ (ssh-deploy--download-directory-via-ftp remote local
local-root))))))
+ (message "Unsupported protocol. Only SSH and FTP are supported at the
moment.")))
;; TODO When process asks for password we should supply it to the process
automatically
(defun ssh-deploy--upload-via-tramp (local remote local-root)
@@ -243,7 +254,20 @@
(defun ssh-deploy--upload (local remote local-root)
"Upload LOCAL to REMOTE and LOCAL-ROOT via ssh or ftp."
- (ssh-deploy--upload-via-tramp local remote local-root))
+ (if (or (string= (alist-get 'protocol remote) "ssh") (string= (alist-get
'protocol remote) "ftp"))
+ (progn
+ (let ((path (concat (alist-get 'server remote) ":" (alist-get 'path
remote))))
+ (message "Uploading path '%s' to '%s'.." local path)
+ (let ((file-or-directory (file-regular-p local)))
+ (if file-or-directory
+ (if (string= (alist-get 'protocol remote) "ssh")
+ (ssh-deploy--upload-via-tramp local remote local-root)
+ (ssh-deploy--upload-file-via-ftp local remote))
+ (if (string= (alist-get 'protocol remote) "ssh")
+ (ssh-deploy--upload-via-tramp local remote local-root)
+ (ssh-deploy--upload-directory-via-ftp local remote
local-root))))))
+ (message "Unsupported protocol. Only SSH and FTP are supported at the
moment.")))
+
(defun ssh-deploy--upload-file-via-ssh (local remote)
"Upload file LOCAL to REMOTE via ssh."
- [elpa] externals/ssh-deploy 29cf0b2 061/173: Added force handler in documentation, (continued)
- [elpa] externals/ssh-deploy 29cf0b2 061/173: Added force handler in documentation, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 3ea14de 062/173: Improved README for forced uploads, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy a1ea2c2 025/173: Improved description of complex connections, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 828aca3 022/173: Local path and local root is now evaluated based on their truenames., Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy d40d817 027/173: Now displaying asynchrous process output., Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy be5451c 019/173: Updated to comments and README, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 78d0641 031/173: Updated version and modification date., Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy e94c9e7 035/173: Updated title of README.md, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 959aa79 036/173: Fixed a log message., Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy f0eb826 030/173: Fixed a bug in protocol definition and started with support for multiple protocols., Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 4e70a41 041/173: Now uses TRAMP via async.el for SSH transfers,
Stefan Monnier <=
- [elpa] externals/ssh-deploy 8253251 044/173: Improved README a bit, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 94fc9e6 051/173: Updated readme, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 56da852 066/173: Fixed bug where plug-in reported external changes even though remote, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy a627c90 057/173: Updated readme, spelling and grammar fixes, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 0e32ab3 056/173: Added support for detection of external changes in FTP and improved async signals, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 109dbb1 034/173: FTP support and refactoring completed, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 14e7700 043/173: Now uses asynchrous tranfers progressively, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 97d803d 004/173: Updated comments and changed license in preparation for MELPA submission., Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy de8eadd 067/173: Remote path is not shell escaped on upload and download because it, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 6d1c10c 069/173: Improved documentation, Stefan Monnier, 2018/10/20