aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-12-17 15:50:08 +0800
committerChong Yidong2011-12-17 15:50:08 +0800
commit9cff91f800cc72f8c77cf192c119c78d4a14a8ee (patch)
tree5f023ede7134cbcb1a1b69efe38750dcb6c80134
parent301b181a14b0f698c6aae05522e6f3401ea45a3c (diff)
downloademacs-9cff91f800cc72f8c77cf192c119c78d4a14a8ee.tar.gz
emacs-9cff91f800cc72f8c77cf192c119c78d4a14a8ee.zip
More updates for VC documentation.
* doc/emacs/maintaining.texi (VCS Concepts): Make "revision" terminology less CVS-specific. (VC With A Merging VCS, VC With A Locking VCS): Add xref to Registering node. (Secondary VC Commands): Deleted. Promote subnodes. (Log Buffer): Add command name for C-c C-c. Fix the name of the log buffer. Add index entries. (VCS Changesets, Types of Log File, VC With A Merging VCS): Use "commit" terminology. (Old Revisions): Move it to just before VC Change Log. "Tag" here doesn't refer to tags tables. Note other possible forms of the revision ID. C-x v = does not save. (Registering): Note similarity to C-x v v action. Fix description of how backends are chosen. De-document vc-default-init-revision. (VC Change Log): Document C-x v l in VC-Dir buffer. Document RET in root log buffers. * lisp/vc/vc.el (vc-deduce-fileset): Minor doc fix.
-rw-r--r--doc/emacs/ChangeLog19
-rw-r--r--doc/emacs/emacs.texi12
-rw-r--r--doc/emacs/maintaining.texi587
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/vc/vc.el12
6 files changed, 318 insertions, 317 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 412a9cd5a58..20f068e4ef6 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,22 @@
12011-12-17 Chong Yidong <cyd@gnu.org>
2
3 * maintaining.texi (VCS Concepts): Make "revision" terminology
4 less CVS-specific.
5 (VC With A Merging VCS, VC With A Locking VCS): Add xref to
6 Registering node.
7 (Secondary VC Commands): Deleted. Promote subnodes.
8 (Log Buffer): Add command name for C-c C-c. Fix the name of the
9 log buffer. Add index entries.
10 (VCS Changesets, Types of Log File, VC With A Merging VCS): Use
11 "commit" terminology.
12 (Old Revisions): Move it to just before VC Change Log. "Tag" here
13 doesn't refer to tags tables. Note other possible forms of the
14 revision ID. C-x v = does not save.
15 (Registering): Note similarity to C-x v v action. Fix description
16 of how backends are chosen. De-document vc-default-init-revision.
17 (VC Change Log): Document C-x v l in VC-Dir buffer. Document RET
18 in root log buffers.
19
12011-12-16 Chong Yidong <cyd@gnu.org> 202011-12-16 Chong Yidong <cyd@gnu.org>
2 21
3 * maintaining.texi (Version Control Systems): Drop Meta-CVS. 22 * maintaining.texi (Version Control Systems): Drop Meta-CVS.
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 2cb02feee60..3a93889f6c7 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -741,15 +741,17 @@ Version Control
741* VC Mode Line:: How the mode line shows version control status. 741* VC Mode Line:: How the mode line shows version control status.
742* Basic VC Editing:: How to edit a file under version control. 742* Basic VC Editing:: How to edit a file under version control.
743* Log Buffer:: Features available in log entry buffers. 743* Log Buffer:: Features available in log entry buffers.
744* Registering:: Putting a file under version control.
744* Old Revisions:: Examining and comparing old versions. 745* Old Revisions:: Examining and comparing old versions.
745* Secondary VC Commands:: The commands used a little less frequently. 746* VC Change Log:: Viewing the VC Change Log.
747* VC Undo:: Canceling changes before or after committing.
746* VC Directory Mode:: Listing files managed by version control. 748* VC Directory Mode:: Listing files managed by version control.
747* Branches:: Multiple lines of development. 749* Branches:: Multiple lines of development.
748* Remote Repositories:: Efficient access to remote CVS servers. 750* Remote Repositories:: Efficient access to remote CVS servers.
749* Revision Tags:: Symbolic names for revisions. 751* Revision Tags:: Symbolic names for revisions.
750* Miscellaneous VC:: Various other commands and features of VC. 752* Miscellaneous VC:: Various other commands and features of VC.
751* Customizing VC:: Variables that change VC's behavior. 753* Customizing VC:: Variables that change VC's behavior.
752 754
753Introduction to Version Control 755Introduction to Version Control
754 756
755* Why Version Control?:: Understanding the problems it addresses. 757* Why Version Control?:: Understanding the problems it addresses.
@@ -766,12 +768,6 @@ Basic Editing under Version Control
766* VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS. 768* VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS.
767* Advanced C-x v v:: Advanced features available with a prefix argument. 769* Advanced C-x v v:: Advanced features available with a prefix argument.
768 770
769The Secondary Commands of VC
770
771* Registering:: Putting a file under version control.
772* VC Change Log:: Viewing the VC Change Log.
773* VC Undo:: Canceling changes before or after check-in.
774
775VC Directory Mode 771VC Directory Mode
776 772
777* VC Directory Buffer:: What the buffer looks like and means. 773* VC Directory Buffer:: What the buffer looks like and means.
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 9d788fa7192..063d0e65f5b 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -49,8 +49,10 @@ variable @code{vc-handled-backends} to @code{nil}
49* VC Mode Line:: How the mode line shows version control status. 49* VC Mode Line:: How the mode line shows version control status.
50* Basic VC Editing:: How to edit a file under version control. 50* Basic VC Editing:: How to edit a file under version control.
51* Log Buffer:: Features available in log entry buffers. 51* Log Buffer:: Features available in log entry buffers.
52* Registering:: Putting a file under version control.
52* Old Revisions:: Examining and comparing old versions. 53* Old Revisions:: Examining and comparing old versions.
53* Secondary VC Commands:: The commands used a little less frequently. 54* VC Change Log:: Viewing the VC Change Log.
55* VC Undo:: Canceling changes before or after committing.
54* VC Directory Mode:: Listing files managed by version control. 56* VC Directory Mode:: Listing files managed by version control.
55* Branches:: Multiple lines of development. 57* Branches:: Multiple lines of development.
56@ifnottex 58@ifnottex
@@ -171,14 +173,14 @@ under active development, and has been deprecated in favor of Bazaar.
171@item 173@item
172Git is a distributed version control system originally invented by 174Git is a distributed version control system originally invented by
173Linus Torvalds to support development of Linux (his kernel). VC 175Linus Torvalds to support development of Linux (his kernel). VC
174supports many common git operations, but others, such as repository 176supports many common Git operations, but others, such as repository
175syncing, must be done from the command line. 177syncing, must be done from the command line.
176 178
177@cindex hg 179@cindex hg
178@cindex Mercurial 180@cindex Mercurial
179@item 181@item
180Mercurial (hg) is a distributed version control system broadly 182Mercurial (hg) is a distributed version control system broadly
181resembling git. VC supports most Mercurial commands, with the 183resembling Git. VC supports most Mercurial commands, with the
182exception of repository sync operations. 184exception of repository sync operations.
183 185
184@cindex bzr 186@cindex bzr
@@ -206,16 +208,16 @@ as @dfn{log entries} that describe the changes made to each file.
206 The copy of a version-controlled file that you actually edit is 208 The copy of a version-controlled file that you actually edit is
207called the @dfn{work file}. You can change each work file as you 209called the @dfn{work file}. You can change each work file as you
208would an ordinary file. After you are done with a set of changes, you 210would an ordinary file. After you are done with a set of changes, you
209@dfn{commit} (or @dfn{check in}) the changes; this records the changes 211may @dfn{commit} (or @dfn{check in}) the changes; this records the
210in the repository, along with a descriptive log entry. 212changes in the repository, along with a descriptive log entry.
211 213
212@cindex revision 214@cindex revision
213@cindex revision ID 215@cindex revision ID
214 A copy of a file stored in a repository is called a @dfn{revision}. 216 Each commit creates a new @dfn{revision} in the repository. The
215The history of a file is a sequence of revisions. Each revision is 217version control system keeps track of all past revisions and the
216named by a @dfn{revision ID}. The format of the revision ID depends 218changes that were made in each revision. Each revision is named by a
217on the version control system; in the simplest case, it is just an 219@dfn{revision ID}, whose format depends on the version control system;
218integer. 220in the simplest case, it is just an integer.
219 221
220 To go beyond these basic concepts, you will need to understand three 222 To go beyond these basic concepts, you will need to understand three
221aspects in which version control systems differ. As explained in the 223aspects in which version control systems differ. As explained in the
@@ -231,10 +233,10 @@ these modes of operation, but it cannot hide the differences.
231between users who want to change the same file. There are two ways to 233between users who want to change the same file. There are two ways to
232do this: merging and locking. 234do this: merging and locking.
233 235
234 In a version control system that uses merging, each user may check 236 In a version control system that uses merging, each user may modify
235out and modify a work file at any time. The system lets you 237a work file at any time. The system lets you @dfn{merge} your work
236@dfn{merge} your work file, which may contain changes that have not 238file, which may contain changes that have not been committed, with the
237been committed, with the latest changes that others have committed. 239latest changes that others have committed.
238 240
239 Older version control systems use a @dfn{locking} scheme instead. 241 Older version control systems use a @dfn{locking} scheme instead.
240Here, work files are normally read-only. To edit a file, you ask the 242Here, work files are normally read-only. To edit a file, you ask the
@@ -277,7 +279,7 @@ possible.
277control operations are @dfn{file-based}: each file has its own comment 279control operations are @dfn{file-based}: each file has its own comment
278and revision history separate from that of all other files. Newer 280and revision history separate from that of all other files. Newer
279systems, beginning with Subversion, are @dfn{changeset-based}: a 281systems, beginning with Subversion, are @dfn{changeset-based}: a
280checkin may include changes to several files, and the entire set of 282commit may include changes to several files, and the entire set of
281changes is handled as a unit. Any comment associated with the change 283changes is handled as a unit. Any comment associated with the change
282does not belong to a single file, but to the changeset itself. 284does not belong to a single file, but to the changeset itself.
283 285
@@ -342,10 +344,9 @@ policy, which you should follow.
342 When the policy is to use both, you typically want to write an entry 344 When the policy is to use both, you typically want to write an entry
343for each change just once, then put it into both logs. You can write 345for each change just once, then put it into both logs. You can write
344the entry in @file{ChangeLog}, then copy it to the log buffer with 346the entry in @file{ChangeLog}, then copy it to the log buffer with
345@kbd{C-c C-a} when checking in the change (@pxref{Log Buffer}). Or 347@kbd{C-c C-a} when committing the change (@pxref{Log Buffer}). Or you
346you can write the entry in the log buffer while checking in the 348can write the entry in the log buffer while committing the change, and
347change, and later use the @kbd{C-x v a} command to copy it to 349later use the @kbd{C-x v a} command to copy it to @file{ChangeLog}
348@file{ChangeLog}
349@iftex 350@iftex
350(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}). 351(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}).
351@end iftex 352@end iftex
@@ -450,23 +451,25 @@ and don't persist across sessions.
450@itemize @bullet 451@itemize @bullet
451@item 452@item
452If there is more than one file in the VC fileset and the files have 453If there is more than one file in the VC fileset and the files have
453inconsistent version control states, signal an error. 454inconsistent version control states, signal an error. (Note, however,
455that a fileset is allowed to include both ``newly-added'' files and
456``modified'' files; @pxref{Registering}.)
454 457
455@item 458@item
456If each file in the VC fileset is not registered with a version 459If none of the files in the VC fileset are registered with a version
457control system, register the VC fileset. If the fileset is in a 460control system, register the VC fileset, i.e.@: place it under version
458directory controlled by a version control system, register it with 461control. @xref{Registering}. If Emacs cannot find a system to
459that system; otherwise, prompt for a repository type, create a new 462register under, it prompts for a repository type, creates a new
460repository, and register the VC fileset with it. 463repository, and registers the VC fileset with it.
461 464
462@item 465@item
463If each work file in the VC fileset is unchanged, do nothing. 466If every work file in the VC fileset is unchanged, do nothing.
464 467
465@item 468@item
466If each work file in the VC fileset has been modified, commit the 469If every work file in the VC fileset has been modified, commit the
467changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the 470changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the
468desired log entry for the new revision, followed by @kbd{C-c C-c} to 471desired log entry for the new revision, followed by @kbd{C-c C-c} to
469commit (@pxref{Log Buffer}). 472commit. @xref{Log Buffer}.
470 473
471If committing to a shared repository, the commit may fail if the 474If committing to a shared repository, the commit may fail if the
472repository that has been changed since your last update. In that 475repository that has been changed since your last update. In that
@@ -487,7 +490,7 @@ Nothing informs you if another user has committed changes in the same
487file since you began editing it; when you commit your revision, his 490file since you began editing it; when you commit your revision, his
488changes are removed (however, they remain in the repository and are 491changes are removed (however, they remain in the repository and are
489thus not irrevocably lost). Therefore, you must verify that the 492thus not irrevocably lost). Therefore, you must verify that the
490current revision is unchanged before checking in your changes. In 493current revision is unchanged before committing your changes. In
491addition, locking is possible with RCS even in this mode: @kbd{C-x v 494addition, locking is possible with RCS even in this mode: @kbd{C-x v
492v} with an unmodified file locks the file, just as it does with RCS in 495v} with an unmodified file locks the file, just as it does with RCS in
493its normal locking mode (@pxref{VC With A Locking VCS}). 496its normal locking mode (@pxref{VC With A Locking VCS}).
@@ -505,10 +508,10 @@ inconsistent version control states, signal an error.
505 508
506@item 509@item
507If each file in the VC fileset is not registered with a version 510If each file in the VC fileset is not registered with a version
508control system, register the VC fileset. If the fileset is in a 511control system, register the VC fileset. @xref{Registering}. If
509directory controlled by a version control system, register it with 512Emacs cannot find a system to register under, it prompts for a
510that system; otherwise, prompt for a repository type, create a new 513repository type, creates a new repository, and registers the VC
511repository, and register the VC fileset with it. 514fileset with it.
512 515
513@item 516@item
514If each file is registered and unlocked, lock it and make it writable, 517If each file is registered and unlocked, lock it and make it writable,
@@ -575,13 +578,23 @@ Features}).
575@node Log Buffer 578@node Log Buffer
576@subsection Features of the Log Entry Buffer 579@subsection Features of the Log Entry Buffer
577 580
578 When you tell VC to commit a change, it pops up a buffer called 581@cindex C-c C-c @r{(Log Edit mode)}
579@samp{*VC-Log*}. In this buffer, you should write a @dfn{log entry} 582@findex log-edit-done
583 When you tell VC to commit a change, it pops up a buffer named
584@samp{*vc-log*}. In this buffer, you should write a @dfn{log entry}
580describing the changes you have made (@pxref{Why Version Control?}). 585describing the changes you have made (@pxref{Why Version Control?}).
581After you are done, type @kbd{C-c C-c}; this exits the buffer and 586After you are done, type @kbd{C-c C-c} (@code{log-edit-done}) to exit
582commits the change, together with your log entry. 587the buffer and commit the change, together with your log entry.
583 588
584 While in the @samp{*VC-Log*} buffer, you can write one or more 589@cindex Log Edit mode
590@cindex mode, Log Edit
591@vindex vc-log-mode-hook
592 The major mode for the @samp{*vc-log*} buffer is Log Edit mode, a
593variant of Text mode (@pxref{Text Mode}). On entering Log Edit mode,
594Emacs runs the hooks @code{text-mode-hook} and @code{vc-log-mode-hook}
595(@pxref{Hooks}).
596
597 While in the @samp{*vc-log*} buffer, you can write one or more
585@dfn{header lines}, specifying additional information to be supplied 598@dfn{header lines}, specifying additional information to be supplied
586to the version control system. Each header line must occupy a single 599to the version control system. Each header line must occupy a single
587line at the top of the buffer; the first line that is not a header 600line at the top of the buffer; the first line that is not a header
@@ -598,196 +611,224 @@ Apart from the @samp{Author} header, Emacs recognizes the headers
598@samp{Date} (a manually-specified commit time) and @samp{Fixes} (a 611@samp{Date} (a manually-specified commit time) and @samp{Fixes} (a
599reference to a bug fixed by the change). Not all version control 612reference to a bug fixed by the change). Not all version control
600systems recognize all headers: Bazaar recognizes all three headers, 613systems recognize all headers: Bazaar recognizes all three headers,
601while git, Mercurial, and Monotone recognizes only @samp{Author} and 614while Git, Mercurial, and Monotone recognize only @samp{Author} and
602@samp{Summary}. If you specify a header for a version control that 615@samp{Date}. If you specify a header for a version control that does
603does not support it, the header is treated as part of the log entry. 616not support it, the header is treated as part of the log entry.
604 617
618@kindex C-c C-f @r{(Log Edit mode)}
605@findex log-edit-show-files 619@findex log-edit-show-files
620 Type @kbd{C-c C-f} (@code{log-edit-show-files}) in the
621@samp{*vc-log*} buffer to view a list of files for the VC fileset that
622is to be committed. If you called @kbd{C-x v v} directly from a work
623file, the fileset consists of that single file. If you called
624@kbd{C-x v v} from a VC directory buffer (@pxref{VC Directory Mode}),
625the fileset may consist of multiple files; in that case, @kbd{C-c C-c}
626will commit those files together, as a single revision, if that is
627supported by the version control system (on older version control
628systems, such as CVS, each file in a multi-file VC fileset is
629committed as an individual revision).
630
631@kindex C-c C-d @r{(Log Edit mode)}
606@findex log-edit-show-diff 632@findex log-edit-show-diff
607 Type @kbd{C-c C-f} (@code{log-edit-show-files}) to display a list of
608files in the current VC fileset. If you called @kbd{C-x v v} directly
609from a work file, the fileset consists of that single file; if you
610called @kbd{C-x v v} from a VC directory buffer (@pxref{VC Directory
611Mode}), the fileset may consist of multiple files.
612
613@findex log-edit-insert-changelog
614 Type @kbd{C-c C-d} (@code{log-edit-show-diff}) to show a @dfn{diff} 633 Type @kbd{C-c C-d} (@code{log-edit-show-diff}) to show a @dfn{diff}
615of the changes you have made (i.e., the differences between the work 634of the changes between the current VC fileset and the repository
616file and the repository revision from which you started editing). 635revision from which you started editing. @xref{Old Revisions}.
617@xref{Old Revisions}.
618 636
619 If the current VC fileset includes one or more @file{ChangeLog} 637@kindex C-c C-a @r{(Log Edit mode)}
620files (@pxref{Change Log}), type @kbd{C-c C-a} 638@findex log-edit-insert-changelog
639 If the VC fileset that is to be committed includes one or more
640@file{ChangeLog} files (@pxref{Change Log}), type @kbd{C-c C-a}
621(@code{log-edit-insert-changelog}) to pull the relevant entries into 641(@code{log-edit-insert-changelog}) to pull the relevant entries into
622the @samp{*VC-Log*} buffer. If the topmost item in each 642the @samp{*vc-log*} buffer. If the topmost item in each
623@file{ChangeLog} was made under your user name on the current date, 643@file{ChangeLog} was made under your user name on the current date,
624this command searches that item for entries that match the file(s) to 644this command searches that item for entries matching the file(s) to be
625be committed; if found, these entries are inserted. 645committed, and inserts them.
626@iftex
627@xref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features},
628@end iftex
629@ifnottex 646@ifnottex
630@xref{Change Logs and VC}, 647@xref{Change Logs and VC}, for the opposite way of
648working---generating ChangeLog entries from the revision control log.
631@end ifnottex 649@end ifnottex
632for the opposite way of working---generating ChangeLog entries from
633the revision control log.
634 650
635 To abort a check-in, just @strong{don't} type @kbd{C-c C-c} in that 651 To abort a commit, just @strong{don't} type @kbd{C-c C-c} in that
636buffer. You can switch buffers and do other editing. As long as you 652buffer. You can switch buffers and do other editing. As long as you
637don't try to commit another file, the entry you were editing remains 653don't try to make another commit, the entry you were editing remains
638in the @samp{*VC-Log*} buffer, and you can go back to that buffer at 654in the @samp{*vc-log*} buffer, and you can go back to that buffer at
639any time to complete the check-in. 655any time to complete the commit.
640 656
641 If you change several source files for the same reason, it is often 657@kindex M-n @r{(Log Edit mode)}
642convenient to specify the same log entry for many of the files. (This 658@kindex M-p @r{(Log Edit mode)}
643is the normal way to do things on a changeset-oriented system, where 659@kindex M-s @r{(Log Edit mode)}
644comments are attached to changesets rather than the history of 660@kindex M-r @r{(Log Edit mode)}
645individual files.) The most convenient way to do this is to mark all
646the files in VC Directory Mode and commit from there; the log buffer
647will carry the fileset information with it and do a group commit when
648you type @kbd{C-c C-c}.
649
650 You can also browse the history of previous log entries to duplicate 661 You can also browse the history of previous log entries to duplicate
651a checkin comment. This can be useful when you want several files to 662a commit comment. This can be useful when you want to make several
652have checkin comments that vary only slightly from each other. The 663commits with similar comments. The commands @kbd{M-n}, @kbd{M-p},
653commands @kbd{M-n}, @kbd{M-p}, @kbd{M-s} and @kbd{M-r} for doing this 664@kbd{M-s} and @kbd{M-r} for doing this work just like the minibuffer
654work just like the minibuffer history commands (except that these 665history commands (@pxref{Minibuffer History}), except that they are
655versions are used outside the minibuffer). 666used outside the minibuffer.
656 667
657@vindex vc-log-mode-hook 668@node Registering
658 Each time you commit a change, the log entry buffer is put into VC 669@subsection Registering a File for Version Control
659Log Edit mode, which involves running two hooks: @code{text-mode-hook} 670
660and @code{vc-log-mode-hook}. @xref{Hooks}. 671@table @kbd
672@item C-x v i
673Register the visited file for version control.
674@end table
675
676@kindex C-x v i
677@findex vc-register
678 The command @kbd{C-x v i} (@code{vc-register}) @dfn{registers} each
679file in the current VC fileset, placing it under version control.
680This is essentially equivalent to the action of @kbd{C-x v v} on an
681unregistered VC fileset (@pxref{Basic VC Editing}), except that if the
682VC fileset is already registered, @kbd{C-x v i} signals an error
683whereas @kbd{C-x v v} performs some other action.
684
685 To register a file, Emacs must choose a version control system. For
686a multi-file VC fileset, the VC Directory buffer specifies the system
687to use (@pxref{VC Directory Mode}). For a single-file VC fileset, if
688the file's directory already contains files registered in a version
689control system, or if the directory is part of a directory tree
690controlled by a version control system, Emacs chooses that system. In
691the event that more than one version control system is applicable,
692Emacs uses the one that appears first in the variable
693@iftex
694@code{vc-handled-backends}.
695@end iftex
696@ifnottex
697@code{vc-handled-backends} (@pxref{Customizing VC}).
698@end ifnottex
699If Emacs cannot find a version control system to register the file
700under, it prompts for a repository type, creates a new repository, and
701registers the file into that repository.
702
703 On most version control systems, registering a file with @kbd{C-x v
704i} or @kbd{C-x v v} adds it to the ``working tree'' but not to the
705repository. Such files are labeled as @samp{added} in the VC
706Directory buffer, and show a revision ID of @samp{@@@@} in the mode
707line. To make the registration take effect in the repository, you
708must perform a commit (@pxref{Basic VC Editing}). Note that on
709changeset-based version control systems, commits can consist of both
710file additions and modifications.
711
712 On a locking-based version control system (@pxref{VCS Merging}),
713registering a file leaves it unlocked and read-only. Type @kbd{C-x v
714v} if you wish to start editing it.
661 715
662@node Old Revisions 716@node Old Revisions
663@subsection Examining And Comparing Old Revisions 717@subsection Examining And Comparing Old Revisions
664 718
665 One of the convenient features of version control is the ability
666to examine any revision of a file, or compare two revisions.
667
668@table @kbd 719@table @kbd
669@item C-x v ~
670Prompt for a revision of the current file, and visit it in a buffer of
671its own (@code{vc-revision-other-window}).
672
673@item C-x v = 720@item C-x v =
674Compare the files in the current fileset with the working revision(s) 721Compare the work files in the current VC fileset with the versions you
675you started from (@code{vc-diff}). With a prefix argument, prompt for 722started from (@code{vc-diff}). With a prefix argument, prompt for two
676two revisions of the current fileset and compare them. You can call 723revisions of the current VC fileset and compare them. You can also
677this command from a Dired buffer (@pxref{Dired}). 724call this command from a Dired buffer (@pxref{Dired}).
725
726@ifnottex
727@item M-x vc-ediff
728Like @kbd{C-x v =}, but using an Ediff session. @xref{Top, Ediff,
729ediff, The Ediff Manual}.
730@end ifnottex
678 731
679@item C-x v D 732@item C-x v D
680Compare the entire tree corresponding to the current fileset with the 733Compare all work files in the current version controlled directory
681tree you started from (@code{vc-root-diff}). With a prefix argument, 734tree to the tree you started from (@code{vc-root-diff}). With a
682prompt for two revisions and compare their trees. 735prefix argument, prompt for two revisions and compare their trees.
736
737@item C-x v ~
738Prompt for a revision of the current file, and visit it in a separate
739buffer (@code{vc-revision-other-window}).
683 740
684@item C-x v g 741@item C-x v g
685Display an annotated version of the file: for each line, show the 742Display an annotated version of the current file: for each line, show
686latest revision in which it was modified (@code{vc-annotate}). 743the latest revision in which it was modified (@code{vc-annotate}).
687@end table 744@end table
688 745
689@findex vc-revision-other-window
690@kindex C-x v ~
691 To examine an old revision, visit the work file and type @kbd{C-x v
692~ @var{revision} @key{RET}} (@code{vc-revision-other-window}). Here,
693@var{revision} is either the desired revision ID (@pxref{VCS
694Concepts}), or the name of a tag or branch
695@iftex
696(@pxref{Tags,,,emacs-xtra, Specialized Emacs Features}).
697@end iftex
698@ifnottex
699(@pxref{Tags}).
700@end ifnottex
701This command puts the text of the old revision in a file named
702@file{@var{filename}.~@var{revision}~}, and visits it in its own
703buffer in a separate window.
704
705@findex vc-diff 746@findex vc-diff
706@kindex C-x v = 747@kindex C-x v =
707 @kbd{C-x v =} (@code{vc-diff}) compares each file in the current VC 748 @kbd{C-x v =} (@code{vc-diff}) displays a @dfn{diff} which compares
708fileset (saving them if necessary) with the repository revision(s) 749each work file in the current VC fileset to the version(s) from which
709from which you started editing. Note that the latter may or may not 750you started editing. The diff is displayed in another window, in a
710be the latest revision of the file(s). 751Diff mode buffer (@pxref{Diff Mode}) named @file{*vc-diff*}. The
711 752usual Diff mode commands are available in this buffer. In particular,
712 The diff is displayed in another window, in a Diff mode buffer 753the @kbd{g} (@code{revert-buffer}) command performs the file
713(@pxref{Diff Mode}) named @file{*vc-diff*}. In this buffer, the 754comparison again, generating a new diff.
714@kbd{g} (@code{revert-buffer}) command performs the file comparison
715again, generating a new diff.
716 755
717@findex vc-diff
718@kindex C-u C-x v = 756@kindex C-u C-x v =
719 To compare two arbitrary revisions of the current VC fileset, call 757 To compare two arbitrary revisions of the current VC fileset, call
720@code{vc-diff} with a prefix argument: @kbd{C-u C-x v =}. This 758@code{vc-diff} with a prefix argument: @kbd{C-u C-x v =}. This
721prompts for two revision IDs, using the minibuffer, and displays the 759prompts for two revision IDs (@pxref{VCS Concepts}), and displays a
722diff in a special buffer in another window. Instead of providing a 760diff between those versions of the fileset. This will not work
723revision ID, you can give an empty input, which specifies the current 761reliably for multi-file VC filesets, if the version control system is
724contents of the work file; or a tag or branch name 762file-based rather than changeset-based (e.g.@: CVS), since then
725@iftex 763revision IDs for different files would not be related in any
726(@pxref{Tags,,,emacs-xtra, Specialized Emacs Features}). 764meaningful way.
727@end iftex 765
766 Instead of the revision ID, some version control systems let you
767specify revisions in other formats. For instance, under Bazaar you
768can enter @samp{date:yesterday} for the argument to @kbd{C-u C-x v =}
769(and related commands) to specify the first revision committed after
770yesterday. See the documentation of the version control system for
771details.
772
773 If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a Dired buffer
774(@pxref{Dired}), the file listed on the current line is treated as the
775current VC fileset.
776
728@ifnottex 777@ifnottex
729(@pxref{Tags}). 778@findex vc-ediff
779 @kbd{M-x vc-ediff} works like @kbd{C-x v =}, except that it uses an
780Ediff session. @xref{Top, Ediff, ediff, The Ediff Manual}.
730@end ifnottex 781@end ifnottex
731If your version control system is file-based (e.g. CVS) rather than
732changeset-based (Subversion, GNU Arch, git, Mercurial), supplying a
733revision ID for a multi-file fileset (as opposed to a symbolic tag
734name) is unlikely to return diffs that are connected in any meaningful
735way.
736
737 The command @kbd{C-x v D} (@code{vc-root-diff}) is similar to
738@kbd{C-x v =}, but it compares the entire tree associated with the
739current VC fileset with the tree you started with. This means all the
740files controlled by the current version control repository, even those
741that are not part of the current VC fileset.
742
743 If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a buffer that
744is neither visiting a version-controlled file nor a VC directory
745buffer, these commands generate a diff of all registered files in the
746current directory and its subdirectories.
747 782
748@findex vc-ediff 783@findex vc-root-diff
749The function @code{vc-ediff} works like @code{vc-diff} and provides a way to 784@kindex C-x v D
750visually compare two revisions of a file in an Ediff session, @pxref{Top, 785 @kbd{C-x v D} (@code{vc-root-diff}) is similar to @kbd{C-x v =}, but
751Ediff, ediff, The Ediff Manual}. It compares the file associated with the 786it displays a comparison between the entire current version controlled
752current buffer with the last repository revision. To compare two arbitrary 787tree (i.e.@: the tree controlled by the version control system
753revisions of the current file, call @code{vc-ediff} with a prefix argument. 788associated with the current VC fileset, which may include files that
789are not part of that fileset) and the tree you started with. If you
790invoke this command from a Dired buffer, it applies to the entire
791version controlled tree containing the directory.
754 792
755@vindex vc-diff-switches 793@vindex vc-diff-switches
756@vindex vc-rcs-diff-switches 794 You can customize the @command{diff} options that @kbd{C-x v =} and
757 @kbd{C-x v =} works by running a variant of the @code{diff} utility 795@kbd{C-x v D} use for generating diffs. The options used are taken
758designed to work with the version control system in use. The options 796from the first non-@code{nil} value amongst the variables
759to pass to the @code{diff} command are taken from the first non-@code{nil} 797@code{vc-@var{backend}-diff-switches}, @code{vc-diff-switches}, and
760value of @code{vc-@var{backend}-diff-switches}, @code{vc-diff-switches}, 798@code{diff-switches} (@pxref{Comparing Files}), in that order. Here,
761and @code{diff-switches} (@pxref{Comparing Files}), in that order. 799@var{backend} stands for the current version control system,
762Since @code{nil} means to check the next variable in the sequence, 800e.g.@: @code{bzr} for Bazaar. Since @code{nil} means to check the
763either of the first two may use the value @code{t} to mean no switches at all. 801next variable in the sequence, either of the first two may use the
764Most of the @samp{vc@dots{}diff-switches} variables default to 802value @code{t} to mean no switches at all. Most of the
765@code{nil}, but some default to @code{t}. These are for those version 803@code{vc-@var{backend}-diff-switches} variables default to @code{nil},
766control systems (e.g. SVN) whose @code{diff} implementations do not 804but some default to @code{t}; these are for version control systems,
767accept common options (e.g. @samp{-c}) likely to be in 805such as Subversion, whose @code{diff} implementations do not accept
768@code{diff-switches}. 806common diff options.
769 807
770 The buffer produced by @kbd{C-x v =} supports the commands of 808@findex vc-revision-other-window
771Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and 809@kindex C-x v ~
772@kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always 810 To directly examine an older version of a file, visit the work file
773find the corresponding locations in the current work file. (Older 811and type @kbd{C-x v ~ @var{revision} @key{RET}}
774revisions are not, in general, present as files on your disk.) 812(@code{vc-revision-other-window}). This retrieves the file version
813corresponding to @var{revision}, saves it to
814@file{@var{filename}.~@var{revision}~}, and visits it in a separate
815window.
775 816
776@findex vc-annotate 817@findex vc-annotate
777@kindex C-x v g 818@kindex C-x v g
778 For some back ends, you can display the file @dfn{annotated} with 819 Many version control systems allow you to view files @dfn{annotated}
779per-line revision information, by typing @kbd{C-x v g} 820with per-line revision information, by typing @kbd{C-x v g}
780(@code{vc-annotate}). This creates a new buffer (the ``annotate 821(@code{vc-annotate}). This creates a new buffer (the ``annotate
781buffer'') displaying the file's text, with each part colored to show 822buffer'') displaying the file's text, with each line colored to show
782how old it is. Text colored red is new, blue means old, and 823how old it is. Red text is new, blue is old, and intermediate colors
783intermediate colors indicate intermediate ages. By default, the color 824indicate intermediate ages. By default, the color is scaled over the
784is scaled over the full range of ages, such that the oldest changes 825full range of ages, such that the oldest changes are blue, and the
785are blue, and the newest changes are red. 826newest changes are red.
786 827
787 When you give a prefix argument to this command, Emacs reads two 828 When you give a prefix argument to this command, Emacs reads two
788arguments using the minibuffer: the ID of which revision to display and 829arguments using the minibuffer: the revision to display and annotate
789annotate (instead of the current file contents), and the time span in 830(instead of the current file contents), and the time span in days the
790days the color range should cover. 831color range should cover.
791 832
792 From the annotate buffer, these and other color scaling options are 833 From the annotate buffer, these and other color scaling options are
793available from the @samp{VC-Annotate} menu. In this buffer, you can 834available from the @samp{VC-Annotate} menu. In this buffer, you can
@@ -796,13 +837,13 @@ view diffs, or view log entries:
796 837
797@table @kbd 838@table @kbd
798@item p 839@item p
799Annotate the previous revision, that is to say, the revision before 840Annotate the previous revision, i.e.@: the revision before the one
800the one currently annotated. A numeric prefix argument is a repeat 841currently annotated. A numeric prefix argument is a repeat count, so
801count, so @kbd{C-u 10 p} would take you back 10 revisions. 842@kbd{C-u 10 p} would take you back 10 revisions.
802 843
803@item n 844@item n
804Annotate the next revision---the one after the revision currently 845Annotate the next revision, i.e.@: the revision after the one
805annotated. A numeric prefix argument is a repeat count. 846currently annotated. A numeric prefix argument is a repeat count.
806 847
807@item j 848@item j
808Annotate the revision indicated by the current line. 849Annotate the revision indicated by the current line.
@@ -841,72 +882,8 @@ Toggle the annotation visibility. This is useful for looking just at
841the file contents without distraction from the annotations. 882the file contents without distraction from the annotations.
842@end table 883@end table
843 884
844@node Secondary VC Commands
845@subsection The Secondary Commands of VC
846
847 This section explains the secondary commands of VC.
848
849@menu
850* Registering:: Putting a file under version control.
851* VC Change Log:: Viewing the VC Change Log.
852* VC Undo:: Canceling changes before or after check-in.
853@end menu
854
855@node Registering
856@subsubsection Registering a File for Version Control
857
858@kindex C-x v i
859@findex vc-register
860 You can put any file under version control by simply visiting it, and
861then typing @w{@kbd{C-x v i}} (@code{vc-register}).
862
863@table @kbd
864@item C-x v i
865Register the visited file for version control.
866@end table
867
868 To register the file, Emacs must choose which version control system
869to use for it. If the file's directory already contains files
870registered in a version control system, Emacs uses that system. If
871there is more than one system in use for a directory, Emacs uses the
872one that appears first in @code{vc-handled-backends}
873@iftex
874(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
875@end iftex
876@ifnottex
877(@pxref{Customizing VC}).
878@end ifnottex
879On the other hand, if there are no files already registered, Emacs uses
880the first system from @code{vc-handled-backends} that could register
881the file (for example, you cannot register a file under CVS if its
882directory is not already part of a CVS tree); with the default value
883of @code{vc-handled-backends}, this means that Emacs uses RCS in this
884situation.
885
886 If locking is in use, @kbd{C-x v i} leaves the file unlocked and
887read-only. Type @kbd{C-x v v} if you wish to start editing it. After
888registering a file with CVS, you must subsequently commit the initial
889revision by typing @kbd{C-x v v}. Until you do that, the revision ID
890appears as @samp{@@@@} in the mode line.
891
892@vindex vc-default-init-revision
893@cindex initial revision ID to register
894 The default initial revision ID for a newly registered file
895varies by what VCS you are using; normally it will be 1.1 on VCSes
896that use dot-pair revision IDs and 1 on VCSes that use monotonic IDs.
897You can specify a different default by setting the variable
898@code{vc-default-init-revision}, or you can give @kbd{C-x v i} a
899numeric argument; then it reads the initial revision ID for this
900particular file using the minibuffer.
901
902@c See http://debbugs.gnu.org/9745
903@c @vindex vc-initial-comment
904@c If @code{vc-initial-comment} is non-@code{nil}, @kbd{C-x v i} reads an
905@c initial comment to describe the purpose of this source file. Reading
906@c the initial comment works like reading a log entry (@pxref{Log Buffer}).
907
908@node VC Change Log 885@node VC Change Log
909@subsubsection VC Change Log 886@subsection VC Change Log
910 887
911@table @kbd 888@table @kbd
912@item C-x v l 889@item C-x v l
@@ -929,21 +906,31 @@ Display the changes that will be sent by the next push operation
929@kindex C-x v l 906@kindex C-x v l
930@findex vc-print-log 907@findex vc-print-log
931 The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer 908 The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer
932named @samp{*vc-change-log*} in a new window. This buffer lists the 909named @samp{*vc-change-log*}, showing the history of changes made to
933changes to the current file, including the associated log entries. 910the current file, including who made the changes, the dates, and the
934(These are the log entries associated with the version control system, 911log entry for each change (these are the same log entries you would
935i.e. the ones you enter via the @samp{*VC-Log*} buffer. @xref{Log 912enter via the @samp{*vc-log*} buffer; @pxref{Log Buffer}). Point is
936Buffer}.) Point is centered at the revision of the file currently 913centered at the revision of the file currently being visited. With a
937being visited. With a prefix argument, the command prompts for the 914prefix argument, the command prompts for the revision to center on,
938revision to center on, and the maximum number of revisions to display. 915and the maximum number of revisions to display.
939You can call this command from a Dired buffer (@pxref{Dired}). 916
917 If you call @kbd{C-x v l} from a VC Directory buffer (@pxref{VC
918Directory Mode}) or a Dired buffer (@pxref{Dired}), it applies to the
919file listed on the current line.
940 920
941@findex vc-print-root-log 921@findex vc-print-root-log
942 Type @kbd{C-x v L} (@code{vc-print-root-log}) to display a 922@findex log-view-toggle-entry-display
943@samp{*vc-change-log*} buffer showing the history of the 923 @kbd{C-x v L} (@code{vc-print-root-log}) displays a
944version-controlled directory tree as a whole. With a prefix argument, 924@samp{*vc-change-log*} buffer showing the history of the entire
945the command prompts for the maximum number of revisions to display. 925version-controlled directory tree (RCS, SCCS, and CVS do not support
946RCS, SCCS, and CVS do not support this feature. 926this feature). With a prefix argument, the command prompts for the
927maximum number of revisions to display.
928
929 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
931type @key{RET} (@code{log-view-toggle-entry-display}) in the
932@samp{*vc-change-log*} buffer to reveal the entire log entry for the
933revision at point. A second @key{RET} hides it again.
947 934
948 On a distributed version control system, the @kbd{C-x v I} 935 On a distributed version control system, the @kbd{C-x v I}
949(@code{vc-log-incoming}) command displays a log buffer showing the 936(@code{vc-log-incoming}) command displays a log buffer showing the
@@ -952,62 +939,58 @@ control system's ``pull'' command to get new revisions from another
952repository. This other repository is the default one from which 939repository. This other repository is the default one from which
953changes are pulled, as defined by the version control system; with a 940changes are pulled, as defined by the version control system; with a
954prefix argument, @code{vc-log-incoming} prompts for a specific 941prefix argument, @code{vc-log-incoming} prompts for a specific
955repository from which changes would be pulled, and lists the changes 942repository. Similarly, @kbd{C-x v O} (@code{vc-log-outgoing}) shows
956accordingly. Similarly, @kbd{C-x v O} (@code{vc-log-outgoing}) shows
957the changes that will be sent to another repository, the next time you 943the changes that will be sent to another repository, the next time you
958run the ``push'' command; with a prefix argument, it prompts for a 944run the ``push'' command; with a prefix argument, it prompts for a
959specific repository to which changes would be pushed. 945specific destination repository.
960 946
961 In the @samp{*vc-change-log*} buffer, you can use the following keys 947 In the @samp{*vc-change-log*} buffer, you can use the following keys
962to move between the logs of revisions and of files, to view past 948to move between the logs of revisions and of files, and to examine and
963revisions, to modify change comments, to view annotations and to view 949compare past revisions (@pxref{Old Revisions}):
964diffs:
965 950
966@table @kbd 951@table @kbd
967@item p 952@item p
968Move to the previous revision-item in the buffer. (Revision entries in the log 953Move to the previous revision entry. (Revision entries in the log
969buffer are usually in reverse-chronological order, so the previous 954buffer are usually in reverse-chronological order, so the previous
970revision-item usually corresponds to a newer revision.) A numeric 955revision-item usually corresponds to a newer revision.) A numeric
971prefix argument is a repeat count. 956prefix argument is a repeat count.
972 957
973@item n 958@item n
974Move to the next revision-item (which most often corresponds to the 959Move to the next revision entry. A numeric prefix argument is a
975previous revision of the file). A numeric prefix argument is a repeat 960repeat count.
976count.
977 961
978@item P 962@item P
979Move to the log of the previous file, when the logs of multiple files 963Move to the log of the previous file, if showing logs for a multi-file
980are in the log buffer (@pxref{VC Directory Mode}). Otherwise, just 964VC fileset. Otherwise, just move to the beginning of the log. A
981move to the beginning of the log. A numeric prefix argument is a 965numeric prefix argument is a repeat count.
982repeat count, so @kbd{C-u 10 P} would move backward 10 files.
983 966
984@item N 967@item N
985Move to the log of the next file, when the logs of multiple files are 968Move to the log of the next file, if showing logs for a multi-file VC
986in the log buffer (@pxref{VC Directory Mode}). It also takes a 969fileset. A numeric prefix argument is a repeat count.
987numeric prefix argument as a repeat count.
988 970
989@item a 971@item a
990Annotate the revision indicated by the current line. 972Annotate the revision on the current line (@pxref{Old Revisions}).
991 973
992@item e 974@item e
993Modify the change comment displayed at point. Note that not all VC 975Modify the change comment displayed at point. Note that not all VC
994systems support modifying change comments. 976systems support modifying change comments.
995 977
996@item f 978@item f
997Visit the revision indicated at the current line, like typing @kbd{C-x 979Visit the revision indicated at the current line.
998v ~} and specifying this revision's ID (@pxref{Old Revisions}).
999 980
1000@item d 981@item d
1001Display the diff (@pxref{Comparing Files}) between the revision 982Display a diff between the revision at point and the next earlier
1002indicated at the current line and the next earlier revision. This is 983revision, for the specific file.
1003useful to see what actually changed in the file when the revision
1004indicated on the current line was committed.
1005 984
1006@item D 985@item D
1007Display the changeset diff (@pxref{Comparing Files}) between the 986Display the changeset diff between the revision at point and the next
1008revision indicated at the current line and the next earlier revision. 987earlier revision. This shows the changes to all files made in that
1009This is useful to see all the changes to all files that the revision 988revision.
1010indicated on the current line did when it was committed. 989
990@item @key{RET}
991In a compact-style log buffer (e.g.@: the one created by @kbd{C-x v
992L}), toggle between showing and hiding the full log entry for the
993revision at point.
1011@end table 994@end table
1012 995
1013@vindex vc-log-show-limit 996@vindex vc-log-show-limit
@@ -1021,7 +1004,7 @@ entries} or @samp{Show unlimited entries} buttons at the end of the
1021buffer. However, RCS, SCCS, and CVS do not support this feature. 1004buffer. However, RCS, SCCS, and CVS do not support this feature.
1022 1005
1023@node VC Undo 1006@node VC Undo
1024@subsubsection Undoing Version Control Actions 1007@subsection Undoing Version Control Actions
1025 1008
1026@table @kbd 1009@table @kbd
1027@item C-x v u 1010@item C-x v u
@@ -1030,7 +1013,7 @@ editing the file.
1030 1013
1031@item C-x v c 1014@item C-x v c
1032Remove the last-entered change from the master for the visited file. 1015Remove the last-entered change from the master for the visited file.
1033This undoes your last check-in. 1016This undoes your last commit.
1034@end table 1017@end table
1035 1018
1036@kindex C-x v u 1019@kindex C-x v u
@@ -1133,7 +1116,7 @@ This is because access to the repository may be slow, or you may be
1133working offline and not have access to the repository at all. As a 1116working offline and not have access to the repository at all. As a
1134consequence, VC would not be able to tell you that @samp{file3.c} is 1117consequence, VC would not be able to tell you that @samp{file3.c} is
1135in the ``merge'' state; you would learn that only when you try to 1118in the ``merge'' state; you would learn that only when you try to
1136check-in your modified copy of the file, or use a command such as 1119commit your modified copy of the file, or use a command such as
1137@kbd{C-x v m}. 1120@kbd{C-x v m}.
1138 1121
1139 In practice, this is not a problem because CVS handles this case 1122 In practice, this is not a problem because CVS handles this case
@@ -1330,7 +1313,7 @@ because that's the only way to add a new revision at a point that is
1330not the head of a branch. 1313not the head of a branch.
1331 1314
1332 After the branch is created, you ``stay'' on it. That means that 1315 After the branch is created, you ``stay'' on it. That means that
1333subsequent check-ins create new revisions on that branch. To leave the 1316subsequent commits create new revisions on that branch. To leave the
1334branch, you must explicitly select a different revision with @kbd{C-u C-x 1317branch, you must explicitly select a different revision with @kbd{C-u C-x
1335v v}. To transfer changes from one branch to another, use the merge 1318v v}. To transfer changes from one branch to another, use the merge
1336command, described in the next section. 1319command, described in the next section.
@@ -1379,7 +1362,7 @@ of the work file. You can now commit the changed file, thus creating
1379revision 1.6 containing the changes from the branch. 1362revision 1.6 containing the changes from the branch.
1380 1363
1381 It is possible to do further editing after merging the branch, before 1364 It is possible to do further editing after merging the branch, before
1382the next check-in. But it is usually wiser to commit the merged 1365the next commit. But it is usually wiser to commit the merged
1383revision, then lock it and make the further changes. This will keep 1366revision, then lock it and make the further changes. This will keep
1384a better record of the history of changes. 1367a better record of the history of changes.
1385 1368
diff --git a/etc/NEWS b/etc/NEWS
index d778fe3e520..7454a4a89a3 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -852,6 +852,7 @@ the user for specifics, e.g. a merge source.
852*** New option `vc-revert-show-diff' controls whether `vc-revert' 852*** New option `vc-revert-show-diff' controls whether `vc-revert'
853shows a diff while querying the user. It defaults to t. 853shows a diff while querying the user. It defaults to t.
854 854
855+++
855*** Log entries in some Log View buffers can be toggled to display a 856*** Log entries in some Log View buffers can be toggled to display a
856longer description by typing RET (log-view-toggle-entry-display). 857longer description by typing RET (log-view-toggle-entry-display).
857In the Log View buffers made by `C-x v L' (vc-print-root-log), you can 858In the Log View buffers made by `C-x v L' (vc-print-root-log), you can
@@ -862,6 +863,7 @@ use this to display the full log entry for the revision at point.
862**** Packages using Log View mode can enable this functionality by 863**** Packages using Log View mode can enable this functionality by
863binding `log-view-expanded-log-entry-function' to a suitable function. 864binding `log-view-expanded-log-entry-function' to a suitable function.
864 865
866+++
865*** New command `vc-ediff' allows visual comparison of two revisions 867*** New command `vc-ediff' allows visual comparison of two revisions
866of a file similar to `vc-diff', but using ediff backend. 868of a file similar to `vc-diff', but using ediff backend.
867 869
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eb7be329d84..990a7259bc8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,7 @@
12011-12-16 Chong Yidong <cyd@gnu.org> 12011-12-17 Chong Yidong <cyd@gnu.org>
2 2
3 * vc/vc.el (vc-next-action): Doc fix; remove CVS-isms. 3 * vc/vc.el (vc-next-action): Doc fix; remove CVS-isms.
4 (vc-deduce-fileset): Doc fix.
4 5
52011-12-16 Andreas Schwab <schwab@linux-m68k.org> 62011-12-16 Andreas Schwab <schwab@linux-m68k.org>
6 7
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 85fbd93e9c6..87e8901e33a 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -951,13 +951,13 @@ Within directories, only files already under version control are noticed."
951(defun vc-deduce-fileset (&optional observer allow-unregistered 951(defun vc-deduce-fileset (&optional observer allow-unregistered
952 state-model-only-files) 952 state-model-only-files)
953 "Deduce a set of files and a backend to which to apply an operation. 953 "Deduce a set of files and a backend to which to apply an operation.
954
955Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL). 954Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL).
956If we're in VC-dir mode, the fileset is the list of marked files. 955
957Otherwise, if we're looking at a buffer visiting a version-controlled file, 956If we're in VC-dir mode, FILESET is the list of marked files.
958the fileset is a singleton containing this file. 957Otherwise, if in a buffer visiting a version-controlled file,
959If none of these conditions is met, but ALLOW_UNREGISTERED is on and the 958FILESET is a single-file fileset containing that file.
960visited file is not registered, return a singleton fileset containing it. 959Otherwise, if ALLOW-UNREGISTERED is non-nil and the visited file
960is unregistered, FILESET is a single-file fileset containing it.
961Otherwise, throw an error. 961Otherwise, throw an error.
962 962
963STATE-MODEL-ONLY-FILES if non-nil, means that the caller needs 963STATE-MODEL-ONLY-FILES if non-nil, means that the caller needs