[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy 6d20dae 109/133: Fixed issue were async dire
From: |
Stefan Monnier |
Subject: |
[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 |
Date: |
Sat, 27 Mar 2021 14:48:54 -0400 (EDT) |
branch: externals/ssh-deploy
commit 6d20dae891500f106a4678fd9e37c69c71bf1163
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Fixed issue were async directory diff would lock main thread for resolving
file links when using the handler
---
ssh-deploy-test.el | 28 ++++++++++++++--------------
ssh-deploy.el | 20 ++++++++++++--------
2 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/ssh-deploy-test.el b/ssh-deploy-test.el
index 4416081..e10443a 100644
--- a/ssh-deploy-test.el
+++ b/ssh-deploy-test.el
@@ -477,20 +477,6 @@
(ssh-deploy-test--file-is-in-path)
(ssh-deploy-test--is-not-empty-string)
- ;; Directory Differences
- (ssh-deploy-test--directory-diff 0 0)
- (when async-el
- (ssh-deploy-test--directory-diff 1 0))
- (when async-threads
- (ssh-deploy-test--directory-diff 1 1))
-
- ;; Detect Remote Changes
- (ssh-deploy-test--detect-remote-changes 0 0)
- (when async-el
- (ssh-deploy-test--detect-remote-changes 1 0))
- (when async-threads
- (ssh-deploy-test--detect-remote-changes 1 1))
-
;; Upload
(ssh-deploy-test--upload 0 0)
(when async-el
@@ -512,6 +498,20 @@
(when async-threads
(ssh-deploy-test--rename-and-delete 1 1))
+ ;; Directory Differences
+ (ssh-deploy-test--directory-diff 0 0)
+ (when async-el
+ (ssh-deploy-test--directory-diff 1 0))
+ (when async-threads
+ (ssh-deploy-test--directory-diff 1 1))
+
+ ;; Detect Remote Changes
+ (ssh-deploy-test--detect-remote-changes 0 0)
+ (when async-el
+ (ssh-deploy-test--detect-remote-changes 1 0))
+ (when async-threads
+ (ssh-deploy-test--detect-remote-changes 1 1))
+
(delete-directory ssh-deploy-revision-folder t)
)))
diff --git a/ssh-deploy.el b/ssh-deploy.el
index eb86b9f..8112354 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -5,8 +5,8 @@
;; Author: Christian Johansson <christian@cvj.se>
;; Maintainer: Christian Johansson <christian@cvj.se>
;; Created: 5 Jul 2016
-;; Modified: 25 Apr 2019
-;; Version: 3.1.1
+;; Modified: 27 Apr 2019
+;; Version: 3.1.2
;; Keywords: tools, convenience
;; URL: https://github.com/cjohansson/emacs-ssh-deploy
@@ -699,6 +699,7 @@
;; these functions MUST only use module variables as fall-backs for missing
arguments.
+;; TODO Add support for async version of this function
;;;###autoload
(defun ssh-deploy-diff-files (file-a file-b)
"Find difference between FILE-A and FILE-B."
@@ -708,6 +709,7 @@
(ediff file-a file-b)))
;;;###autoload
+
(defun ssh-deploy-diff-directories (directory-a directory-b &optional
on-explicit-save debug async async-with-threads revision-folder remote-changes
exclude-list)
"Find difference between DIRECTORY-A and DIRECTORY-B but exclude,
ON-EXPLICIT-SAVE defines automatic uploads, DEBUG is the debug flag, ASYNC is
for asynchronous, ASYNC-WITH-THREADS for threads instead of processes,
REVISION-FOLDER is for revisions, REMOTE-CHANGES are whether to look for remote
change, EXCLUDE-LIST is what files to exclude."
(let ((on-explicit-save (or on-explicit-save ssh-deploy-on-explicit-save))
@@ -722,17 +724,19 @@
(message "Calculating differences between directory '%s' and '%s'..
(asynchronously)" directory-a directory-b)
(ssh-deploy--async-process
(lambda()
- (ssh-deploy--diff-directories-data directory-a directory-b
exclude-list))
+ (let ((directory-b (file-truename directory-b)))
+ (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)))
(when (or (> (length (nth 4 diff)) 0) (> (length (nth 5 diff)) 0)
(> (length (nth 7 diff)) 0))
(ssh-deploy--diff-directories-present diff directory-a
directory-b on-explicit-save debug async async-with-threads revision-folder
remote-changes exclude-list)))
async-with-threads))
- (message "Calculating differences between directory '%s' and '%s'..
(synchronously)" directory-a directory-b)
- (let ((diff (ssh-deploy--diff-directories-data directory-a directory-b
exclude-list)))
- (message "Completed calculation of differences between directory '%s'
and '%s'. Result: %s only in A, %s only in B, %s differs. (synchronously)" (nth
0 diff) (nth 1 diff) (length (nth 4 diff)) (length (nth 5 diff)) (length (nth 7
diff)))
- (when (or (> (length (nth 4 diff)) 0) (> (length (nth 5 diff)) 0) (>
(length (nth 7 diff)) 0))
- (ssh-deploy--diff-directories-present diff directory-a directory-b
on-explicit-save debug async async-with-threads revision-folder remote-changes
exclude-list))))))
+ (let ((directory-b (file-truename directory-b)))
+ (message "Calculating differences between directory '%s' and '%s'..
(synchronously)" directory-a directory-b)
+ (let ((diff (ssh-deploy--diff-directories-data directory-a directory-b
exclude-list)))
+ (message "Completed calculation of differences between directory
'%s' and '%s'. Result: %s only in A, %s only in B, %s differs. (synchronously)"
(nth 0 diff) (nth 1 diff) (length (nth 4 diff)) (length (nth 5 diff)) (length
(nth 7 diff)))
+ (when (or (> (length (nth 4 diff)) 0) (> (length (nth 5 diff)) 0) (>
(length (nth 7 diff)) 0))
+ (ssh-deploy--diff-directories-present diff directory-a directory-b
on-explicit-save debug async async-with-threads revision-folder remote-changes
exclude-list)))))))
(defun ssh-deploy--remote-changes-post-executor (response verbose)
"Process RESPONSE from `ssh-deploy--remote-changes-data' with flags:
VERBOSE."
- [elpa] externals/ssh-deploy 4044f78 064/133: Hydra compilation working, (continued)
- [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, 2021/03/27
- [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 <=
- [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
- [elpa] externals/ssh-deploy 316395c 089/133: Updated version and date, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy f462007 105/133: More work on directory difference unit test, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 2f6a36e 101/133: Improved instructions for hydra and use-package, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 567e1d5 120/133: Work on feature to automatically update revisions, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 2c43901 112/133: Using ssh-deploy--diff-files instead of directly ediff-same-file-contents, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy aa93c35 123/133: Concatenation of remote file now done properly for directory diff, Stefan Monnier, 2021/03/27