comparison man/vc2-xtra.texi @ 70467:b038397ebf74

(Version Backups, Local Version Control) (Making Snapshots, Change Logs and VC, Version Headers) (Customizing VC, CVS Options) [ifnottex]: Conditional xref's for on-line manual.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 06 May 2006 14:24:41 +0000
parents a6e9a00b021b
children 3d45362f1d38
comparison
equal deleted inserted replaced
70466:adab6b63717c 70467:b038397ebf74
36 interactions. 36 interactions.
37 37
38 The local copy of the unmodified file is called a @dfn{version 38 The local copy of the unmodified file is called a @dfn{version
39 backup} to indicate that it corresponds exactly to a version that is 39 backup} to indicate that it corresponds exactly to a version that is
40 stored in the repository. Note that version backups are not the same 40 stored in the repository. Note that version backups are not the same
41 as ordinary Emacs backup files (@pxref{Backup,,,emacs, the Emacs 41 as ordinary Emacs backup files
42 Manual}). But they follow a similar naming convention. 42 @iftex
43 (@pxref{Backup,,,emacs, the Emacs Manual}).
44 @end iftex
45 @ifnottex
46 (@pxref{Backup}).
47 @end ifnottex
48 But they follow a similar naming convention.
43 49
44 For a file that comes from a remote CVS repository, VC makes a 50 For a file that comes from a remote CVS repository, VC makes a
45 version backup whenever you save the first changes to the file, and 51 version backup whenever you save the first changes to the file, and
46 removes it after you have committed your modified version to the 52 removes it after you have committed your modified version to the
47 repository. You can disable the making of automatic version backups by 53 repository. You can disable the making of automatic version backups by
48 setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}). 54 setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
49 55
50 @cindex manual version backups 56 @cindex manual version backups
51 The name of the automatic version backup for version @var{version} 57 The name of the automatic version backup for version @var{version}
52 of file @var{file} is @code{@var{file}.~@var{version}.~}. This is 58 of file @var{file} is @code{@var{file}.~@var{version}.~}. This is
53 almost the same as the name used by @kbd{C-x v ~} (@pxref{Old 59 almost the same as the name used by @kbd{C-x v ~}
54 Versions,,,emacs, the Emacs Manual}), the only difference being 60 @iftex
55 the additional dot (@samp{.}) after the version number. This 61 (@pxref{Old Versions,,,emacs, the Emacs Manual}),
56 similarity is intentional, because both kinds of files store the same 62 @end iftex
57 kind of information. The file made by @kbd{C-x v ~} acts as a 63 @ifnottex
58 @dfn{manual version backup}. 64 (@pxref{Old Versions}),
65 @end ifnottex
66 the only difference being the additional dot (@samp{.}) after the
67 version number. This similarity is intentional, because both kinds of
68 files store the same kind of information. The file made by @kbd{C-x v
69 ~} acts as a @dfn{manual version backup}.
59 70
60 All the VC commands that operate on old versions of a file can use 71 All the VC commands that operate on old versions of a file can use
61 both kinds of version backups. For instance, @kbd{C-x v ~} uses 72 both kinds of version backups. For instance, @kbd{C-x v ~} uses
62 either an automatic or a manual version backup, if possible, to get 73 either an automatic or a manual version backup, if possible, to get
63 the contents of the version you request. Likewise, @kbd{C-x v =} and 74 the contents of the version you request. Likewise, @kbd{C-x v =} and
125 disabled for RCS, so that editing under RCS works exactly as under 136 disabled for RCS, so that editing under RCS works exactly as under
126 CVS. 137 CVS.
127 138
128 When you are done with local editing, you can commit the final version 139 When you are done with local editing, you can commit the final version
129 back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}. 140 back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}.
130 This initializes the log entry buffer (@pxref{Log Buffer,,,emacs, the 141 This initializes the log entry buffer
131 Emacs Manual}) to contain all the log entries you have recorded in the 142 @iftex
132 RCS master; you can edit them as you wish, and then commit in CVS by 143 (@pxref{Log Buffer,,,emacs, the Emacs Manual})
133 typing @kbd{C-c C-c}. If the commit is successful, VC removes the RCS 144 @end iftex
145 @ifnottex
146 (@pxref{Log Buffer})
147 @end ifnottex
148 to contain all the log entries you have recorded in the RCS master;
149 you can edit them as you wish, and then commit in CVS by typing
150 @kbd{C-c C-c}. If the commit is successful, VC removes the RCS
134 master, so that the file is once again registered under CVS only. 151 master, so that the file is once again registered under CVS only.
135 (The RCS master is not actually deleted, just renamed by appending 152 (The RCS master is not actually deleted, just renamed by appending
136 @samp{~} to the name, so that you can refer to it later if you wish.) 153 @samp{~} to the name, so that you can refer to it later if you wish.)
137 154
138 While using local RCS, you can pick up recent changes from the CVS 155 While using local RCS, you can pick up recent changes from the CVS
161 prefix argument, it asks for the back end to use in the minibuffer. 178 prefix argument, it asks for the back end to use in the minibuffer.
162 179
163 Thus, if you are using local RCS, and you want to pick up some recent 180 Thus, if you are using local RCS, and you want to pick up some recent
164 changes in the file from remote CVS, first visit the file, then type 181 changes in the file from remote CVS, first visit the file, then type
165 @kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m 182 @kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m
166 @key{RET}} to merge the news (@pxref{Merging,,,emacs, the Emacs 183 @key{RET}} to merge the news
167 Manual}). You can then switch back to RCS by typing @kbd{C-x v b} 184 @iftex
168 again, and continue to edit locally. 185 (@pxref{Merging,,,emacs, the Emacs Manual}).
186 @end iftex
187 @ifnottex
188 (@pxref{Merging}).
189 @end ifnottex
190 You can then switch back to RCS by typing @kbd{C-x v b} again, and
191 continue to edit locally.
169 192
170 But if you do this, the revision numbers in the RCS master no longer 193 But if you do this, the revision numbers in the RCS master no longer
171 correspond to those of CVS. Technically, this is not a problem, but 194 correspond to those of CVS. Technically, this is not a problem, but
172 it can become difficult to keep track of what is in the CVS repository 195 it can become difficult to keep track of what is in the CVS repository
173 and what is not. So we suggest that you return from time to time to 196 and what is not. So we suggest that you return from time to time to
217 A snapshot uses a very small amount of resources---just enough to record 240 A snapshot uses a very small amount of resources---just enough to record
218 the list of file names and which version belongs to the snapshot. Thus, 241 the list of file names and which version belongs to the snapshot. Thus,
219 you need not hesitate to create snapshots whenever they are useful. 242 you need not hesitate to create snapshots whenever they are useful.
220 243
221 You can give a snapshot name as an argument to @kbd{C-x v =} or 244 You can give a snapshot name as an argument to @kbd{C-x v =} or
222 @kbd{C-x v ~} (@pxref{Old Versions,,,emacs, the Emacs Manual}). 245 @kbd{C-x v ~}
246 @iftex
247 (@pxref{Old Versions,,,emacs, the Emacs Manual}).
248 @end iftex
249 @ifnottex
250 (@pxref{Old Versions}).
251 @end ifnottex
223 Thus, you can use it to compare a snapshot against the current files, 252 Thus, you can use it to compare a snapshot against the current files,
224 or two snapshots against each other, or a snapshot against a named 253 or two snapshots against each other, or a snapshot against a named
225 version. 254 version.
226 255
227 @node Snapshot Caveats 256 @node Snapshot Caveats
281 310
282 @node Change Logs and VC 311 @node Change Logs and VC
283 @subsubsection Change Logs and VC 312 @subsubsection Change Logs and VC
284 313
285 If you use RCS or CVS for a program and also maintain a change log 314 If you use RCS or CVS for a program and also maintain a change log
286 file for it (@pxref{Change Log,,,emacs, the Emacs Manual}), you 315 file for it
287 can generate change log entries automatically from the version control 316 @iftex
288 log entries: 317 (@pxref{Change Log,,,emacs, the Emacs Manual}),
318 @end iftex
319 @ifnottex
320 (@pxref{Change Log}),
321 @end ifnottex
322 you can generate change log entries automatically from the version
323 control log entries:
289 324
290 @table @kbd 325 @table @kbd
291 @item C-x v a 326 @item C-x v a
292 @kindex C-x v a 327 @kindex C-x v a
293 @findex vc-update-change-log 328 @findex vc-update-change-log
456 491
457 VC does not normally use the information contained in these headers. 492 VC does not normally use the information contained in these headers.
458 The exception is RCS---with RCS, version headers are sometimes more 493 The exception is RCS---with RCS, version headers are sometimes more
459 reliable than the master file to determine which version of the file 494 reliable than the master file to determine which version of the file
460 you are editing. Note that in a multi-branch environment, version 495 you are editing. Note that in a multi-branch environment, version
461 headers are necessary to make VC behave correctly (@pxref{Multi-User 496 headers are necessary to make VC behave correctly
462 Branching,,,emacs, the Emacs Manual}). 497 @iftex
498 (@pxref{Multi-User Branching,,,emacs, the Emacs Manual}).
499 @end iftex
500 @ifnottex
501 (@pxref{Multi-User Branching}).
502 @end ifnottex
463 503
464 Searching for RCS version headers is controlled by the variable 504 Searching for RCS version headers is controlled by the variable
465 @code{vc-consult-headers}. If it is non-@code{nil} (the default), 505 @code{vc-consult-headers}. If it is non-@code{nil} (the default),
466 Emacs searches for headers to determine the version number you are 506 Emacs searches for headers to determine the version number you are
467 editing. Setting it to @code{nil} disables this feature. 507 editing. Setting it to @code{nil} disables this feature.
557 597
558 The order of systems in the list is significant: when you visit a file 598 The order of systems in the list is significant: when you visit a file
559 registered in more than one system (@pxref{Local Version Control}), VC 599 registered in more than one system (@pxref{Local Version Control}), VC
560 uses the system that comes first in @code{vc-handled-backends} by 600 uses the system that comes first in @code{vc-handled-backends} by
561 default. The order is also significant when you register a file for 601 default. The order is also significant when you register a file for
562 the first time, @pxref{Registering,,,emacs, the Emacs Manual} for 602 the first time, see
563 details. 603 @iftex
604 @ref{Registering,,,emacs, the Emacs Manual},
605 @end iftex
606 @ifnottex
607 @ref{Registering},
608 @end ifnottex
609 for details.
564 610
565 @menu 611 @menu
566 * General VC Options:: Options that apply to multiple back ends. 612 * General VC Options:: Options that apply to multiple back ends.
567 * RCS and SCCS:: Options for RCS and SCCS. 613 * RCS and SCCS:: Options for RCS and SCCS.
568 * CVS Options:: Options for CVS. 614 * CVS Options:: Options for CVS.
709 state (and possibly information returned by previous CVS commands). 755 state (and possibly information returned by previous CVS commands).
710 One consequence of this is that when you have modified a file, and 756 One consequence of this is that when you have modified a file, and
711 somebody else has already checked in other changes to the file, you 757 somebody else has already checked in other changes to the file, you
712 are not notified of it until you actually try to commit. (But you can 758 are not notified of it until you actually try to commit. (But you can
713 try to pick up any recent changes from the repository first, using 759 try to pick up any recent changes from the repository first, using
714 @kbd{C-x v m @key{RET}}, @pxref{Merging,,,emacs, the Emacs Manual}). 760 @kbd{C-x v m @key{RET}},
761 @iftex
762 @pxref{Merging,,,emacs, the Emacs Manual}).
763 @end iftex
764 @ifnottex
765 @pxref{Merging}).
766 @end ifnottex
715 767
716 When @code{vc-cvs-stay-local} is @code{t}, VC also makes local 768 When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
717 version backups, so that simple diff and revert operations are 769 version backups, so that simple diff and revert operations are
718 completely local (@pxref{Version Backups}). 770 completely local (@pxref{Version Backups}).
719 771