Function: vc-hg-registered

vc-hg-registered is a byte-compiled function defined in vc-hg.el.gz.

Signature

(vc-hg-registered FILE)

Documentation

Return non-nil if FILE is registered with hg.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-hg.el.gz
;;; State querying functions

;;;###autoload (defun vc-hg-registered (file)
;;;###autoload   "Return non-nil if FILE is registered with hg."
;;;###autoload   (if (vc-find-root file ".hg")       ; short cut
;;;###autoload       (progn
;;;###autoload         (load "vc-hg" nil t)
;;;###autoload         (vc-hg-registered file))))

;; Modeled after the similar function in vc-bzr.el
(defun vc-hg-registered (file)
  "Return non-nil if FILE is registered with hg."
  (when (vc-hg-root file)           ; short cut
    (let ((state (vc-state file 'Hg)))  ; expensive
      (if (memq state '(ignored unregistered nil))
          ;; Clear the cache for proper fallback to another backend.
          (ignore (vc-file-setprop file 'vc-state nil))
        t))))