[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy f0eb826 030/173: Fixed a bug in protocol def
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ssh-deploy f0eb826 030/173: Fixed a bug in protocol definition and started with support for multiple protocols. |
Date: |
Sat, 20 Oct 2018 10:36:25 -0400 (EDT) |
branch: externals/ssh-deploy
commit f0eb8269167c1db75d4a7a93c8b87572e1f5ae16
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Fixed a bug in protocol definition and started with support for multiple
protocols.
---
ssh-deploy.el | 53 ++++++++++++++++++++++++++++++-----------------------
1 file changed, 30 insertions(+), 23 deletions(-)
diff --git a/ssh-deploy.el b/ssh-deploy.el
index 95884dc..eb8cd27 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -79,7 +79,7 @@
:type 'boolean
:group 'ssh-deploy)
-(defcustom ssh-deploy-protocol 'ssh'
+(defcustom ssh-deploy-protocol "ssh"
"String variable defining current protocol, 'ssh' by default."
:type 'string
:group 'ssh-deploy)
@@ -97,14 +97,17 @@
(fboundp 'tramp-term--initialize)
(fboundp 'tramp-term--do-ssh-login))
(progn
- (let ((hostname (replace-regexp-in-string ":.*$" "" remote-host)))
- (let ((host (split-string hostname "@")))
- (message "Opening tramp-terminal for remote host 'address@hidden'
or '%s' translated from '%s'.." (car host) (car (last host)) hostname
remote-host)
- (unless (eql (catch 'tramp-term--abort (tramp-term--do-ssh-login
host)) 'tramp-term--abort)
- (tramp-term--initialize hostname)
- (run-hook-with-args 'tramp-term-after-initialized-hook hostname)
- (message "tramp-term initialized")))))
- (message "tramp-term is not installed.")))
+ (if (string= ssh-deploy-protocol "ssh")
+ (progn
+ (let ((hostname (replace-regexp-in-string ":.*$" "" remote-host)))
+ (let ((host (split-string hostname "@")))
+ (message "Opening tramp-terminal for remote host
'address@hidden' or '%s' translated from '%s'.." (car host) (car (last host))
hostname remote-host)
+ (unless (eql (catch 'tramp-term--abort
(tramp-term--do-ssh-login host)) 'tramp-term--abort)
+ (tramp-term--initialize hostname)
+ (run-hook-with-args 'tramp-term-after-initialized-hook
hostname)
+ (message "tramp-term initialized")))))
+ (message "Terminal is only available for ssh protocol.")))
+ (message "tramp-term is not installed.")))
(defun ssh-deploy-file-is-in-path (file path)
"Return true if FILE is in the path PATH."
@@ -166,13 +169,15 @@
(ssh-deploy-run-shell-command command)))
(progn
(message "Uploading directory '%s' to '%s'.." path
remote-path)
- (if (string= path local-root)
- (progn
- (let ((command (concat "scp -r " (concat
(shell-quote-argument path) "*") " " (shell-quote-argument (concat
remote-path)))))
- (ssh-deploy-run-shell-command command)))
- (progn
- (let ((command (concat "scp -r "
(shell-quote-argument path) " " (shell-quote-argument (file-name-directory
(directory-file-name remote-path))))))
- (ssh-deploy-run-shell-command command)))))))
+ (if (string= ssh-deploy-protocol "ssh")
+ (if (string= path local-root)
+ (progn
+ (let ((command (concat "scp -r " (concat
(shell-quote-argument path) "*") " " (shell-quote-argument (concat
remote-path)))))
+ (ssh-deploy-run-shell-command command)))
+ (progn
+ (let ((command (concat "scp -r "
(shell-quote-argument path) " " (shell-quote-argument (file-name-directory
(directory-file-name remote-path))))))
+ (ssh-deploy-run-shell-command command))))
+ (message "Only ssh protocol is supported for directory
operations")))))
(progn
(message "Downloading path '%s' to '%s'.." remote-path path)
(if file-or-directory
@@ -182,13 +187,15 @@
(ssh-deploy-run-shell-command command)))
(progn
(message "Downloading directory '%s' to '%s'.." remote-path
path)
- (if (string= path local-root)
- (progn
- (let ((command (concat "scp -r " (concat
(shell-quote-argument remote-path) "*") " " (shell-quote-argument path))))
- (ssh-deploy-run-shell-command command)))
- (progn
- (let ((command (concat "scp -r "
(shell-quote-argument remote-path) " " (shell-quote-argument
(file-name-directory (directory-file-name path))))))
- (ssh-deploy-run-shell-command command)))))))))
+ (if (string= ssh-deploy-protocol "ssh")
+ (if (string= path local-root)
+ (progn
+ (let ((command (concat "scp -r " (concat
(shell-quote-argument remote-path) "*") " " (shell-quote-argument path))))
+ (ssh-deploy-run-shell-command command)))
+ (progn
+ (let ((command (concat "scp -r "
(shell-quote-argument remote-path) " " (shell-quote-argument
(file-name-directory (directory-file-name path))))))
+ (ssh-deploy-run-shell-command command))))
+ (message "Only ssh protocol is supported for directory
operations")))))))
(if ssh-deploy-debug
(message "Path '%s' is not in the root '%s'" path local-root))))))
- [elpa] externals/ssh-deploy f36ffce 059/173: Added MELPA Stable link, (continued)
- [elpa] externals/ssh-deploy f36ffce 059/173: Added MELPA Stable link, Stefan Monnier, 2018/10/20
- [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 <=
- [elpa] externals/ssh-deploy 4e70a41 041/173: Now uses TRAMP via async.el for SSH transfers, Stefan Monnier, 2018/10/20
- [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