annotate doc/emacs/vc1-xtra.texi @ 99000:c283d0803e3c

Move nodes VC Directory Mode and VC Directory Commands to files.texi. Move contents of vc2-xtra.texi here.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 21 Oct 2008 20:50:27 +0000
parents dbc2d4ac9902
children cb5d2387102c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
1 @c This is part of the Emacs manual.
87903
5d58981e6690 Merge from emacs--rel--22
Miles Bader <miles@gnu.org>
parents: 85136
diff changeset
2 @c Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
3 @c See file emacs.texi for copying conditions.
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
4 @c
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
5 @c This file is included either in vc-xtra.texi (when producing the
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
6 @c printed version) or in the main Emacs manual (for the on-line version).
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
7
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
8 @node Remote Repositories
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
9 @subsection Remote Repositories
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
10 @cindex remote repositories
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
11
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
12 A common way of using CVS and other more advanced VCSes is to set up
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
13 a central repository on some Internet host, then have each
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
14 developer check out a personal working copy of the files on his local
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
15 machine. Committing changes to the repository, and picking up changes
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
16 from other users into one's own working area, then works by direct
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
17 interactions with the repository server.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
18
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
19 One difficulty is that access to a repository server is often slow,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
20 and that developers might need to work off-line as well. While only
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
21 third-generation decentralized VCses such as GNU Arch or Mercurial
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
22 really solve this problem, VC is designed to reduce the amount of
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
23 network interaction necessary.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
24
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
25 If you are using a truly decentralized VCS you can skip the rest of
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
26 this section. It describes backup and local-repository techniques
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
27 that are only useful for Subversion and earlier VCSes.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
28
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
29 @menu
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
30 * Version Backups:: Keeping local copies of repository versions.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
31 * Local Version Control:: Using another version system for local editing.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
32 @end menu
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
33
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
34 @node Version Backups
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
35 @subsubsection Version Backups
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
36 @cindex version backups
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
37
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
38 @cindex automatic version backups
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
39 When VC sees that the repository for a file is on a remote
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
40 machine, it automatically makes local backups of unmodified versions
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
41 of the file---@dfn{automatic version backups}. This means that you
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
42 can compare the file to the repository version (@kbd{C-x v =}), or
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
43 revert to that version (@kbd{C-x v u}), without any network
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
44 interactions.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
45
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
46 The local copy of the unmodified file is called a @dfn{version
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
47 backup} to indicate that it corresponds exactly to a version that is
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
48 stored in the repository. Note that version backups are not the same
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
49 as ordinary Emacs backup files
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
50 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
51 (@pxref{Backup,,,emacs, the Emacs Manual}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
52 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
53 @ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
54 (@pxref{Backup}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
55 @end ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
56 But they follow a similar naming convention.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
57
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
58 For a file that comes from a remote repository, VC makes a
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
59 version backup whenever you save the first changes to the file, and
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
60 removes it after you have committed your modified version to the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
61 repository. You can disable the making of automatic version backups by
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
62 setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
63
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
64 @cindex manual version backups
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
65 The name of the automatic version backup for version @var{version}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
66 of file @var{file} is @code{@var{file}.~@var{version}.~}. This is
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
67 almost the same as the name used by @kbd{C-x v ~}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
68 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
69 (@pxref{Old Revisions,,,emacs, the Emacs Manual}),
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
70 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
71 @ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
72 (@pxref{Old Revisions}),
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
73 @end ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
74 the only difference being the additional dot (@samp{.}) after the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
75 version number. This similarity is intentional, because both kinds of
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
76 files store the same kind of information. The file made by @kbd{C-x v
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
77 ~} acts as a @dfn{manual version backup}.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
78
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
79 All the VC commands that operate on old versions of a file can use
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
80 both kinds of version backups. For instance, @kbd{C-x v ~} uses
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
81 either an automatic or a manual version backup, if possible, to get
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
82 the contents of the version you request. Likewise, @kbd{C-x v =} and
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
83 @kbd{C-x v u} use either an automatic or a manual version backup, if
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
84 one of them exists, to get the contents of a version to compare or
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
85 revert to. If you changed a file outside of Emacs, so that no
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
86 automatic version backup was created for the previous text, you can
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
87 create a manual backup of that version using @kbd{C-x v ~}, and thus
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
88 obtain the benefit of the local copy for Emacs commands.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
89
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
90 The only difference in Emacs's handling of manual and automatic
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
91 version backups, once they exist, is that Emacs deletes automatic
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
92 version backups when you commit to the repository. By contrast,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
93 manual version backups remain until you delete them.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
94
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
95 @node Local Version Control
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
96 @subsubsection Local Version Control
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
97 @cindex local version control
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
98 @cindex local back end (version control)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
99
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
100 When you make many changes to a file that comes from a remote
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
101 repository, it can be convenient to have version control on your local
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
102 machine as well. You can then record intermediate versions, revert to
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
103 a previous state, etc., before you actually commit your changes to the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
104 remote server.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
105
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
106 VC lets you do this by putting a file under a second, local version
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
107 control system, so that the file is effectively registered in two
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
108 systems at the same time. For the description here, we will assume
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
109 that the remote system is CVS, and you use RCS locally, although the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
110 mechanism works with any combination of version control systems
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
111 (@dfn{back ends}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
112
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
113 To make it work with other back ends, you must make sure that the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
114 ``more local'' back end comes before the ``more remote'' back end in
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
115 the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
116 default, this variable is set up so that you can use remote CVS and
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
117 local RCS as described here.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
118
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
119 To start using local RCS for a file that comes from a remote CVS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
120 server, you must @emph{register the file in RCS}, by typing @kbd{C-u
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
121 C-x v v rcs @key{RET}}. (In other words, use @code{vc-next-action} with a
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
122 prefix argument, and specify RCS as the back end.)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
123
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
124 You can do this at any time; it does not matter whether you have
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
125 already modified the file with respect to the version in the CVS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
126 repository. If possible, VC tries to make the RCS master start with
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
127 the unmodified repository version, then checks in any local changes
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
128 as a new version. This works if you have not made any changes yet, or
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
129 if the unmodified repository version exists locally as a version
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
130 backup (@pxref{Version Backups}). If the unmodified version is not
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
131 available locally, the RCS master starts with the modified version;
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
132 the only drawback to this is that you cannot compare your changes
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
133 locally to what is stored in the repository.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
134
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
135 The version number of the RCS master is derived from the current CVS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
136 version, starting a branch from it. For example, if the current CVS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
137 version is 1.23, the local RCS branch will be 1.23.1. Version 1.23 in
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
138 the RCS master will be identical to version 1.23 under CVS; your first
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
139 changes are checked in as 1.23.1.1. (If the unmodified file is not
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
140 available locally, VC will check in the modified file twice, both as
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
141 1.23 and 1.23.1.1, to make the revision numbers consistent.)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
142
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
143 If you do not use locking under CVS (the default), locking is also
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
144 disabled for RCS, so that editing under RCS works exactly as under
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
145 CVS.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
146
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
147 When you are done with local editing, you can commit the final version
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
148 back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
149 This initializes the log entry buffer
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
150 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
151 (@pxref{Log Buffer,,,emacs, the Emacs Manual})
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
152 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
153 @ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
154 (@pxref{Log Buffer})
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
155 @end ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
156 to contain all the log entries you have recorded in the RCS master;
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
157 you can edit them as you wish, and then commit in CVS by typing
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
158 @kbd{C-c C-c}. If the commit is successful, VC removes the RCS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
159 master, so that the file is once again registered under CVS only.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
160 (The RCS master is not actually deleted, just renamed by appending
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
161 @samp{~} to the name, so that you can refer to it later if you wish.)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
162
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
163 While using local RCS, you can pick up recent changes from the CVS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
164 repository into your local file, or commit some of your changes back
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
165 to CVS, without terminating local RCS version control. To do this,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
166 switch to the CVS back end temporarily, with the @kbd{C-x v b} command:
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
167
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
168 @table @kbd
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
169 @item C-x v b
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
170 Switch to another back end that the current file is registered
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
171 under (@code{vc-switch-backend}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
172
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
173 @item C-u C-x v b @var{backend} @key{RET}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
174 Switch to @var{backend} for the current file.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
175 @end table
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
176
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
177 @kindex C-x v b
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
178 @findex vc-switch-backend
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
179 @kbd{C-x v b} does not change the buffer contents, or any files; it
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
180 only changes VC's perspective on how to handle the file. Any
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
181 subsequent VC commands for that file will operate on the back end that
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
182 is currently selected.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
183
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
184 If the current file is registered in more than one back end, typing
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
185 @kbd{C-x v b} ``cycles'' through all of these back ends. With a
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
186 prefix argument, it asks for the back end to use in the minibuffer.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
187
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
188 Thus, if you are using local RCS, and you want to pick up some recent
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
189 changes in the file from remote CVS, first visit the file, then type
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
190 @kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
191 @key{RET}} to merge the news
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
192 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
193 (@pxref{Merging,,,emacs, the Emacs Manual}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
194 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
195 @ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
196 (@pxref{Merging}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
197 @end ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
198 You can then switch back to RCS by typing @kbd{C-x v b} again, and
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
199 continue to edit locally.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
200
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
201 But if you do this, the revision numbers in the RCS master no longer
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
202 correspond to those of CVS. Technically, this is not a problem, but
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
203 it can become difficult to keep track of what is in the CVS repository
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
204 and what is not. So we suggest that you return from time to time to
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
205 CVS-only operation, by committing your local changes back to the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
206 repository using @kbd{C-u C-x v v cvs @key{RET}}.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
207
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
208 @node Revision Tags
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
209 @subsection Revision Tags
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
210 @cindex tags and version control
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
211
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
212 In a VCS with per-file revision numbers (such as SCCS, RCS, or CVS)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
213 @dfn{tag} is a named set of file versions (one for each registered
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
214 file) that you can treat as a unit. In a VCS with per-repository
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
215 version numbers (Subversion and most later ones) a tag is simply
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
216 a symbolic name for a revsion.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
217
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
218 One important kind of tag is a @dfn{release}, a (theoretically)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
219 stable version of the system that is ready for distribution to users.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
220
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
221 @menu
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
222 * Making Revision Tags:: The tag facilities.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
223 * Revision Tag Caveats:: Things to be careful of when using tags.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
224 @end menu
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
225
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
226 @node Making Revision Tags
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
227 @subsubsection Making and Using Revision Tags
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
228
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
229 There are two basic commands for tags; one makes a
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
230 tag with a given name, the other retrieves a named tag.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
231
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
232 @table @code
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
233 @kindex C-x v s
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
234 @findex vc-create-tag
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
235 @item C-x v s @var{name} @key{RET}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
236 Define the working revision of every registered file in or under the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
237 current directory as a tag named @var{name}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
238 (@code{vc-create-tag}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
239
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
240 @kindex C-x v r
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
241 @findex vc-retrieve-tag
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
242 @item C-x v r @var{name} @key{RET}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
243 For all registered files at or below the current directory level,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
244 retrieve the tagged revision @var{name}. This command will
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
245 switch to a branch if @var{name} is a branch name and your VCS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
246 distinguishes branches from tags.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
247 (@code{vc-retrieve-tag}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
248
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
249 This command reports an error if any files are locked at or below the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
250 current directory, without changing anything; this is to avoid
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
251 overwriting work in progress.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
252 @end table
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
253
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
254 Tags are inexpensive, so you need not hesitate to create them whenever
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
255 they are useful. Branches vary in cost depending on your VCS; in
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
256 older ones they may be expensive.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
257
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
258 You can give a tag or branch name as an argument to @kbd{C-x v =} or
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
259 @kbd{C-x v ~}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
260 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
261 (@pxref{Old Revisions,,,emacs, the Emacs Manual}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
262 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
263 @ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
264 (@pxref{Old Revisions}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
265 @end ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
266 Thus, you can use it to compare a tagged version against the current files,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
267 or two tagged versions against each other.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
268
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
269 @node Revision Tag Caveats
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
270 @subsubsection Revision Tag Caveats
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
271
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
272 For SCCS, VC implements tags itself; these tags are visible only
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
273 through VC. Most later systems (including CVS, Subversion, bzr, git,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
274 and hg) have a native tag facility, and VC uses it where
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
275 available; those tags will be visible even when you bypass VC.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
276
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
277 There is no support for VC tags using GNU Arch yet.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
278
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
279 Under older VCSes (SCCS, RCS, CVS, early versions of Subversion),
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
280 renaming and deletion could create some difficulties with tags. This is
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
281 not a VC-specific problem, but a general design issue in version
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
282 control systems that was not solved effectively until the earliest
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
283 third-generation systems.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
284
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
285 In a file-oriented VCS, when you rename a registered file you need
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
286 to rename its master along with it; the command @code{vc-rename-file}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
287 will do this automatically. If you are using SCCS, you must also
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
288 update the records of the tag, to mention the file by its new name
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
289 (@code{vc-rename-file} does this, too). An old tag that refers to a
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
290 master file that no longer exists under the recorded name is invalid;
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
291 VC can no longer retrieve it. It would be beyond the scope of this
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
292 manual to explain enough about RCS and SCCS to explain how to update
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
293 the tags by hand.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
294
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
295 Using @code{vc-rename-file} makes the tag remain valid for
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
296 retrieval, but it does not solve all problems. For example, some of the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
297 files in your program probably refer to others by name. At the very
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
298 least, the makefile probably mentions the file that you renamed. If you
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
299 retrieve an old tag, the renamed file is retrieved under its new
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
300 name, which is not the name that the makefile expects. So the program
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
301 won't really work as retrieved.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
302
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
303 @node Miscellaneous VC
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
304 @subsection Miscellaneous Commands and Features of VC
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
305
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
306 This section explains the less-frequently-used features of VC.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
307
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
308 @menu
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
309 * Change Logs and VC:: Generating a change log file from log entries.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
310 * Renaming and VC:: A command to rename both the source and master
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
311 file correctly.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
312 * Version Headers:: Inserting version control headers into working files.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
313 @end menu
97312
aa4551463556 (VC Directory Mode): Talk about multiple VC systems.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 97284
diff changeset
314
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
315 @node Change Logs and VC
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
316 @subsubsection Change Logs and VC
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
317
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
318 If you use RCS or CVS for a program and also maintain a change log
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
319 file for it
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
320 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
321 (@pxref{Change Log,,,emacs, the Emacs Manual}),
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
322 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
323 @ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
324 (@pxref{Change Log}),
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
325 @end ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
326 you can generate change log entries automatically from the version
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
327 control log entries:
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
328
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
329 @table @kbd
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
330 @item C-x v a
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
331 @kindex C-x v a
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
332 @findex vc-update-change-log
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
333 Visit the current directory's change log file and, for registered files
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
334 in that directory, create new entries for versions checked in since the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
335 most recent entry in the change log file.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
336 (@code{vc-update-change-log}).
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
337
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
338 This command works with RCS or CVS only, not with any of the other
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
339 back ends.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
340
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
341 @item C-u C-x v a
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
342 As above, but only find entries for the current buffer's file.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
343
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
344 @item M-1 C-x v a
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
345 As above, but find entries for all the currently visited files that are
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
346 maintained with version control. This works only with RCS, and it puts
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
347 all entries in the log for the default directory, which may not be
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
348 appropriate.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
349 @end table
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
350
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
351 For example, suppose the first line of @file{ChangeLog} is dated
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
352 1999-04-10, and that the only check-in since then was by Nathaniel
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
353 Bowditch to @file{rcs2log} on 1999-05-22 with log text @samp{Ignore log
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
354 messages that start with `#'.}. Then @kbd{C-x v a} visits
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
355 @file{ChangeLog} and inserts text like this:
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
356
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
357 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
358 @medbreak
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
359 @end iftex
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
360 @smallexample
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
361 @group
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
362 1999-05-22 Nathaniel Bowditch <nat@@apn.org>
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
363
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
364 * rcs2log: Ignore log messages that start with `#'.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
365 @end group
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
366 @end smallexample
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
367 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
368 @medbreak
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
369 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
370
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
371 @noindent
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
372 You can then edit the new change log entry further as you wish.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
373
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
374 Some of the new change log entries may duplicate what's already in
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
375 ChangeLog. You will have to remove these duplicates by hand.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
376
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
377 Normally, the log entry for file @file{foo} is displayed as @samp{*
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
378 foo: @var{text of log entry}}. The @samp{:} after @file{foo} is omitted
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
379 if the text of the log entry starts with @w{@samp{(@var{functionname}):
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
380 }}. For example, if the log entry for @file{vc.el} is
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
381 @samp{(vc-do-command): Check call-process status.}, then the text in
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
382 @file{ChangeLog} looks like this:
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
383
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
384 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
385 @medbreak
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
386 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
387 @smallexample
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
388 @group
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
389 1999-05-06 Nathaniel Bowditch <nat@@apn.org>
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
390
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
391 * vc.el (vc-do-command): Check call-process status.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
392 @end group
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
393 @end smallexample
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
394 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
395 @medbreak
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
396 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
397
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
398 When @kbd{C-x v a} adds several change log entries at once, it groups
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
399 related log entries together if they all are checked in by the same
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
400 author at nearly the same time. If the log entries for several such
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
401 files all have the same text, it coalesces them into a single entry.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
402 For example, suppose the most recent check-ins have the following log
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
403 entries:
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
404
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
405 @flushleft
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
406 @bullet{} For @file{vc.texinfo}: @samp{Fix expansion typos.}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
407 @bullet{} For @file{vc.el}: @samp{Don't call expand-file-name.}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
408 @bullet{} For @file{vc-hooks.el}: @samp{Don't call expand-file-name.}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
409 @end flushleft
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
410
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
411 @noindent
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
412 They appear like this in @file{ChangeLog}:
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
413
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
414 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
415 @medbreak
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
416 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
417 @smallexample
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
418 @group
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
419 1999-04-01 Nathaniel Bowditch <nat@@apn.org>
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
420
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
421 * vc.texinfo: Fix expansion typos.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
422
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
423 * vc.el, vc-hooks.el: Don't call expand-file-name.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
424 @end group
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
425 @end smallexample
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
426 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
427 @medbreak
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
428 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
429
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
430 Normally, @kbd{C-x v a} separates log entries by a blank line, but you
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
431 can mark several related log entries to be clumped together (without an
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
432 intervening blank line) by starting the text of each related log entry
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
433 with a label of the form @w{@samp{@{@var{clumpname}@} }}. The label
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
434 itself is not copied to @file{ChangeLog}. For example, suppose the log
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
435 entries are:
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
436
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
437 @flushleft
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
438 @bullet{} For @file{vc.texinfo}: @samp{@{expand@} Fix expansion typos.}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
439 @bullet{} For @file{vc.el}: @samp{@{expand@} Don't call expand-file-name.}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
440 @bullet{} For @file{vc-hooks.el}: @samp{@{expand@} Don't call expand-file-name.}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
441 @end flushleft
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
442
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
443 @noindent
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
444 Then the text in @file{ChangeLog} looks like this:
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
445
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
446 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
447 @medbreak
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
448 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
449 @smallexample
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
450 @group
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
451 1999-04-01 Nathaniel Bowditch <nat@@apn.org>
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
452
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
453 * vc.texinfo: Fix expansion typos.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
454 * vc.el, vc-hooks.el: Don't call expand-file-name.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
455 @end group
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
456 @end smallexample
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
457 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
458 @medbreak
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
459 @end iftex
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
460
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
461 A log entry whose text begins with @samp{#} is not copied to
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
462 @file{ChangeLog}. For example, if you merely fix some misspellings in
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
463 comments, you can log the change with an entry beginning with @samp{#}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
464 to avoid putting such trivia into @file{ChangeLog}.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
465
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
466 @node Renaming and VC
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
467 @subsubsection Renaming VC Work Files and Master Files
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
468
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
469 @findex vc-rename-file
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
470 When you rename a registered file, you must also rename its master
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
471 file correspondingly to get proper results. Use @code{vc-rename-file}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
472 to rename the source file as you specify, and rename its master file
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
473 accordingly. It also updates any tags (@pxref{Revision Tags}) that
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
474 mention the file, so that they use the new name; despite this, the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
475 tag thus modified may not completely work (@pxref{Revision Tag Caveats}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
476
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
477 Some back ends do not provide an explicit rename operation to their
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
478 repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
479 on the original and renamed buffers and provide the necessary edit
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
480 log.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
481
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
482 You cannot use @code{vc-rename-file} on a file that is locked by
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
483 someone else.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
484
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
485 @node Version Headers
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
486 @subsubsection Inserting Version Control Headers
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
487
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
488 Sometimes it is convenient to put version identification strings
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
489 directly into working files. Certain special strings called
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
490 @dfn{version headers} are replaced in each successive version by the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
491 number of that version, the name of the user who created it, and other
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
492 relevant information. All of the back ends that VC supports have such
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
493 a mechanism, except GNU Arch.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
494
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
495 VC does not normally use the information contained in these headers.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
496 The exception is RCS---with RCS, version headers are sometimes more
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
497 reliable than the master file to determine which version of the file
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
498 you are editing. Note that in a multi-branch environment, version
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
499 headers are necessary to make VC behave correctly
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
500 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
501 (@pxref{Multi-User Branching,,,emacs, the Emacs Manual}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
502 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
503 @ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
504 (@pxref{Multi-User Branching}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
505 @end ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
506
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
507 Searching for RCS version headers is controlled by the variable
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
508 @code{vc-consult-headers}. If it is non-@code{nil} (the default),
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
509 Emacs searches for headers to determine the version number you are
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
510 editing. Setting it to @code{nil} disables this feature.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
511
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
512 Note that although CVS uses the same kind of version headers as RCS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
513 does, VC never searches for these headers if you are using CVS,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
514 regardless of the above setting.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
515
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
516 @kindex C-x v h
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
517 @findex vc-insert-headers
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
518 You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
519 insert a suitable header string.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
520
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
521 @table @kbd
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
522 @item C-x v h
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
523 Insert headers in a file for use with your version-control system.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
524 @end table
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
525
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
526 @vindex vc-@var{backend}-header
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
527 The default header string is @samp{@w{$}Id$} for RCS and
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
528 @samp{@w{%}W%} for SCCS. You can specify other headers to insert by
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
529 setting the variables @code{vc-@var{backend}-header} where
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
530 @var{backend} is @code{rcs} or @code{sccs}.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
531
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
532 Instead of a single string, you can specify a list of strings; then
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
533 each string in the list is inserted as a separate header on a line of
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
534 its own.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
535
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
536 It may be necessary to use apparently-superfluous backslashes when
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
537 writing the strings that you put in this variable. For instance, you
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
538 might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
539 backslash prevents the string constant from being interpreted as a
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
540 header, if the Emacs Lisp file containing it is maintained with
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
541 version control.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
542
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
543 @vindex vc-comment-alist
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
544 Each header is inserted surrounded by tabs, inside comment delimiters,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
545 on a new line at point. Normally the ordinary comment
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
546 start and comment end strings of the current mode are used, but for
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
547 certain modes, there are special comment delimiters for this purpose;
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
548 the variable @code{vc-comment-alist} specifies them. Each element of
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
549 this list has the form @code{(@var{mode} @var{starter} @var{ender})}.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
550
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
551 @vindex vc-static-header-alist
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
552 The variable @code{vc-static-header-alist} specifies further strings
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
553 to add based on the name of the buffer. Its value should be a list of
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
554 elements of the form @code{(@var{regexp} . @var{format})}. Whenever
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
555 @var{regexp} matches the buffer name, @var{format} is inserted as part
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
556 of the header. A header line is inserted for each element that matches
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
557 the buffer name, and for each string specified by
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
558 @code{vc-@var{backend}-header}. The header line is made by processing the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
559 string from @code{vc-@var{backend}-header} with the format taken from the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
560 element. The default value for @code{vc-static-header-alist} is as follows:
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
561
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
562 @example
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
563 @group
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
564 (("\\.c$" .
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
565 "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
566 #endif /* lint */\n"))
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
567 @end group
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
568 @end example
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
569
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
570 @noindent
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
571 It specifies insertion of text of this form:
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
572
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
573 @example
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
574 @group
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
575
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
576 #ifndef lint
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
577 static char vcid[] = "@var{string}";
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
578 #endif /* lint */
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
579 @end group
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
580 @end example
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
581
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
582 @noindent
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
583 Note that the text above starts with a blank line.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
584
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
585 If you use more than one version header in a file, put them close
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
586 together in the file. The mechanism in @code{revert-buffer} that
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
587 preserves markers may not handle markers positioned between two version
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
588 headers.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
589
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
590 @node Customizing VC
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
591 @subsection Customizing VC
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
592
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
593 @vindex vc-handled-backends
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
594 The variable @code{vc-handled-backends} determines which version
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
595 control systems VC should handle. The default value is @code{(RCS CVS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
596 SVN SCCS BZR GIT HG Arch)}, so it contains all the version systems
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
597 that are currently supported. If you want VC to ignore one or more of
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
598 these systems, exclude its name from the list. To disable VC entirely,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
599 set this variable to @code{nil}.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
600
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
601 The order of systems in the list is significant: when you visit a file
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
602 registered in more than one system (@pxref{Local Version Control}), VC
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
603 uses the system that comes first in @code{vc-handled-backends} by
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
604 default. The order is also significant when you register a file for
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
605 the first time, see
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
606 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
607 @ref{Registering,,,emacs, the Emacs Manual},
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
608 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
609 @ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
610 @ref{Registering},
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
611 @end ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
612 for details.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
613
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
614 @menu
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
615 * General VC Options:: Options that apply to multiple back ends.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
616 * RCS and SCCS:: Options for RCS and SCCS.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
617 * CVS Options:: Options for CVS.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
618 @end menu
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
619
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
620 @node General VC Options
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
621 @subsubsection General Options
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
622
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
623 @vindex vc-make-backup-files
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
624 Emacs normally does not save backup files for source files that are
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
625 maintained with version control. If you want to make backup files even
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
626 for files that use version control, set the variable
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
627 @code{vc-make-backup-files} to a non-@code{nil} value.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
628
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
629 @vindex vc-keep-workfiles
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
630 Normally the work file exists all the time, whether it is locked or
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
631 not. If you set @code{vc-keep-workfiles} to @code{nil}, then checking
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
632 in a new version with @kbd{C-x v v} deletes the work file; but any
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
633 attempt to visit the file with Emacs creates it again. (With CVS, work
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
634 files are always kept.)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
635
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
636 @vindex vc-follow-symlinks
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
637 Editing a version-controlled file through a symbolic link can be
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
638 dangerous. It bypasses the version control system---you can edit the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
639 file without locking it, and fail to check your changes in. Also,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
640 your changes might overwrite those of another user. To protect against
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
641 this, VC checks each symbolic link that you visit, to see if it points
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
642 to a file under version control.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
643
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
644 The variable @code{vc-follow-symlinks} controls what to do when a
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
645 symbolic link points to a version-controlled file. If it is @code{nil},
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
646 VC only displays a warning message. If it is @code{t}, VC automatically
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
647 follows the link, and visits the real file instead, telling you about
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
648 this in the echo area. If the value is @code{ask} (the default), VC
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
649 asks you each time whether to follow the link.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
650
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
651 @vindex vc-suppress-confirm
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
652 If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v}
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
653 and @kbd{C-x v i} can save the current buffer without asking, and
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
654 @kbd{C-x v u} also operates without asking for confirmation. (This
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
655 variable does not affect @kbd{C-x v c}; that operation is so drastic
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
656 that it should always ask for confirmation.)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
657
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
658 @vindex vc-command-messages
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
659 VC mode does much of its work by running the shell commands for RCS,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
660 CVS and SCCS. If @code{vc-command-messages} is non-@code{nil}, VC
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
661 displays messages to indicate which shell commands it runs, and
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
662 additional messages when the commands finish.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
663
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
664 @vindex vc-path
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
665 You can specify additional directories to search for version control
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
666 programs by setting the variable @code{vc-path}. These directories
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
667 are searched before the usual search path. It is rarely necessary to
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
668 set this variable, because VC normally finds the proper files
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
669 automatically.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
670
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
671 @node RCS and SCCS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
672 @subsubsection Options for RCS and SCCS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
673
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
674 @cindex non-strict locking (RCS)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
675 @cindex locking, non-strict (RCS)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
676 By default, RCS uses locking to coordinate the activities of several
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
677 users, but there is a mode called @dfn{non-strict locking} in which
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
678 you can check-in changes without locking the file first. Use
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
679 @samp{rcs -U} to switch to non-strict locking for a particular file,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
680 see the @code{rcs} manual page for details.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
681
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
682 When deducing the version control state of an RCS file, VC first
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
683 looks for an RCS version header string in the file (@pxref{Version
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
684 Headers}). If there is no header string, VC normally looks at the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
685 file permissions of the work file; this is fast. But there might be
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
686 situations when the file permissions cannot be trusted. In this case
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
687 the master file has to be consulted, which is rather expensive. Also
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
688 the master file can only tell you @emph{if} there's any lock on the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
689 file, but not whether your work file really contains that locked
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
690 version.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
691
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
692 @vindex vc-consult-headers
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
693 You can tell VC not to use version headers to determine the file
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
694 status by setting @code{vc-consult-headers} to @code{nil}. VC then
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
695 always uses the file permissions (if it is supposed to trust them), or
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
696 else checks the master file.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
697
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
698 @vindex vc-mistrust-permissions
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
699 You can specify the criterion for whether to trust the file
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
700 permissions by setting the variable @code{vc-mistrust-permissions}.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
701 Its value can be @code{t} (always mistrust the file permissions and
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
702 check the master file), @code{nil} (always trust the file
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
703 permissions), or a function of one argument which makes the decision.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
704 The argument is the directory name of the @file{RCS} subdirectory. A
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
705 non-@code{nil} value from the function says to mistrust the file
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
706 permissions. If you find that the file permissions of work files are
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
707 changed erroneously, set @code{vc-mistrust-permissions} to @code{t}.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
708 Then VC always checks the master file to determine the file's status.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
709
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
710 VC determines the version control state of files under SCCS much as
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
711 with RCS. It does not consider SCCS version headers, though. Thus,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
712 the variable @code{vc-mistrust-permissions} affects SCCS use, but
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
713 @code{vc-consult-headers} does not.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
714
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
715 @node CVS Options
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
716 @subsubsection Options specific for CVS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
717
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
718 @cindex locking (CVS)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
719 By default, CVS does not use locking to coordinate the activities of
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
720 several users; anyone can change a work file at any time. However,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
721 there are ways to restrict this, resulting in behavior that resembles
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
722 locking.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
723
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
724 @cindex CVSREAD environment variable (CVS)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
725 For one thing, you can set the @env{CVSREAD} environment variable
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
726 (the value you use makes no difference). If this variable is defined,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
727 CVS makes your work files read-only by default. In Emacs, you must
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
728 type @kbd{C-x v v} to make the file writable, so that editing works
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
729 in fact similar as if locking was used. Note however, that no actual
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
730 locking is performed, so several users can make their files writable
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
731 at the same time. When setting @env{CVSREAD} for the first time, make
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
732 sure to check out all your modules anew, so that the file protections
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
733 are set correctly.
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
734
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
735 @cindex cvs watch feature
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
736 @cindex watching files (CVS)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
737 Another way to achieve something similar to locking is to use the
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
738 @dfn{watch} feature of CVS. If a file is being watched, CVS makes it
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
739 read-only by default, and you must also use @kbd{C-x v v} in Emacs to
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
740 make it writable. VC calls @code{cvs edit} to make the file writable,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
741 and CVS takes care to notify other developers of the fact that you
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
742 intend to change the file. See the CVS documentation for details on
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
743 using the watch feature.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
744
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
745 @vindex vc-stay-local
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
746 @vindex vc-cvs-stay-local
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
747 @cindex remote repositories (CVS)
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
748 When a file's repository is on a remote machine, VC tries to keep
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
749 network interactions to a minimum. This is controlled by the variable
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
750 @code{vc-cvs-stay-local}. There is another variable,
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
751 @code{vc-stay-local}, which enables the feature also for other back
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
752 ends that support it, including CVS. In the following, we will talk
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
753 only about @code{vc-cvs-stay-local}, but everything applies to
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
754 @code{vc-stay-local} as well.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
755
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
756 If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
757 only the entry in the local CVS subdirectory to determine the file's
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
758 state (and possibly information returned by previous CVS commands).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
759 One consequence of this is that when you have modified a file, and
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
760 somebody else has already checked in other changes to the file, you
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
761 are not notified of it until you actually try to commit. (But you can
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
762 try to pick up any recent changes from the repository first, using
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
763 @kbd{C-x v m @key{RET}},
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
764 @iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
765 @pxref{Merging,,,emacs, the Emacs Manual}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
766 @end iftex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
767 @ifnottex
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
768 @pxref{Merging}).
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
769 @end ifnottex
97220
605f76f600ae (VC Directory Mode): Fix and improve the info about
Dan Nicolaescu <dann@ics.uci.edu>
parents: 97109
diff changeset
770
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
771 When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
772 version backups, so that simple diff and revert operations are
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
773 completely local (@pxref{Version Backups}).
97220
605f76f600ae (VC Directory Mode): Fix and improve the info about
Dan Nicolaescu <dann@ics.uci.edu>
parents: 97109
diff changeset
774
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
775 On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil},
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
776 then VC queries the remote repository @emph{before} it decides what to
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
777 do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
778 repositories. It also does not make any version backups.
94818
8eb267268480 Document the new VC directory mode.
Eric S. Raymond <esr@snark.thyrsus.com>
parents: 87903
diff changeset
779
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
780 You can also set @code{vc-cvs-stay-local} to a regular expression
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
781 that is matched against the repository host name; VC then stays local
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
782 only for repositories from hosts that match the pattern.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
783
99000
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
784 @vindex vc-cvs-global-switches
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
785 You can specify additional command line options to pass to all CVS
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
786 operations in the variable @code{vc-cvs-global-switches}. These
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
787 switches are inserted immediately after the @code{cvs} command, before
c283d0803e3c Move nodes VC Directory Mode and VC Directory Commands to files.texi.
Chong Yidong <cyd@stupidchicken.com>
parents: 97339
diff changeset
788 the name of the operation to invoke.
84271
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
789
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
790 @ignore
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
791 arch-tag: 8e8c2a01-ad41-4e61-a89a-60131ad67263
ceb51f666c2a Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
792 @end ignore