Function: vc-arch-file-source-p
vc-arch-file-source-p is a byte-compiled function defined in
vc-arch.el.gz.
Signature
(vc-arch-file-source-p FILE)
Documentation
Can return nil, maybe or a non-nil value.
Only the value maybe can be trusted :-(.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/vc-arch.el.gz
(defun vc-arch-file-source-p (file)
"Can return nil, `maybe' or a non-nil value.
Only the value `maybe' can be trusted :-(."
;; FIXME: Check the tag and name of parent dirs.
(unless (string-match "\\`[,+]" (file-name-nondirectory file))
(or (string-match "\\`{arch}/"
(file-relative-name file (vc-arch-root file)))
(file-exists-p
;; Check the presence of an ID file.
(expand-file-name
(concat ".arch-ids/" (file-name-nondirectory file) ".id")
(file-name-directory file)))
;; Check the presence of a tagline.
(vc-with-current-file-buffer file
(save-excursion
(goto-char (point-max))
(or (re-search-backward vc-arch-tagline-re (- (point) 1000) t)
(progn
(goto-char (point-min))
(re-search-forward vc-arch-tagline-re (+ (point) 1000) t)))))
;; FIXME: check =tagging-method to see whether untagged files might
;; be source or not.
(with-current-buffer
(find-file-noselect (expand-file-name "{arch}/=tagging-method"
(vc-arch-root file)))
(let ((untagged-source t)) ;Default is `names'.
(save-excursion
(goto-char (point-min))
(if (re-search-forward "^[ \t]*\\(\\(tagline\\|implicit\\|names\\)\\|explicit\\)" nil t)
(setq untagged-source (match-end 2)))
(if (re-search-forward "^[ \t]*untagged-source[ \t]+\\(\\(source\\)\\|precious\\|backup\\|junk\\|unrecognized\\)" nil t)
(setq untagged-source (match-end 2))))
(if untagged-source 'maybe))))))