Function: vc-dir
vc-dir is an autoloaded, interactive and byte-compiled function
defined in vc-dir.el.gz.
Signature
(vc-dir DIR &optional BACKEND)
Documentation
Show the VC status for "interesting" files in and below DIR.
This allows you to mark files and perform VC operations on them. The list omits files which are up to date, with no changes in your copy or the repository, if there is nothing in particular to say about them.
Preparing the list of file status takes time; when the buffer first appears, it has only the first few lines of summary information. The file lines appear later.
Optional second argument BACKEND specifies the VC backend to use. Interactively, a prefix argument means to ask for the backend.
These are the commands available for use in the file status buffer:
* r vc-dir-mark-registered-files
+ vc-update
<backtab> vc-dir-previous-directory
<down-mouse-3> vc-dir-menu
<follow-link> mouse-face
= vc-diff
B c vc-create-tag
B l vc-print-branch-log
B s vc-retrieve-tag
C-<down> vc-dir-next-directory
C-<up> vc-dir-previous-directory
C-c C-c vc-dir-kill-dir-status-process
C-k vc-dir-kill-line
C-o vc-dir-display-file
D vc-root-diff
DEL vc-dir-unmark-file-up
G vc-dir-ignore
I vc-log-incoming
L vc-print-root-log
M vc-dir-mark-all-files
M-DEL vc-dir-unmark-all-files
M-s a C-M-s vc-dir-isearch-regexp
M-s a C-s vc-dir-isearch
M-{ vc-dir-previous-directory
M-} vc-dir-next-directory
O vc-log-outgoing
P vc-push
Q vc-dir-query-replace-regexp
RET vc-dir-find-file
S vc-dir-search
S-SPC vc-dir-previous-line
SPC vc-dir-next-line
TAB vc-dir-next-directory
U vc-dir-unmark-all-files
d vc-dir-clean-files
e vc-dir-find-file
f vc-dir-find-file
i vc-register
l vc-print-log
m vc-dir-mark
n vc-dir-next-line
o vc-dir-find-file-other-window
p vc-dir-previous-line
u vc-dir-unmark
v vc-next-action
x vc-dir-hide-up-to-date
Probably introduced at or before Emacs version 23.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-dir.el.gz
;;;###autoload
(defun vc-dir (dir &optional backend)
"Show the VC status for \"interesting\" files in and below DIR.
This allows you to mark files and perform VC operations on them.
The list omits files which are up to date, with no changes in your copy
or the repository, if there is nothing in particular to say about them.
Preparing the list of file status takes time; when the buffer
first appears, it has only the first few lines of summary information.
The file lines appear later.
Optional second argument BACKEND specifies the VC backend to use.
Interactively, a prefix argument means to ask for the backend.
These are the commands available for use in the file status buffer:
\\{vc-dir-mode-map}"
(interactive
(list
;; When you hit C-x v d in a visited VC file,
;; the *vc-dir* buffer visits the directory under its truename;
;; therefore it makes sense to always do that.
;; Otherwise if you do C-x v d -> C-x C-f -> C-x v d
;; you may get a new *vc-dir* buffer, different from the original
(file-truename (read-directory-name "VC status for directory: "
(vc-root-dir) nil t
nil))
(if current-prefix-arg
(intern
(completing-read
"Use VC backend: "
(mapcar (lambda (b) (list (symbol-name b)))
vc-handled-backends)
nil t nil nil)))))
(unless backend
(setq backend (vc-responsible-backend dir)))
(let (pop-up-windows) ; based on cvs-examine; bug#6204
(pop-to-buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir backend)))
(if (derived-mode-p 'vc-dir-mode)
(vc-dir-refresh)
;; FIXME: find a better way to pass the backend to `vc-dir-mode'.
(let ((use-vc-backend backend))
(vc-dir-mode))))