Commit e50772e3 authored by Michael Albinus's avatar Michael Albinus
Browse files

* net/tramp-sh.el (tramp-sh-handle-vc-registered): Run first pass

only when `remote-file-name-inhibit-cache' is nil.
(tramp-sh-file-name-handler): Use `tramp-error'.  Simplify code.
parent f2c5082b
2014-03-07 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-sh-handle-vc-registered): Run first pass
only when `remote-file-name-inhibit-cache' is nil.
(tramp-sh-file-name-handler): Use `tramp-error'. Simplify code.
2014-03-06 Martin Rudalics <rudalics@gmx.at>
* window.el (fit-frame-to-buffer, fit-frame-to-buffer-margins):
......
......@@ -3306,6 +3306,7 @@ the result will be a local, non-Tramp, filename."
(with-tramp-progress-reporter
v 3 (format "Checking `vc-registered' for %s" file)
(unless remote-file-name-inhibit-cache
;; There could be new files, created by the vc backend. We
;; cannot reuse the old cache entries, therefore.
(let (tramp-vc-registered-file-names
......@@ -3347,7 +3348,7 @@ the result will be a local, non-Tramp, filename."
(read (current-buffer)))))
(tramp-set-file-property
v (car elt) (cadr elt) (cadr (cdr elt))))))
v (car elt) (cadr elt) (cadr (cdr elt)))))))
;; Second run. Now all `file-exists-p' or `file-readable-p'
;; calls shall be answered from the file cache. We unset
......@@ -3363,17 +3364,18 @@ the result will be a local, non-Tramp, filename."
Fall back to normal file name handler if no Tramp handler exists."
(when (and tramp-locked (not tramp-locker))
(setq tramp-locked nil)
(signal 'file-error (list "Forbidden reentrant call of Tramp")))
(tramp-error
(car-safe tramp-current-connection) 'file-error
"Forbidden reentrant call of Tramp"))
(let ((tl tramp-locked))
(unwind-protect
(progn
(setq tramp-locked t)
(unwind-protect
(let ((tramp-locker t))
(save-match-data
(let ((fn (assoc operation tramp-sh-file-name-handler-alist)))
(if fn
(apply (cdr fn) args)
(tramp-run-real-handler operation args))))))
(tramp-run-real-handler operation args)))))
(setq tramp-locked tl))))
(defun tramp-vc-file-name-handler (operation &rest args)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment