diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2019-08-05 13:09:26 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2019-08-05 13:09:26 +0200 |
commit | 6c1d0d53b34d9350d55ebbd83ea56aa751a55f1b (patch) | |
tree | cd7a17c72e10ef68d048d17088662cb579644aba /lisp/net/tramp-rclone.el | |
parent | 1abf76877847226daa5ab7e07000ac1d4aba3478 (diff) | |
download | emacs-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-rclone.el')
-rw-r--r-- | lisp/net/tramp-rclone.el | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el index 9b3eab34771..e0fd8e34415 100644 --- a/lisp/net/tramp-rclone.el +++ b/lisp/net/tramp-rclone.el @@ -244,30 +244,22 @@ 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 (tramp-rclone-file-name-p filename) (tramp-rclone-flush-directory-cache v1) ;; The mount point's directory cache might need time ;; to flush. (while (file-exists-p filename) - (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) (when (tramp-rclone-file-name-p newname) (tramp-rclone-flush-directory-cache v2) ;; The mount point's directory cache might need time ;; to flush. (while (not (file-exists-p newname)) - (tramp-flush-file-properties - v2 (file-name-directory v2-localname)) (tramp-flush-file-properties v2 v2-localname)))))))))) (defun tramp-rclone-handle-copy-file @@ -292,7 +284,6 @@ file names." "Like `delete-directory' for Tramp files." (with-parsed-tramp-file-name (expand-file-name directory) nil (delete-directory (tramp-rclone-local-file-name directory) recursive trash) - (tramp-flush-file-properties v (file-name-directory localname)) (tramp-flush-directory-properties v localname) (tramp-rclone-flush-directory-cache v))) @@ -300,7 +291,6 @@ file names." "Like `delete-file' for Tramp files." (with-parsed-tramp-file-name (expand-file-name filename) nil (delete-file (tramp-rclone-local-file-name filename) trash) - (tramp-flush-file-properties v (file-name-directory localname)) (tramp-flush-file-properties v localname) (tramp-rclone-flush-directory-cache v))) |