aboutsummaryrefslogtreecommitdiffstats
path: root/man/vc1-xtra.texi
diff options
context:
space:
mode:
Diffstat (limited to 'man/vc1-xtra.texi')
-rw-r--r--man/vc1-xtra.texi137
1 files changed, 137 insertions, 0 deletions
diff --git a/man/vc1-xtra.texi b/man/vc1-xtra.texi
new file mode 100644
index 00000000000..822ecc543ef
--- /dev/null
+++ b/man/vc1-xtra.texi
@@ -0,0 +1,137 @@
1@c This file is included either in vc-xtra.texi (when producing the
2@c printed version) or in the main Emacs manual (for the on-line version).
3@node VC Dired Mode
4@subsection Dired under VC
5
6@cindex PCL-CVS
7@pindex cvs
8@cindex CVS Dired Mode
9 The VC Dired Mode described here works with all the version control
10systems that VC supports. Another more powerful facility, designed
11specifically for CVS, is called PCL-CVS. @xref{Top, , About PCL-CVS,
12pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.
13
14@kindex C-x v d
15@findex vc-directory
16 When you are working on a large program, it is often useful to find
17out which files have changed within an entire directory tree, or to view
18the status of all files under version control at once, and to perform
19version control operations on collections of files. You can use the
20command @kbd{C-x v d} (@code{vc-directory}) to make a directory listing
21that includes only files relevant for version control.
22
23@vindex vc-dired-terse-display
24 @kbd{C-x v d} creates a buffer which uses VC Dired Mode. This looks
25much like an ordinary Dired buffer (@pxref{Dired,,,emacs, the
26Emacs Manual}); however, normally it shows only the noteworthy files
27(those locked or not up-to-date). This is called @dfn{terse display}.
28If you set the variable @code{vc-dired-terse-display} to @code{nil},
29then VC Dired shows all relevant files---those managed under version
30control, plus all subdirectories (@dfn{full display}). The command
31@kbd{v t} in a VC Dired buffer toggles between terse display and full
32display (@pxref{VC Dired Commands}).
33
34@vindex vc-dired-recurse
35 By default, VC Dired produces a recursive listing of noteworthy or
36relevant files at or below the given directory. You can change this by
37setting the variable @code{vc-dired-recurse} to @code{nil}; then VC
38Dired shows only the files in the given directory.
39
40 The line for an individual file shows the version control state in the
41place of the hard link count, owner, group, and size of the file. If
42the file is unmodified, in sync with the master file, the version
43control state shown is blank. Otherwise it consists of text in
44parentheses. Under RCS and SCCS, the name of the user locking the file
45is shown; under CVS, an abbreviated version of the @samp{cvs status}
46output is used. Here is an example using RCS:
47
48@smallexample
49@group
50 /home/jim/project:
51
52 -rw-r--r-- (jim) Apr 2 23:39 file1
53 -r--r--r-- Apr 5 20:21 file2
54@end group
55@end smallexample
56
57@noindent
58The files @samp{file1} and @samp{file2} are under version control,
59@samp{file1} is locked by user jim, and @samp{file2} is unlocked.
60
61 Here is an example using CVS:
62
63@smallexample
64@group
65 /home/joe/develop:
66
67 -rw-r--r-- (modified) Aug 2 1997 file1.c
68 -rw-r--r-- Apr 4 20:09 file2.c
69 -rw-r--r-- (merge) Sep 13 1996 file3.c
70@end group
71@end smallexample
72
73 Here @samp{file1.c} is modified with respect to the repository, and
74@samp{file2.c} is not. @samp{file3.c} is modified, but other changes
75have also been checked in to the repository---you need to merge them
76with the work file before you can check it in.
77
78@vindex vc-stay-local
79@vindex vc-cvs-stay-local
80 In the above, if the repository were on a remote machine, VC would
81only contact it when the variable @code{vc-stay-local} (or
82@code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is
83because access to the repository may be slow, or you may be working
84offline and not have access to the repository at all. As a
85consequence, VC would not be able to tell you that @samp{file3.c} is
86in the ``merge'' state; you would learn that only when you try to
87check-in your modified copy of the file, or use a command such as
88@kbd{C-x v m}.
89
90 In practice, this is not a problem because CVS handles this case
91consistently whenever it arises. In VC, you'll simply get prompted to
92merge the remote changes into your work file first. The benefits of
93less network communication usually outweigh the disadvantage of not
94seeing remote changes immediately.
95
96@vindex vc-directory-exclusion-list
97 When VC Dired displays subdirectories (in the ``full'' display mode),
98it omits some that should never contain any files under version control.
99By default, this includes Version Control subdirectories such as
100@samp{RCS} and @samp{CVS}; you can customize this by setting the
101variable @code{vc-directory-exclusion-list}.
102
103 You can fine-tune VC Dired's format by typing @kbd{C-u C-x v d}---as in
104ordinary Dired, that allows you to specify additional switches for the
105@samp{ls} command.
106
107@node VC Dired Commands
108@subsection VC Dired Commands
109
110 All the usual Dired commands work normally in VC Dired mode, except
111for @kbd{v}, which is redefined as the version control prefix. You can
112invoke VC commands such as @code{vc-diff} and @code{vc-print-log} by
113typing @kbd{v =}, or @kbd{v l}, and so on. Most of these commands apply
114to the file name on the current line.
115
116 The command @kbd{v v} (@code{vc-next-action}) operates on all the
117marked files, so that you can lock or check in several files at once.
118If it operates on more than one file, it handles each file according to
119its current state; thus, it might lock one file, but check in another
120file. This could be confusing; it is up to you to avoid confusing
121behavior by marking a set of files that are in a similar state. If no
122files are marked, @kbd{v v} operates on the file in the current line.
123
124 If any files call for check-in, @kbd{v v} reads a single log entry,
125then uses it for all the files being checked in. This is convenient for
126registering or checking in several files at once, as part of the same
127change.
128
129@findex vc-dired-toggle-terse-mode
130@findex vc-dired-mark-locked
131 You can toggle between terse display (only locked files, or files not
132up-to-date) and full display at any time by typing @kbd{v t}
133(@code{vc-dired-toggle-terse-mode}). There is also a special command
134@kbd{* l} (@code{vc-dired-mark-locked}), which marks all files currently
135locked (or, with CVS, all files not up-to-date). Thus, typing @kbd{* l
136t k} is another way to delete from the buffer all files except those
137currently locked.