yary <[email protected]> writes:

>> OK, I understand. Would it be an option for you to enable Tramp's file
>> cache, assuming that no external program touches the vc related files?
>
> If there's an easy way to clear the cache, for the times when I type "git
> pull" or "cvs up" (etc) on a command-line, then I'd use it.

I've just created a raw patch, how it could work (see appended). When
you set `tramp-cache-inhibit-cache-custom' to nil, file caches would be
still available for vc registration, with corresponding speed.

Flushing the file cache would be done by "M-x tramp-cleanup-connection".

Could you, please, check, whether this would be acceptable?

Best regards, Michael.

*** /home/albinus/src/tramp/lisp/tramp.el.~2.708.~	2009-08-03 21:05:49.000000000 +0200
--- /home/albinus/src/tramp/lisp/tramp.el	2009-08-03 21:33:12.000000000 +0200
***************
*** 4636,4646 ****
  	  (tramp-message v 0 "Wrote %s" filename))
  	(run-hooks 'tramp-handle-write-region-hook)))))
  
  (defun tramp-handle-vc-registered (file)
    "Like `vc-registered' for Tramp files."
    ;; There could be new files, created by the vc backend.  We disable
    ;; the file cache therefore.
!   (let ((tramp-cache-inhibit-cache t))
      (tramp-run-real-handler 'vc-registered (list file))))
  
  ;;;###autoload
--- 4636,4651 ----
  	  (tramp-message v 0 "Wrote %s" filename))
  	(run-hooks 'tramp-handle-write-region-hook)))))
  
+ (defcustom tramp-cache-inhibit-cache-custom t
+   "*Whether Tramp cache shall be inhibited, when vc checks are perfomed."
+   :group 'tramp
+   :type 'boolean)
+ 
  (defun tramp-handle-vc-registered (file)
    "Like `vc-registered' for Tramp files."
    ;; There could be new files, created by the vc backend.  We disable
    ;; the file cache therefore.
!   (let ((tramp-cache-inhibit-cache tramp-cache-inhibit-cache-custom))
      (tramp-run-real-handler 'vc-registered (list file))))
  
  ;;;###autoload
_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to