Function: vc-svn-registered
vc-svn-registered is a byte-compiled function defined in vc-svn.el.gz.
Signature
(vc-svn-registered FILE)
Documentation
Check if FILE is SVN registered.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-svn.el.gz
;;;
;;; State-querying functions
;;;
;;; vc-svn-admin-directory is generally not defined when the
;;; autoloaded function is called.
;;;###autoload (defun vc-svn-registered (f)
;;;###autoload (let ((admin-dir (cond ((and (eq system-type 'windows-nt)
;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK"))
;;;###autoload "_svn")
;;;###autoload (t ".svn"))))
;;;###autoload (when (vc-find-root f admin-dir)
;;;###autoload (load "vc-svn" nil t)
;;;###autoload (vc-svn-registered f))))
(defun vc-svn-registered (file)
"Check if FILE is SVN registered."
(setq file (expand-file-name file))
(when (and (vc-svn-root file)
(file-accessible-directory-p (file-name-directory file)))
(with-temp-buffer
(cd (file-name-directory file))
(let* (process-file-side-effects
(status
(condition-case nil
;; Ignore all errors.
(vc-svn-command t t file "status" "-v")
;; Some problem happened. E.g. We can't find an `svn'
;; executable. We used to only catch `file-error' but when
;; the process is run on a remote host via Tramp, the error
;; is only reported via the exit status which is turned into
;; an `error' by vc-do-command.
(error nil))))
(when (eq 0 status)
(let ((parsed (vc-svn-parse-status file)))
(and parsed (not (memq parsed '(ignored unregistered))))))))))