[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy e895d6d 079/133: Replaced asynchronous (requ
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ssh-deploy e895d6d 079/133: Replaced asynchronous (require) with (autoload) |
Date: |
Sat, 27 Mar 2021 14:48:48 -0400 (EDT) |
branch: externals/ssh-deploy
commit e895d6d6c98b86f938faa22ef2134e0d5d4f85b5
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Replaced asynchronous (require) with (autoload)
---
ssh-deploy.el | 64 +++++++++++++++++++++++++++++++++++------------------------
1 file changed, 38 insertions(+), 26 deletions(-)
diff --git a/ssh-deploy.el b/ssh-deploy.el
index c0df025..4961931 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -310,21 +310,36 @@
(let ((ftp-netrc nil))
(when (boundp 'ange-ftp-netrc-filename)
(setq ftp-netrc ange-ftp-netrc-filename))
- (async-start
- (lambda()
- (let ((ssh-deploy-async 0)
- (ssh-deploy-async-with-threads 0)
- (ssh-deploy-on-explicit-save 0)
- (ssh-deploy-automatically-detect-remote-changes 0))
- (when ftp-netrc
- ;; Pass ange-ftp setting to asynchronous process
- (defvar ange-ftp-netrc-filename ftp-netrc))
- (autoload 'ediff-same-file-contents "ediff-util")
- (autoload 'string-remove-prefix "subr-x")
- (autoload 'ssh-deploy--diff-directories-data "ssh-deploy")
- (autoload 'ssh-deploy--diff-directories-present "ssh-deploy")
- (funcall start)))
- finish)))
+ (let ((script-filename (file-name-directory (symbol-file
'ssh-deploy-diff-directories))))
+ (async-start
+ (lambda()
+ (let ((ssh-deploy-async 0)
+ (ssh-deploy-async-with-threads 0)
+ (ssh-deploy-on-explicit-save 0)
+ (ssh-deploy-automatically-detect-remote-changes 0))
+ (when ftp-netrc
+ ;; Pass ange-ftp setting to asynchronous process
+ (defvar ange-ftp-netrc-filename ftp-netrc))
+ (add-to-list 'load-path ,script-filename)
+ (autoload 'ediff-same-file-contents "ediff-util")
+ (autoload 'string-remove-prefix "subr-x")
+
+ ;; TODO Add all public functions as autoload here
+ (autoload 'ssh-deploy-download "ssh-deploy")
+ (autoload 'ssh-deploy-download-handler "ssh-deploy")
+ (autoload 'ssh-deploy-upload "ssh-deploy")
+ (autoload 'ssh-deploy-upload-handler "ssh-deploy")
+ (autoload 'ssh-deploy-rename "ssh-deploy")
+ (autoload 'ssh-deploy-rename-handler "ssh-deploy")
+ (autoload 'ssh-deploy-delete "ssh-deploy")
+ (autoload 'ssh-deploy-delete-both "ssh-deploy")
+ (autoload 'ssh-deploy-delete-handler "ssh-deploy")
+ (autoload 'ssh-deploy-diff "ssh-deploy")
+ (autoload 'ssh-deploy-diff-handler "ssh-deploy")
+ (autoload 'ssh-deploy--diff-directories-data "ssh-deploy")
+ (autoload 'ssh-deploy--diff-directories-present
"ssh-deploy")
+ (funcall start)))
+ finish))))
(display-warning 'ssh-deploy "async-start functions are not
available!"))))
(defun ssh-deploy--mode-line-set-status-and-update (status &optional filename)
@@ -700,11 +715,10 @@
(remote-changes (or remote-changes
ssh-deploy-automatically-detect-remote-changes))
(exclude-list (or exclude-list ssh-deploy-exclude-list)))
(if (> async 0)
- (let ((script-filename (file-name-directory (symbol-file
'ssh-deploy-diff-directories))))
+ (progn
(message "Calculating differences between directory '%s' and '%s'..
(asynchronously)" directory-a directory-b)
(ssh-deploy--async-process
(lambda()
- (add-to-list 'load-path script-filename)
(ssh-deploy--diff-directories-data directory-a directory-b
exclude-list))
(lambda(diff)
(message "Completed calculation of differences between directory
'%s' and '%s'. Result: %s only in A %s only in B %s differs. (asynchronously)"
(nth 0 diff) (nth 1 diff) (length (nth 4 diff)) (length (nth 5 diff)) (length
(nth 7 diff)))
@@ -1269,15 +1283,13 @@
(interactive)
(if ssh-deploy-script
(if (> ssh-deploy-async 0)
- (let ((script-filename (file-name-directory (symbol-file
'ssh-deploy-diff-directories))))
- (message "Executing of deployment-script starting...
(asynchronously)")
- (ssh-deploy--async-process
- `(lambda() (let ((ssh-deploy-root-local ,ssh-deploy-root-local)
- (ssh-deploy-root-remote ,ssh-deploy-root-remote))
- (add-to-list 'load-path ,script-filename)
- (funcall ,ssh-deploy-script)))
- (lambda(result) (message "Completed execution of
deployment-script. Return: '%s' (asynchronously)" result))
- ssh-deploy-async-with-threads))
+ (message "Executing of deployment-script starting...
(asynchronously)")
+ (ssh-deploy--async-process
+ `(lambda() (let ((ssh-deploy-root-local ,ssh-deploy-root-local)
+ (ssh-deploy-root-remote ,ssh-deploy-root-remote))
+ (funcall ,ssh-deploy-script)))
+ (lambda(result) (message "Completed execution of deployment-script.
Return: '%s' (asynchronously)" result))
+ ssh-deploy-async-with-threads)
(message "Executing of deployment-script starting... (synchronously)")
(let ((ret (funcall ssh-deploy-script)))
(message "Completed execution of deployment-script. Return: '%s'
(synchronously)" ret)))
- [elpa] externals/ssh-deploy 664f52c 072/133: Improved missing async function error and replaced require with autoload, (continued)
- [elpa] externals/ssh-deploy 664f52c 072/133: Improved missing async function error and replaced require with autoload, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 8c354e1 092/133: Added Travis CI file to repo, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy f61f1ef 041/133: Fixed bug where all DirectoryVariables was not passed on from handlers, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy a1a9d3c 051/133: Work on lisp code styling with (if), (progn) and (when), Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy e0bf686 054/133: More (if), (when) and (progn) optimizations, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy efc8be3 058/133: Added another example using plug-in functions from script, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 4044f78 064/133: Hydra compilation working, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy ae5354a 065/133: Fixed issue were remote paths with symlinks didn't work with recursive diff function, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 6e37aae 067/133: Added unit test for download, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 8107b9e 073/133: Added unit test for rename and delete, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy e895d6d 079/133: Replaced asynchronous (require) with (autoload),
Stefan Monnier <=
- [elpa] externals/ssh-deploy 5846974 082/133: Added instructions about how to trigger unit test with async.el integration, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 85a7c37 080/133: Added unit tests for asynchronous operations, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 6ddb12b 090/133: All unit tests for remote changes sync and async and compilation passing, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 8e2507b 085/133: Refactored remote changes function and made unit tests for it, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 8c26f61 091/133: Updated version and change-date, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 6d20dae 109/133: Fixed issue were async directory diff would lock main thread for resolving file links when using the handler, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 9c73fef 110/133: Added support for asynchronous file difference check, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 045e463 095/133: Trying emacs version manager in travis, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 438c1b4 107/133: Do not allow failures on emacs snapshot, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 24fec85 096/133: Added Travis build status to README, Stefan Monnier, 2021/03/27