summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-sudoedit.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2019-08-05 13:09:26 +0200
committerMichael Albinus <michael.albinus@gmx.de>2019-08-05 13:09:26 +0200
commit6c1d0d53b34d9350d55ebbd83ea56aa751a55f1b (patch)
treecd7a17c72e10ef68d048d17088662cb579644aba /lisp/net/tramp-sudoedit.el
parent1abf76877847226daa5ab7e07000ac1d4aba3478 (diff)
downloademacs-6c1d0d53b34d9350d55ebbd83ea56aa751a55f1b.tar.gz
Improve Tramp's caching
* lisp/net/tramp.el (tramp-handle-add-name-to-file) (tramp-handle-write-region): * lisp/net/tramp-adb.el (tramp-adb-handle-make-directory) (tramp-adb-handle-delete-directory) (tramp-adb-handle-delete-file, tramp-adb-handle-write-region) (tramp-adb-handle-set-file-modes) (tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file) (tramp-gvfs-handle-delete-directory) (tramp-gvfs-handle-delete-file) (tramp-gvfs-handle-make-directory) (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times, tramp-gvfs-set-file-uid-gid): * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file) (tramp-rclone-handle-delete-directory) (tramp-rclone-handle-delete-file): * lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link) (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times) (tramp-sh-handle-add-name-to-file) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-delete-directory, tramp-sh-handle-delete-file) (tramp-sh-handle-write-region): * lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file) (tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file) (tramp-smb-handle-delete-directory) (tramp-smb-handle-delete-file) (tramp-smb-handle-make-directory-internal) (tramp-smb-handle-make-symbolic-link) (tramp-smb-handle-rename-file, tramp-smb-handle-write-region): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-add-name-to-file) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-delete-directory) (tramp-sudoedit-handle-delete-file) (tramp-sudoedit-handle-set-file-modes) (tramp-sudoedit-handle-set-file-times) (tramp-sudoedit-handle-make-symbolic-link): Do not flush all file properties of upper directory. * lisp/net/tramp-cache.el (tramp-flush-file-upper-properties): New defun. (tramp-flush-file-properties, tramp-flush-directory-properties): Use it. * test/lisp/net/tramp-tests.el (tramp-time-diff): Declare. (tramp--test-file-attributes-equal-p): Handle also modification and status change time.
Diffstat (limited to 'lisp/net/tramp-sudoedit.el')
-rw-r--r--lisp/net/tramp-sudoedit.el10
1 files changed, 0 insertions, 10 deletions
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index 0ded85fb554..0ec98bb0691 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -189,7 +189,6 @@ pass to the OPERATION."
v2-localname)))))
(tramp-error v2 'file-already-exists newname)
(delete-file newname)))
- (tramp-flush-file-properties v2 (file-name-directory v2-localname))
(tramp-flush-file-properties v2 v2-localname)
(unless
(tramp-sudoedit-send-command
@@ -291,14 +290,10 @@ absolute file names."
(when (and t1 (eq op 'rename))
(with-parsed-tramp-file-name filename v1
- (tramp-flush-file-properties
- v1 (file-name-directory v1-localname))
(tramp-flush-file-properties v1 v1-localname)))
(when t2
(with-parsed-tramp-file-name newname v2
- (tramp-flush-file-properties
- v2 (file-name-directory v2-localname))
(tramp-flush-file-properties v2 v2-localname)))))))
(defun tramp-sudoedit-handle-copy-file
@@ -323,7 +318,6 @@ absolute file names."
"Like `delete-directory' for Tramp files."
(setq directory (expand-file-name directory))
(with-parsed-tramp-file-name directory nil
- (tramp-flush-file-properties v (file-name-directory localname))
(tramp-flush-directory-properties v localname)
(unless
(tramp-sudoedit-send-command
@@ -335,7 +329,6 @@ absolute file names."
(defun tramp-sudoedit-handle-delete-file (filename &optional trash)
"Like `delete-file' for Tramp files."
(with-parsed-tramp-file-name filename nil
- (tramp-flush-file-properties v (file-name-directory localname))
(tramp-flush-file-properties v localname)
(unless
(tramp-sudoedit-send-command
@@ -467,7 +460,6 @@ the result will be a local, non-Tramp, file name."
(defun tramp-sudoedit-handle-set-file-modes (filename mode)
"Like `set-file-modes' for Tramp files."
(with-parsed-tramp-file-name filename nil
- (tramp-flush-file-properties v (file-name-directory localname))
(tramp-flush-file-properties v localname)
(unless (tramp-sudoedit-send-command
v "chmod" (format "%o" mode)
@@ -526,7 +518,6 @@ the result will be a local, non-Tramp, file name."
(defun tramp-sudoedit-handle-set-file-times (filename &optional time)
"Like `set-file-times' for Tramp files."
(with-parsed-tramp-file-name filename nil
- (tramp-flush-file-properties v (file-name-directory localname))
(tramp-flush-file-properties v localname)
(let ((time
(if (or (null time)
@@ -634,7 +625,6 @@ component is used as the target of the symlink."
(tramp-error v 'file-already-exists localname)
(delete-file linkname)))
- (tramp-flush-file-properties v (file-name-directory localname))
(tramp-flush-file-properties v localname)
(tramp-sudoedit-send-command
v "ln" "-sf"