Function: ediff-get-directory-files-under-revision
ediff-get-directory-files-under-revision is a byte-compiled function
defined in ediff-mult.el.gz.
Signature
(ediff-get-directory-files-under-revision JOBNAME REGEXP DIR1 &optional MERGE-AUTOSTORE-DIR)
Source Code
;; Defined in /usr/src/emacs/lisp/vc/ediff-mult.el.gz
;; find directory files that are under revision. Include subdirectories, since
;; we may visit them recursively. DIR1 is the directory to inspect.
;; MERGE-AUTOSTORE-DIR is the directory where to auto-store the results of
;; merges. Can be nil.
(defun ediff-get-directory-files-under-revision (_jobname
regexp dir1
&optional merge-autostore-dir)
(let (lis1 elt common auxdir1)
(setq auxdir1 (file-name-as-directory dir1)
lis1 (directory-files auxdir1 nil regexp))
(if (ediff-nonempty-string-p merge-autostore-dir)
(setq merge-autostore-dir
(file-name-as-directory merge-autostore-dir)))
(while lis1
(setq elt (car lis1)
lis1 (cdr lis1))
;; take files under revision control
(cond ((file-directory-p (concat auxdir1 elt))
(setq common
(cons (ediff-add-slash-if-directory auxdir1 elt) common)))
((and (featurep 'vc-hooks) (vc-backend (concat auxdir1 elt)))
(setq common (cons elt common)))
;; The following two are needed only if vc-hooks isn't loaded.
;; They won't recognize CVS files.
((file-exists-p (concat auxdir1 elt ",v"))
(setq common (cons elt common)))
((file-exists-p (concat auxdir1 "RCS/" elt ",v"))
(setq common (cons elt common)))
) ; cond
) ; while
(setq common (delete "./" common)
common (delete "../" common)
common (delete "RCS" common)
common (delete "CVS" common)
)
;; copying is needed because sort sorts via side effects
(setq common (sort (copy-sequence common) #'string-lessp))
;; return result
(cons
;; header -- has 6 elements. Meta buffer is prepended later by
;; ediff-prepare-meta-buffer
(ediff-make-new-meta-list-header regexp
auxdir1 nil nil
merge-autostore-dir nil)
(mapcar (lambda (elt) (ediff-make-new-meta-list-element
(expand-file-name (concat auxdir1 elt)) nil nil))
common))
))