aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-12-19 15:25:46 +0800
committerChong Yidong2011-12-19 15:25:46 +0800
commitbc859d5f3eb942f627f113eb9e75015cb43eda02 (patch)
treeaec058576e9d3e8d2a73733d6dc19bc5f3fd8a5b
parenta6198c9097703c4ad2a686ecb1ade1af8cd52112 (diff)
downloademacs-bc859d5f3eb942f627f113eb9e75015cb43eda02.tar.gz
emacs-bc859d5f3eb942f627f113eb9e75015cb43eda02.zip
More updates for VC documentation.
* doc/emacs/maintaining.texi (VCS Merging, VCS Changesets): Index entries. (VC Mode Line): Add index entry for "version control status". (VC Undo): Use vc-revert instead of its vc-revert-buffer alias. Document vc-revert-show-diff. De-document vc-rollback. (VC Directory Mode): Rewrite introduction. Move prefix arg documentation here from VC Directory Buffer node. (VC Directory Buffer): Use a decentralized VCS example. (VC Directory Commands): Use a table. Remove material duplicated in previous nodes on multi-file VC filsets.
-rw-r--r--admin/FOR-RELEASE30
-rw-r--r--doc/emacs/ChangeLog12
-rw-r--r--doc/emacs/maintaining.texi388
-rw-r--r--etc/NEWS1
4 files changed, 235 insertions, 196 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 23d2bd2b16a..fc36fb6e1d7 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -61,13 +61,6 @@ sk Miroslav Vaško
61 61
62* BUGS 62* BUGS
63 63
64** Does deleting frames run Lisp code? If so, can we get rid of that?
65It is a dangerous design.
66http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01330.html
67
68** Why were the calls to x_fully_uncatch_errors commented out in eval.c?
69http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01987.html
70
71** rms: gnus-dired.el is a mistake. Those features should not 64** rms: gnus-dired.el is a mistake. Those features should not
72be part of Gnus. They should be moved to some other part of Emacs. 65be part of Gnus. They should be moved to some other part of Emacs.
73rsteib: Gnus dependencies in `gnus-dired.el' (and `mailcap.el') have been 66rsteib: Gnus dependencies in `gnus-dired.el' (and `mailcap.el') have been
@@ -90,25 +83,8 @@ and change key bindings where necessary. The current list of modes:
90 `log-edit-comment-search-forward'. Perhaps search commands 83 `log-edit-comment-search-forward'. Perhaps search commands
91 on the global key binding `M-s' are useless in these modes. 84 on the global key binding `M-s' are useless in these modes.
92 85
93** sdl.web@gmail.com, 30 Oct: ps-lpr-switches has no effect
94http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg02091.html
95
96Fixed by this change?
97
982007-11-09 Vinicius Jose Latorre <viniciusjl@ig.com.br>
99
100 * ps-print.el: [...]
101 (ps-do-despool): If ps-lpr-switches is not a list, force it to be one.
102
103** In C, use EMACS_INT for variables and structure members
104for buffer/string positions. E.g. struct it, struct text_pos.
105
106* DOCUMENTATION 86* DOCUMENTATION
107 87
108** Clean up Emacs.app references in code and documentation.
109
110** Document new font backend
111
112** Document XEmbed support 88** Document XEmbed support
113 89
114** Check the Emacs Tutorial. 90** Check the Emacs Tutorial.
@@ -154,7 +130,7 @@ anti.texi
154arevert-xtra.texi cyd 130arevert-xtra.texi cyd
155basic.texi cyd 131basic.texi cyd
156buffers.texi cyd 132buffers.texi cyd
157building.texi 133building.texi cyd
158calendar.texi 134calendar.texi
159cal-xtra.texi 135cal-xtra.texi
160cmdargs.texi 136cmdargs.texi
@@ -188,13 +164,13 @@ msdog-xtra.texi
188mule.texi 164mule.texi
189m-x.texi cyd 165m-x.texi cyd
190picture-xtra.texi 166picture-xtra.texi
191programs.texi 167programs.texi cyd
192regs.texi cyd 168regs.texi cyd
193rmail.texi 169rmail.texi
194screen.texi cyd 170screen.texi cyd
195search.texi cyd 171search.texi cyd
196sending.texi 172sending.texi
197text.texi 173text.texi cyd
198trouble.texi 174trouble.texi
199vc-xtra.texi 175vc-xtra.texi
200vc1-xtra.texi 176vc1-xtra.texi
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 20f068e4ef6..90bc9dc8c91 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,15 @@
12011-12-19 Chong Yidong <cyd@gnu.org>
2
3 * maintaining.texi (VCS Merging, VCS Changesets): Index entries.
4 (VC Mode Line): Add index entry for "version control status".
5 (VC Undo): Use vc-revert instead of its vc-revert-buffer alias.
6 Document vc-revert-show-diff. De-document vc-rollback.
7 (VC Directory Mode): Rewrite introduction. Move prefix arg
8 documentation here from VC Directory Buffer node.
9 (VC Directory Buffer): Use a decentralized VCS example.
10 (VC Directory Commands): Use a table. Remove material duplicated
11 in previous nodes on multi-file VC filsets.
12
12011-12-17 Chong Yidong <cyd@gnu.org> 132011-12-17 Chong Yidong <cyd@gnu.org>
2 14
3 * maintaining.texi (VCS Concepts): Make "revision" terminology 15 * maintaining.texi (VCS Concepts): Make "revision" terminology
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 063d0e65f5b..96d520e143c 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -227,17 +227,18 @@ these modes of operation, but it cannot hide the differences.
227 227
228@node VCS Merging 228@node VCS Merging
229@subsubsection Merge-based vs lock-based Version Control 229@subsubsection Merge-based vs lock-based Version Control
230@cindex locking versus merging
231 230
232 A version control system typically has some mechanism to coordinate 231 A version control system typically has some mechanism to coordinate
233between users who want to change the same file. There are two ways to 232between users who want to change the same file. There are two ways to
234do this: merging and locking. 233do this: merging and locking.
235 234
235@cindex merging-based version
236 In a version control system that uses merging, each user may modify 236 In a version control system that uses merging, each user may modify
237a work file at any time. The system lets you @dfn{merge} your work 237a work file at any time. The system lets you @dfn{merge} your work
238file, which may contain changes that have not been committed, with the 238file, which may contain changes that have not been committed, with the
239latest changes that others have committed. 239latest changes that others have committed.
240 240
241@cindex locking-based version
241 Older version control systems use a @dfn{locking} scheme instead. 242 Older version control systems use a @dfn{locking} scheme instead.
242Here, work files are normally read-only. To edit a file, you ask the 243Here, work files are normally read-only. To edit a file, you ask the
243version control system to make it writable for you by @dfn{locking} 244version control system to make it writable for you by @dfn{locking}
@@ -274,7 +275,7 @@ possible.
274@node VCS Changesets 275@node VCS Changesets
275@subsubsection Changeset-based vs File-based Version Control 276@subsubsection Changeset-based vs File-based Version Control
276 277
277@cindex changesets 278@cindex file-based version control
278 On SCCS, RCS, CVS, and other early version control systems, version 279 On SCCS, RCS, CVS, and other early version control systems, version
279control operations are @dfn{file-based}: each file has its own comment 280control operations are @dfn{file-based}: each file has its own comment
280and revision history separate from that of all other files. Newer 281and revision history separate from that of all other files. Newer
@@ -283,6 +284,7 @@ commit may include changes to several files, and the entire set of
283changes is handled as a unit. Any comment associated with the change 284changes is handled as a unit. Any comment associated with the change
284does not belong to a single file, but to the changeset itself. 285does not belong to a single file, but to the changeset itself.
285 286
287@cindex changeset-based version control
286 Changeset-based version control is more flexible and powerful than 288 Changeset-based version control is more flexible and powerful than
287file-based version control; usually, when a change to multiple files 289file-based version control; usually, when a change to multiple files
288has to be reversed, it's good to be able to easily identify and remove 290has to be reversed, it's good to be able to easily identify and remove
@@ -356,20 +358,22 @@ later use the @kbd{C-x v a} command to copy it to @file{ChangeLog}
356 358
357@node VC Mode Line 359@node VC Mode Line
358@subsection Version Control and the Mode Line 360@subsection Version Control and the Mode Line
359@cindex VC, mode line indicator 361@cindex VC mode line indicator
360 362
361 When you visit a file that is under version control, Emacs indicates 363 When you visit a file that is under version control, Emacs indicates
362this on the mode line. For example, @samp{Bzr-1223} says that Bazaar 364this on the mode line. For example, @samp{Bzr-1223} says that Bazaar
363is used for that file, and the current revision ID is 1223. 365is used for that file, and the current revision ID is 1223.
364 366
367@cindex version control status
365 The character between the back-end name and the revision ID 368 The character between the back-end name and the revision ID
366indicates the status of the work file. In a merge-based version 369indicates the @dfn{version control status} of the work file. In a
367control system, a @samp{-} character indicates that the work file is 370merge-based version control system, a @samp{-} character indicates
368unmodified, and @samp{:} indicates that it has been modified. 371that the work file is unmodified, and @samp{:} indicates that it has
369@samp{!} indicates that the file contains conflicts as result of a 372been modified. @samp{!} indicates that the file contains conflicts as
370recent merge operation (@pxref{Merging}), or that the file was removed 373result of a recent merge operation (@pxref{Merging}), or that the file
371from the version control. Finally, @samp{?} means that the file is 374was removed from the version control. Finally, @samp{?} means that
372under version control, but is missing from the working tree. 375the file is under version control, but is missing from the working
376tree.
373 377
374 In a lock-based system, @samp{-} indicates an unlocked file, and 378 In a lock-based system, @samp{-} indicates an unlocked file, and
375@samp{:} a locked file; if the file is locked by another user (for 379@samp{:} a locked file; if the file is locked by another user (for
@@ -399,6 +403,7 @@ system, but is usually not excessive.
399@subsection Basic Editing under Version Control 403@subsection Basic Editing under Version Control
400 404
401@cindex filesets, VC 405@cindex filesets, VC
406@cindex VC filesets
402 Most VC commands operate on @dfn{VC filesets}. A VC fileset is a 407 Most VC commands operate on @dfn{VC filesets}. A VC fileset is a
403collection of one or more files that a VC operation acts on. When you 408collection of one or more files that a VC operation acts on. When you
404type VC commands in a buffer visiting a version-controlled file, the 409type VC commands in a buffer visiting a version-controlled file, the
@@ -451,9 +456,9 @@ and don't persist across sessions.
451@itemize @bullet 456@itemize @bullet
452@item 457@item
453If there is more than one file in the VC fileset and the files have 458If there is more than one file in the VC fileset and the files have
454inconsistent version control states, signal an error. (Note, however, 459inconsistent version control statuses, signal an error. (Note,
455that a fileset is allowed to include both ``newly-added'' files and 460however, that a fileset is allowed to include both ``newly-added''
456``modified'' files; @pxref{Registering}.) 461files and ``modified'' files; @pxref{Registering}.)
457 462
458@item 463@item
459If none of the files in the VC fileset are registered with a version 464If none of the files in the VC fileset are registered with a version
@@ -504,7 +509,7 @@ its default mode), @kbd{C-x v v} does the following:
504@itemize @bullet 509@itemize @bullet
505@item 510@item
506If there is more than one file in the VC fileset and the files have 511If there is more than one file in the VC fileset and the files have
507inconsistent version control states, signal an error. 512inconsistent version control statuses, signal an error.
508 513
509@item 514@item
510If each file in the VC fileset is not registered with a version 515If each file in the VC fileset is not registered with a version
@@ -887,7 +892,7 @@ the file contents without distraction from the annotations.
887 892
888@table @kbd 893@table @kbd
889@item C-x v l 894@item C-x v l
890Display revision control state and change history 895Display the change history for the current fileset
891(@code{vc-print-log}). 896(@code{vc-print-log}).
892 897
893@item C-x v L 898@item C-x v L
@@ -927,8 +932,8 @@ this feature). With a prefix argument, the command prompts for the
927maximum number of revisions to display. 932maximum number of revisions to display.
928 933
929 The @kbd{C-x v L} history is shown in a compact form, usually 934 The @kbd{C-x v L} history is shown in a compact form, usually
930omitting all but the first line of each log entry. However, you can 935showing only the first line of each log entry. However, you can type
931type @key{RET} (@code{log-view-toggle-entry-display}) in the 936@key{RET} (@code{log-view-toggle-entry-display}) in the
932@samp{*vc-change-log*} buffer to reveal the entire log entry for the 937@samp{*vc-change-log*} buffer to reveal the entire log entry for the
933revision at point. A second @key{RET} hides it again. 938revision at point. A second @key{RET} hides it again.
934 939
@@ -1008,58 +1013,67 @@ buffer. However, RCS, SCCS, and CVS do not support this feature.
1008 1013
1009@table @kbd 1014@table @kbd
1010@item C-x v u 1015@item C-x v u
1011Revert the buffer and the file to the working revision from which you started 1016Revert the work file(s) in the current VC fileset to the last revision
1012editing the file. 1017(@code{vc-revert}).
1013
1014@item C-x v c
1015Remove the last-entered change from the master for the visited file.
1016This undoes your last commit.
1017@end table 1018@end table
1018 1019
1020@c `C-x v c' (vc-rollback) was removed, since it's RCS/SCCS specific.
1021
1019@kindex C-x v u 1022@kindex C-x v u
1020@findex vc-revert-buffer 1023@findex vc-revert
1021 If you want to discard your current set of changes and revert to the 1024@vindex vc-revert-show-diff
1022working revision from which you started editing the file, use @kbd{C-x 1025 If you want to discard all the changes you have made to the current
1023v u} (@code{vc-revert-buffer}). If the version control system is 1026VC fileset, type @kbd{C-x v u} (@code{vc-revert-buffer}). This shows
1024locking-based, this leaves the file unlocked, and you must lock it 1027you a diff between the work file(s) and the revision from which you
1025again before making new changes. @kbd{C-x v u} requires confirmation, 1028started editing, and asks for confirmation for discarding the changes.
1026unless it sees that you haven't made any changes with respect to the 1029If you agree, the fileset is reverted. If you don't want @kbd{C-x v
1027master copy of the working revision. 1030u} to show a diff, set the variable @code{vc-revert-show-diff} to
1028 1031@code{nil} (you can still view the diff directly with @kbd{C-x v =};
1029 @kbd{C-x v u} is also the command to unlock a file if you lock it and 1032@pxref{Old Revisions}). Note that @kbd{C-x v u} cannot be reversed
1030then decide not to change it. 1033with the usual undo commands (@pxref{Undo}), so use it with care.
1031 1034
1032@kindex C-x v c 1035 On locking-based version control systems, @kbd{C-x v u} leaves files
1033@findex vc-rollback 1036unlocked; you must lock again to resume editing. You can also use
1034 To cancel a change that you already committed, use @kbd{C-x v c} 1037@kbd{C-x v u} to unlock a file if you lock it and then decide not to
1035(@code{vc-rollback}). This command discards all record of the most 1038change it.
1036recent checked-in revision, but only if your work file corresponds to
1037that revision---you cannot use @kbd{C-x v c} to cancel a revision that
1038is not the latest on its branch. Note that many version control
1039systems do not support rollback at all; this command is something of a
1040historical relic.
1041 1039
1042@node VC Directory Mode 1040@node VC Directory Mode
1043@subsection VC Directory Mode 1041@subsection VC Directory Mode
1044 1042
1043@cindex VC Directory buffer
1044 The @dfn{VC Directory buffer} is a specialized buffer for viewing
1045the version control statuses of the files in a directory tree, and
1046performing version control operations on those files. In particular,
1047it is used to specify multi-file VC filesets for commands like
1048@w{@kbd{C-x v v}} to act on (@pxref{VC Directory Commands}).
1049
1045@kindex C-x v d 1050@kindex C-x v d
1046@findex vc-dir 1051@findex vc-dir
1047 When you are working on a large program, it is often useful to find 1052 To use the VC Directory buffer, type @kbd{C-x v d} (@code{vc-dir}).
1048out which files have changed within an entire directory tree, or to 1053This reads a directory name using the minibuffer, and switches to a VC
1049view the status of all files under version control at once, and to 1054Directory buffer for that directory. By default, the buffer is named
1050perform version control operations on collections of files. You can 1055@samp{*vc-dir*}. Its contents are described
1051use the command @kbd{C-x v d} (@code{vc-dir}) to make a directory 1056@iftex
1052listing that includes only files relevant for version control. This 1057below.
1053creates a @dfn{VC Directory buffer} and displays it in a separate 1058@end iftex
1054window. 1059@ifnottex
1060in @ref{VC Directory Buffer}.
1061@end ifnottex
1055 1062
1063 The @code{vc-dir} command automatically detects the version control
1064system to be used in the specified directory. In the event that more
1065than one system is being used in the directory, you should invoke the
1066command with a prefix argument, @kbd{C-u C-x v d}; this prompts for
1067the version control system which the VC Directory buffer should use.
1068
1069@ifnottex
1056@cindex PCL-CVS 1070@cindex PCL-CVS
1057@pindex cvs 1071@pindex cvs
1058@cindex CVS directory mode 1072@cindex CVS directory mode
1059 The VC Directory buffer works with all the version control systems 1073 In addition to the VC Directory buffer, Emacs has a similar facility
1060that VC supports. For CVS, Emacs also offers a more powerful facility 1074called PCL-CVS which is specialized for CVS. @xref{Top, , About
1061called PCL-CVS. @xref{Top, , About PCL-CVS, pcl-cvs, PCL-CVS --- The 1075PCL-CVS, pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.
1062Emacs Front-End to CVS}. 1076@end ifnottex
1063 1077
1064@menu 1078@menu
1065* Buffer: VC Directory Buffer. What the buffer looks like and means. 1079* Buffer: VC Directory Buffer. What the buffer looks like and means.
@@ -1070,152 +1084,188 @@ Emacs Front-End to CVS}.
1070@subsubsection The VC Directory Buffer 1084@subsubsection The VC Directory Buffer
1071 1085
1072 The VC Directory buffer contains a list of version-controlled files 1086 The VC Directory buffer contains a list of version-controlled files
1073in the current directory and its subdirectories. Files which are 1087and their version control statuses. It lists files in the current
1074up-to-date (have no local differences from the repository copy) are 1088directory (the one specified when you called @kbd{C-x v d}) and its
1075usually hidden; if all files in a subdirectory are up-to-date, the 1089subdirectories, but only those with a ``noteworthy'' status. Files
1076subdirectory is hidden as well. There is an exception to this rule: 1090that are up-to-date (i.e.@: the same as in the repository) are
1077if VC mode detects that a file has changed to an up-to-date state 1091omitted. If all the files in a subdirectory are up-to-date, the
1078since you last looked at it, that file and its state are shown. 1092subdirectory is not listed either. As an exception, if a file has
1079 1093become up-to-date as a direct result of a VC command, it is listed.
1080 If a directory uses more that one version control system, you can 1094
1081select which system to use for the @code{vc-dir} command by invoking 1095 Here is an example of a VC Directory buffer listing:
1082@code{vc-dir} with a prefix argument: @kbd{C-u C-x v d}.
1083
1084 The line for an individual file shows the version control state of
1085the file. Under RCS and SCCS, the name of the user locking the file
1086is shown; under CVS, an abbreviated version of the @samp{cvs status}
1087output is used. Here is an example using CVS:
1088 1096
1089@smallexample 1097@smallexample
1090@group 1098@group
1091 ./ 1099 ./
1092 modified file1.c 1100 edited configure.ac
1093 needs-update file2.c 1101* added README
1094 needs-merge file3.c 1102 unregistered temp.txt
1103 src/
1104* edited src/main.c
1095@end group 1105@end group
1096@end smallexample 1106@end smallexample
1097 1107
1098@noindent 1108@noindent
1099In this example, @samp{file1.c} is modified with respect to the 1109Two work files have been modified but not committed:
1100repository, and @samp{file2.c} is not. @samp{file3.c} is modified, 1110@file{configure.ac} in the current directory, and @file{foo.c} in the
1101but other changes have also been committed---you need to merge them 1111@file{src/} subdirectory. The file named @file{README} has been added
1102with the work file before you can check it in. 1112but is not yet committed, while @file{temp.txt} is not under version
1103 1113control (@pxref{Registering}).
1104@vindex vc-stay-local 1114
1105@vindex vc-cvs-stay-local 1115The @samp{*} characters next to the entries for @file{README} and
1106 In the above, if the repository were on a remote machine, VC only 1116@file{src/main.c} indicate that the user has marked out these files as
1107contacts it when the variable @code{vc-stay-local} (or 1117the current VC fileset
1108@code{vc-cvs-stay-local}) is @code{nil}
1109@iftex 1118@iftex
1110(@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}). 1119(see below).
1111@end iftex 1120@end iftex
1112@ifnottex 1121@ifnottex
1113(@pxref{CVS Options}). 1122(@pxref{VC Directory Commands}).
1123@end ifnottex
1124
1125 The above example is typical for a decentralized version control
1126system like Bazaar, Git, or Mercurial. Other systems can show other
1127statuses. For instance, CVS shows the @samp{needs-update} status if
1128the repository has changes that have not been applied to the work
1129file. RCS and SCCS show the name of the user locking a file as its
1130status.
1131
1132@ifnottex
1133@vindex vc-stay-local
1134@vindex vc-cvs-stay-local
1135 On CVS and Subversion, the @code{vc-dir} command normally contacts
1136the repository, which may be on a remote machine, to check for
1137updates. If you change the variable @code{vc-stay-local} or
1138@code{vc-cvs-stay-local} (for CVS) to @code{nil} (@pxref{CVS
1139Options}), then Emacs avoids contacting a remote repository when
1140generating the VC Directory buffer (it will still contact it when
1141necessary, e.g.@: when doing a commit). This may be desirable if you
1142are working offline or the network is slow.
1114@end ifnottex 1143@end ifnottex
1115This is because access to the repository may be slow, or you may be
1116working offline and not have access to the repository at all. As a
1117consequence, VC would not be able to tell you that @samp{file3.c} is
1118in the ``merge'' state; you would learn that only when you try to
1119commit your modified copy of the file, or use a command such as
1120@kbd{C-x v m}.
1121
1122 In practice, this is not a problem because CVS handles this case
1123consistently whenever it arises. In VC, you'll simply get prompted to
1124merge the remote changes into your work file first. The benefits of
1125less network communication usually outweigh the disadvantage of not
1126seeing remote changes immediately.
1127 1144
1128@vindex vc-directory-exclusion-list 1145@vindex vc-directory-exclusion-list
1129 When a VC directory displays subdirectories it omits some that 1146 The VC Directory buffer omits subdirectories listed in the variable
1130should never contain any files under version control. By default, 1147@code{vc-directory-exclusion-list}. The default value of this
1131this includes Version Control subdirectories such as @samp{RCS} and 1148variable contains directories that are used internally by version
1132@samp{CVS}; you can customize this by setting the variable 1149control systems.
1133@code{vc-directory-exclusion-list}.
1134 1150
1135@node VC Directory Commands 1151@node VC Directory Commands
1136@subsubsection VC Directory Commands 1152@subsubsection VC Directory Commands
1137 1153
1138 VC Directory mode has a full set of navigation and marking commands 1154 Emacs provides several commands for navigating the VC Directory
1139for picking out filesets. Some of these are also available in a 1155buffer, and for ``marking'' files as belonging to the current VC
1140context menu invoked by @kbd{mouse-2}. 1156fileset.
1141 1157
1142 Up- and down-arrow keys move in the buffer; @kbd{n} and @kbd{p} also 1158@table @kbd
1143move vertically as in other list-browsing modes. @key{SPC} and 1159@item n
1144@key{TAB} behave like down-arrow, and @key{BackTab} behaves like 1160@itemx @key{SPC}
1145up-arrow. 1161Move point to the next entry (@code{vc-dir-next-line}).
1146 1162
1147 Both @kbd{C-m} and @kbd{f} visit the file on the current 1163@item p
1148line. @kbd{o} visits that file in another window. @kbd{q} dismisses 1164Move point to the previous entry (@code{vc-dir-previous-line}).
1149the directory buffer.
1150 1165
1151 @kbd{x} hides up-to-date files. 1166@item @key{TAB}
1167Move to the next directory entry (@code{vc-dir-next-directory}).
1152 1168
1153 @kbd{m} marks the file or directory on the current line. If the 1169@item S-@key{TAB}
1154region is active, @kbd{m} marks all the files in the region. There 1170Move to the previous directory entry
1155are some restrictions when marking: a file cannot be marked if any of 1171(@code{vc-dir-previous-directory}).
1156its parent directories are marked, and a directory cannot be marked if
1157any files in it or in its child directories are marked.
1158 1172
1159 @kbd{M} marks all the files with the same VC state as the current 1173@item @key{RET}
1160file if the cursor is on a file. If the cursor is on a directory, it 1174@itemx f
1161marks all child files. With a prefix argument: marks all files and 1175Visit the file or directory listed on the current line
1162directories. 1176(@code{vc-dir-find-file}).
1163 1177
1164 @kbd{u} unmarks the file or directory on the current line. If the 1178@item o
1165region is active, it unmarks all the files in the region. 1179Visit the file or directory on the current line, in a separate window
1180(@code{vc-dir-find-file-other-window}).
1166 1181
1167 @kbd{U} marks all the files with the same VC state as the current file 1182@item m
1168if the cursor is on a file. If the cursor is on a directory, it 1183Mark the file or directory on the current line (@code{vc-dir-mark}),
1169unmarks all child files. With a prefix argument: unmarks all marked 1184putting it in the current VC fileset. If the region is active, mark
1185all files in the region.
1186
1187A file cannot be marked with this command if it is already in a marked
1188directory, or one of its subdirectories. Similarly, a directory
1189cannot be marked with this command if any file in its tree is marked.
1190
1191@item M
1192If point is on a file entry, mark all files with the same status; if
1193point is on a directory entry, mark all files in that directory tree
1194(@code{vc-dir-mark-all-files}). With a prefix argument, mark all
1195listed files and directories.
1196
1197@item u
1198Unmark the file or directory on the current line. If the region is
1199active, unmark all the files in the region (@code{vc-dir-unmark}).
1200
1201@item U
1202If point is on a file entry, umark all files with the same status; if
1203point is on a directory entry, unmark all files in that directory tree
1204(@code{vc-dir-unmark-all-files}). With a prefix argument, unmark all
1170files and directories. 1205files and directories.
1171 1206
1172 It is possible to do search, search and replace, incremental search, 1207@item x
1173and incremental regexp search on multiple files. These commands will 1208Hide files with @samp{up-to-date} status
1174work on all the marked files or the current file if nothing is marked. 1209(@code{vc-dir-hide-up-to-date}).
1175If a directory is marked, the files in that directory shown in the VC 1210
1176directory buffer will be used. 1211@item q
1212Quit the VC Directory buffer, and bury it (@code{quit-window}).
1213@end table
1214
1215@findex vc-dir-mark
1216@findex vc-dir-mark-all-files
1217 While in the VC Directory buffer, all the files that you mark with
1218@kbd{m} (@code{vc-dir-mark}) or @kbd{M} (@code{vc-dir-mark}) are in
1219the current VC fileset. If you mark a directory entry with @kbd{m},
1220all the listed files in that directory tree are in the current VC
1221fileset. The files and directories that belong to the current VC
1222fileset are indicated with a @samp{*} character in the VC Directory
1223buffer, next to their VC status. In this way, you can set up a
1224multi-file VC fileset to be acted on by VC commands like @w{@kbd{C-x v
1225v}} (@pxref{Basic VC Editing}), @w{@kbd{C-x v =}} (@pxref{Old
1226Revisions}), and @w{@kbd{C-x v u}} (@pxref{VC Undo}).
1227
1228 The VC Directory buffer also defines some single-key shortcuts for
1229VC commands with the @kbd{C-x v} prefix: @kbd{=}, @kbd{+}, @kbd{l},
1230@kbd{i}, and @kbd{v}.
1231
1232 For example, you can commit a set of edited files by opening a VC
1233Directory buffer, where the files are listed with the @samp{edited}
1234status; marking the files; and typing @kbd{v} or @kbd{C-x v v}
1235(@code{vc-next-action}). If the version control system is
1236changeset-based, Emacs will commit the files in a single revision.
1237
1238 While in the VC Directory buffer, you can also perform search and
1239replace on the current VC fileset, with the following commands:
1177 1240
1178 @kbd{S} searches the marked files. 1241@table @kbd
1242@item S
1243Search the fileset (@code{vc-dir-search}).
1244
1245@item Q
1246Do a regular expression query replace on the fileset
1247(@code{vc-dir-query-replace-regexp}).
1179 1248
1180 @kbd{Q} does a query replace on the marked files. 1249@item M-s a C-s
1250Do an incremental search on the fileset (@code{vc-dir-isearch}).
1181 1251
1182 @kbd{M-s a C-s} does an incremental search on the marked files. 1252@item M-s a C-M-s
1253Do an incremental regular expression search on the fileset
1254(@code{vc-dir-isearch-regexp}).
1255@end table
1183 1256
1184 @kbd{M-s a C-M-s} does an incremental regular expression search 1257@noindent
1185on the marked files. 1258Apart from acting on multiple files, these commands behave much like
1259their single-buffer counterparts (@pxref{Search}).
1186 1260
1187@cindex stashes in version control 1261@cindex stashes in version control
1188@cindex shelves in version control 1262@cindex shelves in version control
1189 Commands are also accessible from the VC-dir menu. Note that some 1263 The above commands are also available via the menu bar, and via a
1190VC backends use the VC-dir menu to make available extra, 1264context menu invoked by @kbd{Mouse-2}. Furthermore, some VC backends
1191backend-specific, commands. For example, Git and Bazaar allow you to 1265use the menu to provide extra backend-specific commands. For example,
1192manipulate @dfn{stashes} and @dfn{shelves}. (These provide a 1266Git and Bazaar allow you to manipulate @dfn{stashes} and @dfn{shelves}
1193mechanism to temporarily store uncommitted changes somewhere out of 1267(where are a way to temporarily put aside uncommitted changes, and
1194the way, and bring them back at a later time.) 1268bring them back at a later time).
1195
1196 Normal VC commands with the @kbd{C-x v} prefix work in VC directory
1197buffers. Some single-key shortcuts are available as well; @kbd{=},
1198@kbd{+}, @kbd{l}, @kbd{i}, and @kbd{v} behave as through prefixed with
1199@kbd{C-x v}.
1200
1201 The command @kbd{C-x v v} (@code{vc-next-action}) operates on all
1202the marked files, so that you can commit several files at once. If
1203the underlying VC supports atomic commits of multiple-file changesets,
1204@kbd{C-x v v} with a selected set of modified but not committed files
1205will commit all of them at once as a single changeset.
1206
1207 When @kbd{C-x v v} (@code{vc-next-action}) operates on multiple
1208files, all of those files must be either in the same state or in
1209compatible states (added, modified and removed states are considered
1210compatible). Otherwise it signals an error. This differs from the
1211behavior of older versions of VC, which did not have fileset
1212operations and simply did @code{vc-next-action} on each file
1213individually.
1214
1215 If any files are in a state that calls for commit, @kbd{C-x v v} reads a
1216single log entry and uses it for the changeset as a whole. If the
1217underling VCS is file- rather than changeset-oriented, the log entry
1218will be replicated into the history of each file.
1219 1269
1220@node Branches 1270@node Branches
1221@subsection Multiple Branches of a File 1271@subsection Multiple Branches of a File
diff --git a/etc/NEWS b/etc/NEWS
index 7454a4a89a3..65a3b41f5bf 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -849,6 +849,7 @@ the user for specifics, e.g. a merge source.
849 849
850**** Currently supported for Bzr, Git, and Mercurial. 850**** Currently supported for Bzr, Git, and Mercurial.
851 851
852+++
852*** New option `vc-revert-show-diff' controls whether `vc-revert' 853*** New option `vc-revert-show-diff' controls whether `vc-revert'
853shows a diff while querying the user. It defaults to t. 854shows a diff while querying the user. It defaults to t.
854 855