Mercurial > emacs
annotate doc/emacs/vc1-xtra.texi @ 94818:8eb267268480
Document the new VC directory mode.
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Fri, 09 May 2008 20:03:27 +0000 |
parents | 5d58981e6690 |
children | 31c82b39ac3c |
rev | line source |
---|---|
84271 | 1 @c This is part of the Emacs manual. |
87903 | 2 @c Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
84271 | 3 @c See file emacs.texi for copying conditions. |
4 @c | |
5 @c This file is included either in vc-xtra.texi (when producing the | |
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 | 9 |
10 @cindex PCL-CVS | |
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 | 14 systems that VC supports. Another more powerful facility, designed |
15 specifically for CVS, is called PCL-CVS. @xref{Top, , About PCL-CVS, | |
16 pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}. | |
17 | |
18 @kindex C-x v d | |
19 @findex vc-directory | |
20 When you are working on a large program, it is often useful to find | |
21 out which files have changed within an entire directory tree, or to view | |
22 the status of all files under version control at once, and to perform | |
23 version control operations on collections of files. You can use the | |
24 command @kbd{C-x v d} (@code{vc-directory}) to make a directory listing | |
25 that includes only files relevant for version control. | |
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 | 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 | 38 is shown; under CVS, an abbreviated version of the @samp{cvs status} |
39 output is used. Here is an example using RCS: | |
40 | |
41 Here is an example using CVS: | |
42 | |
43 @smallexample | |
44 @group | |
94818
8eb267268480
Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87903
diff
changeset
|
45 DIRECTORY ./ |
8eb267268480
Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87903
diff
changeset
|
46 edited file1.c |
8eb267268480
Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
87903
diff
changeset
|
47 up-to-date file2.c |
84271 | 48 @end group |
49 @end smallexample | |
50 | |
51 Here @samp{file1.c} is modified with respect to the repository, and | |
52 @samp{file2.c} is not. @samp{file3.c} is modified, but other changes | |
53 have also been checked in to the repository---you need to merge them | |
54 with the work file before you can check it in. | |
55 | |
56 @vindex vc-stay-local | |
57 @vindex vc-cvs-stay-local | |
58 In the above, if the repository were on a remote machine, VC would | |
59 only contact it when the variable @code{vc-stay-local} (or | |
60 @code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is | |
61 because access to the repository may be slow, or you may be working | |
62 offline and not have access to the repository at all. As a | |
63 consequence, VC would not be able to tell you that @samp{file3.c} is | |
64 in the ``merge'' state; you would learn that only when you try to | |
65 check-in your modified copy of the file, or use a command such as | |
66 @kbd{C-x v m}. | |
67 | |
68 In practice, this is not a problem because CVS handles this case | |
69 consistently whenever it arises. In VC, you'll simply get prompted to | |
70 merge the remote changes into your work file first. The benefits of | |
71 less network communication usually outweigh the disadvantage of not | |
72 seeing remote changes immediately. | |
73 | |
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 | 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 | 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 | 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 | 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 | 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 | 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 | 124 |
125 @ignore | |
126 arch-tag: 8e8c2a01-ad41-4e61-a89a-60131ad67263 | |
127 @end ignore |