emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ssh-deploy ab4b80e 096/173: Detection for remote change


From: Stefan Monnier
Subject: [elpa] externals/ssh-deploy ab4b80e 096/173: Detection for remote changes doesn't apply to directories
Date: Sat, 20 Oct 2018 10:36:37 -0400 (EDT)

branch: externals/ssh-deploy
commit ab4b80e206163b09a021f7de157e8bd4ae66358b
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>

    Detection for remote changes doesn't apply to directories
---
 README.md     | 41 +++++++++++++++++++++++++++--------------
 ssh-deploy.el | 17 ++++++++---------
 2 files changed, 35 insertions(+), 23 deletions(-)

diff --git a/README.md b/README.md
index e6ee554..e8596fc 100644
--- a/README.md
+++ b/README.md
@@ -114,20 +114,33 @@ Set your user and group as owner and file permissions to 
`600`. Emacs should now
 ;; ssh-deploy - prefix = C-c C-z, f = forced upload, u = upload, d = download, 
x = diff, t = terminal, b = browse
 (add-to-list 'load-path "~/.emacs.d/ssh-deploy/")
 (use-package ssh-deploy
-    :config
-    (add-hook 'after-save-hook (lambda() (if ssh-deploy-on-explicit-save 
(ssh-deploy-upload-handler)) ))
-    (add-hook 'find-file-hook (lambda() (if 
ssh-deploy-automatically-detect-remote-changes 
(ssh-deploy-remote-changes-handler)) ))
-    (global-set-key (kbd "C-c C-z f") (lambda() 
(interactive)(ssh-deploy-upload-handler-forced) ))
-    (global-set-key (kbd "C-c C-z u") (lambda() 
(interactive)(ssh-deploy-upload-handler) ))
-    (global-set-key (kbd "C-c C-z D") (lambda() 
(interactive)(ssh-deploy-delete-handler) ))
-    (global-set-key (kbd "C-c C-z d") (lambda() 
(interactive)(ssh-deploy-download-handler) ))
-    (global-set-key (kbd "C-c C-z x") (lambda() 
(interactive)(ssh-deploy-diff-handler) ))
-    (global-set-key (kbd "C-c C-z t") (lambda() 
(interactive)(ssh-deploy-remote-terminal-eshell-base-handler) ))
-    (global-set-key (kbd "C-c C-z T") (lambda() 
(interactive)(ssh-deploy-remote-terminal-eshell-handler) ))
-    (global-set-key (kbd "C-c C-z R") (lambda() 
(interactive)(ssh-deploy-rename-handler) ))
-    (global-set-key (kbd "C-c C-z e") (lambda() 
(interactive)(ssh-deploy-remote-changes-handler) ))
-    (global-set-key (kbd "C-c C-z b") (lambda() 
(interactive)(ssh-deploy-browse-remote-base-handler) ))
-    (global-set-key (kbd "C-c C-z B") (lambda() 
(interactive)(ssh-deploy-browse-remote-handler) )))
+        :demand
+        :bind (("C-c C-z" . hydra-ssh-deploy/body))
+        :hook ((after-save . (lambda() (if ssh-deploy-on-explicit-save 
(ssh-deploy-upload-handler)) ))
+               (find-file . (lambda() (if 
ssh-deploy-automatically-detect-remote-changes 
(ssh-deploy-remote-changes-handler)) )))
+        :config
+        (defhydra hydra-ssh-deploy (:color red :hint nil)
+          "
+    _u_: Upload                              _f_: Force Upload
+    _d_: Download
+    _D_: Delete
+    _x_: Difference
+    _t_: Eshell Base Terminal                _T_: Eshell Relative Terminal
+    _e_: Detect Remote Changes
+    _R_: Rename
+    _b_: Browse Base                         _B_: Browse Relative
+    "
+          ("f" ssh-deploy-upload-handler-forced)
+          ("u" ssh-deploy-upload-handler)
+          ("d" ssh-deploy-download-handler)
+          ("D" ssh-deploy-delete-handler)
+          ("x" ssh-deploy-diff-handler)
+          ("t" ssh-deploy-remote-terminal-eshell-base-handler)
+          ("T" ssh-deploy-remote-terminal-eshell-handler)
+          ("e" ssh-deploy-remote-changes-handler)
+          ("R" ssh-deploy-rename-handler)
+          ("b" ssh-deploy-browse-remote-base-handler)
+          ("B" ssh-deploy-browse-remote-handler)))
 ```
 
 * Or use the hydra-script I'm using:
diff --git a/ssh-deploy.el b/ssh-deploy.el
index bed1cd8..ca2012f 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -3,8 +3,8 @@
 ;; Author: Christian Johansson <github.com/cjohansson>
 ;; Maintainer: Christian Johansson <github.com/cjohansson>
 ;; Created: 5 Jul 2016
-;; Modified: 22 Nov 2017
-;; Version: 1.71
+;; Modified: 11 Dec 2017
+;; Version: 1.72
 ;; Keywords: tools, convenience
 ;; URL: https://github.com/cjohansson/emacs-ssh-deploy
 
@@ -36,7 +36,7 @@
 ;;
 ;; By setting the variables (globally, per directory or per file):
 ;; ssh-deploy-root-local,ssh-deploy-root-remote, ssh-deploy-on-explicit-save
-;; you can setup a directory for SSH or FTP deployment.
+;; you can setup a directory for TRAMP deployment.
 ;;
 ;; For asynchronous transfers you need to setup ~/.netrc or key-based 
authorization or equivalent for automatic authentication.
 ;;
@@ -64,21 +64,21 @@
 ;;     (global-set-key (kbd "C-c C-z b") (lambda() 
(interactive)(ssh-deploy-browse-remote-base-handler) ))
 ;;     (global-set-key (kbd "C-c C-z B") (lambda() 
(interactive)(ssh-deploy-browse-remote-handler) ))
 ;;
-;; Here is an example for SSH deployment, 
/Users/Chris/Web/Site1/.dir.locals.el:
+;; Here is an example for SSH/SFTP deployment, 
/Users/Chris/Web/Site1/.dir-locals.el:
 ;; ((nil . (
 ;;   (ssh-deploy-root-local . "/Users/Chris/Web/Site1/")
 ;;   (ssh-deploy-root-remote . "/ssh:address@hidden:/var/www/site1/")
 ;;   (ssh-deploy-on-explicity-save . t)
 ;; )))
 ;;
-;; Here is an example for FTP deployment, 
/Users/Chris/Web/Site2/.dir.locals.el:
+;; Here is an example for FTP deployment, 
/Users/Chris/Web/Site2/.dir-locals.el:
 ;; ((nil . (
 ;;   (ssh-deploy-root-local . "/Users/Chris/Web/Site2/")
 ;;   (ssh-deploy-root-remote . "/ftp:address@hidden:/var/www/site2/")
 ;;   (ssh-deploy-on-explicit-save . nil)
 ;; )))
 ;;
-;; Now when you are in a directory which is deployed via SSH or FTP you can 
access these features.
+;; Now when you are in a directory which is configured for deployment.
 ;;
 ;; Here is a list of other variables you can set globally or per directory:
 
@@ -96,7 +96,7 @@
 ;;; Code:
 
 (defgroup ssh-deploy nil
-  "Upload, download, difference, browse and terminal handler for files and 
directories on remote hosts via SSH and FTP."
+  "Upload, download, difference, browse and terminal handler for files and 
directories on remote hosts via TRAMP."
   :group 'tools
   :group 'convenience)
 
@@ -550,8 +550,7 @@
                               (message "Remote file '%s' has not changed, 
created base revision." path-remote))
                           (display-warning "ssh-deploy" (format "Remote file 
'%s' has changed, please download or diff." path-remote) :warning))
                         (display-warning "ssh-deploy" "Function 
'ediff-same-file-contents' is missing." :warning)))
-                  (message "Remote file '%s' doesn't exist." path-remote)))
-            (message "Directory differences not implemented yet"))))))
+                  (message "Remote file '%s' doesn't exist." 
path-remote))))))))
 
 ;;;### autoload
 (defun ssh-deploy-delete (path-local &optional root-local root-remote async 
debug exclude-list)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]