[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy 0e32ab3 056/173: Added support for detection
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ssh-deploy 0e32ab3 056/173: Added support for detection of external changes in FTP and improved async signals |
Date: |
Sat, 20 Oct 2018 10:36:30 -0400 (EDT) |
branch: externals/ssh-deploy
commit 0e32ab36c6da602894d4c15c25e736fd03a9600e
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added support for detection of external changes in FTP and improved async
signals
---
ssh-deploy.el | 116 +++++++++++++++++++++++++++++-----------------------------
1 file changed, 57 insertions(+), 59 deletions(-)
diff --git a/ssh-deploy.el b/ssh-deploy.el
index 5f050e2..e334e95 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: 15 Dec 2016
-;; Version: 1.47
+;; Modified: 20 Dec 2016
+;; Version: 1.48
;; Keywords: tools, convenience
;; URL: https://github.com/cjohansson/emacs-ssh-deploy
@@ -176,20 +176,20 @@
(async-start
`(lambda()
(require 'ediff)
- (if (fboundp 'ediff-same-contents)
+ (if (fboundp 'ediff-same-file-contents)
(progn
- (if (or (not (file-exists-p ,remote-path)) (and
(file-exists-p ,revision-path) (ediff-same-contents ,revision-path
,remote-path)))
+ (if (or (not (file-exists-p ,remote-path)) (and
(file-exists-p ,revision-path) (ediff-same-file-contents ,revision-path
,remote-path)))
(progn
(message "Uploading file '%s' to '%s' via
tramp asynchronously.." ,local ,remote-path)
(copy-file ,local ,remote-path t t t t)
(copy-file ,local ,revision-path t t t t)
- 0)
- 1))
- 2))
- (lambda(return-message)
- (if (= return-message 0) (message "Upload completed.")
- (if (= return-message 1) (display-warning "ssh-deploy"
"External file has changed, please download or diff." :warning)
- (if (= return-message 2) (display-warning
"ssh-deploy" "Function ediff-same-contents is missing" :warning))))))))
+ (list 0 (format "Upload '%s' completed."
,remote-path)))
+ (list 1 (format "External file '%s' has changed,
please download or diff." ,remote-path))))
+ (list 1 "Function ediff-same-file-contents is
missing.")))
+ (lambda(return)
+ (if (= (nth 0 return) 0)
+ (message (nth 1 return))
+ (display-warning "ssh-deploy" (nth 1 return)
:warning))))))
(progn
(message "Uploading directory '%s' to '%s' via tramp
asynchronously.." local remote-path)
(if (string= remote-path (alist-get 'string remote))
@@ -199,14 +199,14 @@
(copy-directory ,local ,remote-path t t t)
,local)
(lambda(return-path)
- (message "Upload '%s' finished" return-path))))
+ (message "Upload '%s' finished." return-path))))
(progn
(async-start
`(lambda()
(copy-directory ,local ,(file-name-directory
(directory-file-name remote-path)) t t)
,local)
(lambda(return-path)
- (message "Upload '%s' finished" return-path)))))))))
+ (message "Upload '%s' finished." return-path)))))))))
(message "async.el is not installed")))
(defun ssh-deploy--upload-via-tramp (local remote local-root)
@@ -246,7 +246,7 @@
(copy-file ,remote-path ,local t t t t)
,local)
(lambda(return-path)
- (message "Download '%s' finished" return-path)
+ (message "Download '%s' finished." return-path)
(ssh-deploy-store-revision return-path))))
(progn
(message "Downloading directory '%s' to '%s' via tramp
asynchronously.." remote-path local)
@@ -257,14 +257,14 @@
(copy-directory ,remote-path ,local t t t)
,local)
(lambda(return-path)
- (message "Download '%s' finished" return-path))))
+ (message "Download '%s' finished." return-path))))
(progn
(async-start
`(lambda()
(copy-directory ,remote-path ,(file-name-directory
(directory-file-name remote-path)) t t)
,local)
(lambda(return-path)
- (message "Download '%s' finished" return-path)))))))))
+ (message "Download '%s' finished." return-path)))))))))
(message "async.el is not installed")))
(defun ssh-deploy--download-via-tramp (remote local local-root)
@@ -275,17 +275,17 @@
(progn
(message "Downloading file '%s' to '%s' via tramp synchronously.."
remote-path local)
(copy-file remote-path local t t t t)
- (message "Download '%s' finished" local)
+ (message "Download '%s' finished." local)
(ssh-deploy-store-revision local))
(progn
(message "Downloading directory '%s' to '%s' via tramp
synchronously.." remote-path local)
(if (string= remote-path (alist-get 'string remote))
(progn
(copy-directory remote-path local t t t)
- (message "Download '%s' finished" local))
+ (message "Download '%s' finished." local))
(progn
(copy-directory remote-path (file-name-directory
(directory-file-name remote-path)) t t)
- (message "Download '%s' finished" local))
+ (message "Download '%s' finished." local))
)))))
(defun ssh-deploy--upload (local remote local-root async)
@@ -302,13 +302,13 @@
(if (file-exists-p revision-path)
(progn
(require 'ediff)
- (if (fboundp 'ediff-same-contents)
+ (if (fboundp 'ediff-same-file-contents)
(progn
- (if (not (ediff-same-contents revision-path remote))
+ (if (not (ediff-same-file-contents revision-path remote))
t
nil))
(progn
- (message "Function ediff-same-contents is missing.")
+ (message "Function ediff-same-file-contents is missing.")
nil)))
t))
nil)))
@@ -366,29 +366,28 @@
(if (file-exists-p ,remote-path)
(progn
(require 'ediff)
- (if (fboundp
'ediff-same-contents)
+ (if (fboundp
'ediff-same-file-contents)
(progn
- (if (ediff-same-contents
,revision-path ,remote-path)
- 0
- 1))
- 2))
- 3))
- (lambda(return-message)
- (if (= return-message 0) (message
"Remote file has not changed.")
- (if (= return-message 1)
(display-warning "ssh-deploy" "External file has changed, please download or
diff." :warning)
- (if (= return-message 2)
(display-warning "ssh-deploy" "Function ediff-same-contents is missing"
:warning)
- (if (= return-message 3)
(message "Remote file doesn't exist."))))))))
+ (if
(ediff-same-file-contents ,revision-path ,remote-path)
+ (list 0 (format
"Remote file '%s' has not changed." ,remote-path))
+ (list 1 (format
"External file '%s' has changed, please download or diff." ,remote-path))))
+ (list 1 "Function
ediff-same-file-contents is missing.")))
+ (list 0 (format "Remote file '%s'
doesn't exist." ,remote-path))))
+ (lambda(return)
+ (if (= (nth 0 return) 0)
+ (message (nth 1 return))
+ (display-warning "ssh-deploy" (nth 1
return) :warning)))))
(progn
(if (file-exists-p remote-path)
(progn
(require 'ediff)
- (if (fboundp 'ediff-same-contents)
+ (if (fboundp
'ediff-same-file-contents)
(progn
- (if (ediff-same-contents
revision-path remote-path)
- (message "Remote file has
not changed.")
- (display-warning
"ssh-deploy" "External file has changed, please download or diff." :warning)))
- (display-warning "ssh-deploy"
"Function ediff-same-contents is missing" :warning)))
- (message "Remote file doesn't
exist.")))))
+ (if (ediff-same-file-contents
revision-path remote-path)
+ (message "Remote file '%s'
has not changed." remote-path)
+ (display-warning
"ssh-deploy" (format "External file '%s' has changed, please download or diff."
remote-path) :warning)))
+ (display-warning "ssh-deploy"
"Function ediff-same-file-contents is missing." :warning)))
+ (message "Remote file '%s' doesn't
exist." remote-path)))))
(progn
(if (fboundp 'async-start)
(progn
@@ -397,33 +396,32 @@
(if (file-exists-p ,remote-path)
(progn
(require 'ediff)
- (if (fboundp
'ediff-same-contents)
+ (if (fboundp
'ediff-same-file-contents)
(progn
- (if (ediff-same-contents
,path ,remote-path)
+ (if
(ediff-same-file-contents ,path ,remote-path)
(progn
(copy-file ,path
,revision-path t t t t)
- 0)
- 1))
- 2))
- 3))
- (lambda(return-message)
- (if (= return-message 0) (message
"Remote file has not changed, created base revision.")
- (if (= return-message 1)
(display-warning "ssh-deploy" "External file has changed, please download or
diff." :warning)
- (if (= return-message 2)
(display-warning "ssh-deploy" "Function ediff-same-contents is missing"
:warning)
- (if (= return-message 3)
(message "Remote file doesn't exist."))))))))
+ (list 0 (format
"Remote file '%s' has not changed, created base revision." ,remote-path)))
+ (list 1 (format
"External file has '%s' changed, please download or diff." ,remote-path))))
+ (list 1 "Function
ediff-file-same-contents is missing")))
+ (list 0 (format "Remote file '%s'
doesn't exist." ,remote-path))))
+ (lambda(return)
+ (if (= (nth 0 return) 0)
+ (message (nth 1 return))
+ (display-warning "ssh-deploy" (nth 1
return) :warning)))))
(progn
(if (file-exists-p remote-path)
(progn
(require 'ediff)
- (if (fboundp 'ediff-same-contents)
+ (if (fboundp 'ediff-same-file-contents)
(progn
- (if (ediff-same-contents path
remote-path)
+ (if (ediff-same-file-contents
path remote-path)
(progn
(copy-file path
revision-path t t t t)
- (message "Remote file has
not changed, created base revision."))
- (display-warning "ssh-deploy"
"External file has changed, please download or diff." :warning)))
- (display-warning "ssh-deploy"
"Function ediff-same-contents is missing" :warning)))
- (message "Remote file doesn't
exist")))))))))))))))
+ (message "Remote file '%s'
has not changed, created base revision." remote-path))
+ (display-warning "ssh-deploy"
(format "External file '%s' has changed, please download or diff." remote-path)
:warning)))
+ (display-warning "ssh-deploy"
"Function ediff-same-file-contents is missing." :warning)))
+ (message "Remote file '%s' doesn't
exist." remote-path)))))))))))))))
;;;### autoload
(defun ssh-deploy-download-handler ()
@@ -484,13 +482,13 @@
(if file-or-directory
(progn
(require 'ediff)
- (if (fboundp 'ediff-same-contents)
+ (if (fboundp 'ediff-same-file-contents)
(progn
(message "Comparing file '%s' to '%s'.." path
command)
- (if (ediff-same-contents path command)
+ (if (ediff-same-file-contents path command)
(message "Files have identical contents.")
(ediff path command)))
- (message "Function ediff-same-contents is missing.")))
+ (message "Function ediff-same-file-contents is
missing.")))
(progn
(if (fboundp 'ztree-diff)
(progn
- [elpa] externals/ssh-deploy be5451c 019/173: Updated to comments and README, (continued)
- [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, 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 <=
- [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
- [elpa] externals/ssh-deploy ec46610 075/173: Fixed a typo and improved documentation, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c8b322a 074/173: Fixed markdown syntax, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 5e86b22 072/173: Bug fix for automatically creating missing remote directories on upload, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 4fbe568 084/173: Updated hydra example to prevent lazy loading of package, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 4c35ab7 055/173: Fixed syntax bug in MELPA description, Stefan Monnier, 2018/10/20