[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy c07b006 114/173: Replaced (file-regular-p) w
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ssh-deploy c07b006 114/173: Replaced (file-regular-p) with (not (file-directory-p)) |
Date: |
Sat, 20 Oct 2018 10:36:41 -0400 (EDT) |
branch: externals/ssh-deploy
commit c07b006416daeebf12fdc9e62aaeceda4fd20ca7
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Replaced (file-regular-p) with (not (file-directory-p))
(file-directory-p) has better TRAMP support
---
ssh-deploy-diff-mode.el | 10 +++++-----
ssh-deploy.el | 28 ++++++++++++++--------------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/ssh-deploy-diff-mode.el b/ssh-deploy-diff-mode.el
index 4220b32..c64a15b 100644
--- a/ssh-deploy-diff-mode.el
+++ b/ssh-deploy-diff-mode.el
@@ -3,8 +3,8 @@
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
;; Created: 1 Feb 2018
-;; Modified: 19 Feb 2018
-;; Version: 1.12
+;; Modified: 22 Feb 2018
+;; Version: 1.13
;; Keywords: tools, convenience
;; URL: https://github.com/cjohansson/emacs-ssh-deploy
@@ -35,7 +35,6 @@
;;; Code:
-;; TODO: Must explicitly send global variables, seems like settings are lost
sometimes?
;; TODO: Downloading and deletion of remote files that does not exist on local
root does not work?
;; TODO: On some FTP hosts, TRAMP wrongly thinks some files are directories
@@ -240,7 +239,8 @@
(debug (cond ((boundp 'ssh-deploy-debug) ssh-deploy-debug)(t nil)))
(exclude-list (cond ((boundp 'ssh-deploy-exclude-list)
ssh-deploy-exclude-list)(t nil)))
(revision-folder (cond ((boundp 'ssh-deploy-revision-folder)
ssh-deploy-revision-folder)(t nil))))
- (if (fboundp 'ssh-deploy-delete)
+ (if (and (fboundp 'ssh-deploy-delete)
+ (fboundp 'ssh-deploy-delete-both))
(cond ((= section ssh-deploy-diff-mode--section-in-both)
(let ((yes-no-prompt (read-string (format "Type 'yes' to
confirm that you want to delete the file '%s': " file-name))))
(if (string= yes-no-prompt "yes")
@@ -249,7 +249,7 @@
((= section ssh-deploy-diff-mode--section-only-in-b)
(ssh-deploy-delete path-remote async debug))
((= section ssh-deploy-diff-mode--section-in-both)
(ssh-deploy-delete-both path-local root-local root-remote async debug
exclude-list))
(t (message "Delete is not available in this section")))
- (display-warning "ssh-deploy" "Function ssh-deploy-delete is missing"
:warning))))
+ (display-warning "ssh-deploy" "Function ssh-deploy-delete or
ssh-deploy-delete-both is missing" :warning))))
(defun ssh-deploy-diff-mode--difference (parts)
"If file exists in both start a difference session based on PARTS."
diff --git a/ssh-deploy.el b/ssh-deploy.el
index 0457cd2..4942f03 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: 19 Feb 2018
-;; Version: 1.77
+;; Modified: 22 Feb 2018
+;; Version: 1.78
;; Keywords: tools, convenience
;; URL: https://github.com/cjohansson/emacs-ssh-deploy
@@ -242,7 +242,7 @@
(defun ssh-deploy--upload-via-tramp-async (path-local path-remote force
revision-folder)
"Upload PATH-LOCAL to PATH-REMOTE via TRAMP asynchronously and FORCE upload
despite remote change, check for revisions in REVISION-FOLDER."
(if (fboundp 'async-start)
- (let ((file-or-directory (file-regular-p path-local)))
+ (let ((file-or-directory (not (file-directory-p path-local))))
(if file-or-directory
(let ((revision-path (ssh-deploy--get-revision-path path-local
revision-folder)))
(message "Uploading file '%s' to '%s'.. (asynchronously)"
path-local path-remote)
@@ -275,7 +275,7 @@
(defun ssh-deploy--upload-via-tramp (path-local path-remote force
revision-folder)
"Upload PATH-LOCAL to PATH-REMOTE via TRAMP synchronously and FORCE despite
remote change compared with copy in REVISION-FOLDER."
- (let ((file-or-directory (file-regular-p path-local))
+ (let ((file-or-directory (not (file-directory-p path-local)))
(revision-path (ssh-deploy--get-revision-path path-local
revision-folder)))
(if file-or-directory
(progn
@@ -305,7 +305,7 @@
(message "Downloading '%s' to '%s'.. (asynchronously)" path-remote
path-local)
(async-start
`(lambda()
- (let ((file-or-directory (file-regular-p ,path-remote)))
+ (let ((file-or-directory (not (file-directory-p ,path-remote))))
(if file-or-directory
(progn
(copy-file ,path-remote ,path-local t t t t)
@@ -318,7 +318,7 @@
(defun ssh-deploy--download-via-tramp (path-remote path-local revision-folder)
"Download PATH-REMOTE to PATH-LOCAL via TRAMP synchronously and store a copy
in REVISION-FOLDER."
- (let ((file-or-directory (file-regular-p path-remote)))
+ (let ((file-or-directory (not (file-directory-p path-remote))))
(if file-or-directory
(progn
(message "Downloading file '%s' to '%s'.. (synchronously)"
path-remote path-local)
@@ -557,7 +557,7 @@
(exclude-list (or exclude-list ssh-deploy-exclude-list))
(revision-path (ssh-deploy--get-revision-path path-local
revision-folder))
(path-remote (concat root-remote (ssh-deploy--get-relative-path
root-local path-local))))
- (if (file-regular-p path-local)
+ (if (not (file-directory-p path-local))
(if (file-exists-p revision-path)
(if (and async (fboundp 'async-start))
(async-start
@@ -624,7 +624,7 @@
(async-start
`(lambda()
(if (file-exists-p ,path)
- (let ((file-or-directory (file-regular-p ,path)))
+ (let ((file-or-directory (not (file-directory-p ,path))))
(progn
(if file-or-directory
(delete-file ,path t)
@@ -635,7 +635,7 @@
(cond ((= 0 (nth 1 response)) (message "Deleted '%s'.
(asynchronously)" (nth 0 response)))
(t (display-warning "ssh-deploy" (format "Did not find '%s'.
(asynchronously)" (nth 0 response)) :warning)))))
(if (file-exists-p path)
- (let ((file-or-directory (file-regular-p path)))
+ (let ((file-or-directory (not (file-directory-p path))))
(progn
(if file-or-directory
(delete-file path t)
@@ -651,7 +651,7 @@
(if (and (ssh-deploy--file-is-in-path path-local root-local)
(ssh-deploy--file-is-included path-local exclude-list))
(let ((exclude-list (or exclude-list ssh-deploy-exclude-list))
- (file-or-directory (file-regular-p path-local))
+ (file-or-directory (not (file-directory-p path-local)))
(path-remote (concat root-remote (ssh-deploy--get-relative-path
root-local path-local))))
(ssh-deploy-delete path-local async debug)
(kill-this-buffer)
@@ -673,11 +673,11 @@
(ssh-deploy--file-is-included old-path-local exclude-list)
(ssh-deploy--file-is-included new-path-local exclude-list))
(let ((exclude-list (or exclude-list ssh-deploy-exclude-list))
- (file-or-directory (file-regular-p old-path-local))
+ (file-or-directory (not (file-directory-p old-path-local)))
(old-path-remote (concat root-remote
(ssh-deploy--get-relative-path root-local old-path-local)))
(new-path-remote (concat root-remote
(ssh-deploy--get-relative-path root-local new-path-local))))
(rename-file old-path-local new-path-local t)
- (if (file-regular-p new-path-local)
+ (if (not (file-directory-p new-path-local))
(progn
(rename-buffer new-path-local)
(set-buffer-modified-p nil)
@@ -739,7 +739,7 @@
;;;### autoload
(defun ssh-deploy-store-revision (path &optional root)
"Store PATH in revision-folder ROOT."
- (if (file-regular-p path)
+ (if (not (file-directory-p path))
(let* ((root (or root ssh-deploy-revision-folder))
(revision-path (ssh-deploy--get-revision-path path root)))
(message "Storing revision of '%s' at '%s'.." path revision-path)
@@ -748,7 +748,7 @@
;;;### autoload
(defun ssh-deploy-diff (path-local path-remote &optional root-local debug
exclude-list async)
"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."
- (let ((file-or-directory (file-regular-p path-local))
+ (let ((file-or-directory (not (file-directory-p path-local)))
(exclude-list (or exclude-list ssh-deploy-exclude-list)))
(if (not (boundp 'root-local))
(setq root-local ssh-deploy-root-local))
- [elpa] externals/ssh-deploy 36b81ff 111/173: Fixed bug where async upload to new remote directory was not working, (continued)
- [elpa] externals/ssh-deploy 36b81ff 111/173: Fixed bug where async upload to new remote directory was not working, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c58f524 141/173: Using (with-current-buffer) instead of (switch-to-buffer), Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 42d4d7a 150/173: Merge branch 'master' of https://github.com/cjohansson/emacs-ssh-deploy, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy b17f543 151/173: line status does not get stuck on asynchronously uploads/downloads, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c813bbb 154/173: Improved syntax and comments for detecting remote changes, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 1d3d534 161/173: Added verbose flag to enable silencing of non-error messages, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 0e3e55e 168/173: Merge branch 'master' of https://github.com/cjohansson/emacs-ssh-deploy, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy aef539b 115/173: Create potential missing local directory when downloading file, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c2a2be4 119/173: Naming remote SQL buffers to enable having multiple open simultaneously, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 592427e 121/173: Added support for launching remote shell sessions, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c07b006 114/173: Replaced (file-regular-p) with (not (file-directory-p)),
Stefan Monnier <=
- [elpa] externals/ssh-deploy 96276c8 135/173: Added forced upload to menu-bar, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 715325d 126/173: Improved wording of directory difference calculation, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy b879998 116/173: Added support for remote SQL sessions, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy fc9bdbc 142/173: Asynchronously downloaded buffers are now automatically reverted, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 519a639 147/173: Fixed issue were buffer was marked as modified after a rename, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 2f281c3 158/173: Fixed bug in (when (not to (unless conversion, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy a81c3f1 166/173: Fixed README syntax, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy b560147 164/173: Rename run script menu item, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 104a384 170/173: Fixed lambda function predicate function, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 67313e2 172/173: Merge branch 'master' of https://github.com/cjohansson/emacs-ssh-deploy, Stefan Monnier, 2018/10/20