tramp-devel
[Top][All Lists]
Advanced

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

[PATCH 1/1] Inhibit flushing file data by external process while in vc-r


From: Julian Scheid
Subject: [PATCH 1/1] Inhibit flushing file data by external process while in vc-registered
Date: Tue, 18 Aug 2009 21:08:02 +1200

How about this for a temporary, simple solution?

---
 lisp/ChangeLog |    7 +++++++
 lisp/tramp.el  |    9 ++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8f9b4b2..92f63c4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2009-08-18  Julian Scheid  <address@hidden>
+
+       * tramp.el (tramp-vc-registered-file-names): Set
+       tramp-process-inhibit-flush.
+       (tramp-handle-process-file) Only flush if
+       tramp-process-inhibit-flush isn't set.
+
 2009-08-17  Michael Albinus  <address@hidden>
 
        * tramp.el (tramp-methods): New method "rsyncc".
diff --git a/lisp/tramp.el b/lisp/tramp.el
index f6606cc..9b08f1e 100644
--- a/lisp/tramp.el
+++ b/lisp/tramp.el
@@ -4214,14 +4214,16 @@ beginning of local filename are not substituted."
         (kill-buffer (tramp-get-connection-buffer v))
         (setq ret 1)))
 
-      ;; Check return code.
-      (unless ret (setq ret (tramp-send-command-and-check v nil)))
       ;; Provide error file.
       (when tmpstderr (rename-file tmpstderr (cadr destination) t))
       ;; Cleanup.  We remove all file cache values for the connection,
       ;; because the remote process could have changed them.
       (when tmpinput (delete-file tmpinput))
-      (tramp-flush-directory-property v "")
+
+      (unless (and (boundp 'tramp-process-inhibit-flush)
+                   tramp-process-inhibit-flush)
+        (tramp-flush-file-property v file))
+
       ;; Return exit status.
       (if (equal ret -1)
          (keyboard-quit)
@@ -4898,6 +4900,7 @@ Returns a file name in `tramp-auto-save-directory' for 
autosaving this file."
   (with-parsed-tramp-file-name file nil
     (let (tramp-vc-registered-file-names
          (tramp-cache-inhibit-cache (current-time))
+          (tramp-process-inhibit-flush t)
          (file-name-handler-alist
           `((,tramp-file-name-regexp . tramp-vc-file-name-handler))))
 
-- 
1.6.4





reply via email to

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