annotate doc/emacs/vc1-xtra.texi @ 97109:20a9ca33d937

(VC Directory Mode): Update the display format and fix the vc-dir command name.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 30 Jul 2008 07:56:17 +0000
parents 31c82b39ac3c
children 605f76f600ae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
1 @c This is part of the Emacs manual.
87903
5d58981e6690 Merge from emacs--rel--22
Miles Bader <miles@gnu.org>
parents: 85136
diff changeset
2 @c Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
3 @c See file emacs.texi for copying conditions.
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
4 @c
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
5 @c This file is included either in vc-xtra.texi (when producing the
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
6 @c printed version) or in the main Emacs manual (for the on-line version).
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
7 @node VC Directory Mode
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
8 @subsection VC Directory Mode
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
9
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
10 @cindex PCL-CVS
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
11 @pindex cvs
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
12 @cindex CVS directory mode
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
13 The VC directory mode described here works with all the version control
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
14 systems that VC supports. Another more powerful facility, designed
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
15 specifically for CVS, is called PCL-CVS. @xref{Top, , About PCL-CVS,
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
16 pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
17
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
18 @kindex C-x v d
97109
20a9ca33d937 (VC Directory Mode): Update the display format and fix
Dan Nicolaescu <dann@ics.uci.edu>
parents: 95054
diff changeset
19 @findex vc-dir
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
20 When you are working on a large program, it is often useful to find
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
21 out which files have changed within an entire directory tree, or to view
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
22 the status of all files under version control at once, and to perform
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
23 version control operations on collections of files. You can use the
97109
20a9ca33d937 (VC Directory Mode): Update the display format and fix
Dan Nicolaescu <dann@ics.uci.edu>
parents: 95054
diff changeset
24 command @kbd{C-x v d} (@code{vc-dir}) to make a directory listing
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
25 that includes only files relevant for version control.
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
26
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
27 @kbd{C-x v d} creates a buffer which uses VC directory mode. This
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
28 buffer will contain a listing of version-controlled files beneath
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
29 the current directory, and their containing directories. Files
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
30 which are up-to-date (have no local differences from the repository
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
31 copy) will be omitted; if all files in a directory are up-to-date,
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
32 the directory will be omitted as well. But there is an exception;
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
33 if VC mode detects that a file changed to up-to-date state since your
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
34 last look at it, that state will be shown.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
35
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
36 The line for an individual file will show the version control state of
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
37 the file. Under RCS and SCCS, the name of the user locking the file
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
38 is shown; under CVS, an abbreviated version of the @samp{cvs status}
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
39 output is used. Here is an example using RCS:
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
40
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
41 Here is an example using CVS:
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
42
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
43 @smallexample
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
44 @group
97109
20a9ca33d937 (VC Directory Mode): Update the display format and fix
Dan Nicolaescu <dann@ics.uci.edu>
parents: 95054
diff changeset
45 ./
20a9ca33d937 (VC Directory Mode): Update the display format and fix
Dan Nicolaescu <dann@ics.uci.edu>
parents: 95054
diff changeset
46 modified file1.c
20a9ca33d937 (VC Directory Mode): Update the display format and fix
Dan Nicolaescu <dann@ics.uci.edu>
parents: 95054
diff changeset
47 update file2.c
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
48 @end group
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
49 @end smallexample
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
50
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
51 Here @samp{file1.c} is modified with respect to the repository, and
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
52 @samp{file2.c} is not. @samp{file3.c} is modified, but other changes
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
53 have also been checked in to the repository---you need to merge them
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
54 with the work file before you can check it in.
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
55
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
56 @vindex vc-stay-local
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
57 @vindex vc-cvs-stay-local
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
58 In the above, if the repository were on a remote machine, VC would
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
59 only contact it when the variable @code{vc-stay-local} (or
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
60 @code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
61 because access to the repository may be slow, or you may be working
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
62 offline and not have access to the repository at all. As a
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
63 consequence, VC would not be able to tell you that @samp{file3.c} is
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
64 in the ``merge'' state; you would learn that only when you try to
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
65 check-in your modified copy of the file, or use a command such as
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
66 @kbd{C-x v m}.
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
67
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
68 In practice, this is not a problem because CVS handles this case
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
69 consistently whenever it arises. In VC, you'll simply get prompted to
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
70 merge the remote changes into your work file first. The benefits of
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
71 less network communication usually outweigh the disadvantage of not
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
72 seeing remote changes immediately.
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
73
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
74 @vindex vc-directory-exclusion-list
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
75 When a VC directory displays subdirectories it omits some that
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
76 should never contain any files under version control. By default,
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
77 this includes Version Control subdirectories such as @samp{RCS} and
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
78 @samp{CVS}; you can customize this by setting the variable
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
79 @code{vc-directory-exclusion-list}.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
80
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
81 @node VC Directory Commands
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
82 @subsection VC Directory Commands
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
83
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
84 VC directory mode has a full set of navigation and marking commands
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
85 for picking out filesets. Some of these are also available in a
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
86 context menu invoked with the right mouse button.
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
87
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
88 Up and down-arrow keys move in the buffer; @kbd{n} and @kbd{p} also
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
89 move vertically as in other list-browsing modes. @kbd{SPC} and
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
90 @kbd{TAB} behave like down-arrow, and the back-tab behaves like up-arrow.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
91
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
92 Both @kbd{C-m} and @kbd{f} visit the file on the current
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
93 line. @kbd{o} visits that file in another window. @kbd{q} dismisses
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
94 the directory buffer.
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
95
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
96 @kbd{x} toggles hiding of up-to-date files.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
97
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
98 @kbd{m} marks the file on the current line. @kbd{M} marks all
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
99 files. @kbd{u} marks the file on the current line. @kbd{U} unmarks all
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
100 files.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
101
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
102 Normal VC command with the @kbd{C-x v} prefix work in directory
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
103 buffers. Some single-key shortcuts are available as well; @kbd{=},
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
104 @kbd{+}, @kbd{l}, @kbd{i}, and @kbd{v} behave as through prefixed with
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
105 @kbd{C-x v}.
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
106
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
107 The command @kbd{C-x v v} (@code{vc-next-action}) operates on all the
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
108 marked files, so that you can lock or check in several files at once.
85136
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
109 If the underlying VC supports atomic commits of multiple-file
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
110 changesets @kbd{v v} with a selected set of modified but not committed
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
111 files wuill commit all of them at once as a single changeset.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
112
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
113 When @kbd{C-x v v} (@code{vc-next-action}) operates on a set of files,
85136
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
114 it requires that all of those files must be in the same state;
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
115 otherwise it will throw an error. Note that this differs from the
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
116 behavior of older versions of VC, which did not have fileset
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
117 operations and simply did @code{vc-next-action} on each file
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
118 individually.
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
119
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
120 If any files are in a state that calls for commit, @kbd{C-x v v} reads a
85136
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
121 single log entry and uses it for the changeset as a whole. If the
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
122 underling VCS is file- rather than changeset-oriented, the log entry
25d7083373cc Updates for new VC.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 84271
diff changeset
123 will be replicated into the history of each file.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
124
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
125 @ignore
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
126 arch-tag: 8e8c2a01-ad41-4e61-a89a-60131ad67263
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
127 @end ignore