emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android e3196835ed0: Merge remote-tracking branch 'origin/master


From: Po Lu
Subject: feature/android e3196835ed0: Merge remote-tracking branch 'origin/master' into feature/android
Date: Sun, 11 Jun 2023 20:08:23 -0400 (EDT)

branch: feature/android
commit e3196835ed08a1d1a675b933a53d1a397defd561
Merge: aad78abfd29 b6d48190609
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Merge remote-tracking branch 'origin/master' into feature/android
---
 lisp/net/tramp-fuse.el       | 32 +++++++++++++++++++-------------
 lisp/net/tramp-sshfs.el      |  2 +-
 test/infra/Makefile.in       |  6 +++++-
 test/infra/test-jobs.yml     |  4 ----
 test/lisp/net/tramp-tests.el | 13 +++++++------
 5 files changed, 32 insertions(+), 25 deletions(-)

diff --git a/lisp/net/tramp-fuse.el b/lisp/net/tramp-fuse.el
index 8626610211a..99360c2c28e 100644
--- a/lisp/net/tramp-fuse.el
+++ b/lisp/net/tramp-fuse.el
@@ -95,6 +95,11 @@
     (with-tramp-file-property v localname "file-executable-p"
       (file-executable-p (tramp-fuse-local-file-name filename)))))
 
+(defun tramp-fuse-handle-file-exists-p (filename)
+  "Like `file-exists-p' for Tramp files."
+  (tramp-skeleton-file-exists-p filename
+    (file-exists-p (tramp-fuse-local-file-name filename))))
+
 (defun tramp-fuse-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for Tramp files."
   (tramp-fuse-remove-hidden-files
@@ -139,24 +144,24 @@
       (format "%s@%s:/" user host)
     (format "%s:/" host)))
 
-(defun tramp-fuse-mount-point (vec)
-  "Return local mount point of VEC."
-  (or (tramp-get-file-property vec "/" "mount-point")
-      (expand-file-name
-       (concat
-       tramp-temp-name-prefix
-       (tramp-file-name-method vec) "."
-       (when (tramp-file-name-user vec)
-         (concat (tramp-file-name-user-domain vec) "@"))
-       (tramp-file-name-host-port vec))
-       (or small-temporary-file-directory
-          tramp-compat-temporary-file-directory))))
-
 (defconst tramp-fuse-mount-timeout
   (eval (car (get 'remote-file-name-inhibit-cache 'standard-value)) t)
   "Time period to check whether the mount point still exists.
 It has the same meaning as `remote-file-name-inhibit-cache'.")
 
+(defun tramp-fuse-mount-point (vec)
+  "Return local mount point of VEC."
+  (let ((remote-file-name-inhibit-cache tramp-fuse-mount-timeout))
+    (or (tramp-get-file-property vec "/" "mount-point")
+       (expand-file-name
+        (concat
+         tramp-temp-name-prefix
+         (tramp-file-name-method vec) "."
+         (when (tramp-file-name-user vec)
+           (concat (tramp-file-name-user-domain vec) "@"))
+         (tramp-file-name-host-port vec))
+        tramp-compat-temporary-file-directory))))
+
 (defun tramp-fuse-mounted-p (vec)
   "Check, whether fuse volume determined by VEC is mounted."
   ;; Remember the mount status by using a file property on "/",
@@ -198,6 +203,7 @@ It has the same meaning as 
`remote-file-name-inhibit-cache'.")
          (command (format "%s -u %s" (tramp-fuse-get-fusermount) mount-point)))
     (tramp-message vec 6 "%s\n%s" command (shell-command-to-string command))
     (tramp-flush-file-property vec "/" "mounted")
+    (tramp-flush-file-property vec "/" "mount-point")
     (setq tramp-fuse-mount-points
          (delete (tramp-file-name-unify vec) tramp-fuse-mount-points))
     ;; Give the caches a chance to expire.
diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el
index 9d871276f7a..e3c9e0b53b2 100644
--- a/lisp/net/tramp-sshfs.el
+++ b/lisp/net/tramp-sshfs.el
@@ -100,7 +100,7 @@
     (file-directory-p . tramp-handle-file-directory-p)
     (file-equal-p . tramp-handle-file-equal-p)
     (file-executable-p . tramp-fuse-handle-file-executable-p)
-    (file-exists-p . tramp-handle-file-exists-p)
+    (file-exists-p . tramp-fuse-handle-file-exists-p)
     (file-group-gid . tramp-handle-file-group-gid)
     (file-in-directory-p . tramp-handle-file-in-directory-p)
     (file-local-copy . tramp-handle-file-local-copy)
diff --git a/test/infra/Makefile.in b/test/infra/Makefile.in
index 5f7d6281a7c..fff7281b566 100644
--- a/test/infra/Makefile.in
+++ b/test/infra/Makefile.in
@@ -41,7 +41,11 @@ define subdir_template
   SUBDIR_TARGETS += $(target)
 
   $(eval
-    ifeq ($(findstring src, $(1)), src)
+    ifeq ($(findstring lib-src, $(1)), lib-src)
+    define changes
+       @echo '        - $(1)/*.{h,c}' >>$(FILE)
+    endef
+    else ifeq ($(findstring src, $(1)), src)
     define changes
        @echo '        - $(1)/treesit.{h,c}' >>$(FILE)
        @echo '        - test/$(1)/treesit-tests.el' >>$(FILE)
diff --git a/test/infra/test-jobs.yml b/test/infra/test-jobs.yml
index b49dd369611..2f6e0dab4d5 100644
--- a/test/infra/test-jobs.yml
+++ b/test/infra/test-jobs.yml
@@ -9,10 +9,6 @@ test-lib-src-inotify:
   rules:
     - if: '$CI_PIPELINE_SOURCE == "schedule"'
       when: never
-    - changes:
-        - lib-src/treesit.{h,c}
-        - test/lib-src/treesit-tests.el
-      when: never
     - changes:
         - lib-src/*.{h,c}
         - test/lib-src/*resources/**
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 017cb73f3bb..0b01c13470a 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2559,7 +2559,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
            ;; Do not overwrite if excluded.
            (cl-letf (((symbol-function #'y-or-n-p) #'tramp-compat-always)
                      ;; Ange-FTP.
-                     ((symbol-function 'yes-or-no-p) #'tramp-compat-always))
+                     ((symbol-function #'yes-or-no-p) #'tramp-compat-always))
              (write-region "foo" nil tmp-name nil nil nil 'mustbenew))
            (should-error
             (cl-letf (((symbol-function #'y-or-n-p) #'ignore)
@@ -6737,8 +6737,9 @@ INPUT, if non-nil, is a string sent to the process."
                (insert "foo")
                ;; Bug#53207: with `create-lockfiles' nil, saving the
                ;; buffer results in a prompt.
-               (cl-letf (((symbol-function 'yes-or-no-p)
-                          (lambda (_) (ert-fail "Test failed unexpectedly"))))
+               (cl-letf (((symbol-function #'read-from-minibuffer)
+                          (lambda (&rest _)
+                            (ert-fail "Test failed unexpectedly"))))
                  (should (buffer-modified-p))
                  (save-buffer)
                  (should-not (buffer-modified-p)))
@@ -6756,7 +6757,7 @@ INPUT, if non-nil, is a string sent to the process."
                ;; modification time properly, for them it doesn't
                ;; make sense to test.
                (when (not (verify-visited-file-modtime))
-                 (cl-letf (((symbol-function 'read-char-choice)
+                 (cl-letf (((symbol-function #'read-char-choice)
                             (lambda (prompt &rest _) (message "%s" prompt) 
?y)))
                    (ert-with-message-capture captured-messages
                      (insert "bar")
@@ -6772,9 +6773,9 @@ INPUT, if non-nil, is a string sent to the process."
                        (should (file-locked-p tmp-name)))))
 
                  ;; `save-buffer' removes the file lock.
-                 (cl-letf (((symbol-function 'yes-or-no-p)
+                 (cl-letf (((symbol-function #'yes-or-no-p)
                             #'tramp-compat-always)
-                           ((symbol-function 'read-char-choice)
+                           ((symbol-function #'read-char-choice)
                             (lambda (&rest _) ?y)))
                    (should (buffer-modified-p))
                    (save-buffer)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]