[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy b8f976a 116/133: Passing verbose flag to dif
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ssh-deploy b8f976a 116/133: Passing verbose flag to diff files function |
Date: |
Sat, 27 Mar 2021 14:48:55 -0400 (EDT) |
branch: externals/ssh-deploy
commit b8f976aaea5d70dbb199a0bde39b8db7e97397b3
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Passing verbose flag to diff files function
---
ssh-deploy.el | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/ssh-deploy.el b/ssh-deploy.el
index 63e996e..5258406 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -711,11 +711,12 @@
;;;###autoload
-(defun ssh-deploy-diff-files (file-a file-b &optional async async-with-threads)
- "Find difference between FILE-A and FILE-B, do it asynchronous if ASYNC is
aboe zero and use threads if ASYNC-WITH-THREADS is above zero."
+(defun ssh-deploy-diff-files (file-a file-b &optional async async-with-threads
verbose)
+ "Find difference between FILE-A and FILE-B, do it asynchronous if ASYNC is
aboe zero and use threads if ASYNC-WITH-THREADS is above zero, if VERBOSE is
above zero print messages."
(message "Comparing file '%s' to '%s'.." file-a file-b)
(let ((async (or async ssh-deploy-async))
- (async-with-threads (or async-with-threads
ssh-deploy-async-with-threads)))
+ (async-with-threads (or async-with-threads
ssh-deploy-async-with-threads))
+ (verbose (or verbose ssh-deploy-verbose)))
(ssh-deploy--mode-line-set-status-and-update
ssh-deploy--status-file-difference file-a)
(if (> async 0)
(ssh-deploy--async-process
@@ -723,15 +724,19 @@
(lambda(result)
(ssh-deploy--mode-line-set-status-and-update
ssh-deploy--status-idle (nth 1 result))
(if (nth 0 result)
- (message "File '%s' and '%s' have identical contents.
(asynchronously)" (nth 1 result) (nth 2 result))
- (message "File '%s' and '%s' does not have identical contents,
launching ediff.. (asynchronously)" file-a file-b)
+ (when (> verbose 0)
+ (message "File '%s' and '%s' have identical contents.
(asynchronously)" (nth 1 result) (nth 2 result)))
+ (when (> verbose 0)
+ (message "File '%s' and '%s' does not have identical contents,
launching ediff.. (asynchronously)" file-a file-b))
(ediff file-a file-b)))
async-with-threads)
(let ((result (ssh-deploy--diff-files file-a file-b)))
(ssh-deploy--mode-line-set-status-and-update ssh-deploy--status-idle
(nth 1 result))
(if (nth 0 result)
- (message "File '%s' and '%s' have identical contents.
(synchronously)" (nth 1 result) (nth 2 result))
- (message "File '%s' and '%s' does not have identical contents,
launching ediff.. (synchronously)" file-a file-b)
+ (when (> verbose 0)
+ (message "File '%s' and '%s' have identical contents.
(synchronously)" (nth 1 result) (nth 2 result)))
+ (when (> verbose 0)
+ (message "File '%s' and '%s' does not have identical contents,
launching ediff.. (synchronously)" file-a file-b))
(ediff file-a file-b))))))
;;;###autoload
@@ -1036,8 +1041,8 @@
(copy-file path revision-path t t t t))))
;;;###autoload
-(defun ssh-deploy-diff (path-local path-remote &optional root-local debug
exclude-list async async-with-threads on-explicit-save revision-folder
remote-changes)
- "Find differences between PATH-LOCAL and PATH-REMOTE, where PATH-LOCAL is
inside ROOT-LOCAL. DEBUG enables feedback message, check if PATH-LOCAL is not
in EXCLUDE-LIST. ASYNC make the process work asynchronously, if
ASYNC-WITH-THREADS is above zero use threads, ON-EXPLICIT-SAVE for automatic
uploads, REVISION-FOLDER for revision-folder, REMOTE-CHANGES for automatic
notification of remote change."
+(defun ssh-deploy-diff (path-local path-remote &optional root-local debug
exclude-list async async-with-threads on-explicit-save revision-folder
remote-changes verbose)
+ "Find differences between PATH-LOCAL and PATH-REMOTE, where PATH-LOCAL is
inside ROOT-LOCAL. DEBUG enables feedback message, check if PATH-LOCAL is not
in EXCLUDE-LIST. ASYNC make the process work asynchronously, if
ASYNC-WITH-THREADS is above zero use threads, ON-EXPLICIT-SAVE for automatic
uploads, REVISION-FOLDER for revision-folder, REMOTE-CHANGES for automatic
notification of remote change, VERBOSE messaging if above zero."
(let ((file-or-directory (not (file-directory-p path-local)))
(root-local (or root-local ssh-deploy-root-local))
(debug (or debug ssh-deploy-debug))
@@ -1046,11 +1051,12 @@
(async-with-threads (or async-with-threads
ssh-deploy-async-with-threads))
(on-explicit-save (or on-explicit-save ssh-deploy-on-explicit-save))
(revision-folder (or revision-folder ssh-deploy-revision-folder))
- (remote-changes (or remote-changes
ssh-deploy-automatically-detect-remote-changes)))
+ (remote-changes (or remote-changes
ssh-deploy-automatically-detect-remote-changes))
+ (verbose (or verbose ssh-deploy-verbose)))
(if (and (ssh-deploy--file-is-in-path-p path-local root-local)
(ssh-deploy--file-is-included-p path-local exclude-list))
(if file-or-directory
- (ssh-deploy-diff-files path-local path-remote async
async-with-threads)
+ (ssh-deploy-diff-files path-local path-remote async
async-with-threads verbose)
(ssh-deploy-diff-directories path-local path-remote on-explicit-save
debug async async-with-threads revision-folder remote-changes exclude-list))
(when debug (message "Path '%s' is not in the root '%s' or is excluded
from it." path-local root-local)))))
- [elpa] externals/ssh-deploy 336833f 076/133: Got (autoload) working inside asynchronous process, (continued)
- [elpa] externals/ssh-deploy 336833f 076/133: Got (autoload) working inside asynchronous process, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy db73e5b 083/133: Started in new function for detecting remote changes that should be testable by unit tests, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 3a6c3ac 084/133: More work on making detect remote changes unit-testable, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 7d578da 088/133: Passing unit test for asynchronous change detection, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 20a87ab 099/133: Added async.el to travis test, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 761eb11 098/133: Updated Travis to use emacs version snapshot, 25.1 and 26.1 via EVM, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 0111640 108/133: Removed unnecessary async autoloads, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy ea734f5 104/133: Added note, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 49ae447 097/133: Fixed Travis build status logo, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy a5aa5f6 093/133: Run only async test with threads if threads are available, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy b8f976a 116/133: Passing verbose flag to diff files function,
Stefan Monnier <=
- [elpa] externals/ssh-deploy e1507fe 119/133: Create FUNDING.yml, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 37a15c6 118/133: fix: ".git" matching, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy d0f7294 121/133: When remote differs only with local-revision, update local-revision [#61], Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy e133963 125/133: Default exclude value for DirectoryVariables now matches only .dir-locals.el, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 168c66d 114/133: Updated .gitignore to ignore test-generated files, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 93a0e18 128/133: Resolved hydra declaration if hydra is not installed, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 89bb950 131/133: Merge pull request #69 from housensen/patch-1, Stefan Monnier, 2021/03/27
- [elpa] externals/ssh-deploy 7a5a087 066/133: Updated version, Stefan Monnier, 2021/03/27
- [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