emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111622: Revert changes, which were c


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111622: Revert changes, which were committed with revno 111620 by accident.
Date: Wed, 30 Jan 2013 08:37:12 +0100
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111622
committer: Michael Albinus <address@hidden
branch nick: trunk
timestamp: Wed 2013-01-30 08:37:12 +0100
message:
  Revert changes, which were committed with revno 111620 by accident.
modified:
  lisp/net/tramp-sh.el
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2013-01-29 16:03:40 +0000
+++ b/lisp/net/tramp-sh.el      2013-01-30 07:37:12 +0000
@@ -988,8 +988,7 @@
     (set-file-selinux-context . tramp-sh-handle-set-file-selinux-context)
     (file-acl . tramp-sh-handle-file-acl)
     (set-file-acl . tramp-sh-handle-set-file-acl)
-    (vc-registered . tramp-sh-handle-vc-registered)
-    (inotify-add-watch . tramp-sh-handle-inotify-add-watch))
+    (vc-registered . tramp-sh-handle-vc-registered))
   "Alist of handler functions.
 Operations not mentioned here will be handled by the normal Emacs functions.")
 
@@ -3488,64 +3487,6 @@
         ;; Default file name handlers, we don't care.
         (t (tramp-run-real-handler operation args)))))))
 
-(defun tramp-sh-handle-inotify-add-watch (file-name aspect callback)
-  "Like `inotify-add-watch' for Tramp files."
-  (setq file-name (expand-file-name file-name))
-  (unless (consp aspect) (setq aspect (cons aspect nil)))
-  (with-parsed-tramp-file-name file-name nil
-    (let* ((default-directory (file-name-directory file-name))
-          (command (tramp-get-remote-inotifywait v))
-          (aspect (mapconcat
-                   (lambda (x)
-                     (replace-regexp-in-string "-" "_" (symbol-name x)))
-                   aspect ","))
-          (p (and command
-                  (start-file-process
-                   "inotifywait" nil command "-mq" "-e" aspect localname))))
-      (when (processp p)
-       (tramp-compat-set-process-query-on-exit-flag p nil)
-       (set-process-filter p 'tramp-sh-inotify-process-filter)
-       (tramp-set-connection-property p "inotify-callback" callback)
-       ;; Return the file-name vector as watch-descriptor.
-       (tramp-set-connection-property p "inotify-watch-descriptor" v)))))
-
-(defun tramp-sh-inotify-process-filter (proc string)
-  "Read output from \"inotifywait\" and add corresponding inotify events."
-  (tramp-message
-   (tramp-get-connection-property proc "vector" nil) 6
-   (format "%s\n%s" proc string))
-  (dolist (line (split-string string "[\n\r]+" 'omit-nulls))
-    ;; Check, whether there is a problem.
-    (unless
-       (string-match
-        
"^[^[:blank:]]+[[:blank:]]+\\([^[:blank:]]+\\)+\\([[:blank:]]+\\([^[:blank:]]+\\)\\)?[[:blank:]]*$"
 line)
-      (tramp-error proc 'filewatch-error "%s" line))
-
-    (let* ((object
-           (list
-            (tramp-get-connection-property
-             proc "inotify-watch-descriptor" nil)
-            ;; Aspect symbols.  We filter out MOVE and CLOSE, which
-            ;; are convenience macros.  See INOTIFY(7).
-            (mapcar
-             (lambda (x)
-               (intern-soft (replace-regexp-in-string "_" "-" (downcase x))))
-             (delete "MOVE" (delete "CLOSE"
-               (split-string (match-string 1 line) "," 'omit-nulls))))
-            ;; We cannot gather any cookie value.  So we return 0 as
-            ;; "don't know".
-            0 (match-string 3 line)))
-          (callback
-           (tramp-get-connection-property proc "inotify-callback" nil))
-          (event `(file-inotify ,object ,callback)))
-
-      ;; Usually, we would add an Emacs event now.  Unfortunately,
-      ;; `unread-command-events' does not accept several events at
-      ;; once.  Therefore, we apply the callback directly.
-      ;(setq unread-command-events (cons event unread-command-events)))))
-      (let ((last-input-event event))
-       (funcall callback object)))))
-
 ;;; Internal Functions:
 
 (defun tramp-maybe-send-script (vec script name)
@@ -5105,11 +5046,6 @@
     (tramp-message vec 5 "Finding a suitable `trash' command")
     (tramp-find-executable vec "trash" (tramp-get-remote-path vec))))
 
-(defun tramp-get-remote-inotifywait (vec)
-  (with-tramp-connection-property vec "inotifywait"
-    (tramp-message vec 5 "Finding a suitable `inotifywait' command")
-    (tramp-find-executable vec "inotifywait" (tramp-get-remote-path vec) t t)))
-
 (defun tramp-get-remote-id (vec)
   (with-tramp-connection-property vec "id"
     (tramp-message vec 5 "Finding POSIX `id' command")


reply via email to

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