* lisp/vc/vc-hg.el (vc-hg-registered):
Clear the vc-state cache when returning nil.
"Return non-nil if FILE is registered with hg."
(when (vc-hg-root file) ; short cut
(let ((state (vc-state file 'Hg))) ; expensive
- (and state (not (memq state '(ignored unregistered)))))))
+ (if (memq state '(ignored unregistered nil))
+ ;; Clear the cache for proper fallback to another backend.
+ (ignore (vc-file-setprop file 'vc-state nil))
+ t))))
(defun vc-hg-state (file)
"Hg-specific version of `vc-state'."